diff --git a/.agents/skills/hooks-admin/SKILL.md b/.agents/skills/hooks-admin/SKILL.md index 713a481c69..8409458c1c 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 30 tables and 12 custom operations +description: React Query hooks for the admin API — provides typed query and mutation hooks for 42 tables and 12 custom operations --- # hooks-admin -React Query hooks for the admin API — provides typed query and mutation hooks for 30 tables and 12 custom operations +React Query hooks for the admin API — provides typed query and mutation hooks for 42 tables and 12 custom operations ## Usage @@ -39,18 +39,28 @@ const { data, isLoading } = useAppAdminGrantsQuery({ See the `references/` directory for detailed per-entity API documentation: - [app-admin-grant](references/app-admin-grant.md) +- [app-capability](references/app-capability.md) +- [app-capability-default-capability](references/app-capability-default-capability.md) +- [app-capability-default](references/app-capability-default.md) +- [app-capability-default-grant](references/app-capability-default-grant.md) - [app-claimed-invite](references/app-claimed-invite.md) - [app-grant](references/app-grant.md) - [app-invite](references/app-invite.md) - [app-membership](references/app-membership.md) - [app-membership-default](references/app-membership-default.md) +- [app-membership-profile](references/app-membership-profile.md) - [app-owner-grant](references/app-owner-grant.md) -- [app-permission](references/app-permission.md) -- [app-permission-default](references/app-permission-default.md) -- [app-permission-default-grant](references/app-permission-default-grant.md) -- [app-permission-default-permission](references/app-permission-default-permission.md) +- [app-profile-capability](references/app-profile-capability.md) +- [app-profile](references/app-profile.md) +- [app-profile-definition-grant](references/app-profile-definition-grant.md) +- [app-profile-grant](references/app-profile-grant.md) +- [app-profile-template](references/app-profile-template.md) - [membership-type](references/membership-type.md) - [org-admin-grant](references/org-admin-grant.md) +- [org-capability](references/org-capability.md) +- [org-capability-default-capability](references/org-capability-default-capability.md) +- [org-capability-default](references/org-capability-default.md) +- [org-capability-default-grant](references/org-capability-default-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) - [org-claimed-invite](references/org-claimed-invite.md) @@ -62,21 +72,23 @@ See the `references/` directory for detailed per-entity API documentation: - [org-member-profile](references/org-member-profile.md) - [org-membership](references/org-membership.md) - [org-membership-default](references/org-membership-default.md) +- [org-membership-profile](references/org-membership-profile.md) - [org-membership-setting](references/org-membership-setting.md) - [org-owner-grant](references/org-owner-grant.md) -- [org-permission](references/org-permission.md) -- [org-permission-default](references/org-permission-default.md) -- [org-permission-default-grant](references/org-permission-default-grant.md) -- [org-permission-default-permission](references/org-permission-default-permission.md) -- [app-permissions-get-by-mask](references/app-permissions-get-by-mask.md) -- [app-permissions-get-mask](references/app-permissions-get-mask.md) -- [app-permissions-get-mask-by-names](references/app-permissions-get-mask-by-names.md) -- [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) +- [org-profile-capability](references/org-profile-capability.md) +- [org-profile](references/org-profile.md) +- [org-profile-definition-grant](references/org-profile-definition-grant.md) +- [org-profile-grant](references/org-profile-grant.md) +- [org-profile-template](references/org-profile-template.md) +- [app-capabilities-get-by-mask](references/app-capabilities-get-by-mask.md) +- [app-capabilities-get-mask](references/app-capabilities-get-mask.md) +- [app-capabilities-get-mask-by-names](references/app-capabilities-get-mask-by-names.md) +- [app-capabilities-get-padded-mask](references/app-capabilities-get-padded-mask.md) +- [org-capabilities-get-by-mask](references/org-capabilities-get-by-mask.md) +- [org-capabilities-get-mask](references/org-capabilities-get-mask.md) +- [org-capabilities-get-mask-by-names](references/org-capabilities-get-mask-by-names.md) +- [org-capabilities-get-padded-mask](references/org-capabilities-get-padded-mask.md) - [org-is-manager-of](references/org-is-manager-of.md) -- [org-permissions-get-by-mask](references/org-permissions-get-by-mask.md) -- [org-permissions-get-mask](references/org-permissions-get-mask.md) -- [org-permissions-get-mask-by-names](references/org-permissions-get-mask-by-names.md) -- [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [provision-bucket](references/provision-bucket.md) - [submit-app-invite-code](references/submit-app-invite-code.md) - [submit-org-invite-code](references/submit-org-invite-code.md) diff --git a/.agents/skills/hooks-admin/references/app-capabilities-get-by-mask.md b/.agents/skills/hooks-admin/references/app-capabilities-get-by-mask.md new file mode 100644 index 0000000000..98a59f1eec --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capabilities-get-by-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetByMask + + + +Reads and enables pagination through a set of `AppCapability`. + +## Usage + +```typescript +useAppCapabilitiesGetByMaskQuery({ after: '', first: '', mask: '', offset: '' }) +``` + +## Examples + +### Use useAppCapabilitiesGetByMaskQuery + +```typescript +const { data, isLoading } = useAppCapabilitiesGetByMaskQuery({ after: '', first: '', mask: '', offset: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capabilities-get-mask-by-names.md b/.agents/skills/hooks-admin/references/app-capabilities-get-mask-by-names.md new file mode 100644 index 0000000000..1403980999 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capabilities-get-mask-by-names.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetMaskByNames + + + +React Query query hook for appCapabilitiesGetMaskByNames + +## Usage + +```typescript +useAppCapabilitiesGetMaskByNamesQuery({ names: '' }) +``` + +## Examples + +### Use useAppCapabilitiesGetMaskByNamesQuery + +```typescript +const { data, isLoading } = useAppCapabilitiesGetMaskByNamesQuery({ names: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capabilities-get-mask.md b/.agents/skills/hooks-admin/references/app-capabilities-get-mask.md new file mode 100644 index 0000000000..b55470cf35 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capabilities-get-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetMask + + + +React Query query hook for appCapabilitiesGetMask + +## Usage + +```typescript +useAppCapabilitiesGetMaskQuery({ ids: '' }) +``` + +## Examples + +### Use useAppCapabilitiesGetMaskQuery + +```typescript +const { data, isLoading } = useAppCapabilitiesGetMaskQuery({ ids: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capabilities-get-padded-mask.md b/.agents/skills/hooks-admin/references/app-capabilities-get-padded-mask.md new file mode 100644 index 0000000000..5efa892c58 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capabilities-get-padded-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetPaddedMask + + + +React Query query hook for appCapabilitiesGetPaddedMask + +## Usage + +```typescript +useAppCapabilitiesGetPaddedMaskQuery({ mask: '' }) +``` + +## Examples + +### Use useAppCapabilitiesGetPaddedMaskQuery + +```typescript +const { data, isLoading } = useAppCapabilitiesGetPaddedMaskQuery({ mask: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capability-default-capability.md b/.agents/skills/hooks-admin/references/app-capability-default-capability.md new file mode 100644 index 0000000000..b3fd38491b --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capability-default-capability.md @@ -0,0 +1,34 @@ +# appCapabilityDefaultCapability + + + +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + +## Usage + +```typescript +useAppCapabilityDefaultCapabilitiesQuery({ selection: { fields: { capabilityId: true, createdAt: true, id: true, updatedAt: true } } }) +useAppCapabilityDefaultCapabilityQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, id: true, updatedAt: true } } }) +useCreateAppCapabilityDefaultCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateAppCapabilityDefaultCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteAppCapabilityDefaultCapabilityMutation({}) +``` + +## Examples + +### List all appCapabilityDefaultCapabilities + +```typescript +const { data, isLoading } = useAppCapabilityDefaultCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }, +}); +``` + +### Create a appCapabilityDefaultCapability + +```typescript +const { mutate } = useCreateAppCapabilityDefaultCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capability-default-grant.md b/.agents/skills/hooks-admin/references/app-capability-default-grant.md new file mode 100644 index 0000000000..ba6827a7fc --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capability-default-grant.md @@ -0,0 +1,34 @@ +# appCapabilityDefaultGrant + + + +Audit log of capability additions and removals from the defaults bitmask + +## Usage + +```typescript +useAppCapabilityDefaultGrantsQuery({ selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useAppCapabilityDefaultGrantQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useCreateAppCapabilityDefaultGrantMutation({ selection: { fields: { id: true } } }) +useUpdateAppCapabilityDefaultGrantMutation({ selection: { fields: { id: true } } }) +useDeleteAppCapabilityDefaultGrantMutation({}) +``` + +## Examples + +### List all appCapabilityDefaultGrants + +```typescript +const { data, isLoading } = useAppCapabilityDefaultGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); +``` + +### Create a appCapabilityDefaultGrant + +```typescript +const { mutate } = useCreateAppCapabilityDefaultGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', grantorId: '', isGrant: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capability-default.md b/.agents/skills/hooks-admin/references/app-capability-default.md new file mode 100644 index 0000000000..381863ffdc --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capability-default.md @@ -0,0 +1,34 @@ +# appCapabilityDefault + + + +Stores the default capability bitmask assigned to new members upon joining + +## Usage + +```typescript +useAppCapabilityDefaultsQuery({ selection: { fields: { capabilities: true, id: true } } }) +useAppCapabilityDefaultQuery({ id: '', selection: { fields: { capabilities: true, id: true } } }) +useCreateAppCapabilityDefaultMutation({ selection: { fields: { id: true } } }) +useUpdateAppCapabilityDefaultMutation({ selection: { fields: { id: true } } }) +useDeleteAppCapabilityDefaultMutation({}) +``` + +## Examples + +### List all appCapabilityDefaults + +```typescript +const { data, isLoading } = useAppCapabilityDefaultsQuery({ + selection: { fields: { capabilities: true, id: true } }, +}); +``` + +### Create a appCapabilityDefault + +```typescript +const { mutate } = useCreateAppCapabilityDefaultMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-capability.md b/.agents/skills/hooks-admin/references/app-capability.md new file mode 100644 index 0000000000..2da00982c9 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-capability.md @@ -0,0 +1,34 @@ +# appCapability + + + +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + +## Usage + +```typescript +useAppCapabilitiesQuery({ selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } } }) +useAppCapabilityQuery({ id: '', selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } } }) +useCreateAppCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateAppCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteAppCapabilityMutation({}) +``` + +## Examples + +### List all appCapabilities + +```typescript +const { data, isLoading } = useAppCapabilitiesQuery({ + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); +``` + +### Create a appCapability + +```typescript +const { mutate } = useCreateAppCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ bitnum: '', bitstr: '', description: '', kind: '', name: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-grant.md b/.agents/skills/hooks-admin/references/app-grant.md index cb760b9dcf..8d1691a04d 100644 --- a/.agents/skills/hooks-admin/references/app-grant.md +++ b/.agents/skills/hooks-admin/references/app-grant.md @@ -2,13 +2,13 @@ -Records of individual permission grants and revocations for members via bitmask +Records of individual capability grants and revocations for members via bitmask ## Usage ```typescript -useAppGrantsQuery({ selection: { fields: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } } }) -useAppGrantQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } } }) +useAppGrantsQuery({ selection: { fields: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useAppGrantQuery({ id: '', selection: { fields: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) useCreateAppGrantMutation({ selection: { fields: { id: true } } }) useUpdateAppGrantMutation({ selection: { fields: { id: true } } }) useDeleteAppGrantMutation({}) @@ -20,7 +20,7 @@ useDeleteAppGrantMutation({}) ```typescript const { data, isLoading } = useAppGrantsQuery({ - selection: { fields: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppGrantsQuery({ const { mutate } = useCreateAppGrantMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', grantorId: '', isGrant: '', permissions: '' }); +mutate({ actorId: '', capabilities: '', grantorId: '', isGrant: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/app-membership-profile.md b/.agents/skills/hooks-admin/references/app-membership-profile.md new file mode 100644 index 0000000000..01bbed9c73 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-membership-profile.md @@ -0,0 +1,34 @@ +# appMembershipProfile + + + +Every profile a membership holds; memberships.profile_id points at one of them + +## Usage + +```typescript +useAppMembershipProfilesQuery({ selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } } }) +useAppMembershipProfileQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } } }) +useCreateAppMembershipProfileMutation({ selection: { fields: { id: true } } }) +useUpdateAppMembershipProfileMutation({ selection: { fields: { id: true } } }) +useDeleteAppMembershipProfileMutation({}) +``` + +## Examples + +### List all appMembershipProfiles + +```typescript +const { data, isLoading } = useAppMembershipProfilesQuery({ + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a appMembershipProfile + +```typescript +const { mutate } = useCreateAppMembershipProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorId: '', membershipId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-membership.md b/.agents/skills/hooks-admin/references/app-membership.md index ddb058fb70..90d52f11da 100644 --- a/.agents/skills/hooks-admin/references/app-membership.md +++ b/.agents/skills/hooks-admin/references/app-membership.md @@ -2,13 +2,13 @@ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status ## Usage ```typescript -useAppMembershipsQuery({ selection: { fields: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } } }) -useAppMembershipQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } } }) +useAppMembershipsQuery({ selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } } }) +useAppMembershipQuery({ id: '', selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } } }) useCreateAppMembershipMutation({ selection: { fields: { id: true } } }) useUpdateAppMembershipMutation({ selection: { fields: { id: true } } }) useDeleteAppMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteAppMembershipMutation({}) ```typescript const { data, isLoading } = useAppMembershipsQuery({ - selection: { fields: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppMembershipsQuery({ const { mutate } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }); +mutate({ actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/app-profile-capability.md b/.agents/skills/hooks-admin/references/app-profile-capability.md new file mode 100644 index 0000000000..0e220a1d21 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-profile-capability.md @@ -0,0 +1,34 @@ +# appProfileCapability + + + +Join table linking profiles to individual capabilities they include + +## Usage + +```typescript +useAppProfileCapabilitiesQuery({ selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } } }) +useAppProfileCapabilityQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } } }) +useCreateAppProfileCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateAppProfileCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteAppProfileCapabilityMutation({}) +``` + +## Examples + +### List all appProfileCapabilities + +```typescript +const { data, isLoading } = useAppProfileCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a appProfileCapability + +```typescript +const { mutate } = useCreateAppProfileCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-profile-definition-grant.md b/.agents/skills/hooks-admin/references/app-profile-definition-grant.md new file mode 100644 index 0000000000..9de737fe79 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-profile-definition-grant.md @@ -0,0 +1,34 @@ +# appProfileDefinitionGrant + + + +Audit log of capability additions and removals from profile definitions + +## Usage + +```typescript +useAppProfileDefinitionGrantsQuery({ selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } } }) +useAppProfileDefinitionGrantQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } } }) +useCreateAppProfileDefinitionGrantMutation({ selection: { fields: { id: true } } }) +useUpdateAppProfileDefinitionGrantMutation({ selection: { fields: { id: true } } }) +useDeleteAppProfileDefinitionGrantMutation({}) +``` + +## Examples + +### List all appProfileDefinitionGrants + +```typescript +const { data, isLoading } = useAppProfileDefinitionGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a appProfileDefinitionGrant + +```typescript +const { mutate } = useCreateAppProfileDefinitionGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', grantorId: '', isGrant: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-profile-grant.md b/.agents/skills/hooks-admin/references/app-profile-grant.md new file mode 100644 index 0000000000..e07f61ac47 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-profile-grant.md @@ -0,0 +1,34 @@ +# appProfileGrant + + + +Audit log of profile assignments and revocations for members + +## Usage + +```typescript +useAppProfileGrantsQuery({ selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } } }) +useAppProfileGrantQuery({ id: '', selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } } }) +useCreateAppProfileGrantMutation({ selection: { fields: { id: true } } }) +useUpdateAppProfileGrantMutation({ selection: { fields: { id: true } } }) +useDeleteAppProfileGrantMutation({}) +``` + +## Examples + +### List all appProfileGrants + +```typescript +const { data, isLoading } = useAppProfileGrantsQuery({ + selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a appProfileGrant + +```typescript +const { mutate } = useCreateAppProfileGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ grantorId: '', isGrant: '', membershipId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-profile-template.md b/.agents/skills/hooks-admin/references/app-profile-template.md new file mode 100644 index 0000000000..3342902da0 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-profile-template.md @@ -0,0 +1,34 @@ +# appProfileTemplate + + + +Template profiles that are automatically seeded into new entities when created + +## Usage + +```typescript +useAppProfileTemplatesQuery({ selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } } }) +useAppProfileTemplateQuery({ id: '', selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } } }) +useCreateAppProfileTemplateMutation({ selection: { fields: { id: true } } }) +useUpdateAppProfileTemplateMutation({ selection: { fields: { id: true } } }) +useDeleteAppProfileTemplateMutation({}) +``` + +## Examples + +### List all appProfileTemplates + +```typescript +const { data, isLoading } = useAppProfileTemplatesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, +}); +``` + +### Create a appProfileTemplate + +```typescript +const { mutate } = useCreateAppProfileTemplateMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '', description: '', isDefault: '', name: '', slug: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/app-profile.md b/.agents/skills/hooks-admin/references/app-profile.md new file mode 100644 index 0000000000..8bb507b5f2 --- /dev/null +++ b/.agents/skills/hooks-admin/references/app-profile.md @@ -0,0 +1,34 @@ +# appProfile + + + +Named capability bundles (roles) that group multiple capabilities into reusable profiles + +## Usage + +```typescript +useAppProfilesQuery({ selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } } }) +useAppProfileQuery({ id: '', selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } } }) +useCreateAppProfileMutation({ selection: { fields: { id: true } } }) +useUpdateAppProfileMutation({ selection: { fields: { id: true } } }) +useDeleteAppProfileMutation({}) +``` + +## Examples + +### List all appProfiles + +```typescript +const { data, isLoading } = useAppProfilesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, +}); +``` + +### Create a appProfile + +```typescript +const { mutate } = useCreateAppProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capabilities-get-by-mask.md b/.agents/skills/hooks-admin/references/org-capabilities-get-by-mask.md new file mode 100644 index 0000000000..a3d0a06b4d --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capabilities-get-by-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetByMask + + + +Reads and enables pagination through a set of `OrgCapability`. + +## Usage + +```typescript +useOrgCapabilitiesGetByMaskQuery({ after: '', first: '', mask: '', offset: '' }) +``` + +## Examples + +### Use useOrgCapabilitiesGetByMaskQuery + +```typescript +const { data, isLoading } = useOrgCapabilitiesGetByMaskQuery({ after: '', first: '', mask: '', offset: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capabilities-get-mask-by-names.md b/.agents/skills/hooks-admin/references/org-capabilities-get-mask-by-names.md new file mode 100644 index 0000000000..df79843c4a --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capabilities-get-mask-by-names.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetMaskByNames + + + +React Query query hook for orgCapabilitiesGetMaskByNames + +## Usage + +```typescript +useOrgCapabilitiesGetMaskByNamesQuery({ names: '' }) +``` + +## Examples + +### Use useOrgCapabilitiesGetMaskByNamesQuery + +```typescript +const { data, isLoading } = useOrgCapabilitiesGetMaskByNamesQuery({ names: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capabilities-get-mask.md b/.agents/skills/hooks-admin/references/org-capabilities-get-mask.md new file mode 100644 index 0000000000..e4c2d30c2c --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capabilities-get-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetMask + + + +React Query query hook for orgCapabilitiesGetMask + +## Usage + +```typescript +useOrgCapabilitiesGetMaskQuery({ ids: '' }) +``` + +## Examples + +### Use useOrgCapabilitiesGetMaskQuery + +```typescript +const { data, isLoading } = useOrgCapabilitiesGetMaskQuery({ ids: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capabilities-get-padded-mask.md b/.agents/skills/hooks-admin/references/org-capabilities-get-padded-mask.md new file mode 100644 index 0000000000..ab652acf9b --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capabilities-get-padded-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetPaddedMask + + + +React Query query hook for orgCapabilitiesGetPaddedMask + +## Usage + +```typescript +useOrgCapabilitiesGetPaddedMaskQuery({ mask: '' }) +``` + +## Examples + +### Use useOrgCapabilitiesGetPaddedMaskQuery + +```typescript +const { data, isLoading } = useOrgCapabilitiesGetPaddedMaskQuery({ mask: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capability-default-capability.md b/.agents/skills/hooks-admin/references/org-capability-default-capability.md new file mode 100644 index 0000000000..fbd2d61562 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capability-default-capability.md @@ -0,0 +1,34 @@ +# orgCapabilityDefaultCapability + + + +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + +## Usage + +```typescript +useOrgCapabilityDefaultCapabilitiesQuery({ selection: { fields: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } } }) +useOrgCapabilityDefaultCapabilityQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } } }) +useCreateOrgCapabilityDefaultCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateOrgCapabilityDefaultCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteOrgCapabilityDefaultCapabilityMutation({}) +``` + +## Examples + +### List all orgCapabilityDefaultCapabilities + +```typescript +const { data, isLoading } = useOrgCapabilityDefaultCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }, +}); +``` + +### Create a orgCapabilityDefaultCapability + +```typescript +const { mutate } = useCreateOrgCapabilityDefaultCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', entityId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capability-default-grant.md b/.agents/skills/hooks-admin/references/org-capability-default-grant.md new file mode 100644 index 0000000000..a254c847b6 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capability-default-grant.md @@ -0,0 +1,34 @@ +# orgCapabilityDefaultGrant + + + +Audit log of capability additions and removals from the defaults bitmask + +## Usage + +```typescript +useOrgCapabilityDefaultGrantsQuery({ selection: { fields: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useOrgCapabilityDefaultGrantQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useCreateOrgCapabilityDefaultGrantMutation({ selection: { fields: { id: true } } }) +useUpdateOrgCapabilityDefaultGrantMutation({ selection: { fields: { id: true } } }) +useDeleteOrgCapabilityDefaultGrantMutation({}) +``` + +## Examples + +### List all orgCapabilityDefaultGrants + +```typescript +const { data, isLoading } = useOrgCapabilityDefaultGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); +``` + +### Create a orgCapabilityDefaultGrant + +```typescript +const { mutate } = useCreateOrgCapabilityDefaultGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', entityId: '', grantorId: '', isGrant: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capability-default.md b/.agents/skills/hooks-admin/references/org-capability-default.md new file mode 100644 index 0000000000..de066decb7 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capability-default.md @@ -0,0 +1,34 @@ +# orgCapabilityDefault + + + +Stores the default capability bitmask assigned to new members upon joining + +## Usage + +```typescript +useOrgCapabilityDefaultsQuery({ selection: { fields: { capabilities: true, entityId: true, id: true } } }) +useOrgCapabilityDefaultQuery({ id: '', selection: { fields: { capabilities: true, entityId: true, id: true } } }) +useCreateOrgCapabilityDefaultMutation({ selection: { fields: { id: true } } }) +useUpdateOrgCapabilityDefaultMutation({ selection: { fields: { id: true } } }) +useDeleteOrgCapabilityDefaultMutation({}) +``` + +## Examples + +### List all orgCapabilityDefaults + +```typescript +const { data, isLoading } = useOrgCapabilityDefaultsQuery({ + selection: { fields: { capabilities: true, entityId: true, id: true } }, +}); +``` + +### Create a orgCapabilityDefault + +```typescript +const { mutate } = useCreateOrgCapabilityDefaultMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '', entityId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-capability.md b/.agents/skills/hooks-admin/references/org-capability.md new file mode 100644 index 0000000000..18ee889755 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-capability.md @@ -0,0 +1,34 @@ +# orgCapability + + + +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + +## Usage + +```typescript +useOrgCapabilitiesQuery({ selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } } }) +useOrgCapabilityQuery({ id: '', selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } } }) +useCreateOrgCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateOrgCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteOrgCapabilityMutation({}) +``` + +## Examples + +### List all orgCapabilities + +```typescript +const { data, isLoading } = useOrgCapabilitiesQuery({ + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); +``` + +### Create a orgCapability + +```typescript +const { mutate } = useCreateOrgCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ bitnum: '', bitstr: '', description: '', kind: '', name: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-grant.md b/.agents/skills/hooks-admin/references/org-grant.md index cdecbe6bde..7ddd74f47a 100644 --- a/.agents/skills/hooks-admin/references/org-grant.md +++ b/.agents/skills/hooks-admin/references/org-grant.md @@ -2,13 +2,13 @@ -Records of individual permission grants and revocations for members via bitmask +Records of individual capability grants and revocations for members via bitmask ## Usage ```typescript -useOrgGrantsQuery({ selection: { fields: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } } }) -useOrgGrantQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } } }) +useOrgGrantsQuery({ selection: { fields: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) +useOrgGrantQuery({ id: '', selection: { fields: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } } }) useCreateOrgGrantMutation({ selection: { fields: { id: true } } }) useUpdateOrgGrantMutation({ selection: { fields: { id: true } } }) useDeleteOrgGrantMutation({}) @@ -20,7 +20,7 @@ useDeleteOrgGrantMutation({}) ```typescript const { data, isLoading } = useOrgGrantsQuery({ - selection: { fields: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useOrgGrantsQuery({ const { mutate } = useCreateOrgGrantMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }); +mutate({ actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/org-membership-profile.md b/.agents/skills/hooks-admin/references/org-membership-profile.md new file mode 100644 index 0000000000..3d6bc3f020 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-membership-profile.md @@ -0,0 +1,34 @@ +# orgMembershipProfile + + + +Every profile a membership holds; memberships.profile_id points at one of them + +## Usage + +```typescript +useOrgMembershipProfilesQuery({ selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } } }) +useOrgMembershipProfileQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } } }) +useCreateOrgMembershipProfileMutation({ selection: { fields: { id: true } } }) +useUpdateOrgMembershipProfileMutation({ selection: { fields: { id: true } } }) +useDeleteOrgMembershipProfileMutation({}) +``` + +## Examples + +### List all orgMembershipProfiles + +```typescript +const { data, isLoading } = useOrgMembershipProfilesQuery({ + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a orgMembershipProfile + +```typescript +const { mutate } = useCreateOrgMembershipProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorId: '', membershipId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-membership.md b/.agents/skills/hooks-admin/references/org-membership.md index e899998aac..5b7d33ae2d 100644 --- a/.agents/skills/hooks-admin/references/org-membership.md +++ b/.agents/skills/hooks-admin/references/org-membership.md @@ -2,13 +2,13 @@ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status ## Usage ```typescript -useOrgMembershipsQuery({ selection: { fields: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } } }) -useOrgMembershipQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } } }) +useOrgMembershipsQuery({ selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } } }) +useOrgMembershipQuery({ id: '', selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } } }) useCreateOrgMembershipMutation({ selection: { fields: { id: true } } }) useUpdateOrgMembershipMutation({ selection: { fields: { id: true } } }) useDeleteOrgMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteOrgMembershipMutation({}) ```typescript const { data, isLoading } = useOrgMembershipsQuery({ - selection: { fields: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useOrgMembershipsQuery({ const { mutate } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }); +mutate({ actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/org-profile-capability.md b/.agents/skills/hooks-admin/references/org-profile-capability.md new file mode 100644 index 0000000000..bb0d69f345 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-profile-capability.md @@ -0,0 +1,34 @@ +# orgProfileCapability + + + +Join table linking profiles to individual capabilities they include + +## Usage + +```typescript +useOrgProfileCapabilitiesQuery({ selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } } }) +useOrgProfileCapabilityQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } } }) +useCreateOrgProfileCapabilityMutation({ selection: { fields: { id: true } } }) +useUpdateOrgProfileCapabilityMutation({ selection: { fields: { id: true } } }) +useDeleteOrgProfileCapabilityMutation({}) +``` + +## Examples + +### List all orgProfileCapabilities + +```typescript +const { data, isLoading } = useOrgProfileCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a orgProfileCapability + +```typescript +const { mutate } = useCreateOrgProfileCapabilityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-profile-definition-grant.md b/.agents/skills/hooks-admin/references/org-profile-definition-grant.md new file mode 100644 index 0000000000..4dc00a46a6 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-profile-definition-grant.md @@ -0,0 +1,34 @@ +# orgProfileDefinitionGrant + + + +Audit log of capability additions and removals from profile definitions + +## Usage + +```typescript +useOrgProfileDefinitionGrantsQuery({ selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } } }) +useOrgProfileDefinitionGrantQuery({ id: '', selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } } }) +useCreateOrgProfileDefinitionGrantMutation({ selection: { fields: { id: true } } }) +useUpdateOrgProfileDefinitionGrantMutation({ selection: { fields: { id: true } } }) +useDeleteOrgProfileDefinitionGrantMutation({}) +``` + +## Examples + +### List all orgProfileDefinitionGrants + +```typescript +const { data, isLoading } = useOrgProfileDefinitionGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a orgProfileDefinitionGrant + +```typescript +const { mutate } = useCreateOrgProfileDefinitionGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilityId: '', grantorId: '', isGrant: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-profile-grant.md b/.agents/skills/hooks-admin/references/org-profile-grant.md new file mode 100644 index 0000000000..abfffbc947 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-profile-grant.md @@ -0,0 +1,34 @@ +# orgProfileGrant + + + +Audit log of profile assignments and revocations for members + +## Usage + +```typescript +useOrgProfileGrantsQuery({ selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } } }) +useOrgProfileGrantQuery({ id: '', selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } } }) +useCreateOrgProfileGrantMutation({ selection: { fields: { id: true } } }) +useUpdateOrgProfileGrantMutation({ selection: { fields: { id: true } } }) +useDeleteOrgProfileGrantMutation({}) +``` + +## Examples + +### List all orgProfileGrants + +```typescript +const { data, isLoading } = useOrgProfileGrantsQuery({ + selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, +}); +``` + +### Create a orgProfileGrant + +```typescript +const { mutate } = useCreateOrgProfileGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-profile-template.md b/.agents/skills/hooks-admin/references/org-profile-template.md new file mode 100644 index 0000000000..84b0c10a80 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-profile-template.md @@ -0,0 +1,34 @@ +# orgProfileTemplate + + + +Template profiles that are automatically seeded into new entities when created + +## Usage + +```typescript +useOrgProfileTemplatesQuery({ selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } } }) +useOrgProfileTemplateQuery({ id: '', selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } } }) +useCreateOrgProfileTemplateMutation({ selection: { fields: { id: true } } }) +useUpdateOrgProfileTemplateMutation({ selection: { fields: { id: true } } }) +useDeleteOrgProfileTemplateMutation({}) +``` + +## Examples + +### List all orgProfileTemplates + +```typescript +const { data, isLoading } = useOrgProfileTemplatesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, +}); +``` + +### Create a orgProfileTemplate + +```typescript +const { mutate } = useCreateOrgProfileTemplateMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '', description: '', isDefault: '', name: '', slug: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-profile.md b/.agents/skills/hooks-admin/references/org-profile.md new file mode 100644 index 0000000000..e25055bad8 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-profile.md @@ -0,0 +1,34 @@ +# orgProfile + + + +Named capability bundles (roles) that group multiple capabilities into reusable profiles + +## Usage + +```typescript +useOrgProfilesQuery({ selection: { fields: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } } }) +useOrgProfileQuery({ id: '', selection: { fields: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } } }) +useCreateOrgProfileMutation({ selection: { fields: { id: true } } }) +useUpdateOrgProfileMutation({ selection: { fields: { id: true } } }) +useDeleteOrgProfileMutation({}) +``` + +## Examples + +### List all orgProfiles + +```typescript +const { data, isLoading } = useOrgProfilesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, +}); +``` + +### Create a orgProfile + +```typescript +const { mutate } = useCreateOrgProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }); +``` diff --git a/.agents/skills/hooks-api/SKILL.md b/.agents/skills/hooks-api/SKILL.md index 5198cc125d..e7fc0db982 100644 --- a/.agents/skills/hooks-api/SKILL.md +++ b/.agents/skills/hooks-api/SKILL.md @@ -1,25 +1,25 @@ --- name: hooks-api -description: React Query hooks for the api API — provides typed query and mutation hooks for 80 tables and 17 custom operations +description: React Query hooks for the api API — provides typed query and mutation hooks for 86 tables and 17 custom operations --- # hooks-api -React Query hooks for the api API — provides typed query and mutation hooks for 80 tables and 17 custom operations +React Query hooks for the api API — provides typed query and mutation hooks for 86 tables and 17 custom operations ## Usage ```typescript // Import hooks -import { useApiSchemasQuery } from './hooks'; +import { useApisQuery } from './hooks'; // Query hooks: useQuery, usesQuery // Mutation hooks: useCreateMutation, useUpdateMutation, useDeleteMutation // Bulk mutation hooks (when enabled): useBulkCreateMutation, useBulkUpsertMutation, etc. -const { data, isLoading } = useApiSchemasQuery({ +const { data, isLoading } = useApisQuery({ selection: { fields: { id: true } }, }); ``` @@ -29,7 +29,7 @@ const { data, isLoading } = useApiSchemasQuery({ ### Query records ```typescript -const { data, isLoading } = useApiSchemasQuery({ +const { data, isLoading } = useApisQuery({ selection: { fields: { id: true } }, }); ``` @@ -38,10 +38,11 @@ const { data, isLoading } = useApiSchemasQuery({ See the `references/` directory for detailed per-entity API documentation: +- [api](references/api.md) - [api-schema](references/api-schema.md) - [api-setting](references/api-setting.md) -- [apis](references/apis.md) -- [ast-migration](references/ast-migration.md) +- [app-component](references/app-component.md) +- [app](references/app.md) - [check-constraint](references/check-constraint.md) - [composite-type](references/composite-type.md) - [cors-setting](references/cors-setting.md) @@ -54,6 +55,9 @@ See the `references/` directory for detailed per-entity API documentation: - [domain-event](references/domain-event.md) - [domain-type](references/domain-type.md) - [domain-verification](references/domain-verification.md) +- [email-identity](references/email-identity.md) +- [email-provider-account](references/email-provider-account.md) +- [email-site-identity](references/email-site-identity.md) - [embedding-chunk](references/embedding-chunk.md) - [enum](references/enum.md) - [exclusion-constraint](references/exclusion-constraint.md) @@ -70,13 +74,16 @@ See the `references/` directory for detailed per-entity API documentation: - [node-type-registry](references/node-type-registry.md) - [page](references/page.md) - [partition](references/partition.md) +- [platform-api](references/platform-api.md) - [platform-api-schema](references/platform-api-schema.md) - [platform-api-setting](references/platform-api-setting.md) -- [platform-apis](references/platform-apis.md) - [platform-cors-setting](references/platform-cors-setting.md) - [platform-domain](references/platform-domain.md) - [platform-domain-event](references/platform-domain-event.md) - [platform-domain-verification](references/platform-domain-verification.md) +- [platform-email-identity](references/platform-email-identity.md) +- [platform-email-provider-account](references/platform-email-provider-account.md) +- [platform-email-site-identity](references/platform-email-site-identity.md) - [platform-managed-domain](references/platform-managed-domain.md) - [platform-page](references/platform-page.md) - [platform-site-app-link](references/platform-site-app-link.md) @@ -104,7 +111,6 @@ See the `references/` directory for detailed per-entity API documentation: - [site-theme](references/site-theme.md) - [site-web-config](references/site-web-config.md) - [spatial-relation](references/spatial-relation.md) -- [sql-action](references/sql-action.md) - [table-behavior](references/table-behavior.md) - [table](references/table.md) - [table-grant](references/table-grant.md) @@ -124,14 +130,14 @@ See the `references/` directory for detailed per-entity API documentation: - [resolve-http-route](references/resolve-http-route.md) - [resolve-route](references/resolve-route.md) - [resolve-site-app-links](references/resolve-site-app-links.md) -- [accept-database-transfer](references/accept-database-transfer.md) - [apply-rls](references/apply-rls.md) -- [cancel-database-transfer](references/cancel-database-transfer.md) +- [apps-install-app](references/apps-install-app.md) +- [apps-uninstall-app](references/apps-uninstall-app.md) +- [apps-upgrade-app](references/apps-upgrade-app.md) - [domains-assign-subdomain](references/domains-assign-subdomain.md) - [platform-domains-assign-subdomain](references/platform-domains-assign-subdomain.md) - [platform-sites-provision-static-site](references/platform-sites-provision-static-site.md) - [provision-bucket](references/provision-bucket.md) -- [reject-database-transfer](references/reject-database-transfer.md) - [request-database](references/request-database.md) - [set-field-order](references/set-field-order.md) - [sites-provision-static-site](references/sites-provision-static-site.md) diff --git a/.agents/skills/hooks-api/references/app-component.md b/.agents/skills/hooks-api/references/app-component.md new file mode 100644 index 0000000000..f6646203e8 --- /dev/null +++ b/.agents/skills/hooks-api/references/app-component.md @@ -0,0 +1,34 @@ +# appComponent + + + +App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + +## Usage + +```typescript +useAppComponentsQuery({ selection: { fields: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } } }) +useAppComponentQuery({ id: '', selection: { fields: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } } }) +useCreateAppComponentMutation({ selection: { fields: { id: true } } }) +useUpdateAppComponentMutation({ selection: { fields: { id: true } } }) +useDeleteAppComponentMutation({}) +``` + +## Examples + +### List all appComponents + +```typescript +const { data, isLoading } = useAppComponentsQuery({ + selection: { fields: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }, +}); +``` + +### Create a appComponent + +```typescript +const { mutate } = useCreateAppComponentMutation({ + selection: { fields: { id: true } }, +}); +mutate({ appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }); +``` diff --git a/.agents/skills/hooks-api/references/app.md b/.agents/skills/hooks-api/references/app.md index 685bf7b9cf..5bb394ed19 100644 --- a/.agents/skills/hooks-api/references/app.md +++ b/.agents/skills/hooks-api/references/app.md @@ -2,13 +2,13 @@ -Mobile and native app configuration linked to a site, including store links and identifiers +App aggregates: thin identity rows whose components are global catalog references ## Usage ```typescript -useAppsQuery({ selection: { fields: { appIdPrefix: true, appImage: true, appStoreId: true, appStoreLink: true, databaseId: true, id: true, name: true, playStoreLink: true, siteId: true } } }) -useAppQuery({ id: '', selection: { fields: { appIdPrefix: true, appImage: true, appStoreId: true, appStoreLink: true, databaseId: true, id: true, name: true, playStoreLink: true, siteId: true } } }) +useAppsQuery({ selection: { fields: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } } }) +useAppQuery({ id: '', selection: { fields: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } } }) useCreateAppMutation({ selection: { fields: { id: true } } }) useUpdateAppMutation({ selection: { fields: { id: true } } }) useDeleteAppMutation({}) @@ -20,7 +20,7 @@ useDeleteAppMutation({}) ```typescript const { data, isLoading } = useAppsQuery({ - selection: { fields: { appIdPrefix: true, appImage: true, appStoreId: true, appStoreLink: true, databaseId: true, id: true, name: true, playStoreLink: true, siteId: true } }, + selection: { fields: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppsQuery({ const { mutate } = useCreateAppMutation({ selection: { fields: { id: true } }, }); -mutate({ appIdPrefix: '', appImage: '', appStoreId: '', appStoreLink: '', databaseId: '', name: '', playStoreLink: '', siteId: '' }); +mutate({ config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }); ``` diff --git a/.agents/skills/hooks-api/references/apps-install-app.md b/.agents/skills/hooks-api/references/apps-install-app.md new file mode 100644 index 0000000000..de5d653c2b --- /dev/null +++ b/.agents/skills/hooks-api/references/apps-install-app.md @@ -0,0 +1,20 @@ +# appsInstallApp + + + +React Query mutation hook for appsInstallApp + +## Usage + +```typescript +const { mutate } = useAppsInstallAppMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useAppsInstallAppMutation + +```typescript +const { mutate, isLoading } = useAppsInstallAppMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-api/references/apps-uninstall-app.md b/.agents/skills/hooks-api/references/apps-uninstall-app.md new file mode 100644 index 0000000000..68664998bf --- /dev/null +++ b/.agents/skills/hooks-api/references/apps-uninstall-app.md @@ -0,0 +1,20 @@ +# appsUninstallApp + + + +React Query mutation hook for appsUninstallApp + +## Usage + +```typescript +const { mutate } = useAppsUninstallAppMutation(); mutate({ input: { targetAppId: '' } }); +``` + +## Examples + +### Use useAppsUninstallAppMutation + +```typescript +const { mutate, isLoading } = useAppsUninstallAppMutation(); +mutate({ input: { targetAppId: '' } }); +``` diff --git a/.agents/skills/hooks-api/references/apps-upgrade-app.md b/.agents/skills/hooks-api/references/apps-upgrade-app.md new file mode 100644 index 0000000000..5b19254d70 --- /dev/null +++ b/.agents/skills/hooks-api/references/apps-upgrade-app.md @@ -0,0 +1,20 @@ +# appsUpgradeApp + + + +React Query mutation hook for appsUpgradeApp + +## Usage + +```typescript +const { mutate } = useAppsUpgradeAppMutation(); mutate({ input: { newParams: '', targetAppId: '' } }); +``` + +## Examples + +### Use useAppsUpgradeAppMutation + +```typescript +const { mutate, isLoading } = useAppsUpgradeAppMutation(); +mutate({ input: { newParams: '', targetAppId: '' } }); +``` diff --git a/.agents/skills/hooks-api/references/email-identity.md b/.agents/skills/hooks-api/references/email-identity.md new file mode 100644 index 0000000000..de9ba39a61 --- /dev/null +++ b/.agents/skills/hooks-api/references/email-identity.md @@ -0,0 +1,34 @@ +# emailIdentity + + + +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + +## Usage + +```typescript +useEmailIdentitiesQuery({ selection: { fields: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } } }) +useEmailIdentityQuery({ id: '', selection: { fields: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } } }) +useCreateEmailIdentityMutation({ selection: { fields: { id: true } } }) +useUpdateEmailIdentityMutation({ selection: { fields: { id: true } } }) +useDeleteEmailIdentityMutation({}) +``` + +## Examples + +### List all emailIdentities + +```typescript +const { data, isLoading } = useEmailIdentitiesQuery({ + selection: { fields: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); +``` + +### Create a emailIdentity + +```typescript +const { mutate } = useCreateEmailIdentityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }); +``` diff --git a/.agents/skills/hooks-api/references/email-provider-account.md b/.agents/skills/hooks-api/references/email-provider-account.md new file mode 100644 index 0000000000..c2b2c674fe --- /dev/null +++ b/.agents/skills/hooks-api/references/email-provider-account.md @@ -0,0 +1,34 @@ +# emailProviderAccount + + + +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + +## Usage + +```typescript +useEmailProviderAccountsQuery({ selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } } }) +useEmailProviderAccountQuery({ id: '', selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } } }) +useCreateEmailProviderAccountMutation({ selection: { fields: { id: true } } }) +useUpdateEmailProviderAccountMutation({ selection: { fields: { id: true } } }) +useDeleteEmailProviderAccountMutation({}) +``` + +## Examples + +### List all emailProviderAccounts + +```typescript +const { data, isLoading } = useEmailProviderAccountsQuery({ + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); +``` + +### Create a emailProviderAccount + +```typescript +const { mutate } = useCreateEmailProviderAccountMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }); +``` diff --git a/.agents/skills/hooks-api/references/email-site-identity.md b/.agents/skills/hooks-api/references/email-site-identity.md new file mode 100644 index 0000000000..5366c80c30 --- /dev/null +++ b/.agents/skills/hooks-api/references/email-site-identity.md @@ -0,0 +1,34 @@ +# emailSiteIdentity + + + +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + +## Usage + +```typescript +useEmailSiteIdentitiesQuery({ selection: { fields: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } } }) +useEmailSiteIdentityQuery({ id: '', selection: { fields: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } } }) +useCreateEmailSiteIdentityMutation({ selection: { fields: { id: true } } }) +useUpdateEmailSiteIdentityMutation({ selection: { fields: { id: true } } }) +useDeleteEmailSiteIdentityMutation({}) +``` + +## Examples + +### List all emailSiteIdentities + +```typescript +const { data, isLoading } = useEmailSiteIdentitiesQuery({ + selection: { fields: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); +``` + +### Create a emailSiteIdentity + +```typescript +const { mutate } = useCreateEmailSiteIdentityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', emailIdentityId: '', siteId: '' }); +``` diff --git a/.agents/skills/hooks-api/references/platform-email-identity.md b/.agents/skills/hooks-api/references/platform-email-identity.md new file mode 100644 index 0000000000..946f9c8577 --- /dev/null +++ b/.agents/skills/hooks-api/references/platform-email-identity.md @@ -0,0 +1,34 @@ +# platformEmailIdentity + + + +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + +## Usage + +```typescript +usePlatformEmailIdentitiesQuery({ selection: { fields: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } } }) +usePlatformEmailIdentityQuery({ id: '', selection: { fields: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } } }) +useCreatePlatformEmailIdentityMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformEmailIdentityMutation({ selection: { fields: { id: true } } }) +useDeletePlatformEmailIdentityMutation({}) +``` + +## Examples + +### List all platformEmailIdentities + +```typescript +const { data, isLoading } = usePlatformEmailIdentitiesQuery({ + selection: { fields: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); +``` + +### Create a platformEmailIdentity + +```typescript +const { mutate } = useCreatePlatformEmailIdentityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }); +``` diff --git a/.agents/skills/hooks-api/references/platform-email-provider-account.md b/.agents/skills/hooks-api/references/platform-email-provider-account.md new file mode 100644 index 0000000000..873e5b085f --- /dev/null +++ b/.agents/skills/hooks-api/references/platform-email-provider-account.md @@ -0,0 +1,34 @@ +# platformEmailProviderAccount + + + +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + +## Usage + +```typescript +usePlatformEmailProviderAccountsQuery({ selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } } }) +usePlatformEmailProviderAccountQuery({ id: '', selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } } }) +useCreatePlatformEmailProviderAccountMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformEmailProviderAccountMutation({ selection: { fields: { id: true } } }) +useDeletePlatformEmailProviderAccountMutation({}) +``` + +## Examples + +### List all platformEmailProviderAccounts + +```typescript +const { data, isLoading } = usePlatformEmailProviderAccountsQuery({ + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); +``` + +### Create a platformEmailProviderAccount + +```typescript +const { mutate } = useCreatePlatformEmailProviderAccountMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }); +``` diff --git a/.agents/skills/hooks-api/references/platform-email-site-identity.md b/.agents/skills/hooks-api/references/platform-email-site-identity.md new file mode 100644 index 0000000000..c142dfa2f3 --- /dev/null +++ b/.agents/skills/hooks-api/references/platform-email-site-identity.md @@ -0,0 +1,34 @@ +# platformEmailSiteIdentity + + + +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + +## Usage + +```typescript +usePlatformEmailSiteIdentitiesQuery({ selection: { fields: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } } }) +usePlatformEmailSiteIdentityQuery({ id: '', selection: { fields: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } } }) +useCreatePlatformEmailSiteIdentityMutation({ selection: { fields: { id: true } } }) +useUpdatePlatformEmailSiteIdentityMutation({ selection: { fields: { id: true } } }) +useDeletePlatformEmailSiteIdentityMutation({}) +``` + +## Examples + +### List all platformEmailSiteIdentities + +```typescript +const { data, isLoading } = usePlatformEmailSiteIdentitiesQuery({ + selection: { fields: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); +``` + +### Create a platformEmailSiteIdentity + +```typescript +const { mutate } = useCreatePlatformEmailSiteIdentityMutation({ + selection: { fields: { id: true } }, +}); +mutate({ emailIdentityId: '', siteId: '' }); +``` diff --git a/.agents/skills/hooks-auth/SKILL.md b/.agents/skills/hooks-auth/SKILL.md index b8795add5e..3bf7851dd2 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 13 tables and 35 custom operations +description: React Query hooks for the auth API — provides typed query and mutation hooks for 13 tables and 37 custom operations --- # hooks-auth -React Query hooks for the auth API — provides typed query and mutation hooks for 13 tables and 35 custom operations +React Query hooks for the auth API — provides typed query and mutation hooks for 13 tables and 37 custom operations ## Usage @@ -79,9 +79,11 @@ See the `references/` directory for detailed per-entity API documentation: - [set-password](references/set-password.md) - [sign-in](references/sign-in.md) - [sign-in-cross-origin](references/sign-in-cross-origin.md) +- [sign-in-magic-link](references/sign-in-magic-link.md) - [sign-in-sms-otp](references/sign-in-sms-otp.md) - [sign-out](references/sign-out.md) - [sign-up](references/sign-up.md) +- [sign-up-magic-link](references/sign-up-magic-link.md) - [sign-up-sms](references/sign-up-sms.md) - [verify-email](references/verify-email.md) - [verify-password](references/verify-password.md) diff --git a/.agents/skills/hooks-auth/references/principal-scope-override.md b/.agents/skills/hooks-auth/references/principal-scope-override.md index e9b83284b1..05e8536225 100644 --- a/.agents/skills/hooks-auth/references/principal-scope-override.md +++ b/.agents/skills/hooks-auth/references/principal-scope-override.md @@ -2,7 +2,7 @@ -Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. +Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. ## Usage diff --git a/.agents/skills/hooks-auth/references/sign-in-magic-link.md b/.agents/skills/hooks-auth/references/sign-in-magic-link.md new file mode 100644 index 0000000000..cedaeda6f3 --- /dev/null +++ b/.agents/skills/hooks-auth/references/sign-in-magic-link.md @@ -0,0 +1,20 @@ +# signInMagicLink + + + +React Query mutation hook for signInMagicLink + +## Usage + +```typescript +const { mutate } = useSignInMagicLinkMutation(); mutate({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }); +``` + +## Examples + +### Use useSignInMagicLinkMutation + +```typescript +const { mutate, isLoading } = useSignInMagicLinkMutation(); +mutate({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/sign-up-magic-link.md b/.agents/skills/hooks-auth/references/sign-up-magic-link.md new file mode 100644 index 0000000000..1680db401a --- /dev/null +++ b/.agents/skills/hooks-auth/references/sign-up-magic-link.md @@ -0,0 +1,20 @@ +# signUpMagicLink + + + +React Query mutation hook for signUpMagicLink + +## Usage + +```typescript +const { mutate } = useSignUpMagicLinkMutation(); mutate({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }); +``` + +## Examples + +### Use useSignUpMagicLinkMutation + +```typescript +const { mutate, isLoading } = useSignUpMagicLinkMutation(); +mutate({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }); +``` diff --git a/.agents/skills/hooks-compute/SKILL.md b/.agents/skills/hooks-compute/SKILL.md index 38b33fa7b0..d233091158 100644 --- a/.agents/skills/hooks-compute/SKILL.md +++ b/.agents/skills/hooks-compute/SKILL.md @@ -1,25 +1,25 @@ --- name: hooks-compute -description: React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 29 custom operations +description: React Query hooks for the compute API — provides typed query and mutation hooks for 70 tables and 38 custom operations --- # hooks-compute -React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 29 custom operations +React Query hooks for the compute API — provides typed query and mutation hooks for 70 tables and 38 custom operations ## Usage ```typescript // Import hooks -import { useDbPresetsQuery } from './hooks'; +import { useContentPresetsQuery } from './hooks'; // Query hooks: useQuery, usesQuery // Mutation hooks: useCreateMutation, useUpdateMutation, useDeleteMutation // Bulk mutation hooks (when enabled): useBulkCreateMutation, useBulkUpsertMutation, etc. -const { data, isLoading } = useDbPresetsQuery({ +const { data, isLoading } = useContentPresetsQuery({ selection: { fields: { id: true } }, }); ``` @@ -29,7 +29,7 @@ const { data, isLoading } = useDbPresetsQuery({ ### Query records ```typescript -const { data, isLoading } = useDbPresetsQuery({ +const { data, isLoading } = useContentPresetsQuery({ selection: { fields: { id: true } }, }); ``` @@ -38,6 +38,7 @@ const { data, isLoading } = useDbPresetsQuery({ See the `references/` directory for detailed per-entity API documentation: +- [content-preset](references/content-preset.md) - [db-preset](references/db-preset.md) - [function-api-binding](references/function-api-binding.md) - [function-capability-binding](references/function-capability-binding.md) @@ -117,12 +118,19 @@ See the `references/` directory for detailed per-entity API documentation: - [import-graph-json](references/import-graph-json.md) - [infra-init-empty-repo](references/infra-init-empty-repo.md) - [infra-insert-node-at-path](references/infra-insert-node-at-path.md) +- [infra-insert-nodes-at-paths](references/infra-insert-nodes-at-paths.md) +- [infra-set-and-commit](references/infra-set-and-commit.md) - [infra-set-data-at-path](references/infra-set-data-at-path.md) +- [infra-set-many-and-commit](references/infra-set-many-and-commit.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [platform-resource-installations-install](references/platform-resource-installations-install.md) - [platform-resource-installations-rollback](references/platform-resource-installations-rollback.md) - [platform-resource-installations-uninstall](references/platform-resource-installations-uninstall.md) @@ -133,6 +141,8 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-installations-uninstall](references/resource-installations-uninstall.md) - [resource-installations-upgrade](references/resource-installations-upgrade.md) - [save-graph](references/save-graph.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) - [start-execution](references/start-execution.md) - [validate-function-graph](references/validate-function-graph.md) diff --git a/.agents/skills/hooks-compute/references/content-preset.md b/.agents/skills/hooks-compute/references/content-preset.md new file mode 100644 index 0000000000..e88ddebe7e --- /dev/null +++ b/.agents/skills/hooks-compute/references/content-preset.md @@ -0,0 +1,34 @@ +# contentPreset + + + +Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + +## Usage + +```typescript +useContentPresetsQuery({ selection: { fields: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } } }) +useContentPresetQuery({ id: '', selection: { fields: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } } }) +useCreateContentPresetMutation({ selection: { fields: { id: true } } }) +useUpdateContentPresetMutation({ selection: { fields: { id: true } } }) +useDeleteContentPresetMutation({}) +``` + +## Examples + +### List all contentPresets + +```typescript +const { data, isLoading } = useContentPresetsQuery({ + selection: { fields: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }, +}); +``` + +### Create a contentPreset + +```typescript +const { mutate } = useCreateContentPresetMutation({ + selection: { fields: { id: true } }, +}); +mutate({ active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/function-definition.md b/.agents/skills/hooks-compute/references/function-definition.md index 0bfc2e6e4e..93cbce3c63 100644 --- a/.agents/skills/hooks-compute/references/function-definition.md +++ b/.agents/skills/hooks-compute/references/function-definition.md @@ -7,8 +7,8 @@ Function definitions — registered cloud functions with routing, queue, and ret ## Usage ```typescript -useFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) -useFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +useFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +useFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useUpdateFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useDeleteFunctionDefinitionMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionDefinitionMutation({}) ```typescript const { data, isLoading } = useFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionDefinitionsQuery({ const { mutate } = useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -mutate({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +mutate({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/function-deployment.md b/.agents/skills/hooks-compute/references/function-deployment.md index f983fea8c6..d0ac57d720 100644 --- a/.agents/skills/hooks-compute/references/function-deployment.md +++ b/.agents/skills/hooks-compute/references/function-deployment.md @@ -7,8 +7,8 @@ Function deployment bindings — ties a handler image to a namespace for Knative ## Usage ```typescript -useFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) -useFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +useFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +useFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useUpdateFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useDeleteFunctionDeploymentMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionDeploymentMutation({}) ```typescript const { data, isLoading } = useFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionDeploymentsQuery({ const { mutate } = useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -mutate({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +mutate({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..b48b858b5e --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# infraInsertNodesAtPaths + + + +React Query mutation hook for infraInsertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInfraInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInfraInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInfraInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/infra-set-and-commit.md b/.agents/skills/hooks-compute/references/infra-set-and-commit.md new file mode 100644 index 0000000000..a64e1bf66f --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-set-and-commit.md @@ -0,0 +1,20 @@ +# infraSetAndCommit + + + +React Query mutation hook for infraSetAndCommit + +## Usage + +```typescript +const { mutate } = useInfraSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInfraSetAndCommitMutation + +```typescript +const { mutate, isLoading } = useInfraSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md b/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md new file mode 100644 index 0000000000..3ada7f8d91 --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md @@ -0,0 +1,20 @@ +# infraSetManyAndCommit + + + +React Query mutation hook for infraSetManyAndCommit + +## Usage + +```typescript +const { mutate } = useInfraSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useInfraSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useInfraSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..d7185a48ac --- /dev/null +++ b/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# insertNodesAtPaths + + + +React Query mutation hook for insertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-function-definition.md b/.agents/skills/hooks-compute/references/platform-function-definition.md index 739c3642ba..f23e03dc7b 100644 --- a/.agents/skills/hooks-compute/references/platform-function-definition.md +++ b/.agents/skills/hooks-compute/references/platform-function-definition.md @@ -7,8 +7,8 @@ Function definitions — registered cloud functions with routing, queue, and ret ## Usage ```typescript -usePlatformFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) -usePlatformFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +usePlatformFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +usePlatformFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useUpdatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useDeletePlatformFunctionDefinitionMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformFunctionDefinitionMutation({}) ```typescript const { data, isLoading } = usePlatformFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformFunctionDefinitionsQuery({ const { mutate } = useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -mutate({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +mutate({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-function-deployment.md b/.agents/skills/hooks-compute/references/platform-function-deployment.md index e968311f01..f263fc6baa 100644 --- a/.agents/skills/hooks-compute/references/platform-function-deployment.md +++ b/.agents/skills/hooks-compute/references/platform-function-deployment.md @@ -7,8 +7,8 @@ Function deployment bindings — ties a handler image to a namespace for Knative ## Usage ```typescript -usePlatformFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) -usePlatformFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +usePlatformFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +usePlatformFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useUpdatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useDeletePlatformFunctionDeploymentMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformFunctionDeploymentMutation({}) ```typescript const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ const { mutate } = useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -mutate({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +mutate({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..dd4c10a2f0 --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# platformInfraInsertNodesAtPaths + + + +React Query mutation hook for platformInfraInsertNodesAtPaths + +## Usage + +```typescript +const { mutate } = usePlatformInfraInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md b/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..3a31f2d542 --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetAndCommit + + + +React Query mutation hook for platformInfraSetAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraSetAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md b/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..1cdfbea46e --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetManyAndCommit + + + +React Query mutation hook for platformInfraSetManyAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use usePlatformInfraSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-compute/references/set-and-commit.md b/.agents/skills/hooks-compute/references/set-and-commit.md new file mode 100644 index 0000000000..362ab6ea2b --- /dev/null +++ b/.agents/skills/hooks-compute/references/set-and-commit.md @@ -0,0 +1,20 @@ +# setAndCommit + + + +React Query mutation hook for setAndCommit + +## Usage + +```typescript +const { mutate } = useSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useSetAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/set-many-and-commit.md b/.agents/skills/hooks-compute/references/set-many-and-commit.md new file mode 100644 index 0000000000..7329c10396 --- /dev/null +++ b/.agents/skills/hooks-compute/references/set-many-and-commit.md @@ -0,0 +1,20 @@ +# setManyAndCommit + + + +React Query mutation hook for setManyAndCommit + +## Usage + +```typescript +const { mutate } = useSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-modules/SKILL.md b/.agents/skills/hooks-modules/SKILL.md index 092bd5df16..b07db5d06a 100644 --- a/.agents/skills/hooks-modules/SKILL.md +++ b/.agents/skills/hooks-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-modules -description: React Query hooks for the modules API — provides typed query and mutation hooks for 76 tables and 12 custom operations +description: React Query hooks for the modules API — provides typed query and mutation hooks for 83 tables and 3 custom operations --- # hooks-modules -React Query hooks for the modules API — provides typed query and mutation hooks for 76 tables and 12 custom operations +React Query hooks for the modules API — provides typed query and mutation hooks for 83 tables and 3 custom operations ## Usage @@ -46,12 +46,15 @@ See the `references/` directory for detailed per-entity API documentation: - [blueprint](references/blueprint.md) - [blueprint-construction](references/blueprint-construction.md) - [blueprint-template](references/blueprint-template.md) +- [capabilities-module](references/capabilities-module.md) - [catalog-module](references/catalog-module.md) - [compute-log-module](references/compute-log-module.md) - [config-secrets-user-module](references/config-secrets-user-module.md) - [connected-accounts-module](references/connected-accounts-module.md) +- [content-preset-module](references/content-preset-module.md) - [crypto-addresses-module](references/crypto-addresses-module.md) - [crypto-auth-module](references/crypto-auth-module.md) +- [data-capabilities-field](references/data-capabilities-field.md) - [database-provision-module](references/database-provision-module.md) - [database-settings-module](references/database-settings-module.md) - [db-pool-config](references/db-pool-config.md) @@ -62,9 +65,11 @@ See the `references/` directory for detailed per-entity API documentation: - [denormalized-table-field](references/denormalized-table-field.md) - [devices-module](references/devices-module.md) - [domain-module](references/domain-module.md) +- [email-sender-module](references/email-sender-module.md) - [emails-module](references/emails-module.md) - [entity-type-provision](references/entity-type-provision.md) - [events-module](references/events-module.md) +- [file-ref-field](references/file-ref-field.md) - [function-deployment-module](references/function-deployment-module.md) - [function-invocation-module](references/function-invocation-module.md) - [function-module](references/function-module.md) @@ -86,8 +91,8 @@ See the `references/` directory for detailed per-entity API documentation: - [merkle-store-module](references/merkle-store-module.md) - [namespace-module](references/namespace-module.md) - [notifications-module](references/notifications-module.md) +- [oauth-requests-module](references/oauth-requests-module.md) - [pages-module](references/pages-module.md) -- [permissions-module](references/permissions-module.md) - [phone-numbers-module](references/phone-numbers-module.md) - [plans-module](references/plans-module.md) - [principal-auth-module](references/principal-auth-module.md) @@ -99,6 +104,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-module](references/resource-module.md) - [rls-module](references/rls-module.md) - [route-module](references/route-module.md) +- [scope-types-module](references/scope-types-module.md) - [secure-table-provision](references/secure-table-provision.md) - [session-secrets-module](references/session-secrets-module.md) - [sessions-module](references/sessions-module.md) @@ -109,20 +115,12 @@ See the `references/` directory for detailed per-entity API documentation: - [user-auth-module](references/user-auth-module.md) - [user-credentials-module](references/user-credentials-module.md) - [user-settings-module](references/user-settings-module.md) +- [user-settings-security-module](references/user-settings-security-module.md) - [user-state-module](references/user-state-module.md) - [users-module](references/users-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [webauthn-credentials-module](references/webauthn-credentials-module.md) - [webhook-module](references/webhook-module.md) -- [resolve-blueprint-field](references/resolve-blueprint-field.md) -- [resolve-blueprint-table](references/resolve-blueprint-table.md) - [construct-blueprint](references/construct-blueprint.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) - [provision-bucket](references/provision-bucket.md) -- [provision-check-constraint](references/provision-check-constraint.md) -- [provision-full-text-search](references/provision-full-text-search.md) -- [provision-index](references/provision-index.md) -- [provision-relation](references/provision-relation.md) -- [provision-spatial-relation](references/provision-spatial-relation.md) -- [provision-table](references/provision-table.md) -- [provision-unique-constraint](references/provision-unique-constraint.md) diff --git a/.agents/skills/hooks-modules/references/agent-module.md b/.agents/skills/hooks-modules/references/agent-module.md index c8c4f086b1..7a2db5fb4d 100644 --- a/.agents/skills/hooks-modules/references/agent-module.md +++ b/.agents/skills/hooks-modules/references/agent-module.md @@ -7,8 +7,8 @@ React Query hooks for AgentModule data operations ## Usage ```typescript -useAgentModulesQuery({ selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } } }) -useAgentModuleQuery({ id: '', selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } } }) +useAgentModulesQuery({ selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } } }) +useAgentModuleQuery({ id: '', selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } } }) useCreateAgentModuleMutation({ selection: { fields: { id: true } } }) useUpdateAgentModuleMutation({ selection: { fields: { id: true } } }) useDeleteAgentModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteAgentModuleMutation({}) ```typescript const { data, isLoading } = useAgentModulesQuery({ - selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, + selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAgentModulesQuery({ const { mutate } = useCreateAgentModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }); +mutate({ agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/api-surface-module.md b/.agents/skills/hooks-modules/references/api-surface-module.md index 4b08201c0b..37dc608085 100644 --- a/.agents/skills/hooks-modules/references/api-surface-module.md +++ b/.agents/skills/hooks-modules/references/api-surface-module.md @@ -7,8 +7,8 @@ React Query hooks for ApiSurfaceModule data operations ## Usage ```typescript -useApiSurfaceModulesQuery({ selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useApiSurfaceModuleQuery({ id: '', selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useApiSurfaceModulesQuery({ selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useApiSurfaceModuleQuery({ id: '', selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateApiSurfaceModuleMutation({ selection: { fields: { id: true } } }) useUpdateApiSurfaceModuleMutation({ selection: { fields: { id: true } } }) useDeleteApiSurfaceModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteApiSurfaceModuleMutation({}) ```typescript const { data, isLoading } = useApiSurfaceModulesQuery({ - selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useApiSurfaceModulesQuery({ const { mutate } = useCreateApiSurfaceModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/app-module.md b/.agents/skills/hooks-modules/references/app-module.md index 8960424657..2d02742242 100644 --- a/.agents/skills/hooks-modules/references/app-module.md +++ b/.agents/skills/hooks-modules/references/app-module.md @@ -7,8 +7,8 @@ React Query hooks for AppModule data operations ## Usage ```typescript -useAppModulesQuery({ selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useAppModuleQuery({ id: '', selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useAppModulesQuery({ selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useAppModuleQuery({ id: '', selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateAppModuleMutation({ selection: { fields: { id: true } } }) useUpdateAppModuleMutation({ selection: { fields: { id: true } } }) useDeleteAppModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteAppModuleMutation({}) ```typescript const { data, isLoading } = useAppModulesQuery({ - selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppModulesQuery({ const { mutate } = useCreateAppModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/billing-module.md b/.agents/skills/hooks-modules/references/billing-module.md index a7eb538743..25fd2b58d0 100644 --- a/.agents/skills/hooks-modules/references/billing-module.md +++ b/.agents/skills/hooks-modules/references/billing-module.md @@ -7,8 +7,8 @@ React Query hooks for BillingModule data operations ## Usage ```typescript -useBillingModulesQuery({ selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } } }) -useBillingModuleQuery({ id: '', selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } } }) +useBillingModulesQuery({ selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } } }) +useBillingModuleQuery({ id: '', selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } } }) useCreateBillingModuleMutation({ selection: { fields: { id: true } } }) useUpdateBillingModuleMutation({ selection: { fields: { id: true } } }) useDeleteBillingModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteBillingModuleMutation({}) ```typescript const { data, isLoading } = useBillingModulesQuery({ - selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, + selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBillingModulesQuery({ const { mutate } = useCreateBillingModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }); +mutate({ apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/billing-provider-module.md b/.agents/skills/hooks-modules/references/billing-provider-module.md index 88f93fdba5..5980231bee 100644 --- a/.agents/skills/hooks-modules/references/billing-provider-module.md +++ b/.agents/skills/hooks-modules/references/billing-provider-module.md @@ -7,8 +7,8 @@ React Query hooks for BillingProviderModule data operations ## Usage ```typescript -useBillingProviderModulesQuery({ selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } } }) -useBillingProviderModuleQuery({ id: '', selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } } }) +useBillingProviderModulesQuery({ selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } } }) +useBillingProviderModuleQuery({ id: '', selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } } }) useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useUpdateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useDeleteBillingProviderModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteBillingProviderModuleMutation({}) ```typescript const { data, isLoading } = useBillingProviderModulesQuery({ - selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }, + selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBillingProviderModulesQuery({ const { mutate } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }); +mutate({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/capabilities-module.md b/.agents/skills/hooks-modules/references/capabilities-module.md new file mode 100644 index 0000000000..126d8836bb --- /dev/null +++ b/.agents/skills/hooks-modules/references/capabilities-module.md @@ -0,0 +1,34 @@ +# capabilitiesModule + + + +React Query hooks for CapabilitiesModule data operations + +## Usage + +```typescript +useCapabilitiesModulesQuery({ selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useCapabilitiesModuleQuery({ id: '', selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useCreateCapabilitiesModuleMutation({ selection: { fields: { id: true } } }) +useUpdateCapabilitiesModuleMutation({ selection: { fields: { id: true } } }) +useDeleteCapabilitiesModuleMutation({}) +``` + +## Examples + +### List all capabilitiesModules + +```typescript +const { data, isLoading } = useCapabilitiesModulesQuery({ + selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, +}); +``` + +### Create a capabilitiesModule + +```typescript +const { mutate } = useCreateCapabilitiesModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/catalog-module.md b/.agents/skills/hooks-modules/references/catalog-module.md index cf24906c51..ba6b2625c0 100644 --- a/.agents/skills/hooks-modules/references/catalog-module.md +++ b/.agents/skills/hooks-modules/references/catalog-module.md @@ -7,8 +7,8 @@ React Query hooks for CatalogModule data operations ## Usage ```typescript -useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) -useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) useCreateCatalogModuleMutation({ selection: { fields: { id: true } } }) useUpdateCatalogModuleMutation({ selection: { fields: { id: true } } }) useDeleteCatalogModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteCatalogModuleMutation({}) ```typescript const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useCatalogModulesQuery({ const { mutate } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +mutate({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/content-preset-module.md b/.agents/skills/hooks-modules/references/content-preset-module.md new file mode 100644 index 0000000000..7cfb083377 --- /dev/null +++ b/.agents/skills/hooks-modules/references/content-preset-module.md @@ -0,0 +1,34 @@ +# contentPresetModule + + + +React Query hooks for ContentPresetModule data operations + +## Usage + +```typescript +useContentPresetModulesQuery({ selection: { fields: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } } }) +useContentPresetModuleQuery({ id: '', selection: { fields: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } } }) +useCreateContentPresetModuleMutation({ selection: { fields: { id: true } } }) +useUpdateContentPresetModuleMutation({ selection: { fields: { id: true } } }) +useDeleteContentPresetModuleMutation({}) +``` + +## Examples + +### List all contentPresetModules + +```typescript +const { data, isLoading } = useContentPresetModulesQuery({ + selection: { fields: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }, +}); +``` + +### Create a contentPresetModule + +```typescript +const { mutate } = useCreateContentPresetModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/data-capabilities-field.md b/.agents/skills/hooks-modules/references/data-capabilities-field.md new file mode 100644 index 0000000000..eab076c00e --- /dev/null +++ b/.agents/skills/hooks-modules/references/data-capabilities-field.md @@ -0,0 +1,34 @@ +# dataCapabilitiesField + + + +React Query hooks for DataCapabilitiesField data operations + +## Usage + +```typescript +useDataCapabilitiesFieldsQuery({ selection: { fields: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } } }) +useDataCapabilitiesFieldQuery({ id: '', selection: { fields: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } } }) +useCreateDataCapabilitiesFieldMutation({ selection: { fields: { id: true } } }) +useUpdateDataCapabilitiesFieldMutation({ selection: { fields: { id: true } } }) +useDeleteDataCapabilitiesFieldMutation({}) +``` + +## Examples + +### List all dataCapabilitiesFields + +```typescript +const { data, isLoading } = useDataCapabilitiesFieldsQuery({ + selection: { fields: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }, +}); +``` + +### Create a dataCapabilitiesField + +```typescript +const { mutate } = useCreateDataCapabilitiesFieldMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/database-settings-module.md b/.agents/skills/hooks-modules/references/database-settings-module.md index 098e37454c..8a68eb5a18 100644 --- a/.agents/skills/hooks-modules/references/database-settings-module.md +++ b/.agents/skills/hooks-modules/references/database-settings-module.md @@ -7,8 +7,8 @@ React Query hooks for DatabaseSettingsModule data operations ## Usage ```typescript -useDatabaseSettingsModulesQuery({ selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } } }) -useDatabaseSettingsModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } } }) +useDatabaseSettingsModulesQuery({ selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } } }) +useDatabaseSettingsModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } } }) useCreateDatabaseSettingsModuleMutation({ selection: { fields: { id: true } } }) useUpdateDatabaseSettingsModuleMutation({ selection: { fields: { id: true } } }) useDeleteDatabaseSettingsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteDatabaseSettingsModuleMutation({}) ```typescript const { data, isLoading } = useDatabaseSettingsModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }, + selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDatabaseSettingsModulesQuery({ const { mutate } = useCreateDatabaseSettingsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }); +mutate({ apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/db-usage-module.md b/.agents/skills/hooks-modules/references/db-usage-module.md index 4d347624fa..f97d403ca7 100644 --- a/.agents/skills/hooks-modules/references/db-usage-module.md +++ b/.agents/skills/hooks-modules/references/db-usage-module.md @@ -7,8 +7,8 @@ React Query hooks for DbUsageModule data operations ## Usage ```typescript -useDbUsageModulesQuery({ selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } } }) -useDbUsageModuleQuery({ id: '', selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } } }) +useDbUsageModulesQuery({ selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } } }) +useDbUsageModuleQuery({ id: '', selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } } }) useCreateDbUsageModuleMutation({ selection: { fields: { id: true } } }) useUpdateDbUsageModuleMutation({ selection: { fields: { id: true } } }) useDeleteDbUsageModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteDbUsageModuleMutation({}) ```typescript const { data, isLoading } = useDbUsageModulesQuery({ - selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, + selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDbUsageModulesQuery({ const { mutate } = useCreateDbUsageModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }); +mutate({ apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/domain-module.md b/.agents/skills/hooks-modules/references/domain-module.md index f1bff2641a..0eb8fd223c 100644 --- a/.agents/skills/hooks-modules/references/domain-module.md +++ b/.agents/skills/hooks-modules/references/domain-module.md @@ -7,8 +7,8 @@ React Query hooks for DomainModule data operations ## Usage ```typescript -useDomainModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useDomainModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useDomainModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useDomainModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateDomainModuleMutation({ selection: { fields: { id: true } } }) useUpdateDomainModuleMutation({ selection: { fields: { id: true } } }) useDeleteDomainModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteDomainModuleMutation({}) ```typescript const { data, isLoading } = useDomainModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useDomainModulesQuery({ const { mutate } = useCreateDomainModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/email-sender-module.md b/.agents/skills/hooks-modules/references/email-sender-module.md new file mode 100644 index 0000000000..c8eb749242 --- /dev/null +++ b/.agents/skills/hooks-modules/references/email-sender-module.md @@ -0,0 +1,34 @@ +# emailSenderModule + + + +React Query hooks for EmailSenderModule data operations + +## Usage + +```typescript +useEmailSenderModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } } }) +useEmailSenderModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } } }) +useCreateEmailSenderModuleMutation({ selection: { fields: { id: true } } }) +useUpdateEmailSenderModuleMutation({ selection: { fields: { id: true } } }) +useDeleteEmailSenderModuleMutation({}) +``` + +## Examples + +### List all emailSenderModules + +```typescript +const { data, isLoading } = useEmailSenderModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }, +}); +``` + +### Create a emailSenderModule + +```typescript +const { mutate } = useCreateEmailSenderModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/entity-type-provision.md b/.agents/skills/hooks-modules/references/entity-type-provision.md index ee10e22b7c..a115b6877f 100644 --- a/.agents/skills/hooks-modules/references/entity-type-provision.md +++ b/.agents/skills/hooks-modules/references/entity-type-provision.md @@ -3,7 +3,7 @@ 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). + and installs the required modules (capabilities, 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). diff --git a/.agents/skills/hooks-modules/references/events-module.md b/.agents/skills/hooks-modules/references/events-module.md index 96fcca90b5..5fd9fdd5fa 100644 --- a/.agents/skills/hooks-modules/references/events-module.md +++ b/.agents/skills/hooks-modules/references/events-module.md @@ -7,8 +7,8 @@ React Query hooks for EventsModule data operations ## Usage ```typescript -useEventsModulesQuery({ selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } } }) -useEventsModuleQuery({ id: '', selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } } }) +useEventsModulesQuery({ selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } } }) +useEventsModuleQuery({ id: '', selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } } }) useCreateEventsModuleMutation({ selection: { fields: { id: true } } }) useUpdateEventsModuleMutation({ selection: { fields: { id: true } } }) useDeleteEventsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteEventsModuleMutation({}) ```typescript const { data, isLoading } = useEventsModulesQuery({ - selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }, + selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useEventsModulesQuery({ const { mutate } = useCreateEventsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }); +mutate({ achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/file-ref-field.md b/.agents/skills/hooks-modules/references/file-ref-field.md new file mode 100644 index 0000000000..60de795420 --- /dev/null +++ b/.agents/skills/hooks-modules/references/file-ref-field.md @@ -0,0 +1,34 @@ +# fileRefField + + + +React Query hooks for FileRefField data operations + +## Usage + +```typescript +useFileRefFieldsQuery({ selection: { fields: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } } }) +useFileRefFieldQuery({ id: '', selection: { fields: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } } }) +useCreateFileRefFieldMutation({ selection: { fields: { id: true } } }) +useUpdateFileRefFieldMutation({ selection: { fields: { id: true } } }) +useDeleteFileRefFieldMutation({}) +``` + +## Examples + +### List all fileRefFields + +```typescript +const { data, isLoading } = useFileRefFieldsQuery({ + selection: { fields: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }, +}); +``` + +### Create a fileRefField + +```typescript +const { mutate } = useCreateFileRefFieldMutation({ + selection: { fields: { id: true } }, +}); +mutate({ bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/function-deployment-module.md b/.agents/skills/hooks-modules/references/function-deployment-module.md index 7623d16040..4a25d53693 100644 --- a/.agents/skills/hooks-modules/references/function-deployment-module.md +++ b/.agents/skills/hooks-modules/references/function-deployment-module.md @@ -7,8 +7,8 @@ React Query hooks for FunctionDeploymentModule data operations ## Usage ```typescript -useFunctionDeploymentModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useFunctionDeploymentModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useFunctionDeploymentModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useFunctionDeploymentModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateFunctionDeploymentModuleMutation({ selection: { fields: { id: true } } }) useUpdateFunctionDeploymentModuleMutation({ selection: { fields: { id: true } } }) useDeleteFunctionDeploymentModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionDeploymentModuleMutation({}) ```typescript const { data, isLoading } = useFunctionDeploymentModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionDeploymentModulesQuery({ const { mutate } = useCreateFunctionDeploymentModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/function-invocation-module.md b/.agents/skills/hooks-modules/references/function-invocation-module.md index 62781b0db6..87b7bb2b78 100644 --- a/.agents/skills/hooks-modules/references/function-invocation-module.md +++ b/.agents/skills/hooks-modules/references/function-invocation-module.md @@ -7,8 +7,8 @@ React Query hooks for FunctionInvocationModule data operations ## Usage ```typescript -useFunctionInvocationModulesQuery({ selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useFunctionInvocationModuleQuery({ id: '', selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useFunctionInvocationModulesQuery({ selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useFunctionInvocationModuleQuery({ id: '', selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateFunctionInvocationModuleMutation({ selection: { fields: { id: true } } }) useUpdateFunctionInvocationModuleMutation({ selection: { fields: { id: true } } }) useDeleteFunctionInvocationModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionInvocationModuleMutation({}) ```typescript const { data, isLoading } = useFunctionInvocationModulesQuery({ - selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionInvocationModulesQuery({ const { mutate } = useCreateFunctionInvocationModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/function-module.md b/.agents/skills/hooks-modules/references/function-module.md index e8b3855adf..003d49381f 100644 --- a/.agents/skills/hooks-modules/references/function-module.md +++ b/.agents/skills/hooks-modules/references/function-module.md @@ -7,8 +7,8 @@ React Query hooks for FunctionModule data operations ## Usage ```typescript -useFunctionModulesQuery({ selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } } }) -useFunctionModuleQuery({ id: '', selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } } }) +useFunctionModulesQuery({ selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } } }) +useFunctionModuleQuery({ id: '', selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } } }) useCreateFunctionModuleMutation({ selection: { fields: { id: true } } }) useUpdateFunctionModuleMutation({ selection: { fields: { id: true } } }) useDeleteFunctionModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionModuleMutation({}) ```typescript const { data, isLoading } = useFunctionModulesQuery({ - selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionModulesQuery({ const { mutate } = useCreateFunctionModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }); +mutate({ apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/graph-execution-module.md b/.agents/skills/hooks-modules/references/graph-execution-module.md index 196339cdde..8929f9f09d 100644 --- a/.agents/skills/hooks-modules/references/graph-execution-module.md +++ b/.agents/skills/hooks-modules/references/graph-execution-module.md @@ -7,8 +7,8 @@ React Query hooks for GraphExecutionModule data operations ## Usage ```typescript -useGraphExecutionModulesQuery({ selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useGraphExecutionModuleQuery({ id: '', selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useGraphExecutionModulesQuery({ selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useGraphExecutionModuleQuery({ id: '', selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateGraphExecutionModuleMutation({ selection: { fields: { id: true } } }) useUpdateGraphExecutionModuleMutation({ selection: { fields: { id: true } } }) useDeleteGraphExecutionModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteGraphExecutionModuleMutation({}) ```typescript const { data, isLoading } = useGraphExecutionModulesQuery({ - selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useGraphExecutionModulesQuery({ const { mutate } = useCreateGraphExecutionModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/graph-module.md b/.agents/skills/hooks-modules/references/graph-module.md index b079490d1f..57202f00ab 100644 --- a/.agents/skills/hooks-modules/references/graph-module.md +++ b/.agents/skills/hooks-modules/references/graph-module.md @@ -7,8 +7,8 @@ React Query hooks for GraphModule data operations ## Usage ```typescript -useGraphModulesQuery({ selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } } }) -useGraphModuleQuery({ id: '', selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } } }) +useGraphModulesQuery({ selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } } }) +useGraphModuleQuery({ id: '', selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } } }) useCreateGraphModuleMutation({ selection: { fields: { id: true } } }) useUpdateGraphModuleMutation({ selection: { fields: { id: true } } }) useDeleteGraphModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteGraphModuleMutation({}) ```typescript const { data, isLoading } = useGraphModulesQuery({ - selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }, + selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useGraphModulesQuery({ const { mutate } = useCreateGraphModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/hierarchy-module.md b/.agents/skills/hooks-modules/references/hierarchy-module.md index 78a30ed076..3f77c5e516 100644 --- a/.agents/skills/hooks-modules/references/hierarchy-module.md +++ b/.agents/skills/hooks-modules/references/hierarchy-module.md @@ -7,8 +7,8 @@ React Query hooks for HierarchyModule data operations ## Usage ```typescript -useHierarchyModulesQuery({ selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } } }) -useHierarchyModuleQuery({ id: '', selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } } }) +useHierarchyModulesQuery({ selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } } }) +useHierarchyModuleQuery({ id: '', selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } } }) useCreateHierarchyModuleMutation({ selection: { fields: { id: true } } }) useUpdateHierarchyModuleMutation({ selection: { fields: { id: true } } }) useDeleteHierarchyModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteHierarchyModuleMutation({}) ```typescript const { data, isLoading } = useHierarchyModulesQuery({ - selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }, + selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useHierarchyModulesQuery({ const { mutate } = useCreateHierarchyModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }); +mutate({ chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/http-route-module.md b/.agents/skills/hooks-modules/references/http-route-module.md index 1c432db087..646c765dc5 100644 --- a/.agents/skills/hooks-modules/references/http-route-module.md +++ b/.agents/skills/hooks-modules/references/http-route-module.md @@ -7,8 +7,8 @@ React Query hooks for HttpRouteModule data operations ## Usage ```typescript -useHttpRouteModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } } }) -useHttpRouteModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } } }) +useHttpRouteModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } } }) +useHttpRouteModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } } }) useCreateHttpRouteModuleMutation({ selection: { fields: { id: true } } }) useUpdateHttpRouteModuleMutation({ selection: { fields: { id: true } } }) useDeleteHttpRouteModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteHttpRouteModuleMutation({}) ```typescript const { data, isLoading } = useHttpRouteModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useHttpRouteModulesQuery({ const { mutate } = useCreateHttpRouteModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/limits-module.md b/.agents/skills/hooks-modules/references/limits-module.md index be1c2f64ec..f3c261892d 100644 --- a/.agents/skills/hooks-modules/references/limits-module.md +++ b/.agents/skills/hooks-modules/references/limits-module.md @@ -7,8 +7,8 @@ React Query hooks for LimitsModule data operations ## Usage ```typescript -useLimitsModulesQuery({ selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) -useLimitsModuleQuery({ id: '', selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useLimitsModulesQuery({ selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useLimitsModuleQuery({ id: '', selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) useCreateLimitsModuleMutation({ selection: { fields: { id: true } } }) useUpdateLimitsModuleMutation({ selection: { fields: { id: true } } }) useDeleteLimitsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteLimitsModuleMutation({}) ```typescript const { data, isLoading } = useLimitsModulesQuery({ - selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useLimitsModulesQuery({ const { mutate } = useCreateLimitsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +mutate({ actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/memberships-module.md b/.agents/skills/hooks-modules/references/memberships-module.md index 0e72c50a3e..33f636c076 100644 --- a/.agents/skills/hooks-modules/references/memberships-module.md +++ b/.agents/skills/hooks-modules/references/memberships-module.md @@ -7,8 +7,8 @@ React Query hooks for MembershipsModule data operations ## Usage ```typescript -useMembershipsModulesQuery({ selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } } }) -useMembershipsModuleQuery({ id: '', selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } } }) +useMembershipsModulesQuery({ selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } } }) +useMembershipsModuleQuery({ id: '', selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } } }) useCreateMembershipsModuleMutation({ selection: { fields: { id: true } } }) useUpdateMembershipsModuleMutation({ selection: { fields: { id: true } } }) useDeleteMembershipsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteMembershipsModuleMutation({}) ```typescript const { data, isLoading } = useMembershipsModulesQuery({ - selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, + selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMembershipsModulesQuery({ const { mutate } = useCreateMembershipsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }); +mutate({ actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/merkle-store-module.md b/.agents/skills/hooks-modules/references/merkle-store-module.md index 02e66c6192..a66a1ad8a3 100644 --- a/.agents/skills/hooks-modules/references/merkle-store-module.md +++ b/.agents/skills/hooks-modules/references/merkle-store-module.md @@ -7,8 +7,8 @@ React Query hooks for MerkleStoreModule data operations ## Usage ```typescript -useMerkleStoreModulesQuery({ selection: { fields: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } } }) -useMerkleStoreModuleQuery({ id: '', selection: { fields: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } } }) +useMerkleStoreModulesQuery({ selection: { fields: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } } }) +useMerkleStoreModuleQuery({ id: '', selection: { fields: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } } }) useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } } }) useUpdateMerkleStoreModuleMutation({ selection: { fields: { id: true } } }) useDeleteMerkleStoreModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteMerkleStoreModuleMutation({}) ```typescript const { data, isLoading } = useMerkleStoreModulesQuery({ - selection: { fields: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, + selection: { fields: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMerkleStoreModulesQuery({ const { mutate } = useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }); +mutate({ apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/namespace-module.md b/.agents/skills/hooks-modules/references/namespace-module.md index 78c2af01e3..ff069b196f 100644 --- a/.agents/skills/hooks-modules/references/namespace-module.md +++ b/.agents/skills/hooks-modules/references/namespace-module.md @@ -7,8 +7,8 @@ React Query hooks for NamespaceModule data operations ## Usage ```typescript -useNamespaceModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) -useNamespaceModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useNamespaceModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) +useNamespaceModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } } }) useCreateNamespaceModuleMutation({ selection: { fields: { id: true } } }) useUpdateNamespaceModuleMutation({ selection: { fields: { id: true } } }) useDeleteNamespaceModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteNamespaceModuleMutation({}) ```typescript const { data, isLoading } = useNamespaceModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useNamespaceModulesQuery({ const { mutate } = useCreateNamespaceModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/notifications-module.md b/.agents/skills/hooks-modules/references/notifications-module.md index 398e1b5f83..b10678bcfb 100644 --- a/.agents/skills/hooks-modules/references/notifications-module.md +++ b/.agents/skills/hooks-modules/references/notifications-module.md @@ -7,8 +7,8 @@ React Query hooks for NotificationsModule data operations ## Usage ```typescript -useNotificationsModulesQuery({ selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } } }) -useNotificationsModuleQuery({ id: '', selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } } }) +useNotificationsModulesQuery({ selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } } }) +useNotificationsModuleQuery({ id: '', selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } } }) useCreateNotificationsModuleMutation({ selection: { fields: { id: true } } }) useUpdateNotificationsModuleMutation({ selection: { fields: { id: true } } }) useDeleteNotificationsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteNotificationsModuleMutation({}) ```typescript const { data, isLoading } = useNotificationsModulesQuery({ - selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }, + selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useNotificationsModulesQuery({ const { mutate } = useCreateNotificationsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }); +mutate({ apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/oauth-requests-module.md b/.agents/skills/hooks-modules/references/oauth-requests-module.md new file mode 100644 index 0000000000..7ece9a978b --- /dev/null +++ b/.agents/skills/hooks-modules/references/oauth-requests-module.md @@ -0,0 +1,39 @@ +# oauthRequestsModule + + + +Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + +## Usage + +```typescript +useOauthRequestsModulesQuery({ selection: { fields: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } } }) +useOauthRequestsModuleQuery({ id: '', selection: { fields: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } } }) +useCreateOauthRequestsModuleMutation({ selection: { fields: { id: true } } }) +useUpdateOauthRequestsModuleMutation({ selection: { fields: { id: true } } }) +useDeleteOauthRequestsModuleMutation({}) +``` + +## Examples + +### List all oauthRequestsModules + +```typescript +const { data, isLoading } = useOauthRequestsModulesQuery({ + selection: { fields: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }, +}); +``` + +### Create a oauthRequestsModule + +```typescript +const { mutate } = useCreateOauthRequestsModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/profiles-module.md b/.agents/skills/hooks-modules/references/profiles-module.md index 8d093b528d..25d4780042 100644 --- a/.agents/skills/hooks-modules/references/profiles-module.md +++ b/.agents/skills/hooks-modules/references/profiles-module.md @@ -7,8 +7,8 @@ React Query hooks for ProfilesModule data operations ## Usage ```typescript -useProfilesModulesQuery({ selection: { fields: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) -useProfilesModuleQuery({ id: '', selection: { fields: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useProfilesModulesQuery({ selection: { fields: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) +useProfilesModuleQuery({ id: '', selection: { fields: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } } }) useCreateProfilesModuleMutation({ selection: { fields: { id: true } } }) useUpdateProfilesModuleMutation({ selection: { fields: { id: true } } }) useDeleteProfilesModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteProfilesModuleMutation({}) ```typescript const { data, isLoading } = useProfilesModulesQuery({ - selection: { fields: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useProfilesModulesQuery({ const { mutate } = useCreateProfilesModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +mutate({ actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/rate-limit-meters-module.md b/.agents/skills/hooks-modules/references/rate-limit-meters-module.md index c693c4392d..9816ffaf48 100644 --- a/.agents/skills/hooks-modules/references/rate-limit-meters-module.md +++ b/.agents/skills/hooks-modules/references/rate-limit-meters-module.md @@ -7,8 +7,8 @@ React Query hooks for RateLimitMetersModule data operations ## Usage ```typescript -useRateLimitMetersModulesQuery({ selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } } }) -useRateLimitMetersModuleQuery({ id: '', selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } } }) +useRateLimitMetersModulesQuery({ selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } } }) +useRateLimitMetersModuleQuery({ id: '', selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } } }) useCreateRateLimitMetersModuleMutation({ selection: { fields: { id: true } } }) useUpdateRateLimitMetersModuleMutation({ selection: { fields: { id: true } } }) useDeleteRateLimitMetersModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteRateLimitMetersModuleMutation({}) ```typescript const { data, isLoading } = useRateLimitMetersModulesQuery({ - selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, + selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useRateLimitMetersModulesQuery({ const { mutate } = useCreateRateLimitMetersModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }); +mutate({ apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/resource-module.md b/.agents/skills/hooks-modules/references/resource-module.md index 988e6f91fc..2167354cb6 100644 --- a/.agents/skills/hooks-modules/references/resource-module.md +++ b/.agents/skills/hooks-modules/references/resource-module.md @@ -7,8 +7,8 @@ React Query hooks for ResourceModule data operations ## Usage ```typescript -useResourceModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) -useResourceModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) +useResourceModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) +useResourceModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } } }) useCreateResourceModuleMutation({ selection: { fields: { id: true } } }) useUpdateResourceModuleMutation({ selection: { fields: { id: true } } }) useDeleteResourceModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteResourceModuleMutation({}) ```typescript const { data, isLoading } = useResourceModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useResourceModulesQuery({ const { mutate } = useCreateResourceModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/route-module.md b/.agents/skills/hooks-modules/references/route-module.md index 9d8b50490f..31ff546f1b 100644 --- a/.agents/skills/hooks-modules/references/route-module.md +++ b/.agents/skills/hooks-modules/references/route-module.md @@ -7,8 +7,8 @@ React Query hooks for RouteModule data operations ## Usage ```typescript -useRouteModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) -useRouteModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) +useRouteModulesQuery({ selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) +useRouteModuleQuery({ id: '', selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) useCreateRouteModuleMutation({ selection: { fields: { id: true } } }) useUpdateRouteModuleMutation({ selection: { fields: { id: true } } }) useDeleteRouteModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteRouteModuleMutation({}) ```typescript const { data, isLoading } = useRouteModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useRouteModulesQuery({ const { mutate } = useCreateRouteModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/scope-types-module.md b/.agents/skills/hooks-modules/references/scope-types-module.md new file mode 100644 index 0000000000..d304a8fe50 --- /dev/null +++ b/.agents/skills/hooks-modules/references/scope-types-module.md @@ -0,0 +1,34 @@ +# scopeTypesModule + + + +React Query hooks for ScopeTypesModule data operations + +## Usage + +```typescript +useScopeTypesModulesQuery({ selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } } }) +useScopeTypesModuleQuery({ id: '', selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } } }) +useCreateScopeTypesModuleMutation({ selection: { fields: { id: true } } }) +useUpdateScopeTypesModuleMutation({ selection: { fields: { id: true } } }) +useDeleteScopeTypesModuleMutation({}) +``` + +## Examples + +### List all scopeTypesModules + +```typescript +const { data, isLoading } = useScopeTypesModulesQuery({ + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); +``` + +### Create a scopeTypesModule + +```typescript +const { mutate } = useCreateScopeTypesModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/site-surface-module.md b/.agents/skills/hooks-modules/references/site-surface-module.md index a9ffcf7f48..550f573f83 100644 --- a/.agents/skills/hooks-modules/references/site-surface-module.md +++ b/.agents/skills/hooks-modules/references/site-surface-module.md @@ -7,8 +7,8 @@ React Query hooks for SiteSurfaceModule data operations ## Usage ```typescript -useSiteSurfaceModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } } }) -useSiteSurfaceModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } } }) +useSiteSurfaceModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } } }) +useSiteSurfaceModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } } }) useCreateSiteSurfaceModuleMutation({ selection: { fields: { id: true } } }) useUpdateSiteSurfaceModuleMutation({ selection: { fields: { id: true } } }) useDeleteSiteSurfaceModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteSiteSurfaceModuleMutation({}) ```typescript const { data, isLoading } = useSiteSurfaceModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useSiteSurfaceModulesQuery({ const { mutate } = useCreateSiteSurfaceModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }); +mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/storage-module.md b/.agents/skills/hooks-modules/references/storage-module.md index 33b61e261c..75564c3bb8 100644 --- a/.agents/skills/hooks-modules/references/storage-module.md +++ b/.agents/skills/hooks-modules/references/storage-module.md @@ -7,8 +7,8 @@ React Query hooks for StorageModule data operations ## Usage ```typescript -useStorageModulesQuery({ selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) -useStorageModuleQuery({ id: '', selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) +useStorageModulesQuery({ selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) +useStorageModuleQuery({ id: '', selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } } }) useCreateStorageModuleMutation({ selection: { fields: { id: true } } }) useUpdateStorageModuleMutation({ selection: { fields: { id: true } } }) useDeleteStorageModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteStorageModuleMutation({}) ```typescript const { data, isLoading } = useStorageModulesQuery({ - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useStorageModulesQuery({ const { mutate } = useCreateStorageModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); +mutate({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/user-settings-security-module.md b/.agents/skills/hooks-modules/references/user-settings-security-module.md new file mode 100644 index 0000000000..ccb40f16ce --- /dev/null +++ b/.agents/skills/hooks-modules/references/user-settings-security-module.md @@ -0,0 +1,34 @@ +# userSettingsSecurityModule + + + +React Query hooks for UserSettingsSecurityModule data operations + +## Usage + +```typescript +useUserSettingsSecurityModulesQuery({ selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } } }) +useUserSettingsSecurityModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } } }) +useCreateUserSettingsSecurityModuleMutation({ selection: { fields: { id: true } } }) +useUpdateUserSettingsSecurityModuleMutation({ selection: { fields: { id: true } } }) +useDeleteUserSettingsSecurityModuleMutation({}) +``` + +## Examples + +### List all userSettingsSecurityModules + +```typescript +const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); +``` + +### Create a userSettingsSecurityModule + +```typescript +const { mutate } = useCreateUserSettingsSecurityModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/webhook-module.md b/.agents/skills/hooks-modules/references/webhook-module.md index a6d14aab16..a1f287a12f 100644 --- a/.agents/skills/hooks-modules/references/webhook-module.md +++ b/.agents/skills/hooks-modules/references/webhook-module.md @@ -7,8 +7,8 @@ React Query hooks for WebhookModule data operations ## Usage ```typescript -useWebhookModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } } }) -useWebhookModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } } }) +useWebhookModulesQuery({ selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } } }) +useWebhookModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } } }) useCreateWebhookModuleMutation({ selection: { fields: { id: true } } }) useUpdateWebhookModuleMutation({ selection: { fields: { id: true } } }) useDeleteWebhookModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteWebhookModuleMutation({}) ```typescript const { data, isLoading } = useWebhookModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useWebhookModulesQuery({ const { mutate } = useCreateWebhookModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }); +mutate({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }); ``` diff --git a/.agents/skills/hooks-objects/SKILL.md b/.agents/skills/hooks-objects/SKILL.md index bbe72773f3..bb0063deed 100644 --- a/.agents/skills/hooks-objects/SKILL.md +++ b/.agents/skills/hooks-objects/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-objects -description: React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 4 custom operations +description: React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 7 custom operations --- # hooks-objects -React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 4 custom operations +React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 7 custom operations ## Usage @@ -45,5 +45,8 @@ See the `references/` directory for detailed per-entity API documentation: - [store](references/store.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [provision-bucket](references/provision-bucket.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) diff --git a/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md b/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..d7185a48ac --- /dev/null +++ b/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# insertNodesAtPaths + + + +React Query mutation hook for insertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-objects/references/set-many-and-commit.md b/.agents/skills/hooks-objects/references/set-many-and-commit.md new file mode 100644 index 0000000000..7329c10396 --- /dev/null +++ b/.agents/skills/hooks-objects/references/set-many-and-commit.md @@ -0,0 +1,20 @@ +# setManyAndCommit + + + +React Query mutation hook for setManyAndCommit + +## Usage + +```typescript +const { mutate } = useSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-usage/SKILL.md b/.agents/skills/hooks-usage/SKILL.md index 241555ae28..560d3ebc46 100644 --- a/.agents/skills/hooks-usage/SKILL.md +++ b/.agents/skills/hooks-usage/SKILL.md @@ -1,25 +1,25 @@ --- name: hooks-usage -description: React Query hooks for the usage API — provides typed query and mutation hooks for 18 tables and 5 custom operations +description: React Query hooks for the usage API — provides typed query and mutation hooks for 38 tables and 16 custom operations --- # hooks-usage -React Query hooks for the usage API — provides typed query and mutation hooks for 18 tables and 5 custom operations +React Query hooks for the usage API — provides typed query and mutation hooks for 38 tables and 16 custom operations ## Usage ```typescript // Import hooks -import { useAppLimitCapsQuery } from './hooks'; +import { useAppAchievementRewardsQuery } from './hooks'; // Query hooks: useQuery, usesQuery // Mutation hooks: useCreateMutation, useUpdateMutation, useDeleteMutation // Bulk mutation hooks (when enabled): useBulkCreateMutation, useBulkUpsertMutation, etc. -const { data, isLoading } = useAppLimitCapsQuery({ +const { data, isLoading } = useAppAchievementRewardsQuery({ selection: { fields: { id: true } }, }); ``` @@ -29,7 +29,7 @@ const { data, isLoading } = useAppLimitCapsQuery({ ### Query records ```typescript -const { data, isLoading } = useAppLimitCapsQuery({ +const { data, isLoading } = useAppAchievementRewardsQuery({ selection: { fields: { id: true } }, }); ``` @@ -38,6 +38,13 @@ const { data, isLoading } = useAppLimitCapsQuery({ See the `references/` directory for detailed per-entity API documentation: +- [app-achievement-reward](references/app-achievement-reward.md) +- [app-event-aggregate](references/app-event-aggregate.md) +- [app-event](references/app-event.md) +- [app-event-type](references/app-event-type.md) +- [app-level](references/app-level.md) +- [app-level-grant](references/app-level-grant.md) +- [app-level-requirement](references/app-level-requirement.md) - [app-limit-cap](references/app-limit-cap.md) - [app-limit-caps-default](references/app-limit-caps-default.md) - [app-limit](references/app-limit.md) @@ -48,6 +55,12 @@ See the `references/` directory for detailed per-entity API documentation: - [app-limit-default](references/app-limit-default.md) - [app-limit-event](references/app-limit-event.md) - [app-limit-warning](references/app-limit-warning.md) +- [billing-usage-summary](references/billing-usage-summary.md) +- [ledger](references/ledger.md) +- [meter](references/meter.md) +- [meter-credit](references/meter-credit.md) +- [meter-default](references/meter-default.md) +- [meter-source](references/meter-source.md) - [org-limit-aggregate](references/org-limit-aggregate.md) - [org-limit-cap](references/org-limit-cap.md) - [org-limit-caps-default](references/org-limit-caps-default.md) @@ -56,8 +69,26 @@ See the `references/` directory for detailed per-entity API documentation: - [org-limit-default](references/org-limit-default.md) - [org-limit-event](references/org-limit-event.md) - [org-limit-warning](references/org-limit-warning.md) +- [plan-cap](references/plan-cap.md) +- [plan](references/plan.md) +- [plan-limit](references/plan-limit.md) +- [plan-meter-limit](references/plan-meter-limit.md) +- [plan-override](references/plan-override.md) +- [plan-pricing](references/plan-pricing.md) +- [plan-subscription](references/plan-subscription.md) +- [capture-app-limit-defaults](references/capture-app-limit-defaults.md) +- [capture-org-limit-defaults](references/capture-org-limit-defaults.md) +- [capture-trust-ladder](references/capture-trust-ladder.md) +- [events-achieved](references/events-achieved.md) +- [events-required](references/events-required.md) +- [grant-achievement](references/grant-achievement.md) - [provision-bucket](references/provision-bucket.md) +- [recompute-capabilities](references/recompute-capabilities.md) +- [revoke-achievement](references/revoke-achievement.md) - [seed-app-limit-caps-defaults](references/seed-app-limit-caps-defaults.md) - [seed-app-limit-defaults](references/seed-app-limit-defaults.md) +- [seed-meter-defaults](references/seed-meter-defaults.md) - [seed-org-limit-caps-defaults](references/seed-org-limit-caps-defaults.md) - [seed-org-limit-defaults](references/seed-org-limit-defaults.md) +- [seed-plan](references/seed-plan.md) +- [seed-trust-ladder](references/seed-trust-ladder.md) diff --git a/.agents/skills/hooks-usage/references/app-achievement-reward.md b/.agents/skills/hooks-usage/references/app-achievement-reward.md new file mode 100644 index 0000000000..be031291b4 --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-achievement-reward.md @@ -0,0 +1,34 @@ +# appAchievementReward + + + +Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + +## Usage + +```typescript +useAppAchievementRewardsQuery({ selection: { fields: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } } }) +useAppAchievementRewardQuery({ id: '', selection: { fields: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } } }) +useCreateAppAchievementRewardMutation({ selection: { fields: { id: true } } }) +useUpdateAppAchievementRewardMutation({ selection: { fields: { id: true } } }) +useDeleteAppAchievementRewardMutation({}) +``` + +## Examples + +### List all appAchievementRewards + +```typescript +const { data, isLoading } = useAppAchievementRewardsQuery({ + selection: { fields: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }, +}); +``` + +### Create a appAchievementReward + +```typescript +const { mutate } = useCreateAppAchievementRewardMutation({ + selection: { fields: { id: true } }, +}); +mutate({ amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-event-aggregate.md b/.agents/skills/hooks-usage/references/app-event-aggregate.md new file mode 100644 index 0000000000..088d679e03 --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-event-aggregate.md @@ -0,0 +1,34 @@ +# appEventAggregate + + + +Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + +## Usage + +```typescript +useAppEventAggregatesQuery({ selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } } }) +useAppEventAggregateQuery({ id: '', selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } } }) +useCreateAppEventAggregateMutation({ selection: { fields: { id: true } } }) +useUpdateAppEventAggregateMutation({ selection: { fields: { id: true } } }) +useDeleteAppEventAggregateMutation({}) +``` + +## Examples + +### List all appEventAggregates + +```typescript +const { data, isLoading } = useAppEventAggregatesQuery({ + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }, +}); +``` + +### Create a appEventAggregate + +```typescript +const { mutate } = useCreateAppEventAggregateMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorId: '', count: '', name: '', periodStart: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-event-type.md b/.agents/skills/hooks-usage/references/app-event-type.md new file mode 100644 index 0000000000..3dc3b9b2e9 --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-event-type.md @@ -0,0 +1,34 @@ +# appEventType + + + +Catalog of known event types with per-type configuration for aggregation, retention, and level participation + +## Usage + +```typescript +useAppEventTypesQuery({ selection: { fields: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } } }) +useAppEventTypeQuery({ id: '', selection: { fields: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } } }) +useCreateAppEventTypeMutation({ selection: { fields: { id: true } } }) +useUpdateAppEventTypeMutation({ selection: { fields: { id: true } } }) +useDeleteAppEventTypeMutation({}) +``` + +## Examples + +### List all appEventTypes + +```typescript +const { data, isLoading } = useAppEventTypesQuery({ + selection: { fields: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }, +}); +``` + +### Create a appEventType + +```typescript +const { mutate } = useCreateAppEventTypeMutation({ + selection: { fields: { id: true } }, +}); +mutate({ aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-event.md b/.agents/skills/hooks-usage/references/app-event.md new file mode 100644 index 0000000000..b9c9fe6996 --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-event.md @@ -0,0 +1,34 @@ +# appEvent + + + +Partitioned append-only log of individual user actions; every single event ever recorded + +## Usage + +```typescript +useAppEventsQuery({ selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true } } }) +useAppEventQuery({ id: '', selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true } } }) +useCreateAppEventMutation({ selection: { fields: { id: true } } }) +useUpdateAppEventMutation({ selection: { fields: { id: true } } }) +useDeleteAppEventMutation({}) +``` + +## Examples + +### List all appEvents + +```typescript +const { data, isLoading } = useAppEventsQuery({ + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true } }, +}); +``` + +### Create a appEvent + +```typescript +const { mutate } = useCreateAppEventMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorId: '', count: '', name: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-level-grant.md b/.agents/skills/hooks-usage/references/app-level-grant.md new file mode 100644 index 0000000000..bc91f4a40c --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-level-grant.md @@ -0,0 +1,34 @@ +# appLevelGrant + + + +Records when a user achieves a level; prevents duplicate reward grants + +## Usage + +```typescript +useAppLevelGrantsQuery({ selection: { fields: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } } }) +useAppLevelGrantQuery({ id: '', selection: { fields: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } } }) +useCreateAppLevelGrantMutation({ selection: { fields: { id: true } } }) +useUpdateAppLevelGrantMutation({ selection: { fields: { id: true } } }) +useDeleteAppLevelGrantMutation({}) +``` + +## Examples + +### List all appLevelGrants + +```typescript +const { data, isLoading } = useAppLevelGrantsQuery({ + selection: { fields: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }, +}); +``` + +### Create a appLevelGrant + +```typescript +const { mutate } = useCreateAppLevelGrantMutation({ + selection: { fields: { id: true } }, +}); +mutate({ actorId: '', expiresAt: '', levelName: '', periodStart: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-level-requirement.md b/.agents/skills/hooks-usage/references/app-level-requirement.md new file mode 100644 index 0000000000..3bc599a59a --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-level-requirement.md @@ -0,0 +1,34 @@ +# appLevelRequirement + + + +Defines the specific requirements that must be met to achieve a level + +## Usage + +```typescript +useAppLevelRequirementsQuery({ selection: { fields: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } } }) +useAppLevelRequirementQuery({ id: '', selection: { fields: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } } }) +useCreateAppLevelRequirementMutation({ selection: { fields: { id: true } } }) +useUpdateAppLevelRequirementMutation({ selection: { fields: { id: true } } }) +useDeleteAppLevelRequirementMutation({}) +``` + +## Examples + +### List all appLevelRequirements + +```typescript +const { data, isLoading } = useAppLevelRequirementsQuery({ + selection: { fields: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }, +}); +``` + +### Create a appLevelRequirement + +```typescript +const { mutate } = useCreateAppLevelRequirementMutation({ + selection: { fields: { id: true } }, +}); +mutate({ description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-level.md b/.agents/skills/hooks-usage/references/app-level.md new file mode 100644 index 0000000000..f6318b2d25 --- /dev/null +++ b/.agents/skills/hooks-usage/references/app-level.md @@ -0,0 +1,34 @@ +# appLevel + + + +Defines available levels that users can achieve by completing requirements + +## Usage + +```typescript +useAppLevelsQuery({ selection: { fields: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } } }) +useAppLevelQuery({ id: '', selection: { fields: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } } }) +useCreateAppLevelMutation({ selection: { fields: { id: true } } }) +useUpdateAppLevelMutation({ selection: { fields: { id: true } } }) +useDeleteAppLevelMutation({}) +``` + +## Examples + +### List all appLevels + +```typescript +const { data, isLoading } = useAppLevelsQuery({ + selection: { fields: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }, +}); +``` + +### Create a appLevel + +```typescript +const { mutate } = useCreateAppLevelMutation({ + selection: { fields: { id: true } }, +}); +mutate({ description: '', image: '', name: '', ownerId: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/app-limit-credit-code.md b/.agents/skills/hooks-usage/references/app-limit-credit-code.md index 58c5cb8cc5..91b96717bb 100644 --- a/.agents/skills/hooks-usage/references/app-limit-credit-code.md +++ b/.agents/skills/hooks-usage/references/app-limit-credit-code.md @@ -2,7 +2,7 @@ -Redeemable credit codes managed by admins with the add_credits permission +Redeemable credit codes managed by admins with the add_credits capability ## Usage diff --git a/.agents/skills/hooks-usage/references/billing-usage-summary.md b/.agents/skills/hooks-usage/references/billing-usage-summary.md new file mode 100644 index 0000000000..f53c984556 --- /dev/null +++ b/.agents/skills/hooks-usage/references/billing-usage-summary.md @@ -0,0 +1,34 @@ +# billingUsageSummary + + + +Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + +## Usage + +```typescript +useBillingUsageSummariesQuery({ selection: { fields: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } } }) +useBillingUsageSummaryQuery({ id: '', selection: { fields: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } } }) +useCreateBillingUsageSummaryMutation({ selection: { fields: { id: true } } }) +useUpdateBillingUsageSummaryMutation({ selection: { fields: { id: true } } }) +useDeleteBillingUsageSummaryMutation({}) +``` + +## Examples + +### List all billingUsageSummaries + +```typescript +const { data, isLoading } = useBillingUsageSummariesQuery({ + selection: { fields: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }, +}); +``` + +### Create a billingUsageSummary + +```typescript +const { mutate } = useCreateBillingUsageSummaryMutation({ + selection: { fields: { id: true } }, +}); +mutate({ creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/capture-app-limit-defaults.md b/.agents/skills/hooks-usage/references/capture-app-limit-defaults.md new file mode 100644 index 0000000000..2262b458c5 --- /dev/null +++ b/.agents/skills/hooks-usage/references/capture-app-limit-defaults.md @@ -0,0 +1,19 @@ +# captureAppLimitDefaults + + + +React Query query hook for captureAppLimitDefaults + +## Usage + +```typescript +useCaptureAppLimitDefaultsQuery() +``` + +## Examples + +### Use useCaptureAppLimitDefaultsQuery + +```typescript +const { data, isLoading } = useCaptureAppLimitDefaultsQuery(); +``` diff --git a/.agents/skills/hooks-usage/references/capture-org-limit-defaults.md b/.agents/skills/hooks-usage/references/capture-org-limit-defaults.md new file mode 100644 index 0000000000..dd2b075f1c --- /dev/null +++ b/.agents/skills/hooks-usage/references/capture-org-limit-defaults.md @@ -0,0 +1,19 @@ +# captureOrgLimitDefaults + + + +React Query query hook for captureOrgLimitDefaults + +## Usage + +```typescript +useCaptureOrgLimitDefaultsQuery() +``` + +## Examples + +### Use useCaptureOrgLimitDefaultsQuery + +```typescript +const { data, isLoading } = useCaptureOrgLimitDefaultsQuery(); +``` diff --git a/.agents/skills/hooks-usage/references/capture-trust-ladder.md b/.agents/skills/hooks-usage/references/capture-trust-ladder.md new file mode 100644 index 0000000000..c50cd6fb32 --- /dev/null +++ b/.agents/skills/hooks-usage/references/capture-trust-ladder.md @@ -0,0 +1,19 @@ +# captureTrustLadder + + + +React Query query hook for captureTrustLadder + +## Usage + +```typescript +useCaptureTrustLadderQuery() +``` + +## Examples + +### Use useCaptureTrustLadderQuery + +```typescript +const { data, isLoading } = useCaptureTrustLadderQuery(); +``` diff --git a/.agents/skills/hooks-usage/references/events-achieved.md b/.agents/skills/hooks-usage/references/events-achieved.md new file mode 100644 index 0000000000..d88d7a2abd --- /dev/null +++ b/.agents/skills/hooks-usage/references/events-achieved.md @@ -0,0 +1,19 @@ +# eventsAchieved + + + +React Query query hook for eventsAchieved + +## Usage + +```typescript +useEventsAchievedQuery({ level: '', roleId: '' }) +``` + +## Examples + +### Use useEventsAchievedQuery + +```typescript +const { data, isLoading } = useEventsAchievedQuery({ level: '', roleId: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/events-required.md b/.agents/skills/hooks-usage/references/events-required.md new file mode 100644 index 0000000000..7c3a9fc23e --- /dev/null +++ b/.agents/skills/hooks-usage/references/events-required.md @@ -0,0 +1,19 @@ +# eventsRequired + + + +Reads and enables pagination through a set of `AppLevelRequirement`. + +## Usage + +```typescript +useEventsRequiredQuery({ after: '', first: '', level: '', offset: '', roleId: '' }) +``` + +## Examples + +### Use useEventsRequiredQuery + +```typescript +const { data, isLoading } = useEventsRequiredQuery({ after: '', first: '', level: '', offset: '', roleId: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/grant-achievement.md b/.agents/skills/hooks-usage/references/grant-achievement.md new file mode 100644 index 0000000000..979578c72a --- /dev/null +++ b/.agents/skills/hooks-usage/references/grant-achievement.md @@ -0,0 +1,20 @@ +# grantAchievement + + + +React Query mutation hook for grantAchievement + +## Usage + +```typescript +const { mutate } = useGrantAchievementMutation(); mutate({ input: { actorId: '', levelName: '' } }); +``` + +## Examples + +### Use useGrantAchievementMutation + +```typescript +const { mutate, isLoading } = useGrantAchievementMutation(); +mutate({ input: { actorId: '', levelName: '' } }); +``` diff --git a/.agents/skills/hooks-usage/references/ledger.md b/.agents/skills/hooks-usage/references/ledger.md new file mode 100644 index 0000000000..721879081c --- /dev/null +++ b/.agents/skills/hooks-usage/references/ledger.md @@ -0,0 +1,34 @@ +# ledger + + + +Append-only event log for all billing events (usage, grants, adjustments) + +## Usage + +```typescript +useLedgersQuery({ selection: { fields: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } } }) +useLedgerQuery({ id: '', selection: { fields: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } } }) +useCreateLedgerMutation({ selection: { fields: { id: true } } }) +useUpdateLedgerMutation({ selection: { fields: { id: true } } }) +useDeleteLedgerMutation({}) +``` + +## Examples + +### List all ledgers + +```typescript +const { data, isLoading } = useLedgersQuery({ + selection: { fields: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }, +}); +``` + +### Create a ledger + +```typescript +const { mutate } = useCreateLedgerMutation({ + selection: { fields: { id: true } }, +}); +mutate({ delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/meter-credit.md b/.agents/skills/hooks-usage/references/meter-credit.md new file mode 100644 index 0000000000..8b806ebee9 --- /dev/null +++ b/.agents/skills/hooks-usage/references/meter-credit.md @@ -0,0 +1,34 @@ +# meterCredit + + + +Append-only ledger of credit grants for billing meters that automatically update balances + +## Usage + +```typescript +useMeterCreditsQuery({ selection: { fields: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } } }) +useMeterCreditQuery({ id: '', selection: { fields: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } } }) +useCreateMeterCreditMutation({ selection: { fields: { id: true } } }) +useUpdateMeterCreditMutation({ selection: { fields: { id: true } } }) +useDeleteMeterCreditMutation({}) +``` + +## Examples + +### List all meterCredits + +```typescript +const { data, isLoading } = useMeterCreditsQuery({ + selection: { fields: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }, +}); +``` + +### Create a meterCredit + +```typescript +const { mutate } = useCreateMeterCreditMutation({ + selection: { fields: { id: true } }, +}); +mutate({ amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/meter-default.md b/.agents/skills/hooks-usage/references/meter-default.md new file mode 100644 index 0000000000..087fa56c0a --- /dev/null +++ b/.agents/skills/hooks-usage/references/meter-default.md @@ -0,0 +1,34 @@ +# meterDefault + + + +Default meter catalog: defines which meters are available and their default plan_limit values for new entities + +## Usage + +```typescript +useMeterDefaultsQuery({ selection: { fields: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } } }) +useMeterDefaultQuery({ id: '', selection: { fields: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } } }) +useCreateMeterDefaultMutation({ selection: { fields: { id: true } } }) +useUpdateMeterDefaultMutation({ selection: { fields: { id: true } } }) +useDeleteMeterDefaultMutation({}) +``` + +## Examples + +### List all meterDefaults + +```typescript +const { data, isLoading } = useMeterDefaultsQuery({ + selection: { fields: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }, +}); +``` + +### Create a meterDefault + +```typescript +const { mutate } = useCreateMeterDefaultMutation({ + selection: { fields: { id: true } }, +}); +mutate({ categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/meter-source.md b/.agents/skills/hooks-usage/references/meter-source.md new file mode 100644 index 0000000000..a4ca1a3009 --- /dev/null +++ b/.agents/skills/hooks-usage/references/meter-source.md @@ -0,0 +1,34 @@ +# meterSource + + + +Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + +## Usage + +```typescript +useMeterSourcesQuery({ selection: { fields: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } } }) +useMeterSourceQuery({ id: '', selection: { fields: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } } }) +useCreateMeterSourceMutation({ selection: { fields: { id: true } } }) +useUpdateMeterSourceMutation({ selection: { fields: { id: true } } }) +useDeleteMeterSourceMutation({}) +``` + +## Examples + +### List all meterSources + +```typescript +const { data, isLoading } = useMeterSourcesQuery({ + selection: { fields: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }, +}); +``` + +### Create a meterSource + +```typescript +const { mutate } = useCreateMeterSourceMutation({ + selection: { fields: { id: true } }, +}); +mutate({ aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/meter.md b/.agents/skills/hooks-usage/references/meter.md new file mode 100644 index 0000000000..023a7edc97 --- /dev/null +++ b/.agents/skills/hooks-usage/references/meter.md @@ -0,0 +1,34 @@ +# meter + + + +Defines billable meters (what to track: quotas, feature flags, credit pools) + +## Usage + +```typescript +useMetersQuery({ selection: { fields: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } } }) +useMeterQuery({ id: '', selection: { fields: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } } }) +useCreateMeterMutation({ selection: { fields: { id: true } } }) +useUpdateMeterMutation({ selection: { fields: { id: true } } }) +useDeleteMeterMutation({}) +``` + +## Examples + +### List all meters + +```typescript +const { data, isLoading } = useMetersQuery({ + selection: { fields: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }, +}); +``` + +### Create a meter + +```typescript +const { mutate } = useCreateMeterMutation({ + selection: { fields: { id: true } }, +}); +mutate({ aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-cap.md b/.agents/skills/hooks-usage/references/plan-cap.md new file mode 100644 index 0000000000..b5df8f4fc9 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-cap.md @@ -0,0 +1,34 @@ +# planCap + + + +Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + +## Usage + +```typescript +usePlanCapsQuery({ selection: { fields: { capName: true, capValue: true, id: true, planId: true } } }) +usePlanCapQuery({ id: '', selection: { fields: { capName: true, capValue: true, id: true, planId: true } } }) +useCreatePlanCapMutation({ selection: { fields: { id: true } } }) +useUpdatePlanCapMutation({ selection: { fields: { id: true } } }) +useDeletePlanCapMutation({}) +``` + +## Examples + +### List all planCaps + +```typescript +const { data, isLoading } = usePlanCapsQuery({ + selection: { fields: { capName: true, capValue: true, id: true, planId: true } }, +}); +``` + +### Create a planCap + +```typescript +const { mutate } = useCreatePlanCapMutation({ + selection: { fields: { id: true } }, +}); +mutate({ capName: '', capValue: '', planId: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-limit.md b/.agents/skills/hooks-usage/references/plan-limit.md new file mode 100644 index 0000000000..939bd8a0ee --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-limit.md @@ -0,0 +1,34 @@ +# planLimit + + + +Maps each plan to specific limit names and their maximum allowed values + +## Usage + +```typescript +usePlanLimitsQuery({ selection: { fields: { id: true, limitName: true, maxValue: true, planId: true } } }) +usePlanLimitQuery({ id: '', selection: { fields: { id: true, limitName: true, maxValue: true, planId: true } } }) +useCreatePlanLimitMutation({ selection: { fields: { id: true } } }) +useUpdatePlanLimitMutation({ selection: { fields: { id: true } } }) +useDeletePlanLimitMutation({}) +``` + +## Examples + +### List all planLimits + +```typescript +const { data, isLoading } = usePlanLimitsQuery({ + selection: { fields: { id: true, limitName: true, maxValue: true, planId: true } }, +}); +``` + +### Create a planLimit + +```typescript +const { mutate } = useCreatePlanLimitMutation({ + selection: { fields: { id: true } }, +}); +mutate({ limitName: '', maxValue: '', planId: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-meter-limit.md b/.agents/skills/hooks-usage/references/plan-meter-limit.md new file mode 100644 index 0000000000..da2e4df3f9 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-meter-limit.md @@ -0,0 +1,34 @@ +# planMeterLimit + + + +Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + +## Usage + +```typescript +usePlanMeterLimitsQuery({ selection: { fields: { id: true, meterSlug: true, planId: true, planLimit: true } } }) +usePlanMeterLimitQuery({ id: '', selection: { fields: { id: true, meterSlug: true, planId: true, planLimit: true } } }) +useCreatePlanMeterLimitMutation({ selection: { fields: { id: true } } }) +useUpdatePlanMeterLimitMutation({ selection: { fields: { id: true } } }) +useDeletePlanMeterLimitMutation({}) +``` + +## Examples + +### List all planMeterLimits + +```typescript +const { data, isLoading } = usePlanMeterLimitsQuery({ + selection: { fields: { id: true, meterSlug: true, planId: true, planLimit: true } }, +}); +``` + +### Create a planMeterLimit + +```typescript +const { mutate } = useCreatePlanMeterLimitMutation({ + selection: { fields: { id: true } }, +}); +mutate({ meterSlug: '', planId: '', planLimit: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-override.md b/.agents/skills/hooks-usage/references/plan-override.md new file mode 100644 index 0000000000..78a75204b4 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-override.md @@ -0,0 +1,34 @@ +# planOverride + + + +Per-entity limit overrides that take precedence over plan defaults + +## Usage + +```typescript +usePlanOverridesQuery({ selection: { fields: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } } }) +usePlanOverrideQuery({ id: '', selection: { fields: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } } }) +useCreatePlanOverrideMutation({ selection: { fields: { id: true } } }) +useUpdatePlanOverrideMutation({ selection: { fields: { id: true } } }) +useDeletePlanOverrideMutation({}) +``` + +## Examples + +### List all planOverrides + +```typescript +const { data, isLoading } = usePlanOverridesQuery({ + selection: { fields: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }, +}); +``` + +### Create a planOverride + +```typescript +const { mutate } = useCreatePlanOverrideMutation({ + selection: { fields: { id: true } }, +}); +mutate({ entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-pricing.md b/.agents/skills/hooks-usage/references/plan-pricing.md new file mode 100644 index 0000000000..fd56aa5438 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-pricing.md @@ -0,0 +1,34 @@ +# planPricing + + + +Billing intervals and pricing for each plan tier + +## Usage + +```typescript +usePlanPricingsQuery({ selection: { fields: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } } }) +usePlanPricingQuery({ id: '', selection: { fields: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } } }) +useCreatePlanPricingMutation({ selection: { fields: { id: true } } }) +useUpdatePlanPricingMutation({ selection: { fields: { id: true } } }) +useDeletePlanPricingMutation({}) +``` + +## Examples + +### List all planPricings + +```typescript +const { data, isLoading } = usePlanPricingsQuery({ + selection: { fields: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }, +}); +``` + +### Create a planPricing + +```typescript +const { mutate } = useCreatePlanPricingMutation({ + selection: { fields: { id: true } }, +}); +mutate({ billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan-subscription.md b/.agents/skills/hooks-usage/references/plan-subscription.md new file mode 100644 index 0000000000..b4aa5f5db9 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan-subscription.md @@ -0,0 +1,34 @@ +# planSubscription + + + +Assigns a plan to an entity with subscription lifecycle (start, end, active state) + +## Usage + +```typescript +usePlanSubscriptionsQuery({ selection: { fields: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } } }) +usePlanSubscriptionQuery({ id: '', selection: { fields: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } } }) +useCreatePlanSubscriptionMutation({ selection: { fields: { id: true } } }) +useUpdatePlanSubscriptionMutation({ selection: { fields: { id: true } } }) +useDeletePlanSubscriptionMutation({}) +``` + +## Examples + +### List all planSubscriptions + +```typescript +const { data, isLoading } = usePlanSubscriptionsQuery({ + selection: { fields: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }, +}); +``` + +### Create a planSubscription + +```typescript +const { mutate } = useCreatePlanSubscriptionMutation({ + selection: { fields: { id: true } }, +}); +mutate({ endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/plan.md b/.agents/skills/hooks-usage/references/plan.md new file mode 100644 index 0000000000..8442ac9ed5 --- /dev/null +++ b/.agents/skills/hooks-usage/references/plan.md @@ -0,0 +1,34 @@ +# plan + + + +Defines plan tiers with named limit configurations + +## Usage + +```typescript +usePlansQuery({ selection: { fields: { description: true, id: true, isActive: true, name: true } } }) +usePlanQuery({ id: '', selection: { fields: { description: true, id: true, isActive: true, name: true } } }) +useCreatePlanMutation({ selection: { fields: { id: true } } }) +useUpdatePlanMutation({ selection: { fields: { id: true } } }) +useDeletePlanMutation({}) +``` + +## Examples + +### List all plans + +```typescript +const { data, isLoading } = usePlansQuery({ + selection: { fields: { description: true, id: true, isActive: true, name: true } }, +}); +``` + +### Create a plan + +```typescript +const { mutate } = useCreatePlanMutation({ + selection: { fields: { id: true } }, +}); +mutate({ description: '', isActive: '', name: '' }); +``` diff --git a/.agents/skills/hooks-usage/references/recompute-capabilities.md b/.agents/skills/hooks-usage/references/recompute-capabilities.md new file mode 100644 index 0000000000..7e7f1f640a --- /dev/null +++ b/.agents/skills/hooks-usage/references/recompute-capabilities.md @@ -0,0 +1,20 @@ +# recomputeCapabilities + + + +React Query mutation hook for recomputeCapabilities + +## Usage + +```typescript +const { mutate } = useRecomputeCapabilitiesMutation(); mutate({ input: { actorId: '' } }); +``` + +## Examples + +### Use useRecomputeCapabilitiesMutation + +```typescript +const { mutate, isLoading } = useRecomputeCapabilitiesMutation(); +mutate({ input: { actorId: '' } }); +``` diff --git a/.agents/skills/hooks-usage/references/revoke-achievement.md b/.agents/skills/hooks-usage/references/revoke-achievement.md new file mode 100644 index 0000000000..07a81cf10c --- /dev/null +++ b/.agents/skills/hooks-usage/references/revoke-achievement.md @@ -0,0 +1,20 @@ +# revokeAchievement + + + +React Query mutation hook for revokeAchievement + +## Usage + +```typescript +const { mutate } = useRevokeAchievementMutation(); mutate({ input: { actorId: '', levelName: '' } }); +``` + +## Examples + +### Use useRevokeAchievementMutation + +```typescript +const { mutate, isLoading } = useRevokeAchievementMutation(); +mutate({ input: { actorId: '', levelName: '' } }); +``` diff --git a/.agents/skills/hooks-usage/references/seed-meter-defaults.md b/.agents/skills/hooks-usage/references/seed-meter-defaults.md new file mode 100644 index 0000000000..a55295a5b6 --- /dev/null +++ b/.agents/skills/hooks-usage/references/seed-meter-defaults.md @@ -0,0 +1,20 @@ +# seedMeterDefaults + + + +React Query mutation hook for seedMeterDefaults + +## Usage + +```typescript +const { mutate } = useSeedMeterDefaultsMutation(); mutate({ input: { defaults: '' } }); +``` + +## Examples + +### Use useSeedMeterDefaultsMutation + +```typescript +const { mutate, isLoading } = useSeedMeterDefaultsMutation(); +mutate({ input: { defaults: '' } }); +``` diff --git a/.agents/skills/hooks-usage/references/seed-plan.md b/.agents/skills/hooks-usage/references/seed-plan.md new file mode 100644 index 0000000000..2b2808de4c --- /dev/null +++ b/.agents/skills/hooks-usage/references/seed-plan.md @@ -0,0 +1,20 @@ +# seedPlan + + + +React Query mutation hook for seedPlan + +## Usage + +```typescript +const { mutate } = useSeedPlanMutation(); mutate({ input: { planConfig: '', planName: '' } }); +``` + +## Examples + +### Use useSeedPlanMutation + +```typescript +const { mutate, isLoading } = useSeedPlanMutation(); +mutate({ input: { planConfig: '', planName: '' } }); +``` diff --git a/.agents/skills/hooks-usage/references/seed-trust-ladder.md b/.agents/skills/hooks-usage/references/seed-trust-ladder.md new file mode 100644 index 0000000000..9aa2f56994 --- /dev/null +++ b/.agents/skills/hooks-usage/references/seed-trust-ladder.md @@ -0,0 +1,20 @@ +# seedTrustLadder + + + +React Query mutation hook for seedTrustLadder + +## Usage + +```typescript +const { mutate } = useSeedTrustLadderMutation(); mutate({ input: { ladder: '' } }); +``` + +## Examples + +### Use useSeedTrustLadderMutation + +```typescript +const { mutate, isLoading } = useSeedTrustLadderMutation(); +mutate({ input: { ladder: '' } }); +``` diff --git a/.agents/skills/orm-admin/SKILL.md b/.agents/skills/orm-admin/SKILL.md index 2d7f2b08e6..7fec9be40b 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 30 tables and 12 custom operations +description: ORM client for the admin API — provides typed CRUD operations for 42 tables and 12 custom operations --- # orm-admin -ORM client for the admin API — provides typed CRUD operations for 30 tables and 12 custom operations +ORM client for the admin API — provides typed CRUD operations for 42 tables and 12 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the admin API — provides typed CRUD operations for 30 tables an // Import the ORM client import { db } from './orm'; -// Available models: appAdminGrant, appClaimedInvite, appGrant, appInvite, appMembership, appMembershipDefault, appOwnerGrant, appPermission, ... +// Available models: appAdminGrant, appCapability, appCapabilityDefaultCapability, appCapabilityDefault, appCapabilityDefaultGrant, appClaimedInvite, appGrant, appInvite, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -38,18 +38,28 @@ const items = await db.appAdminGrant.findMany({ See the `references/` directory for detailed per-entity API documentation: - [app-admin-grant](references/app-admin-grant.md) +- [app-capability](references/app-capability.md) +- [app-capability-default-capability](references/app-capability-default-capability.md) +- [app-capability-default](references/app-capability-default.md) +- [app-capability-default-grant](references/app-capability-default-grant.md) - [app-claimed-invite](references/app-claimed-invite.md) - [app-grant](references/app-grant.md) - [app-invite](references/app-invite.md) - [app-membership](references/app-membership.md) - [app-membership-default](references/app-membership-default.md) +- [app-membership-profile](references/app-membership-profile.md) - [app-owner-grant](references/app-owner-grant.md) -- [app-permission](references/app-permission.md) -- [app-permission-default](references/app-permission-default.md) -- [app-permission-default-grant](references/app-permission-default-grant.md) -- [app-permission-default-permission](references/app-permission-default-permission.md) +- [app-profile-capability](references/app-profile-capability.md) +- [app-profile](references/app-profile.md) +- [app-profile-definition-grant](references/app-profile-definition-grant.md) +- [app-profile-grant](references/app-profile-grant.md) +- [app-profile-template](references/app-profile-template.md) - [membership-type](references/membership-type.md) - [org-admin-grant](references/org-admin-grant.md) +- [org-capability](references/org-capability.md) +- [org-capability-default-capability](references/org-capability-default-capability.md) +- [org-capability-default](references/org-capability-default.md) +- [org-capability-default-grant](references/org-capability-default-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) - [org-claimed-invite](references/org-claimed-invite.md) @@ -61,21 +71,23 @@ See the `references/` directory for detailed per-entity API documentation: - [org-member-profile](references/org-member-profile.md) - [org-membership](references/org-membership.md) - [org-membership-default](references/org-membership-default.md) +- [org-membership-profile](references/org-membership-profile.md) - [org-membership-setting](references/org-membership-setting.md) - [org-owner-grant](references/org-owner-grant.md) -- [org-permission](references/org-permission.md) -- [org-permission-default](references/org-permission-default.md) -- [org-permission-default-grant](references/org-permission-default-grant.md) -- [org-permission-default-permission](references/org-permission-default-permission.md) -- [app-permissions-get-by-mask](references/app-permissions-get-by-mask.md) -- [app-permissions-get-mask](references/app-permissions-get-mask.md) -- [app-permissions-get-mask-by-names](references/app-permissions-get-mask-by-names.md) -- [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) +- [org-profile-capability](references/org-profile-capability.md) +- [org-profile](references/org-profile.md) +- [org-profile-definition-grant](references/org-profile-definition-grant.md) +- [org-profile-grant](references/org-profile-grant.md) +- [org-profile-template](references/org-profile-template.md) +- [app-capabilities-get-by-mask](references/app-capabilities-get-by-mask.md) +- [app-capabilities-get-mask](references/app-capabilities-get-mask.md) +- [app-capabilities-get-mask-by-names](references/app-capabilities-get-mask-by-names.md) +- [app-capabilities-get-padded-mask](references/app-capabilities-get-padded-mask.md) +- [org-capabilities-get-by-mask](references/org-capabilities-get-by-mask.md) +- [org-capabilities-get-mask](references/org-capabilities-get-mask.md) +- [org-capabilities-get-mask-by-names](references/org-capabilities-get-mask-by-names.md) +- [org-capabilities-get-padded-mask](references/org-capabilities-get-padded-mask.md) - [org-is-manager-of](references/org-is-manager-of.md) -- [org-permissions-get-by-mask](references/org-permissions-get-by-mask.md) -- [org-permissions-get-mask](references/org-permissions-get-mask.md) -- [org-permissions-get-mask-by-names](references/org-permissions-get-mask-by-names.md) -- [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [provision-bucket](references/provision-bucket.md) - [submit-app-invite-code](references/submit-app-invite-code.md) - [submit-org-invite-code](references/submit-org-invite-code.md) diff --git a/.agents/skills/orm-admin/references/app-capabilities-get-by-mask.md b/.agents/skills/orm-admin/references/app-capabilities-get-by-mask.md new file mode 100644 index 0000000000..90d1a9e9cc --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capabilities-get-by-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetByMask + + + +Reads and enables pagination through a set of `AppCapability`. + +## Usage + +```typescript +db.query.appCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute() +``` + +## Examples + +### Run appCapabilitiesGetByMask + +```typescript +const result = await db.query.appCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capabilities-get-mask-by-names.md b/.agents/skills/orm-admin/references/app-capabilities-get-mask-by-names.md new file mode 100644 index 0000000000..3dda6a91ee --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capabilities-get-mask-by-names.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetMaskByNames + + + +Execute the appCapabilitiesGetMaskByNames query + +## Usage + +```typescript +db.query.appCapabilitiesGetMaskByNames({ names: '' }).execute() +``` + +## Examples + +### Run appCapabilitiesGetMaskByNames + +```typescript +const result = await db.query.appCapabilitiesGetMaskByNames({ names: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capabilities-get-mask.md b/.agents/skills/orm-admin/references/app-capabilities-get-mask.md new file mode 100644 index 0000000000..9fbf544d1e --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capabilities-get-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetMask + + + +Execute the appCapabilitiesGetMask query + +## Usage + +```typescript +db.query.appCapabilitiesGetMask({ ids: '' }).execute() +``` + +## Examples + +### Run appCapabilitiesGetMask + +```typescript +const result = await db.query.appCapabilitiesGetMask({ ids: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capabilities-get-padded-mask.md b/.agents/skills/orm-admin/references/app-capabilities-get-padded-mask.md new file mode 100644 index 0000000000..ee316c4f81 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capabilities-get-padded-mask.md @@ -0,0 +1,19 @@ +# appCapabilitiesGetPaddedMask + + + +Execute the appCapabilitiesGetPaddedMask query + +## Usage + +```typescript +db.query.appCapabilitiesGetPaddedMask({ mask: '' }).execute() +``` + +## Examples + +### Run appCapabilitiesGetPaddedMask + +```typescript +const result = await db.query.appCapabilitiesGetPaddedMask({ mask: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capability-default-capability.md b/.agents/skills/orm-admin/references/app-capability-default-capability.md new file mode 100644 index 0000000000..1354f47ae3 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capability-default-capability.md @@ -0,0 +1,34 @@ +# appCapabilityDefaultCapability + + + +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + +## Usage + +```typescript +db.appCapabilityDefaultCapability.findMany({ select: { id: true } }).execute() +db.appCapabilityDefaultCapability.findOne({ id: '', select: { id: true } }).execute() +db.appCapabilityDefaultCapability.create({ data: { capabilityId: '' }, select: { id: true } }).execute() +db.appCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.appCapabilityDefaultCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appCapabilityDefaultCapability records + +```typescript +const items = await db.appCapabilityDefaultCapability.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a appCapabilityDefaultCapability + +```typescript +const item = await db.appCapabilityDefaultCapability.create({ + data: { capabilityId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capability-default-grant.md b/.agents/skills/orm-admin/references/app-capability-default-grant.md new file mode 100644 index 0000000000..30ba84b9c6 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capability-default-grant.md @@ -0,0 +1,34 @@ +# appCapabilityDefaultGrant + + + +Audit log of capability additions and removals from the defaults bitmask + +## Usage + +```typescript +db.appCapabilityDefaultGrant.findMany({ select: { id: true } }).execute() +db.appCapabilityDefaultGrant.findOne({ id: '', select: { id: true } }).execute() +db.appCapabilityDefaultGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute() +db.appCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.appCapabilityDefaultGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appCapabilityDefaultGrant records + +```typescript +const items = await db.appCapabilityDefaultGrant.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a appCapabilityDefaultGrant + +```typescript +const item = await db.appCapabilityDefaultGrant.create({ + data: { capabilityId: '', grantorId: '', isGrant: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capability-default.md b/.agents/skills/orm-admin/references/app-capability-default.md new file mode 100644 index 0000000000..b879fc2c82 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capability-default.md @@ -0,0 +1,34 @@ +# appCapabilityDefault + + + +Stores the default capability bitmask assigned to new members upon joining + +## Usage + +```typescript +db.appCapabilityDefault.findMany({ select: { id: true } }).execute() +db.appCapabilityDefault.findOne({ id: '', select: { id: true } }).execute() +db.appCapabilityDefault.create({ data: { capabilities: '' }, select: { id: true } }).execute() +db.appCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.appCapabilityDefault.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appCapabilityDefault records + +```typescript +const items = await db.appCapabilityDefault.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a appCapabilityDefault + +```typescript +const item = await db.appCapabilityDefault.create({ + data: { capabilities: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-capability.md b/.agents/skills/orm-admin/references/app-capability.md new file mode 100644 index 0000000000..ff9bc53583 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-capability.md @@ -0,0 +1,34 @@ +# appCapability + + + +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + +## Usage + +```typescript +db.appCapability.findMany({ select: { id: true } }).execute() +db.appCapability.findOne({ id: '', select: { id: true } }).execute() +db.appCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute() +db.appCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute() +db.appCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appCapability records + +```typescript +const items = await db.appCapability.findMany({ + select: { id: true, bitnum: true } +}).execute(); +``` + +### Create a appCapability + +```typescript +const item = await db.appCapability.create({ + data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-grant.md b/.agents/skills/orm-admin/references/app-grant.md index 531fb02203..9ed8dd742c 100644 --- a/.agents/skills/orm-admin/references/app-grant.md +++ b/.agents/skills/orm-admin/references/app-grant.md @@ -2,14 +2,14 @@ -Records of individual permission grants and revocations for members via bitmask +Records of individual capability grants and revocations for members via bitmask ## Usage ```typescript db.appGrant.findMany({ select: { id: true } }).execute() db.appGrant.findOne({ id: '', select: { id: true } }).execute() -db.appGrant.create({ data: { actorId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute() +db.appGrant.create({ data: { actorId: '', capabilities: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute() db.appGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.appGrant.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.appGrant.findMany({ ```typescript const item = await db.appGrant.create({ - data: { actorId: '', grantorId: '', isGrant: '', permissions: '' }, + data: { actorId: '', capabilities: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/app-membership-profile.md b/.agents/skills/orm-admin/references/app-membership-profile.md new file mode 100644 index 0000000000..60de9aab46 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-membership-profile.md @@ -0,0 +1,34 @@ +# appMembershipProfile + + + +Every profile a membership holds; memberships.profile_id points at one of them + +## Usage + +```typescript +db.appMembershipProfile.findMany({ select: { id: true } }).execute() +db.appMembershipProfile.findOne({ id: '', select: { id: true } }).execute() +db.appMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute() +db.appMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() +db.appMembershipProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appMembershipProfile records + +```typescript +const items = await db.appMembershipProfile.findMany({ + select: { id: true, actorId: true } +}).execute(); +``` + +### Create a appMembershipProfile + +```typescript +const item = await db.appMembershipProfile.create({ + data: { actorId: '', membershipId: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-membership.md b/.agents/skills/orm-admin/references/app-membership.md index f6e58c7020..9718d02e1b 100644 --- a/.agents/skills/orm-admin/references/app-membership.md +++ b/.agents/skills/orm-admin/references/app-membership.md @@ -2,14 +2,14 @@ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status ## Usage ```typescript db.appMembership.findMany({ select: { id: true } }).execute() db.appMembership.findOne({ id: '', select: { id: true } }).execute() -db.appMembership.create({ data: { actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute() +db.appMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute() db.appMembership.update({ where: { id: '' }, data: { actorId: '' }, 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: { actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }, + data: { actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/app-profile-capability.md b/.agents/skills/orm-admin/references/app-profile-capability.md new file mode 100644 index 0000000000..d2535b94ac --- /dev/null +++ b/.agents/skills/orm-admin/references/app-profile-capability.md @@ -0,0 +1,34 @@ +# appProfileCapability + + + +Join table linking profiles to individual capabilities they include + +## Usage + +```typescript +db.appProfileCapability.findMany({ select: { id: true } }).execute() +db.appProfileCapability.findOne({ id: '', select: { id: true } }).execute() +db.appProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute() +db.appProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.appProfileCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appProfileCapability records + +```typescript +const items = await db.appProfileCapability.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a appProfileCapability + +```typescript +const item = await db.appProfileCapability.create({ + data: { capabilityId: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-profile-definition-grant.md b/.agents/skills/orm-admin/references/app-profile-definition-grant.md new file mode 100644 index 0000000000..a78f6d796d --- /dev/null +++ b/.agents/skills/orm-admin/references/app-profile-definition-grant.md @@ -0,0 +1,34 @@ +# appProfileDefinitionGrant + + + +Audit log of capability additions and removals from profile definitions + +## Usage + +```typescript +db.appProfileDefinitionGrant.findMany({ select: { id: true } }).execute() +db.appProfileDefinitionGrant.findOne({ id: '', select: { id: true } }).execute() +db.appProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute() +db.appProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.appProfileDefinitionGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appProfileDefinitionGrant records + +```typescript +const items = await db.appProfileDefinitionGrant.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a appProfileDefinitionGrant + +```typescript +const item = await db.appProfileDefinitionGrant.create({ + data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-profile-grant.md b/.agents/skills/orm-admin/references/app-profile-grant.md new file mode 100644 index 0000000000..c18df87c73 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-profile-grant.md @@ -0,0 +1,34 @@ +# appProfileGrant + + + +Audit log of profile assignments and revocations for members + +## Usage + +```typescript +db.appProfileGrant.findMany({ select: { id: true } }).execute() +db.appProfileGrant.findOne({ id: '', select: { id: true } }).execute() +db.appProfileGrant.create({ data: { grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute() +db.appProfileGrant.update({ where: { id: '' }, data: { grantorId: '' }, select: { id: true } }).execute() +db.appProfileGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appProfileGrant records + +```typescript +const items = await db.appProfileGrant.findMany({ + select: { id: true, grantorId: true } +}).execute(); +``` + +### Create a appProfileGrant + +```typescript +const item = await db.appProfileGrant.create({ + data: { grantorId: '', isGrant: '', membershipId: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-profile-template.md b/.agents/skills/orm-admin/references/app-profile-template.md new file mode 100644 index 0000000000..1244f30e44 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-profile-template.md @@ -0,0 +1,34 @@ +# appProfileTemplate + + + +Template profiles that are automatically seeded into new entities when created + +## Usage + +```typescript +db.appProfileTemplate.findMany({ select: { id: true } }).execute() +db.appProfileTemplate.findOne({ id: '', select: { id: true } }).execute() +db.appProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute() +db.appProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.appProfileTemplate.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appProfileTemplate records + +```typescript +const items = await db.appProfileTemplate.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a appProfileTemplate + +```typescript +const item = await db.appProfileTemplate.create({ + data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/app-profile.md b/.agents/skills/orm-admin/references/app-profile.md new file mode 100644 index 0000000000..6e87115a75 --- /dev/null +++ b/.agents/skills/orm-admin/references/app-profile.md @@ -0,0 +1,34 @@ +# appProfile + + + +Named capability bundles (roles) that group multiple capabilities into reusable profiles + +## Usage + +```typescript +db.appProfile.findMany({ select: { id: true } }).execute() +db.appProfile.findOne({ id: '', select: { id: true } }).execute() +db.appProfile.create({ data: { capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute() +db.appProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.appProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appProfile records + +```typescript +const items = await db.appProfile.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a appProfile + +```typescript +const item = await db.appProfile.create({ + data: { capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capabilities-get-by-mask.md b/.agents/skills/orm-admin/references/org-capabilities-get-by-mask.md new file mode 100644 index 0000000000..7b9ac29826 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capabilities-get-by-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetByMask + + + +Reads and enables pagination through a set of `OrgCapability`. + +## Usage + +```typescript +db.query.orgCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute() +``` + +## Examples + +### Run orgCapabilitiesGetByMask + +```typescript +const result = await db.query.orgCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capabilities-get-mask-by-names.md b/.agents/skills/orm-admin/references/org-capabilities-get-mask-by-names.md new file mode 100644 index 0000000000..5b7dc10fdf --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capabilities-get-mask-by-names.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetMaskByNames + + + +Execute the orgCapabilitiesGetMaskByNames query + +## Usage + +```typescript +db.query.orgCapabilitiesGetMaskByNames({ names: '' }).execute() +``` + +## Examples + +### Run orgCapabilitiesGetMaskByNames + +```typescript +const result = await db.query.orgCapabilitiesGetMaskByNames({ names: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capabilities-get-mask.md b/.agents/skills/orm-admin/references/org-capabilities-get-mask.md new file mode 100644 index 0000000000..dace13091a --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capabilities-get-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetMask + + + +Execute the orgCapabilitiesGetMask query + +## Usage + +```typescript +db.query.orgCapabilitiesGetMask({ ids: '' }).execute() +``` + +## Examples + +### Run orgCapabilitiesGetMask + +```typescript +const result = await db.query.orgCapabilitiesGetMask({ ids: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capabilities-get-padded-mask.md b/.agents/skills/orm-admin/references/org-capabilities-get-padded-mask.md new file mode 100644 index 0000000000..48cb0cc8d1 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capabilities-get-padded-mask.md @@ -0,0 +1,19 @@ +# orgCapabilitiesGetPaddedMask + + + +Execute the orgCapabilitiesGetPaddedMask query + +## Usage + +```typescript +db.query.orgCapabilitiesGetPaddedMask({ mask: '' }).execute() +``` + +## Examples + +### Run orgCapabilitiesGetPaddedMask + +```typescript +const result = await db.query.orgCapabilitiesGetPaddedMask({ mask: '' }).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capability-default-capability.md b/.agents/skills/orm-admin/references/org-capability-default-capability.md new file mode 100644 index 0000000000..fdaf446fda --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capability-default-capability.md @@ -0,0 +1,34 @@ +# orgCapabilityDefaultCapability + + + +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + +## Usage + +```typescript +db.orgCapabilityDefaultCapability.findMany({ select: { id: true } }).execute() +db.orgCapabilityDefaultCapability.findOne({ id: '', select: { id: true } }).execute() +db.orgCapabilityDefaultCapability.create({ data: { capabilityId: '', entityId: '' }, select: { id: true } }).execute() +db.orgCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.orgCapabilityDefaultCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgCapabilityDefaultCapability records + +```typescript +const items = await db.orgCapabilityDefaultCapability.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a orgCapabilityDefaultCapability + +```typescript +const item = await db.orgCapabilityDefaultCapability.create({ + data: { capabilityId: '', entityId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capability-default-grant.md b/.agents/skills/orm-admin/references/org-capability-default-grant.md new file mode 100644 index 0000000000..fe5075f112 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capability-default-grant.md @@ -0,0 +1,34 @@ +# orgCapabilityDefaultGrant + + + +Audit log of capability additions and removals from the defaults bitmask + +## Usage + +```typescript +db.orgCapabilityDefaultGrant.findMany({ select: { id: true } }).execute() +db.orgCapabilityDefaultGrant.findOne({ id: '', select: { id: true } }).execute() +db.orgCapabilityDefaultGrant.create({ data: { capabilityId: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute() +db.orgCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.orgCapabilityDefaultGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgCapabilityDefaultGrant records + +```typescript +const items = await db.orgCapabilityDefaultGrant.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a orgCapabilityDefaultGrant + +```typescript +const item = await db.orgCapabilityDefaultGrant.create({ + data: { capabilityId: '', entityId: '', grantorId: '', isGrant: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capability-default.md b/.agents/skills/orm-admin/references/org-capability-default.md new file mode 100644 index 0000000000..ad33f5ee0e --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capability-default.md @@ -0,0 +1,34 @@ +# orgCapabilityDefault + + + +Stores the default capability bitmask assigned to new members upon joining + +## Usage + +```typescript +db.orgCapabilityDefault.findMany({ select: { id: true } }).execute() +db.orgCapabilityDefault.findOne({ id: '', select: { id: true } }).execute() +db.orgCapabilityDefault.create({ data: { capabilities: '', entityId: '' }, select: { id: true } }).execute() +db.orgCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.orgCapabilityDefault.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgCapabilityDefault records + +```typescript +const items = await db.orgCapabilityDefault.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a orgCapabilityDefault + +```typescript +const item = await db.orgCapabilityDefault.create({ + data: { capabilities: '', entityId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-capability.md b/.agents/skills/orm-admin/references/org-capability.md new file mode 100644 index 0000000000..aae1fb6870 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-capability.md @@ -0,0 +1,34 @@ +# orgCapability + + + +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + +## Usage + +```typescript +db.orgCapability.findMany({ select: { id: true } }).execute() +db.orgCapability.findOne({ id: '', select: { id: true } }).execute() +db.orgCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute() +db.orgCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute() +db.orgCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgCapability records + +```typescript +const items = await db.orgCapability.findMany({ + select: { id: true, bitnum: true } +}).execute(); +``` + +### Create a orgCapability + +```typescript +const item = await db.orgCapability.create({ + data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-grant.md b/.agents/skills/orm-admin/references/org-grant.md index a54da209fc..9e0f48c18d 100644 --- a/.agents/skills/orm-admin/references/org-grant.md +++ b/.agents/skills/orm-admin/references/org-grant.md @@ -2,14 +2,14 @@ -Records of individual permission grants and revocations for members via bitmask +Records of individual capability grants and revocations for members via bitmask ## Usage ```typescript db.orgGrant.findMany({ select: { id: true } }).execute() db.orgGrant.findOne({ id: '', select: { id: true } }).execute() -db.orgGrant.create({ data: { actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute() +db.orgGrant.create({ data: { actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute() db.orgGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() db.orgGrant.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.orgGrant.findMany({ ```typescript const item = await db.orgGrant.create({ - data: { actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }, + data: { actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/org-membership-profile.md b/.agents/skills/orm-admin/references/org-membership-profile.md new file mode 100644 index 0000000000..c4e98ee258 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-membership-profile.md @@ -0,0 +1,34 @@ +# orgMembershipProfile + + + +Every profile a membership holds; memberships.profile_id points at one of them + +## Usage + +```typescript +db.orgMembershipProfile.findMany({ select: { id: true } }).execute() +db.orgMembershipProfile.findOne({ id: '', select: { id: true } }).execute() +db.orgMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute() +db.orgMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() +db.orgMembershipProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgMembershipProfile records + +```typescript +const items = await db.orgMembershipProfile.findMany({ + select: { id: true, actorId: true } +}).execute(); +``` + +### Create a orgMembershipProfile + +```typescript +const item = await db.orgMembershipProfile.create({ + data: { actorId: '', membershipId: '', profileId: '' }, + 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 be25eb145b..02700b46bf 100644 --- a/.agents/skills/orm-admin/references/org-membership.md +++ b/.agents/skills/orm-admin/references/org-membership.md @@ -2,14 +2,14 @@ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status ## Usage ```typescript db.orgMembership.findMany({ select: { id: true } }).execute() db.orgMembership.findOne({ id: '', select: { id: true } }).execute() -db.orgMembership.create({ data: { actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute() +db.orgMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute() db.orgMembership.update({ where: { id: '' }, data: { actorId: '' }, 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: { actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }, + data: { actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/org-profile-capability.md b/.agents/skills/orm-admin/references/org-profile-capability.md new file mode 100644 index 0000000000..9c9b9fed2f --- /dev/null +++ b/.agents/skills/orm-admin/references/org-profile-capability.md @@ -0,0 +1,34 @@ +# orgProfileCapability + + + +Join table linking profiles to individual capabilities they include + +## Usage + +```typescript +db.orgProfileCapability.findMany({ select: { id: true } }).execute() +db.orgProfileCapability.findOne({ id: '', select: { id: true } }).execute() +db.orgProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute() +db.orgProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.orgProfileCapability.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgProfileCapability records + +```typescript +const items = await db.orgProfileCapability.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a orgProfileCapability + +```typescript +const item = await db.orgProfileCapability.create({ + data: { capabilityId: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-profile-definition-grant.md b/.agents/skills/orm-admin/references/org-profile-definition-grant.md new file mode 100644 index 0000000000..1b1e811ff4 --- /dev/null +++ b/.agents/skills/orm-admin/references/org-profile-definition-grant.md @@ -0,0 +1,34 @@ +# orgProfileDefinitionGrant + + + +Audit log of capability additions and removals from profile definitions + +## Usage + +```typescript +db.orgProfileDefinitionGrant.findMany({ select: { id: true } }).execute() +db.orgProfileDefinitionGrant.findOne({ id: '', select: { id: true } }).execute() +db.orgProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute() +db.orgProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute() +db.orgProfileDefinitionGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgProfileDefinitionGrant records + +```typescript +const items = await db.orgProfileDefinitionGrant.findMany({ + select: { id: true, capabilityId: true } +}).execute(); +``` + +### Create a orgProfileDefinitionGrant + +```typescript +const item = await db.orgProfileDefinitionGrant.create({ + data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-profile-grant.md b/.agents/skills/orm-admin/references/org-profile-grant.md new file mode 100644 index 0000000000..ea00aa5f0c --- /dev/null +++ b/.agents/skills/orm-admin/references/org-profile-grant.md @@ -0,0 +1,34 @@ +# orgProfileGrant + + + +Audit log of profile assignments and revocations for members + +## Usage + +```typescript +db.orgProfileGrant.findMany({ select: { id: true } }).execute() +db.orgProfileGrant.findOne({ id: '', select: { id: true } }).execute() +db.orgProfileGrant.create({ data: { entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute() +db.orgProfileGrant.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute() +db.orgProfileGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgProfileGrant records + +```typescript +const items = await db.orgProfileGrant.findMany({ + select: { id: true, entityId: true } +}).execute(); +``` + +### Create a orgProfileGrant + +```typescript +const item = await db.orgProfileGrant.create({ + data: { entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-profile-template.md b/.agents/skills/orm-admin/references/org-profile-template.md new file mode 100644 index 0000000000..1882a832fa --- /dev/null +++ b/.agents/skills/orm-admin/references/org-profile-template.md @@ -0,0 +1,34 @@ +# orgProfileTemplate + + + +Template profiles that are automatically seeded into new entities when created + +## Usage + +```typescript +db.orgProfileTemplate.findMany({ select: { id: true } }).execute() +db.orgProfileTemplate.findOne({ id: '', select: { id: true } }).execute() +db.orgProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute() +db.orgProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.orgProfileTemplate.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgProfileTemplate records + +```typescript +const items = await db.orgProfileTemplate.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a orgProfileTemplate + +```typescript +const item = await db.orgProfileTemplate.create({ + data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-profile.md b/.agents/skills/orm-admin/references/org-profile.md new file mode 100644 index 0000000000..36cea063cb --- /dev/null +++ b/.agents/skills/orm-admin/references/org-profile.md @@ -0,0 +1,34 @@ +# orgProfile + + + +Named capability bundles (roles) that group multiple capabilities into reusable profiles + +## Usage + +```typescript +db.orgProfile.findMany({ select: { id: true } }).execute() +db.orgProfile.findOne({ id: '', select: { id: true } }).execute() +db.orgProfile.create({ data: { capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute() +db.orgProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute() +db.orgProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgProfile records + +```typescript +const items = await db.orgProfile.findMany({ + select: { id: true, capabilities: true } +}).execute(); +``` + +### Create a orgProfile + +```typescript +const item = await db.orgProfile.create({ + data: { capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/SKILL.md b/.agents/skills/orm-api/SKILL.md index 058ac6134e..206677aab1 100644 --- a/.agents/skills/orm-api/SKILL.md +++ b/.agents/skills/orm-api/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-api -description: ORM client for the api API — provides typed CRUD operations for 80 tables and 17 custom operations +description: ORM client for the api API — provides typed CRUD operations for 86 tables and 17 custom operations --- # orm-api -ORM client for the api API — provides typed CRUD operations for 80 tables and 17 custom operations +ORM client for the api API — provides typed CRUD operations for 86 tables and 17 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the api API — provides typed CRUD operations for 80 tables and // Import the ORM client import { db } from './orm'; -// Available models: apiSchema, apiSetting, apis, astMigration, checkConstraint, compositeType, corsSetting, database, ... +// Available models: api, apiSchema, apiSetting, appComponent, app, checkConstraint, compositeType, corsSetting, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -28,7 +28,7 @@ db..delete({ where: { id: '' } }).execute() ### Query records ```typescript -const items = await db.apiSchema.findMany({ +const items = await db.api.findMany({ select: { id: true } }).execute(); ``` @@ -37,10 +37,11 @@ const items = await db.apiSchema.findMany({ See the `references/` directory for detailed per-entity API documentation: +- [api](references/api.md) - [api-schema](references/api-schema.md) - [api-setting](references/api-setting.md) -- [apis](references/apis.md) -- [ast-migration](references/ast-migration.md) +- [app-component](references/app-component.md) +- [app](references/app.md) - [check-constraint](references/check-constraint.md) - [composite-type](references/composite-type.md) - [cors-setting](references/cors-setting.md) @@ -53,6 +54,9 @@ See the `references/` directory for detailed per-entity API documentation: - [domain-event](references/domain-event.md) - [domain-type](references/domain-type.md) - [domain-verification](references/domain-verification.md) +- [email-identity](references/email-identity.md) +- [email-provider-account](references/email-provider-account.md) +- [email-site-identity](references/email-site-identity.md) - [embedding-chunk](references/embedding-chunk.md) - [enum](references/enum.md) - [exclusion-constraint](references/exclusion-constraint.md) @@ -69,13 +73,16 @@ See the `references/` directory for detailed per-entity API documentation: - [node-type-registry](references/node-type-registry.md) - [page](references/page.md) - [partition](references/partition.md) +- [platform-api](references/platform-api.md) - [platform-api-schema](references/platform-api-schema.md) - [platform-api-setting](references/platform-api-setting.md) -- [platform-apis](references/platform-apis.md) - [platform-cors-setting](references/platform-cors-setting.md) - [platform-domain](references/platform-domain.md) - [platform-domain-event](references/platform-domain-event.md) - [platform-domain-verification](references/platform-domain-verification.md) +- [platform-email-identity](references/platform-email-identity.md) +- [platform-email-provider-account](references/platform-email-provider-account.md) +- [platform-email-site-identity](references/platform-email-site-identity.md) - [platform-managed-domain](references/platform-managed-domain.md) - [platform-page](references/platform-page.md) - [platform-site-app-link](references/platform-site-app-link.md) @@ -103,7 +110,6 @@ See the `references/` directory for detailed per-entity API documentation: - [site-theme](references/site-theme.md) - [site-web-config](references/site-web-config.md) - [spatial-relation](references/spatial-relation.md) -- [sql-action](references/sql-action.md) - [table-behavior](references/table-behavior.md) - [table](references/table.md) - [table-grant](references/table-grant.md) @@ -123,14 +129,14 @@ See the `references/` directory for detailed per-entity API documentation: - [resolve-http-route](references/resolve-http-route.md) - [resolve-route](references/resolve-route.md) - [resolve-site-app-links](references/resolve-site-app-links.md) -- [accept-database-transfer](references/accept-database-transfer.md) - [apply-rls](references/apply-rls.md) -- [cancel-database-transfer](references/cancel-database-transfer.md) +- [apps-install-app](references/apps-install-app.md) +- [apps-uninstall-app](references/apps-uninstall-app.md) +- [apps-upgrade-app](references/apps-upgrade-app.md) - [domains-assign-subdomain](references/domains-assign-subdomain.md) - [platform-domains-assign-subdomain](references/platform-domains-assign-subdomain.md) - [platform-sites-provision-static-site](references/platform-sites-provision-static-site.md) - [provision-bucket](references/provision-bucket.md) -- [reject-database-transfer](references/reject-database-transfer.md) - [request-database](references/request-database.md) - [set-field-order](references/set-field-order.md) - [sites-provision-static-site](references/sites-provision-static-site.md) diff --git a/.agents/skills/orm-api/references/app-component.md b/.agents/skills/orm-api/references/app-component.md new file mode 100644 index 0000000000..e17995b048 --- /dev/null +++ b/.agents/skills/orm-api/references/app-component.md @@ -0,0 +1,34 @@ +# appComponent + + + +App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + +## Usage + +```typescript +db.appComponent.findMany({ select: { id: true } }).execute() +db.appComponent.findOne({ id: '', select: { id: true } }).execute() +db.appComponent.create({ data: { appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }, select: { id: true } }).execute() +db.appComponent.update({ where: { id: '' }, data: { appId: '' }, select: { id: true } }).execute() +db.appComponent.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appComponent records + +```typescript +const items = await db.appComponent.findMany({ + select: { id: true, appId: true } +}).execute(); +``` + +### Create a appComponent + +```typescript +const item = await db.appComponent.create({ + data: { appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/app.md b/.agents/skills/orm-api/references/app.md index c10fbd9e96..1d06c5e9a1 100644 --- a/.agents/skills/orm-api/references/app.md +++ b/.agents/skills/orm-api/references/app.md @@ -2,15 +2,15 @@ -Mobile and native app configuration linked to a site, including store links and identifiers +App aggregates: thin identity rows whose components are global catalog references ## Usage ```typescript db.app.findMany({ select: { id: true } }).execute() db.app.findOne({ id: '', select: { id: true } }).execute() -db.app.create({ data: { appIdPrefix: '', appImage: '', appStoreId: '', appStoreLink: '', databaseId: '', name: '', playStoreLink: '', siteId: '' }, select: { id: true } }).execute() -db.app.update({ where: { id: '' }, data: { appIdPrefix: '' }, select: { id: true } }).execute() +db.app.create({ data: { config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }, select: { id: true } }).execute() +db.app.update({ where: { id: '' }, data: { config: '' }, select: { id: true } }).execute() db.app.delete({ where: { id: '' } }).execute() ``` @@ -20,7 +20,7 @@ db.app.delete({ where: { id: '' } }).execute() ```typescript const items = await db.app.findMany({ - select: { id: true, appIdPrefix: true } + select: { id: true, config: true } }).execute(); ``` @@ -28,7 +28,7 @@ const items = await db.app.findMany({ ```typescript const item = await db.app.create({ - data: { appIdPrefix: '', appImage: '', appStoreId: '', appStoreLink: '', databaseId: '', name: '', playStoreLink: '', siteId: '' }, + data: { config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-api/references/apps-install-app.md b/.agents/skills/orm-api/references/apps-install-app.md new file mode 100644 index 0000000000..b609294136 --- /dev/null +++ b/.agents/skills/orm-api/references/apps-install-app.md @@ -0,0 +1,19 @@ +# appsInstallApp + + + +Execute the appsInstallApp mutation + +## Usage + +```typescript +db.mutation.appsInstallApp({ input: '' }).execute() +``` + +## Examples + +### Run appsInstallApp + +```typescript +const result = await db.mutation.appsInstallApp({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-api/references/apps-uninstall-app.md b/.agents/skills/orm-api/references/apps-uninstall-app.md new file mode 100644 index 0000000000..3598434977 --- /dev/null +++ b/.agents/skills/orm-api/references/apps-uninstall-app.md @@ -0,0 +1,19 @@ +# appsUninstallApp + + + +Execute the appsUninstallApp mutation + +## Usage + +```typescript +db.mutation.appsUninstallApp({ input: { targetAppId: '' } }).execute() +``` + +## Examples + +### Run appsUninstallApp + +```typescript +const result = await db.mutation.appsUninstallApp({ input: { targetAppId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-api/references/apps-upgrade-app.md b/.agents/skills/orm-api/references/apps-upgrade-app.md new file mode 100644 index 0000000000..8da2e3f7e0 --- /dev/null +++ b/.agents/skills/orm-api/references/apps-upgrade-app.md @@ -0,0 +1,19 @@ +# appsUpgradeApp + + + +Execute the appsUpgradeApp mutation + +## Usage + +```typescript +db.mutation.appsUpgradeApp({ input: { newParams: '', targetAppId: '' } }).execute() +``` + +## Examples + +### Run appsUpgradeApp + +```typescript +const result = await db.mutation.appsUpgradeApp({ input: { newParams: '', targetAppId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-api/references/email-identity.md b/.agents/skills/orm-api/references/email-identity.md new file mode 100644 index 0000000000..677c88caf4 --- /dev/null +++ b/.agents/skills/orm-api/references/email-identity.md @@ -0,0 +1,34 @@ +# emailIdentity + + + +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + +## Usage + +```typescript +db.emailIdentity.findMany({ select: { id: true } }).execute() +db.emailIdentity.findOne({ id: '', select: { id: true } }).execute() +db.emailIdentity.create({ data: { databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute() +db.emailIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.emailIdentity.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all emailIdentity records + +```typescript +const items = await db.emailIdentity.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a emailIdentity + +```typescript +const item = await db.emailIdentity.create({ + data: { databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/email-provider-account.md b/.agents/skills/orm-api/references/email-provider-account.md new file mode 100644 index 0000000000..90061a5248 --- /dev/null +++ b/.agents/skills/orm-api/references/email-provider-account.md @@ -0,0 +1,34 @@ +# emailProviderAccount + + + +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + +## Usage + +```typescript +db.emailProviderAccount.findMany({ select: { id: true } }).execute() +db.emailProviderAccount.findOne({ id: '', select: { id: true } }).execute() +db.emailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute() +db.emailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute() +db.emailProviderAccount.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all emailProviderAccount records + +```typescript +const items = await db.emailProviderAccount.findMany({ + select: { id: true, apiBaseUrl: true } +}).execute(); +``` + +### Create a emailProviderAccount + +```typescript +const item = await db.emailProviderAccount.create({ + data: { apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/email-site-identity.md b/.agents/skills/orm-api/references/email-site-identity.md new file mode 100644 index 0000000000..c7e35877a5 --- /dev/null +++ b/.agents/skills/orm-api/references/email-site-identity.md @@ -0,0 +1,34 @@ +# emailSiteIdentity + + + +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + +## Usage + +```typescript +db.emailSiteIdentity.findMany({ select: { id: true } }).execute() +db.emailSiteIdentity.findOne({ id: '', select: { id: true } }).execute() +db.emailSiteIdentity.create({ data: { databaseId: '', emailIdentityId: '', siteId: '' }, select: { id: true } }).execute() +db.emailSiteIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.emailSiteIdentity.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all emailSiteIdentity records + +```typescript +const items = await db.emailSiteIdentity.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a emailSiteIdentity + +```typescript +const item = await db.emailSiteIdentity.create({ + data: { databaseId: '', emailIdentityId: '', siteId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/platform-email-identity.md b/.agents/skills/orm-api/references/platform-email-identity.md new file mode 100644 index 0000000000..de12725a8b --- /dev/null +++ b/.agents/skills/orm-api/references/platform-email-identity.md @@ -0,0 +1,34 @@ +# platformEmailIdentity + + + +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + +## Usage + +```typescript +db.platformEmailIdentity.findMany({ select: { id: true } }).execute() +db.platformEmailIdentity.findOne({ id: '', select: { id: true } }).execute() +db.platformEmailIdentity.create({ data: { fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute() +db.platformEmailIdentity.update({ where: { id: '' }, data: { fromAddress: '' }, select: { id: true } }).execute() +db.platformEmailIdentity.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformEmailIdentity records + +```typescript +const items = await db.platformEmailIdentity.findMany({ + select: { id: true, fromAddress: true } +}).execute(); +``` + +### Create a platformEmailIdentity + +```typescript +const item = await db.platformEmailIdentity.create({ + data: { fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/platform-email-provider-account.md b/.agents/skills/orm-api/references/platform-email-provider-account.md new file mode 100644 index 0000000000..b20f47f543 --- /dev/null +++ b/.agents/skills/orm-api/references/platform-email-provider-account.md @@ -0,0 +1,34 @@ +# platformEmailProviderAccount + + + +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + +## Usage + +```typescript +db.platformEmailProviderAccount.findMany({ select: { id: true } }).execute() +db.platformEmailProviderAccount.findOne({ id: '', select: { id: true } }).execute() +db.platformEmailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute() +db.platformEmailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute() +db.platformEmailProviderAccount.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformEmailProviderAccount records + +```typescript +const items = await db.platformEmailProviderAccount.findMany({ + select: { id: true, apiBaseUrl: true } +}).execute(); +``` + +### Create a platformEmailProviderAccount + +```typescript +const item = await db.platformEmailProviderAccount.create({ + data: { apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-api/references/platform-email-site-identity.md b/.agents/skills/orm-api/references/platform-email-site-identity.md new file mode 100644 index 0000000000..e6ece12432 --- /dev/null +++ b/.agents/skills/orm-api/references/platform-email-site-identity.md @@ -0,0 +1,34 @@ +# platformEmailSiteIdentity + + + +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + +## Usage + +```typescript +db.platformEmailSiteIdentity.findMany({ select: { id: true } }).execute() +db.platformEmailSiteIdentity.findOne({ id: '', select: { id: true } }).execute() +db.platformEmailSiteIdentity.create({ data: { emailIdentityId: '', siteId: '' }, select: { id: true } }).execute() +db.platformEmailSiteIdentity.update({ where: { id: '' }, data: { emailIdentityId: '' }, select: { id: true } }).execute() +db.platformEmailSiteIdentity.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all platformEmailSiteIdentity records + +```typescript +const items = await db.platformEmailSiteIdentity.findMany({ + select: { id: true, emailIdentityId: true } +}).execute(); +``` + +### Create a platformEmailSiteIdentity + +```typescript +const item = await db.platformEmailSiteIdentity.create({ + data: { emailIdentityId: '', siteId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-auth/SKILL.md b/.agents/skills/orm-auth/SKILL.md index c8e9e97a1f..130c35a603 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 13 tables and 35 custom operations +description: ORM client for the auth API — provides typed CRUD operations for 13 tables and 37 custom operations --- # orm-auth -ORM client for the auth API — provides typed CRUD operations for 13 tables and 35 custom operations +ORM client for the auth API — provides typed CRUD operations for 13 tables and 37 custom operations ## Usage @@ -78,9 +78,11 @@ See the `references/` directory for detailed per-entity API documentation: - [set-password](references/set-password.md) - [sign-in](references/sign-in.md) - [sign-in-cross-origin](references/sign-in-cross-origin.md) +- [sign-in-magic-link](references/sign-in-magic-link.md) - [sign-in-sms-otp](references/sign-in-sms-otp.md) - [sign-out](references/sign-out.md) - [sign-up](references/sign-up.md) +- [sign-up-magic-link](references/sign-up-magic-link.md) - [sign-up-sms](references/sign-up-sms.md) - [verify-email](references/verify-email.md) - [verify-password](references/verify-password.md) diff --git a/.agents/skills/orm-auth/references/principal-scope-override.md b/.agents/skills/orm-auth/references/principal-scope-override.md index 1be7a26bca..3763ab214c 100644 --- a/.agents/skills/orm-auth/references/principal-scope-override.md +++ b/.agents/skills/orm-auth/references/principal-scope-override.md @@ -2,7 +2,7 @@ -Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. +Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. ## Usage diff --git a/.agents/skills/orm-auth/references/sign-in-magic-link.md b/.agents/skills/orm-auth/references/sign-in-magic-link.md new file mode 100644 index 0000000000..9945e184e6 --- /dev/null +++ b/.agents/skills/orm-auth/references/sign-in-magic-link.md @@ -0,0 +1,19 @@ +# signInMagicLink + + + +Execute the signInMagicLink mutation + +## Usage + +```typescript +db.mutation.signInMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute() +``` + +## Examples + +### Run signInMagicLink + +```typescript +const result = await db.mutation.signInMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/sign-up-magic-link.md b/.agents/skills/orm-auth/references/sign-up-magic-link.md new file mode 100644 index 0000000000..f965ff86ea --- /dev/null +++ b/.agents/skills/orm-auth/references/sign-up-magic-link.md @@ -0,0 +1,19 @@ +# signUpMagicLink + + + +Execute the signUpMagicLink mutation + +## Usage + +```typescript +db.mutation.signUpMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute() +``` + +## Examples + +### Run signUpMagicLink + +```typescript +const result = await db.mutation.signUpMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/SKILL.md b/.agents/skills/orm-compute/SKILL.md index c16969bcf4..2958f34c3a 100644 --- a/.agents/skills/orm-compute/SKILL.md +++ b/.agents/skills/orm-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-compute -description: ORM client for the compute API — provides typed CRUD operations for 69 tables and 29 custom operations +description: ORM client for the compute API — provides typed CRUD operations for 70 tables and 38 custom operations --- # orm-compute -ORM client for the compute API — provides typed CRUD operations for 69 tables and 29 custom operations +ORM client for the compute API — provides typed CRUD operations for 70 tables and 38 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the compute API — provides typed CRUD operations for 69 tables // Import the ORM client import { db } from './orm'; -// Available models: dbPreset, functionApiBinding, functionCapabilityBinding, functionDefinition, functionDeployment, functionDeploymentEvent, functionExecutionLog, functionGraphCommit, ... +// Available models: contentPreset, dbPreset, functionApiBinding, functionCapabilityBinding, functionDefinition, functionDeployment, functionDeploymentEvent, functionExecutionLog, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -28,7 +28,7 @@ db..delete({ where: { id: '' } }).execute() ### Query records ```typescript -const items = await db.dbPreset.findMany({ +const items = await db.contentPreset.findMany({ select: { id: true } }).execute(); ``` @@ -37,6 +37,7 @@ const items = await db.dbPreset.findMany({ See the `references/` directory for detailed per-entity API documentation: +- [content-preset](references/content-preset.md) - [db-preset](references/db-preset.md) - [function-api-binding](references/function-api-binding.md) - [function-capability-binding](references/function-capability-binding.md) @@ -116,12 +117,19 @@ See the `references/` directory for detailed per-entity API documentation: - [import-graph-json](references/import-graph-json.md) - [infra-init-empty-repo](references/infra-init-empty-repo.md) - [infra-insert-node-at-path](references/infra-insert-node-at-path.md) +- [infra-insert-nodes-at-paths](references/infra-insert-nodes-at-paths.md) +- [infra-set-and-commit](references/infra-set-and-commit.md) - [infra-set-data-at-path](references/infra-set-data-at-path.md) +- [infra-set-many-and-commit](references/infra-set-many-and-commit.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [platform-resource-installations-install](references/platform-resource-installations-install.md) - [platform-resource-installations-rollback](references/platform-resource-installations-rollback.md) - [platform-resource-installations-uninstall](references/platform-resource-installations-uninstall.md) @@ -132,6 +140,8 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-installations-uninstall](references/resource-installations-uninstall.md) - [resource-installations-upgrade](references/resource-installations-upgrade.md) - [save-graph](references/save-graph.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) - [start-execution](references/start-execution.md) - [validate-function-graph](references/validate-function-graph.md) diff --git a/.agents/skills/orm-compute/references/content-preset.md b/.agents/skills/orm-compute/references/content-preset.md new file mode 100644 index 0000000000..a578d21e7f --- /dev/null +++ b/.agents/skills/orm-compute/references/content-preset.md @@ -0,0 +1,34 @@ +# contentPreset + + + +Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + +## Usage + +```typescript +db.contentPreset.findMany({ select: { id: true } }).execute() +db.contentPreset.findOne({ id: '', select: { id: true } }).execute() +db.contentPreset.create({ data: { active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }, select: { id: true } }).execute() +db.contentPreset.update({ where: { id: '' }, data: { active: '' }, select: { id: true } }).execute() +db.contentPreset.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all contentPreset records + +```typescript +const items = await db.contentPreset.findMany({ + select: { id: true, active: true } +}).execute(); +``` + +### Create a contentPreset + +```typescript +const item = await db.contentPreset.create({ + data: { active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-compute/references/function-definition.md b/.agents/skills/orm-compute/references/function-definition.md index eba02866b7..f79b1115bd 100644 --- a/.agents/skills/orm-compute/references/function-definition.md +++ b/.agents/skills/orm-compute/references/function-definition.md @@ -9,7 +9,7 @@ Function definitions — registered cloud functions with routing, queue, and ret ```typescript db.functionDefinition.findMany({ select: { id: true } }).execute() db.functionDefinition.findOne({ id: '', select: { id: true } }).execute() -db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() +db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute() db.functionDefinition.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionDefinition.findMany({ ```typescript const item = await db.functionDefinition.create({ - data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, + data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/function-deployment.md b/.agents/skills/orm-compute/references/function-deployment.md index 8509eae494..d5261c1276 100644 --- a/.agents/skills/orm-compute/references/function-deployment.md +++ b/.agents/skills/orm-compute/references/function-deployment.md @@ -9,7 +9,7 @@ Function deployment bindings — ties a handler image to a namespace for Knative ```typescript db.functionDeployment.findMany({ select: { id: true } }).execute() db.functionDeployment.findOne({ id: '', select: { id: true } }).execute() -db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() +db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute() db.functionDeployment.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionDeployment.findMany({ ```typescript const item = await db.functionDeployment.create({ - data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, + data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..3a6a112c6a --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# infraInsertNodesAtPaths + + + +Execute the infraInsertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.infraInsertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run infraInsertNodesAtPaths + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/infra-set-and-commit.md b/.agents/skills/orm-compute/references/infra-set-and-commit.md new file mode 100644 index 0000000000..1cafda087d --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-set-and-commit.md @@ -0,0 +1,19 @@ +# infraSetAndCommit + + + +Execute the infraSetAndCommit mutation + +## Usage + +```typescript +db.mutation.infraSetAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run infraSetAndCommit + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/infra-set-many-and-commit.md b/.agents/skills/orm-compute/references/infra-set-many-and-commit.md new file mode 100644 index 0000000000..2232a8908d --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# infraSetManyAndCommit + + + +Execute the infraSetManyAndCommit mutation + +## Usage + +```typescript +db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run infraSetManyAndCommit + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..92134612a9 --- /dev/null +++ b/.agents/skills/orm-compute/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.insertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run insertNodesAtPaths + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-function-definition.md b/.agents/skills/orm-compute/references/platform-function-definition.md index 25c601cbdd..262f1d1ab0 100644 --- a/.agents/skills/orm-compute/references/platform-function-definition.md +++ b/.agents/skills/orm-compute/references/platform-function-definition.md @@ -9,7 +9,7 @@ Function definitions — registered cloud functions with routing, queue, and ret ```typescript db.platformFunctionDefinition.findMany({ select: { id: true } }).execute() db.platformFunctionDefinition.findOne({ id: '', select: { id: true } }).execute() -db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() +db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute() db.platformFunctionDefinition.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformFunctionDefinition.findMany({ ```typescript const item = await db.platformFunctionDefinition.create({ - data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, + data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-function-deployment.md b/.agents/skills/orm-compute/references/platform-function-deployment.md index b0fc8d4fa4..e0a3b7df4b 100644 --- a/.agents/skills/orm-compute/references/platform-function-deployment.md +++ b/.agents/skills/orm-compute/references/platform-function-deployment.md @@ -9,7 +9,7 @@ Function deployment bindings — ties a handler image to a namespace for Knative ```typescript db.platformFunctionDeployment.findMany({ select: { id: true } }).execute() db.platformFunctionDeployment.findOne({ id: '', select: { id: true } }).execute() -db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() +db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute() db.platformFunctionDeployment.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformFunctionDeployment.findMany({ ```typescript const item = await db.platformFunctionDeployment.create({ - data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, + data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..432256cae1 --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# platformInfraInsertNodesAtPaths + + + +Execute the platformInfraInsertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraInsertNodesAtPaths + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md b/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..044f7b74aa --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetAndCommit + + + +Execute the platformInfraSetAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraSetAndCommit + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md b/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..a08d77f2f1 --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetManyAndCommit + + + +Execute the platformInfraSetManyAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run platformInfraSetManyAndCommit + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/set-and-commit.md b/.agents/skills/orm-compute/references/set-and-commit.md new file mode 100644 index 0000000000..ad6df17886 --- /dev/null +++ b/.agents/skills/orm-compute/references/set-and-commit.md @@ -0,0 +1,19 @@ +# setAndCommit + + + +Execute the setAndCommit mutation + +## Usage + +```typescript +db.mutation.setAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run setAndCommit + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/set-many-and-commit.md b/.agents/skills/orm-compute/references/set-many-and-commit.md new file mode 100644 index 0000000000..95526566ce --- /dev/null +++ b/.agents/skills/orm-compute/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```typescript +db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run setManyAndCommit + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-modules/SKILL.md b/.agents/skills/orm-modules/SKILL.md index 4bada56dd8..748b992fa5 100644 --- a/.agents/skills/orm-modules/SKILL.md +++ b/.agents/skills/orm-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-modules -description: ORM client for the modules API — provides typed CRUD operations for 76 tables and 12 custom operations +description: ORM client for the modules API — provides typed CRUD operations for 83 tables and 3 custom operations --- # orm-modules -ORM client for the modules API — provides typed CRUD operations for 76 tables and 12 custom operations +ORM client for the modules API — provides typed CRUD operations for 83 tables and 3 custom operations ## Usage @@ -45,12 +45,15 @@ See the `references/` directory for detailed per-entity API documentation: - [blueprint](references/blueprint.md) - [blueprint-construction](references/blueprint-construction.md) - [blueprint-template](references/blueprint-template.md) +- [capabilities-module](references/capabilities-module.md) - [catalog-module](references/catalog-module.md) - [compute-log-module](references/compute-log-module.md) - [config-secrets-user-module](references/config-secrets-user-module.md) - [connected-accounts-module](references/connected-accounts-module.md) +- [content-preset-module](references/content-preset-module.md) - [crypto-addresses-module](references/crypto-addresses-module.md) - [crypto-auth-module](references/crypto-auth-module.md) +- [data-capabilities-field](references/data-capabilities-field.md) - [database-provision-module](references/database-provision-module.md) - [database-settings-module](references/database-settings-module.md) - [db-pool-config](references/db-pool-config.md) @@ -61,9 +64,11 @@ See the `references/` directory for detailed per-entity API documentation: - [denormalized-table-field](references/denormalized-table-field.md) - [devices-module](references/devices-module.md) - [domain-module](references/domain-module.md) +- [email-sender-module](references/email-sender-module.md) - [emails-module](references/emails-module.md) - [entity-type-provision](references/entity-type-provision.md) - [events-module](references/events-module.md) +- [file-ref-field](references/file-ref-field.md) - [function-deployment-module](references/function-deployment-module.md) - [function-invocation-module](references/function-invocation-module.md) - [function-module](references/function-module.md) @@ -85,8 +90,8 @@ See the `references/` directory for detailed per-entity API documentation: - [merkle-store-module](references/merkle-store-module.md) - [namespace-module](references/namespace-module.md) - [notifications-module](references/notifications-module.md) +- [oauth-requests-module](references/oauth-requests-module.md) - [pages-module](references/pages-module.md) -- [permissions-module](references/permissions-module.md) - [phone-numbers-module](references/phone-numbers-module.md) - [plans-module](references/plans-module.md) - [principal-auth-module](references/principal-auth-module.md) @@ -98,6 +103,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-module](references/resource-module.md) - [rls-module](references/rls-module.md) - [route-module](references/route-module.md) +- [scope-types-module](references/scope-types-module.md) - [secure-table-provision](references/secure-table-provision.md) - [session-secrets-module](references/session-secrets-module.md) - [sessions-module](references/sessions-module.md) @@ -108,20 +114,12 @@ See the `references/` directory for detailed per-entity API documentation: - [user-auth-module](references/user-auth-module.md) - [user-credentials-module](references/user-credentials-module.md) - [user-settings-module](references/user-settings-module.md) +- [user-settings-security-module](references/user-settings-security-module.md) - [user-state-module](references/user-state-module.md) - [users-module](references/users-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [webauthn-credentials-module](references/webauthn-credentials-module.md) - [webhook-module](references/webhook-module.md) -- [resolve-blueprint-field](references/resolve-blueprint-field.md) -- [resolve-blueprint-table](references/resolve-blueprint-table.md) - [construct-blueprint](references/construct-blueprint.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) - [provision-bucket](references/provision-bucket.md) -- [provision-check-constraint](references/provision-check-constraint.md) -- [provision-full-text-search](references/provision-full-text-search.md) -- [provision-index](references/provision-index.md) -- [provision-relation](references/provision-relation.md) -- [provision-spatial-relation](references/provision-spatial-relation.md) -- [provision-table](references/provision-table.md) -- [provision-unique-constraint](references/provision-unique-constraint.md) diff --git a/.agents/skills/orm-modules/references/agent-module.md b/.agents/skills/orm-modules/references/agent-module.md index f7caea2b3d..d8d9f9dfb8 100644 --- a/.agents/skills/orm-modules/references/agent-module.md +++ b/.agents/skills/orm-modules/references/agent-module.md @@ -9,7 +9,7 @@ ORM operations for AgentModule records ```typescript db.agentModule.findMany({ select: { id: true } }).execute() db.agentModule.findOne({ id: '', select: { id: true } }).execute() -db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute() +db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute() db.agentModule.update({ where: { id: '' }, data: { agentTableId: '' }, select: { id: true } }).execute() db.agentModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.agentModule.findMany({ ```typescript const item = await db.agentModule.create({ - data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, + data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/api-surface-module.md b/.agents/skills/orm-modules/references/api-surface-module.md index 4e20c4cee6..ae2b9a7e7b 100644 --- a/.agents/skills/orm-modules/references/api-surface-module.md +++ b/.agents/skills/orm-modules/references/api-surface-module.md @@ -9,7 +9,7 @@ ORM operations for ApiSurfaceModule records ```typescript db.apiSurfaceModule.findMany({ select: { id: true } }).execute() db.apiSurfaceModule.findOne({ id: '', select: { id: true } }).execute() -db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.apiSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.apiSurfaceModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.apiSurfaceModule.findMany({ ```typescript const item = await db.apiSurfaceModule.create({ - data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/app-module.md b/.agents/skills/orm-modules/references/app-module.md index 2d2b18dddd..a7c13cf531 100644 --- a/.agents/skills/orm-modules/references/app-module.md +++ b/.agents/skills/orm-modules/references/app-module.md @@ -9,7 +9,7 @@ ORM operations for AppModule records ```typescript db.appModule.findMany({ select: { id: true } }).execute() db.appModule.findOne({ id: '', select: { id: true } }).execute() -db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.appModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.appModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.appModule.findMany({ ```typescript const item = await db.appModule.create({ - data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/billing-module.md b/.agents/skills/orm-modules/references/billing-module.md index 77d3cdaa4c..70fc8de6bc 100644 --- a/.agents/skills/orm-modules/references/billing-module.md +++ b/.agents/skills/orm-modules/references/billing-module.md @@ -9,7 +9,7 @@ ORM operations for BillingModule records ```typescript db.billingModule.findMany({ select: { id: true } }).execute() db.billingModule.findOne({ id: '', select: { id: true } }).execute() -db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute() +db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute() db.billingModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.billingModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.billingModule.findMany({ ```typescript const item = await db.billingModule.create({ - data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, + data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/billing-provider-module.md b/.agents/skills/orm-modules/references/billing-provider-module.md index 6f8cea981b..182cc6f6a5 100644 --- a/.agents/skills/orm-modules/references/billing-provider-module.md +++ b/.agents/skills/orm-modules/references/billing-provider-module.md @@ -9,7 +9,7 @@ ORM operations for BillingProviderModule records ```typescript db.billingProviderModule.findMany({ select: { id: true } }).execute() db.billingProviderModule.findOne({ id: '', select: { id: true } }).execute() -db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute() +db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute() db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.billingProviderModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.billingProviderModule.findMany({ ```typescript const item = await db.billingProviderModule.create({ - data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, + data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/capabilities-module.md b/.agents/skills/orm-modules/references/capabilities-module.md new file mode 100644 index 0000000000..ec40d26f73 --- /dev/null +++ b/.agents/skills/orm-modules/references/capabilities-module.md @@ -0,0 +1,34 @@ +# capabilitiesModule + + + +ORM operations for CapabilitiesModule records + +## Usage + +```typescript +db.capabilitiesModule.findMany({ select: { id: true } }).execute() +db.capabilitiesModule.findOne({ id: '', select: { id: true } }).execute() +db.capabilitiesModule.create({ data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute() +db.capabilitiesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute() +db.capabilitiesModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all capabilitiesModule records + +```typescript +const items = await db.capabilitiesModule.findMany({ + select: { id: true, actorTableId: true } +}).execute(); +``` + +### Create a capabilitiesModule + +```typescript +const item = await db.capabilitiesModule.create({ + data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/catalog-module.md b/.agents/skills/orm-modules/references/catalog-module.md index c40261ac97..7598944390 100644 --- a/.agents/skills/orm-modules/references/catalog-module.md +++ b/.agents/skills/orm-modules/references/catalog-module.md @@ -9,7 +9,7 @@ ORM operations for CatalogModule records ```typescript db.catalogModule.findMany({ select: { id: true } }).execute() db.catalogModule.findOne({ id: '', select: { id: true } }).execute() -db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() +db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.catalogModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.catalogModule.findMany({ ```typescript const item = await db.catalogModule.create({ - data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, + data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/content-preset-module.md b/.agents/skills/orm-modules/references/content-preset-module.md new file mode 100644 index 0000000000..0050c7b567 --- /dev/null +++ b/.agents/skills/orm-modules/references/content-preset-module.md @@ -0,0 +1,34 @@ +# contentPresetModule + + + +ORM operations for ContentPresetModule records + +## Usage + +```typescript +db.contentPresetModule.findMany({ select: { id: true } }).execute() +db.contentPresetModule.findOne({ id: '', select: { id: true } }).execute() +db.contentPresetModule.create({ data: { apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }, select: { id: true } }).execute() +db.contentPresetModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() +db.contentPresetModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all contentPresetModule records + +```typescript +const items = await db.contentPresetModule.findMany({ + select: { id: true, apiName: true } +}).execute(); +``` + +### Create a contentPresetModule + +```typescript +const item = await db.contentPresetModule.create({ + data: { apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/data-capabilities-field.md b/.agents/skills/orm-modules/references/data-capabilities-field.md new file mode 100644 index 0000000000..3405558cfc --- /dev/null +++ b/.agents/skills/orm-modules/references/data-capabilities-field.md @@ -0,0 +1,34 @@ +# dataCapabilitiesField + + + +ORM operations for DataCapabilitiesField records + +## Usage + +```typescript +db.dataCapabilitiesField.findMany({ select: { id: true } }).execute() +db.dataCapabilitiesField.findOne({ id: '', select: { id: true } }).execute() +db.dataCapabilitiesField.create({ data: { capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }, select: { id: true } }).execute() +db.dataCapabilitiesField.update({ where: { id: '' }, data: { capabilitiesModuleId: '' }, select: { id: true } }).execute() +db.dataCapabilitiesField.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all dataCapabilitiesField records + +```typescript +const items = await db.dataCapabilitiesField.findMany({ + select: { id: true, capabilitiesModuleId: true } +}).execute(); +``` + +### Create a dataCapabilitiesField + +```typescript +const item = await db.dataCapabilitiesField.create({ + data: { capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/database-settings-module.md b/.agents/skills/orm-modules/references/database-settings-module.md index 192fa0b0ee..aeb475fde3 100644 --- a/.agents/skills/orm-modules/references/database-settings-module.md +++ b/.agents/skills/orm-modules/references/database-settings-module.md @@ -9,7 +9,7 @@ ORM operations for DatabaseSettingsModule records ```typescript db.databaseSettingsModule.findMany({ select: { id: true } }).execute() db.databaseSettingsModule.findOne({ id: '', select: { id: true } }).execute() -db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute() +db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute() db.databaseSettingsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.databaseSettingsModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.databaseSettingsModule.findMany({ ```typescript const item = await db.databaseSettingsModule.create({ - data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, + data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/db-usage-module.md b/.agents/skills/orm-modules/references/db-usage-module.md index b5319dfd0e..aeb0ddb80d 100644 --- a/.agents/skills/orm-modules/references/db-usage-module.md +++ b/.agents/skills/orm-modules/references/db-usage-module.md @@ -9,7 +9,7 @@ ORM operations for DbUsageModule records ```typescript db.dbUsageModule.findMany({ select: { id: true } }).execute() db.dbUsageModule.findOne({ id: '', select: { id: true } }).execute() -db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute() +db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute() db.dbUsageModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.dbUsageModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.dbUsageModule.findMany({ ```typescript const item = await db.dbUsageModule.create({ - data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, + data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/domain-module.md b/.agents/skills/orm-modules/references/domain-module.md index 2c18fa046f..894c368280 100644 --- a/.agents/skills/orm-modules/references/domain-module.md +++ b/.agents/skills/orm-modules/references/domain-module.md @@ -9,7 +9,7 @@ ORM operations for DomainModule records ```typescript db.domainModule.findMany({ select: { id: true } }).execute() db.domainModule.findOne({ id: '', select: { id: true } }).execute() -db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.domainModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.domainModule.findMany({ ```typescript const item = await db.domainModule.create({ - data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/email-sender-module.md b/.agents/skills/orm-modules/references/email-sender-module.md new file mode 100644 index 0000000000..330eb035cd --- /dev/null +++ b/.agents/skills/orm-modules/references/email-sender-module.md @@ -0,0 +1,34 @@ +# emailSenderModule + + + +ORM operations for EmailSenderModule records + +## Usage + +```typescript +db.emailSenderModule.findMany({ select: { id: true } }).execute() +db.emailSenderModule.findOne({ id: '', select: { id: true } }).execute() +db.emailSenderModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }, select: { id: true } }).execute() +db.emailSenderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() +db.emailSenderModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all emailSenderModule records + +```typescript +const items = await db.emailSenderModule.findMany({ + select: { id: true, apiName: true } +}).execute(); +``` + +### Create a emailSenderModule + +```typescript +const item = await db.emailSenderModule.create({ + data: { apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/entity-type-provision.md b/.agents/skills/orm-modules/references/entity-type-provision.md index 984eb8a365..320ee57233 100644 --- a/.agents/skills/orm-modules/references/entity-type-provision.md +++ b/.agents/skills/orm-modules/references/entity-type-provision.md @@ -3,7 +3,7 @@ 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). + and installs the required modules (capabilities, 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). diff --git a/.agents/skills/orm-modules/references/events-module.md b/.agents/skills/orm-modules/references/events-module.md index b819f53a02..a8fc9d3b2e 100644 --- a/.agents/skills/orm-modules/references/events-module.md +++ b/.agents/skills/orm-modules/references/events-module.md @@ -9,7 +9,7 @@ ORM operations for EventsModule records ```typescript db.eventsModule.findMany({ select: { id: true } }).execute() db.eventsModule.findOne({ id: '', select: { id: true } }).execute() -db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }, select: { id: true } }).execute() +db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }, select: { id: true } }).execute() db.eventsModule.update({ where: { id: '' }, data: { achievementRewardsTableId: '' }, select: { id: true } }).execute() db.eventsModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.eventsModule.findMany({ ```typescript const item = await db.eventsModule.create({ - data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }, + data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/file-ref-field.md b/.agents/skills/orm-modules/references/file-ref-field.md new file mode 100644 index 0000000000..f8022ec482 --- /dev/null +++ b/.agents/skills/orm-modules/references/file-ref-field.md @@ -0,0 +1,34 @@ +# fileRefField + + + +ORM operations for FileRefField records + +## Usage + +```typescript +db.fileRefField.findMany({ select: { id: true } }).execute() +db.fileRefField.findOne({ id: '', select: { id: true } }).execute() +db.fileRefField.create({ data: { bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }, select: { id: true } }).execute() +db.fileRefField.update({ where: { id: '' }, data: { bucketKey: '' }, select: { id: true } }).execute() +db.fileRefField.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all fileRefField records + +```typescript +const items = await db.fileRefField.findMany({ + select: { id: true, bucketKey: true } +}).execute(); +``` + +### Create a fileRefField + +```typescript +const item = await db.fileRefField.create({ + data: { bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/function-deployment-module.md b/.agents/skills/orm-modules/references/function-deployment-module.md index 604cef565a..fb6b473214 100644 --- a/.agents/skills/orm-modules/references/function-deployment-module.md +++ b/.agents/skills/orm-modules/references/function-deployment-module.md @@ -9,7 +9,7 @@ ORM operations for FunctionDeploymentModule records ```typescript db.functionDeploymentModule.findMany({ select: { id: true } }).execute() db.functionDeploymentModule.findOne({ id: '', select: { id: true } }).execute() -db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.functionDeploymentModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.functionDeploymentModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionDeploymentModule.findMany({ ```typescript const item = await db.functionDeploymentModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/function-invocation-module.md b/.agents/skills/orm-modules/references/function-invocation-module.md index 39c9f0925e..8717e63043 100644 --- a/.agents/skills/orm-modules/references/function-invocation-module.md +++ b/.agents/skills/orm-modules/references/function-invocation-module.md @@ -9,7 +9,7 @@ ORM operations for FunctionInvocationModule records ```typescript db.functionInvocationModule.findMany({ select: { id: true } }).execute() db.functionInvocationModule.findOne({ id: '', select: { id: true } }).execute() -db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.functionInvocationModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.functionInvocationModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionInvocationModule.findMany({ ```typescript const item = await db.functionInvocationModule.create({ - data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/function-module.md b/.agents/skills/orm-modules/references/function-module.md index bcf0eaa17d..8eda284faa 100644 --- a/.agents/skills/orm-modules/references/function-module.md +++ b/.agents/skills/orm-modules/references/function-module.md @@ -9,7 +9,7 @@ ORM operations for FunctionModule records ```typescript db.functionModule.findMany({ select: { id: true } }).execute() db.functionModule.findOne({ id: '', select: { id: true } }).execute() -db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.functionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.functionModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionModule.findMany({ ```typescript const item = await db.functionModule.create({ - data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, + data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/graph-execution-module.md b/.agents/skills/orm-modules/references/graph-execution-module.md index e1840f0074..f4e4cfe227 100644 --- a/.agents/skills/orm-modules/references/graph-execution-module.md +++ b/.agents/skills/orm-modules/references/graph-execution-module.md @@ -9,7 +9,7 @@ ORM operations for GraphExecutionModule records ```typescript db.graphExecutionModule.findMany({ select: { id: true } }).execute() db.graphExecutionModule.findOne({ id: '', select: { id: true } }).execute() -db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.graphExecutionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.graphExecutionModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.graphExecutionModule.findMany({ ```typescript const item = await db.graphExecutionModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/graph-module.md b/.agents/skills/orm-modules/references/graph-module.md index 78fd3a116d..b207f2f405 100644 --- a/.agents/skills/orm-modules/references/graph-module.md +++ b/.agents/skills/orm-modules/references/graph-module.md @@ -9,7 +9,7 @@ ORM operations for GraphModule records ```typescript db.graphModule.findMany({ select: { id: true } }).execute() db.graphModule.findOne({ id: '', select: { id: true } }).execute() -db.graphModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute() +db.graphModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute() db.graphModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.graphModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.graphModule.findMany({ ```typescript const item = await db.graphModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/hierarchy-module.md b/.agents/skills/orm-modules/references/hierarchy-module.md index ca88709f98..b849506981 100644 --- a/.agents/skills/orm-modules/references/hierarchy-module.md +++ b/.agents/skills/orm-modules/references/hierarchy-module.md @@ -9,7 +9,7 @@ ORM operations for HierarchyModule records ```typescript db.hierarchyModule.findMany({ select: { id: true } }).execute() db.hierarchyModule.findOne({ id: '', select: { id: true } }).execute() -db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute() +db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute() db.hierarchyModule.update({ where: { id: '' }, data: { chartEdgeGrantsTableId: '' }, select: { id: true } }).execute() db.hierarchyModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.hierarchyModule.findMany({ ```typescript const item = await db.hierarchyModule.create({ - data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, + data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/http-route-module.md b/.agents/skills/orm-modules/references/http-route-module.md index db1c197564..6bc6ff95b3 100644 --- a/.agents/skills/orm-modules/references/http-route-module.md +++ b/.agents/skills/orm-modules/references/http-route-module.md @@ -9,7 +9,7 @@ ORM operations for HttpRouteModule records ```typescript db.httpRouteModule.findMany({ select: { id: true } }).execute() db.httpRouteModule.findOne({ id: '', select: { id: true } }).execute() -db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute() +db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute() db.httpRouteModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.httpRouteModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.httpRouteModule.findMany({ ```typescript const item = await db.httpRouteModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/limits-module.md b/.agents/skills/orm-modules/references/limits-module.md index 4de56ffc79..f40a4d03d8 100644 --- a/.agents/skills/orm-modules/references/limits-module.md +++ b/.agents/skills/orm-modules/references/limits-module.md @@ -9,7 +9,7 @@ ORM operations for LimitsModule records ```typescript db.limitsModule.findMany({ select: { id: true } }).execute() db.limitsModule.findOne({ id: '', select: { id: true } }).execute() -db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute() +db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute() db.limitsModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute() db.limitsModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.limitsModule.findMany({ ```typescript const item = await db.limitsModule.create({ - data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, + data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/memberships-module.md b/.agents/skills/orm-modules/references/memberships-module.md index 7e4741f36d..6104cde1ce 100644 --- a/.agents/skills/orm-modules/references/memberships-module.md +++ b/.agents/skills/orm-modules/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: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute() +db.membershipsModule.create({ data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute() db.membershipsModule.update({ where: { id: '' }, data: { actorMaskCheck: '' }, 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: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, + data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/merkle-store-module.md b/.agents/skills/orm-modules/references/merkle-store-module.md index f84b319610..c8d8f1dc76 100644 --- a/.agents/skills/orm-modules/references/merkle-store-module.md +++ b/.agents/skills/orm-modules/references/merkle-store-module.md @@ -9,7 +9,7 @@ ORM operations for MerkleStoreModule records ```typescript db.merkleStoreModule.findMany({ select: { id: true } }).execute() db.merkleStoreModule.findOne({ id: '', select: { id: true } }).execute() -db.merkleStoreModule.create({ data: { apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute() +db.merkleStoreModule.create({ data: { apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute() db.merkleStoreModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.merkleStoreModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.merkleStoreModule.findMany({ ```typescript const item = await db.merkleStoreModule.create({ - data: { apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, + data: { apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/namespace-module.md b/.agents/skills/orm-modules/references/namespace-module.md index c0b7b8bf20..d60cea3e93 100644 --- a/.agents/skills/orm-modules/references/namespace-module.md +++ b/.agents/skills/orm-modules/references/namespace-module.md @@ -9,7 +9,7 @@ ORM operations for NamespaceModule records ```typescript db.namespaceModule.findMany({ select: { id: true } }).execute() db.namespaceModule.findOne({ id: '', select: { id: true } }).execute() -db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.namespaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.namespaceModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.namespaceModule.findMany({ ```typescript const item = await db.namespaceModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/notifications-module.md b/.agents/skills/orm-modules/references/notifications-module.md index e0a1a4b0cd..e04e9d0f7f 100644 --- a/.agents/skills/orm-modules/references/notifications-module.md +++ b/.agents/skills/orm-modules/references/notifications-module.md @@ -9,7 +9,7 @@ ORM operations for NotificationsModule records ```typescript db.notificationsModule.findMany({ select: { id: true } }).execute() db.notificationsModule.findOne({ id: '', select: { id: true } }).execute() -db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute() +db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute() db.notificationsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.notificationsModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.notificationsModule.findMany({ ```typescript const item = await db.notificationsModule.create({ - data: { apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, + data: { apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/oauth-requests-module.md b/.agents/skills/orm-modules/references/oauth-requests-module.md new file mode 100644 index 0000000000..918dea9a90 --- /dev/null +++ b/.agents/skills/orm-modules/references/oauth-requests-module.md @@ -0,0 +1,39 @@ +# oauthRequestsModule + + + +Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + +## Usage + +```typescript +db.oauthRequestsModule.findMany({ select: { id: true } }).execute() +db.oauthRequestsModule.findOne({ id: '', select: { id: true } }).execute() +db.oauthRequestsModule.create({ data: { databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }, select: { id: true } }).execute() +db.oauthRequestsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.oauthRequestsModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all oauthRequestsModule records + +```typescript +const items = await db.oauthRequestsModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a oauthRequestsModule + +```typescript +const item = await db.oauthRequestsModule.create({ + data: { databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/profiles-module.md b/.agents/skills/orm-modules/references/profiles-module.md index 4d966c613d..c742b40f58 100644 --- a/.agents/skills/orm-modules/references/profiles-module.md +++ b/.agents/skills/orm-modules/references/profiles-module.md @@ -9,7 +9,7 @@ ORM operations for ProfilesModule records ```typescript db.profilesModule.findMany({ select: { id: true } }).execute() db.profilesModule.findOne({ id: '', select: { id: true } }).execute() -db.profilesModule.create({ data: { actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute() +db.profilesModule.create({ data: { actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute() db.profilesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute() db.profilesModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.profilesModule.findMany({ ```typescript const item = await db.profilesModule.create({ - data: { actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, + data: { actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/rate-limit-meters-module.md b/.agents/skills/orm-modules/references/rate-limit-meters-module.md index 298df88543..3f2e4baede 100644 --- a/.agents/skills/orm-modules/references/rate-limit-meters-module.md +++ b/.agents/skills/orm-modules/references/rate-limit-meters-module.md @@ -9,7 +9,7 @@ ORM operations for RateLimitMetersModule records ```typescript db.rateLimitMetersModule.findMany({ select: { id: true } }).execute() db.rateLimitMetersModule.findOne({ id: '', select: { id: true } }).execute() -db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute() +db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute() db.rateLimitMetersModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.rateLimitMetersModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.rateLimitMetersModule.findMany({ ```typescript const item = await db.rateLimitMetersModule.create({ - data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, + data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/resource-module.md b/.agents/skills/orm-modules/references/resource-module.md index 5365a89421..07aac1a301 100644 --- a/.agents/skills/orm-modules/references/resource-module.md +++ b/.agents/skills/orm-modules/references/resource-module.md @@ -9,7 +9,7 @@ ORM operations for ResourceModule records ```typescript db.resourceModule.findMany({ select: { id: true } }).execute() db.resourceModule.findOne({ id: '', select: { id: true } }).execute() -db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.resourceModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.resourceModule.findMany({ ```typescript const item = await db.resourceModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/route-module.md b/.agents/skills/orm-modules/references/route-module.md index 7d7fc877a5..7585795be9 100644 --- a/.agents/skills/orm-modules/references/route-module.md +++ b/.agents/skills/orm-modules/references/route-module.md @@ -9,7 +9,7 @@ ORM operations for RouteModule records ```typescript db.routeModule.findMany({ select: { id: true } }).execute() db.routeModule.findOne({ id: '', select: { id: true } }).execute() -db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.routeModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.routeModule.findMany({ ```typescript const item = await db.routeModule.create({ - data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, + data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/scope-types-module.md b/.agents/skills/orm-modules/references/scope-types-module.md new file mode 100644 index 0000000000..8c5eae3c16 --- /dev/null +++ b/.agents/skills/orm-modules/references/scope-types-module.md @@ -0,0 +1,34 @@ +# scopeTypesModule + + + +ORM operations for ScopeTypesModule records + +## Usage + +```typescript +db.scopeTypesModule.findMany({ select: { id: true } }).execute() +db.scopeTypesModule.findOne({ id: '', select: { id: true } }).execute() +db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute() +db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.scopeTypesModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all scopeTypesModule records + +```typescript +const items = await db.scopeTypesModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a scopeTypesModule + +```typescript +const item = await db.scopeTypesModule.create({ + data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/site-surface-module.md b/.agents/skills/orm-modules/references/site-surface-module.md index 31993ce186..509fc9a4f9 100644 --- a/.agents/skills/orm-modules/references/site-surface-module.md +++ b/.agents/skills/orm-modules/references/site-surface-module.md @@ -9,7 +9,7 @@ ORM operations for SiteSurfaceModule records ```typescript db.siteSurfaceModule.findMany({ select: { id: true } }).execute() db.siteSurfaceModule.findOne({ id: '', select: { id: true } }).execute() -db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute() +db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute() db.siteSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.siteSurfaceModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.siteSurfaceModule.findMany({ ```typescript const item = await db.siteSurfaceModule.create({ - data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, + data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/storage-module.md b/.agents/skills/orm-modules/references/storage-module.md index 34f2d44868..f7ae315ba0 100644 --- a/.agents/skills/orm-modules/references/storage-module.md +++ b/.agents/skills/orm-modules/references/storage-module.md @@ -9,7 +9,7 @@ ORM operations for StorageModule records ```typescript db.storageModule.findMany({ select: { id: true } }).execute() db.storageModule.findOne({ id: '', select: { id: true } }).execute() -db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute() +db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute() db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute() db.storageModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.storageModule.findMany({ ```typescript const item = await db.storageModule.create({ - data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, + data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/user-settings-security-module.md b/.agents/skills/orm-modules/references/user-settings-security-module.md new file mode 100644 index 0000000000..756b0ebea9 --- /dev/null +++ b/.agents/skills/orm-modules/references/user-settings-security-module.md @@ -0,0 +1,34 @@ +# userSettingsSecurityModule + + + +ORM operations for UserSettingsSecurityModule records + +## Usage + +```typescript +db.userSettingsSecurityModule.findMany({ select: { id: true } }).execute() +db.userSettingsSecurityModule.findOne({ id: '', select: { id: true } }).execute() +db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute() +db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() +db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all userSettingsSecurityModule records + +```typescript +const items = await db.userSettingsSecurityModule.findMany({ + select: { id: true, apiName: true } +}).execute(); +``` + +### Create a userSettingsSecurityModule + +```typescript +const item = await db.userSettingsSecurityModule.create({ + data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/webhook-module.md b/.agents/skills/orm-modules/references/webhook-module.md index 347828cd70..d31773a6cd 100644 --- a/.agents/skills/orm-modules/references/webhook-module.md +++ b/.agents/skills/orm-modules/references/webhook-module.md @@ -9,7 +9,7 @@ ORM operations for WebhookModule records ```typescript db.webhookModule.findMany({ select: { id: true } }).execute() db.webhookModule.findOne({ id: '', select: { id: true } }).execute() -db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute() +db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute() db.webhookModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.webhookModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.webhookModule.findMany({ ```typescript const item = await db.webhookModule.create({ - data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, + data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-objects/SKILL.md b/.agents/skills/orm-objects/SKILL.md index d6cb3ea25b..8ff749a58f 100644 --- a/.agents/skills/orm-objects/SKILL.md +++ b/.agents/skills/orm-objects/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-objects -description: ORM client for the objects API — provides typed CRUD operations for 5 tables and 4 custom operations +description: ORM client for the objects API — provides typed CRUD operations for 5 tables and 7 custom operations --- # orm-objects -ORM client for the objects API — provides typed CRUD operations for 5 tables and 4 custom operations +ORM client for the objects API — provides typed CRUD operations for 5 tables and 7 custom operations ## Usage @@ -44,5 +44,8 @@ See the `references/` directory for detailed per-entity API documentation: - [store](references/store.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [provision-bucket](references/provision-bucket.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) diff --git a/.agents/skills/orm-objects/references/insert-nodes-at-paths.md b/.agents/skills/orm-objects/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..92134612a9 --- /dev/null +++ b/.agents/skills/orm-objects/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.insertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run insertNodesAtPaths + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-objects/references/set-many-and-commit.md b/.agents/skills/orm-objects/references/set-many-and-commit.md new file mode 100644 index 0000000000..95526566ce --- /dev/null +++ b/.agents/skills/orm-objects/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```typescript +db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run setManyAndCommit + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/SKILL.md b/.agents/skills/orm-usage/SKILL.md index 100c4259a1..9181998157 100644 --- a/.agents/skills/orm-usage/SKILL.md +++ b/.agents/skills/orm-usage/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-usage -description: ORM client for the usage API — provides typed CRUD operations for 18 tables and 5 custom operations +description: ORM client for the usage API — provides typed CRUD operations for 38 tables and 16 custom operations --- # orm-usage -ORM client for the usage API — provides typed CRUD operations for 18 tables and 5 custom operations +ORM client for the usage API — provides typed CRUD operations for 38 tables and 16 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the usage API — provides typed CRUD operations for 18 tables an // Import the ORM client import { db } from './orm'; -// Available models: appLimitCap, appLimitCapsDefault, appLimit, appLimitCreditCode, appLimitCreditCodeItem, appLimitCredit, appLimitCreditRedemption, appLimitDefault, ... +// Available models: appAchievementReward, appEventAggregate, appEvent, appEventType, appLevel, appLevelGrant, appLevelRequirement, appLimitCap, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -28,7 +28,7 @@ db..delete({ where: { id: '' } }).execute() ### Query records ```typescript -const items = await db.appLimitCap.findMany({ +const items = await db.appAchievementReward.findMany({ select: { id: true } }).execute(); ``` @@ -37,6 +37,13 @@ const items = await db.appLimitCap.findMany({ See the `references/` directory for detailed per-entity API documentation: +- [app-achievement-reward](references/app-achievement-reward.md) +- [app-event-aggregate](references/app-event-aggregate.md) +- [app-event](references/app-event.md) +- [app-event-type](references/app-event-type.md) +- [app-level](references/app-level.md) +- [app-level-grant](references/app-level-grant.md) +- [app-level-requirement](references/app-level-requirement.md) - [app-limit-cap](references/app-limit-cap.md) - [app-limit-caps-default](references/app-limit-caps-default.md) - [app-limit](references/app-limit.md) @@ -47,6 +54,12 @@ See the `references/` directory for detailed per-entity API documentation: - [app-limit-default](references/app-limit-default.md) - [app-limit-event](references/app-limit-event.md) - [app-limit-warning](references/app-limit-warning.md) +- [billing-usage-summary](references/billing-usage-summary.md) +- [ledger](references/ledger.md) +- [meter](references/meter.md) +- [meter-credit](references/meter-credit.md) +- [meter-default](references/meter-default.md) +- [meter-source](references/meter-source.md) - [org-limit-aggregate](references/org-limit-aggregate.md) - [org-limit-cap](references/org-limit-cap.md) - [org-limit-caps-default](references/org-limit-caps-default.md) @@ -55,8 +68,26 @@ See the `references/` directory for detailed per-entity API documentation: - [org-limit-default](references/org-limit-default.md) - [org-limit-event](references/org-limit-event.md) - [org-limit-warning](references/org-limit-warning.md) +- [plan-cap](references/plan-cap.md) +- [plan](references/plan.md) +- [plan-limit](references/plan-limit.md) +- [plan-meter-limit](references/plan-meter-limit.md) +- [plan-override](references/plan-override.md) +- [plan-pricing](references/plan-pricing.md) +- [plan-subscription](references/plan-subscription.md) +- [capture-app-limit-defaults](references/capture-app-limit-defaults.md) +- [capture-org-limit-defaults](references/capture-org-limit-defaults.md) +- [capture-trust-ladder](references/capture-trust-ladder.md) +- [events-achieved](references/events-achieved.md) +- [events-required](references/events-required.md) +- [grant-achievement](references/grant-achievement.md) - [provision-bucket](references/provision-bucket.md) +- [recompute-capabilities](references/recompute-capabilities.md) +- [revoke-achievement](references/revoke-achievement.md) - [seed-app-limit-caps-defaults](references/seed-app-limit-caps-defaults.md) - [seed-app-limit-defaults](references/seed-app-limit-defaults.md) +- [seed-meter-defaults](references/seed-meter-defaults.md) - [seed-org-limit-caps-defaults](references/seed-org-limit-caps-defaults.md) - [seed-org-limit-defaults](references/seed-org-limit-defaults.md) +- [seed-plan](references/seed-plan.md) +- [seed-trust-ladder](references/seed-trust-ladder.md) diff --git a/.agents/skills/orm-usage/references/app-achievement-reward.md b/.agents/skills/orm-usage/references/app-achievement-reward.md new file mode 100644 index 0000000000..be0fd8dfbc --- /dev/null +++ b/.agents/skills/orm-usage/references/app-achievement-reward.md @@ -0,0 +1,34 @@ +# appAchievementReward + + + +Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + +## Usage + +```typescript +db.appAchievementReward.findMany({ select: { id: true } }).execute() +db.appAchievementReward.findOne({ id: '', select: { id: true } }).execute() +db.appAchievementReward.create({ data: { amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }, select: { id: true } }).execute() +db.appAchievementReward.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute() +db.appAchievementReward.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appAchievementReward records + +```typescript +const items = await db.appAchievementReward.findMany({ + select: { id: true, amount: true } +}).execute(); +``` + +### Create a appAchievementReward + +```typescript +const item = await db.appAchievementReward.create({ + data: { amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-event-aggregate.md b/.agents/skills/orm-usage/references/app-event-aggregate.md new file mode 100644 index 0000000000..1183966bc2 --- /dev/null +++ b/.agents/skills/orm-usage/references/app-event-aggregate.md @@ -0,0 +1,34 @@ +# appEventAggregate + + + +Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + +## Usage + +```typescript +db.appEventAggregate.findMany({ select: { id: true } }).execute() +db.appEventAggregate.findOne({ id: '', select: { id: true } }).execute() +db.appEventAggregate.create({ data: { actorId: '', count: '', name: '', periodStart: '' }, select: { id: true } }).execute() +db.appEventAggregate.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() +db.appEventAggregate.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appEventAggregate records + +```typescript +const items = await db.appEventAggregate.findMany({ + select: { id: true, actorId: true } +}).execute(); +``` + +### Create a appEventAggregate + +```typescript +const item = await db.appEventAggregate.create({ + data: { actorId: '', count: '', name: '', periodStart: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-event-type.md b/.agents/skills/orm-usage/references/app-event-type.md new file mode 100644 index 0000000000..19018bc143 --- /dev/null +++ b/.agents/skills/orm-usage/references/app-event-type.md @@ -0,0 +1,34 @@ +# appEventType + + + +Catalog of known event types with per-type configuration for aggregation, retention, and level participation + +## Usage + +```typescript +db.appEventType.findMany({ select: { id: true } }).execute() +db.appEventType.findOne({ id: '', select: { id: true } }).execute() +db.appEventType.create({ data: { aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }, select: { id: true } }).execute() +db.appEventType.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute() +db.appEventType.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appEventType records + +```typescript +const items = await db.appEventType.findMany({ + select: { id: true, aggregation: true } +}).execute(); +``` + +### Create a appEventType + +```typescript +const item = await db.appEventType.create({ + data: { aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-event.md b/.agents/skills/orm-usage/references/app-event.md new file mode 100644 index 0000000000..86c3da2f99 --- /dev/null +++ b/.agents/skills/orm-usage/references/app-event.md @@ -0,0 +1,34 @@ +# appEvent + + + +Partitioned append-only log of individual user actions; every single event ever recorded + +## Usage + +```typescript +db.appEvent.findMany({ select: { id: true } }).execute() +db.appEvent.findOne({ id: '', select: { id: true } }).execute() +db.appEvent.create({ data: { actorId: '', count: '', name: '' }, select: { id: true } }).execute() +db.appEvent.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() +db.appEvent.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appEvent records + +```typescript +const items = await db.appEvent.findMany({ + select: { id: true, actorId: true } +}).execute(); +``` + +### Create a appEvent + +```typescript +const item = await db.appEvent.create({ + data: { actorId: '', count: '', name: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-level-grant.md b/.agents/skills/orm-usage/references/app-level-grant.md new file mode 100644 index 0000000000..4e6c6acba4 --- /dev/null +++ b/.agents/skills/orm-usage/references/app-level-grant.md @@ -0,0 +1,34 @@ +# appLevelGrant + + + +Records when a user achieves a level; prevents duplicate reward grants + +## Usage + +```typescript +db.appLevelGrant.findMany({ select: { id: true } }).execute() +db.appLevelGrant.findOne({ id: '', select: { id: true } }).execute() +db.appLevelGrant.create({ data: { actorId: '', expiresAt: '', levelName: '', periodStart: '' }, select: { id: true } }).execute() +db.appLevelGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute() +db.appLevelGrant.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appLevelGrant records + +```typescript +const items = await db.appLevelGrant.findMany({ + select: { id: true, actorId: true } +}).execute(); +``` + +### Create a appLevelGrant + +```typescript +const item = await db.appLevelGrant.create({ + data: { actorId: '', expiresAt: '', levelName: '', periodStart: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-level-requirement.md b/.agents/skills/orm-usage/references/app-level-requirement.md new file mode 100644 index 0000000000..abcb050f8d --- /dev/null +++ b/.agents/skills/orm-usage/references/app-level-requirement.md @@ -0,0 +1,34 @@ +# appLevelRequirement + + + +Defines the specific requirements that must be met to achieve a level + +## Usage + +```typescript +db.appLevelRequirement.findMany({ select: { id: true } }).execute() +db.appLevelRequirement.findOne({ id: '', select: { id: true } }).execute() +db.appLevelRequirement.create({ data: { description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }, select: { id: true } }).execute() +db.appLevelRequirement.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute() +db.appLevelRequirement.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appLevelRequirement records + +```typescript +const items = await db.appLevelRequirement.findMany({ + select: { id: true, description: true } +}).execute(); +``` + +### Create a appLevelRequirement + +```typescript +const item = await db.appLevelRequirement.create({ + data: { description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-level.md b/.agents/skills/orm-usage/references/app-level.md new file mode 100644 index 0000000000..97493a679e --- /dev/null +++ b/.agents/skills/orm-usage/references/app-level.md @@ -0,0 +1,34 @@ +# appLevel + + + +Defines available levels that users can achieve by completing requirements + +## Usage + +```typescript +db.appLevel.findMany({ select: { id: true } }).execute() +db.appLevel.findOne({ id: '', select: { id: true } }).execute() +db.appLevel.create({ data: { description: '', image: '', name: '', ownerId: '' }, select: { id: true } }).execute() +db.appLevel.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute() +db.appLevel.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all appLevel records + +```typescript +const items = await db.appLevel.findMany({ + select: { id: true, description: true } +}).execute(); +``` + +### Create a appLevel + +```typescript +const item = await db.appLevel.create({ + data: { description: '', image: '', name: '', ownerId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/app-limit-credit-code.md b/.agents/skills/orm-usage/references/app-limit-credit-code.md index 26cb69fb9f..71087ba067 100644 --- a/.agents/skills/orm-usage/references/app-limit-credit-code.md +++ b/.agents/skills/orm-usage/references/app-limit-credit-code.md @@ -2,7 +2,7 @@ -Redeemable credit codes managed by admins with the add_credits permission +Redeemable credit codes managed by admins with the add_credits capability ## Usage diff --git a/.agents/skills/orm-usage/references/billing-usage-summary.md b/.agents/skills/orm-usage/references/billing-usage-summary.md new file mode 100644 index 0000000000..1fadd99742 --- /dev/null +++ b/.agents/skills/orm-usage/references/billing-usage-summary.md @@ -0,0 +1,34 @@ +# billingUsageSummary + + + +Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + +## Usage + +```typescript +db.billingUsageSummary.findMany({ select: { id: true } }).execute() +db.billingUsageSummary.findOne({ id: '', select: { id: true } }).execute() +db.billingUsageSummary.create({ data: { creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }, select: { id: true } }).execute() +db.billingUsageSummary.update({ where: { id: '' }, data: { creditsConsumed: '' }, select: { id: true } }).execute() +db.billingUsageSummary.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all billingUsageSummary records + +```typescript +const items = await db.billingUsageSummary.findMany({ + select: { id: true, creditsConsumed: true } +}).execute(); +``` + +### Create a billingUsageSummary + +```typescript +const item = await db.billingUsageSummary.create({ + data: { creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/capture-app-limit-defaults.md b/.agents/skills/orm-usage/references/capture-app-limit-defaults.md new file mode 100644 index 0000000000..420fcadd04 --- /dev/null +++ b/.agents/skills/orm-usage/references/capture-app-limit-defaults.md @@ -0,0 +1,19 @@ +# captureAppLimitDefaults + + + +Execute the captureAppLimitDefaults query + +## Usage + +```typescript +db.query.captureAppLimitDefaults().execute() +``` + +## Examples + +### Run captureAppLimitDefaults + +```typescript +const result = await db.query.captureAppLimitDefaults().execute(); +``` diff --git a/.agents/skills/orm-usage/references/capture-org-limit-defaults.md b/.agents/skills/orm-usage/references/capture-org-limit-defaults.md new file mode 100644 index 0000000000..b6dddc4e3f --- /dev/null +++ b/.agents/skills/orm-usage/references/capture-org-limit-defaults.md @@ -0,0 +1,19 @@ +# captureOrgLimitDefaults + + + +Execute the captureOrgLimitDefaults query + +## Usage + +```typescript +db.query.captureOrgLimitDefaults().execute() +``` + +## Examples + +### Run captureOrgLimitDefaults + +```typescript +const result = await db.query.captureOrgLimitDefaults().execute(); +``` diff --git a/.agents/skills/orm-usage/references/capture-trust-ladder.md b/.agents/skills/orm-usage/references/capture-trust-ladder.md new file mode 100644 index 0000000000..dcaa5c9307 --- /dev/null +++ b/.agents/skills/orm-usage/references/capture-trust-ladder.md @@ -0,0 +1,19 @@ +# captureTrustLadder + + + +Execute the captureTrustLadder query + +## Usage + +```typescript +db.query.captureTrustLadder().execute() +``` + +## Examples + +### Run captureTrustLadder + +```typescript +const result = await db.query.captureTrustLadder().execute(); +``` diff --git a/.agents/skills/orm-usage/references/events-achieved.md b/.agents/skills/orm-usage/references/events-achieved.md new file mode 100644 index 0000000000..851ac7ee53 --- /dev/null +++ b/.agents/skills/orm-usage/references/events-achieved.md @@ -0,0 +1,19 @@ +# eventsAchieved + + + +Execute the eventsAchieved query + +## Usage + +```typescript +db.query.eventsAchieved({ level: '', roleId: '' }).execute() +``` + +## Examples + +### Run eventsAchieved + +```typescript +const result = await db.query.eventsAchieved({ level: '', roleId: '' }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/events-required.md b/.agents/skills/orm-usage/references/events-required.md new file mode 100644 index 0000000000..b63a7f305c --- /dev/null +++ b/.agents/skills/orm-usage/references/events-required.md @@ -0,0 +1,19 @@ +# eventsRequired + + + +Reads and enables pagination through a set of `AppLevelRequirement`. + +## Usage + +```typescript +db.query.eventsRequired({ after: '', first: '', level: '', offset: '', roleId: '' }).execute() +``` + +## Examples + +### Run eventsRequired + +```typescript +const result = await db.query.eventsRequired({ after: '', first: '', level: '', offset: '', roleId: '' }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/grant-achievement.md b/.agents/skills/orm-usage/references/grant-achievement.md new file mode 100644 index 0000000000..3028761f35 --- /dev/null +++ b/.agents/skills/orm-usage/references/grant-achievement.md @@ -0,0 +1,19 @@ +# grantAchievement + + + +Execute the grantAchievement mutation + +## Usage + +```typescript +db.mutation.grantAchievement({ input: { actorId: '', levelName: '' } }).execute() +``` + +## Examples + +### Run grantAchievement + +```typescript +const result = await db.mutation.grantAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/ledger.md b/.agents/skills/orm-usage/references/ledger.md new file mode 100644 index 0000000000..a3c3cc14ef --- /dev/null +++ b/.agents/skills/orm-usage/references/ledger.md @@ -0,0 +1,34 @@ +# ledger + + + +Append-only event log for all billing events (usage, grants, adjustments) + +## Usage + +```typescript +db.ledger.findMany({ select: { id: true } }).execute() +db.ledger.findOne({ id: '', select: { id: true } }).execute() +db.ledger.create({ data: { delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }, select: { id: true } }).execute() +db.ledger.update({ where: { id: '' }, data: { delta: '' }, select: { id: true } }).execute() +db.ledger.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all ledger records + +```typescript +const items = await db.ledger.findMany({ + select: { id: true, delta: true } +}).execute(); +``` + +### Create a ledger + +```typescript +const item = await db.ledger.create({ + data: { delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/meter-credit.md b/.agents/skills/orm-usage/references/meter-credit.md new file mode 100644 index 0000000000..2517e9011d --- /dev/null +++ b/.agents/skills/orm-usage/references/meter-credit.md @@ -0,0 +1,34 @@ +# meterCredit + + + +Append-only ledger of credit grants for billing meters that automatically update balances + +## Usage + +```typescript +db.meterCredit.findMany({ select: { id: true } }).execute() +db.meterCredit.findOne({ id: '', select: { id: true } }).execute() +db.meterCredit.create({ data: { amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }, select: { id: true } }).execute() +db.meterCredit.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute() +db.meterCredit.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all meterCredit records + +```typescript +const items = await db.meterCredit.findMany({ + select: { id: true, amount: true } +}).execute(); +``` + +### Create a meterCredit + +```typescript +const item = await db.meterCredit.create({ + data: { amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/meter-default.md b/.agents/skills/orm-usage/references/meter-default.md new file mode 100644 index 0000000000..203a9406b8 --- /dev/null +++ b/.agents/skills/orm-usage/references/meter-default.md @@ -0,0 +1,34 @@ +# meterDefault + + + +Default meter catalog: defines which meters are available and their default plan_limit values for new entities + +## Usage + +```typescript +db.meterDefault.findMany({ select: { id: true } }).execute() +db.meterDefault.findOne({ id: '', select: { id: true } }).execute() +db.meterDefault.create({ data: { categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }, select: { id: true } }).execute() +db.meterDefault.update({ where: { id: '' }, data: { categoryMeter: '' }, select: { id: true } }).execute() +db.meterDefault.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all meterDefault records + +```typescript +const items = await db.meterDefault.findMany({ + select: { id: true, categoryMeter: true } +}).execute(); +``` + +### Create a meterDefault + +```typescript +const item = await db.meterDefault.create({ + data: { categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/meter-source.md b/.agents/skills/orm-usage/references/meter-source.md new file mode 100644 index 0000000000..ab2bc7a3a9 --- /dev/null +++ b/.agents/skills/orm-usage/references/meter-source.md @@ -0,0 +1,34 @@ +# meterSource + + + +Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + +## Usage + +```typescript +db.meterSource.findMany({ select: { id: true } }).execute() +db.meterSource.findOne({ id: '', select: { id: true } }).execute() +db.meterSource.create({ data: { aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }, select: { id: true } }).execute() +db.meterSource.update({ where: { id: '' }, data: { aggregationType: '' }, select: { id: true } }).execute() +db.meterSource.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all meterSource records + +```typescript +const items = await db.meterSource.findMany({ + select: { id: true, aggregationType: true } +}).execute(); +``` + +### Create a meterSource + +```typescript +const item = await db.meterSource.create({ + data: { aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/meter.md b/.agents/skills/orm-usage/references/meter.md new file mode 100644 index 0000000000..542d15b93e --- /dev/null +++ b/.agents/skills/orm-usage/references/meter.md @@ -0,0 +1,34 @@ +# meter + + + +Defines billable meters (what to track: quotas, feature flags, credit pools) + +## Usage + +```typescript +db.meter.findMany({ select: { id: true } }).execute() +db.meter.findOne({ id: '', select: { id: true } }).execute() +db.meter.create({ data: { aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }, select: { id: true } }).execute() +db.meter.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute() +db.meter.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all meter records + +```typescript +const items = await db.meter.findMany({ + select: { id: true, aggregation: true } +}).execute(); +``` + +### Create a meter + +```typescript +const item = await db.meter.create({ + data: { aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-cap.md b/.agents/skills/orm-usage/references/plan-cap.md new file mode 100644 index 0000000000..a88d8408b9 --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-cap.md @@ -0,0 +1,34 @@ +# planCap + + + +Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + +## Usage + +```typescript +db.planCap.findMany({ select: { id: true } }).execute() +db.planCap.findOne({ id: '', select: { id: true } }).execute() +db.planCap.create({ data: { capName: '', capValue: '', planId: '' }, select: { id: true } }).execute() +db.planCap.update({ where: { id: '' }, data: { capName: '' }, select: { id: true } }).execute() +db.planCap.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planCap records + +```typescript +const items = await db.planCap.findMany({ + select: { id: true, capName: true } +}).execute(); +``` + +### Create a planCap + +```typescript +const item = await db.planCap.create({ + data: { capName: '', capValue: '', planId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-limit.md b/.agents/skills/orm-usage/references/plan-limit.md new file mode 100644 index 0000000000..f342988f7b --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-limit.md @@ -0,0 +1,34 @@ +# planLimit + + + +Maps each plan to specific limit names and their maximum allowed values + +## Usage + +```typescript +db.planLimit.findMany({ select: { id: true } }).execute() +db.planLimit.findOne({ id: '', select: { id: true } }).execute() +db.planLimit.create({ data: { limitName: '', maxValue: '', planId: '' }, select: { id: true } }).execute() +db.planLimit.update({ where: { id: '' }, data: { limitName: '' }, select: { id: true } }).execute() +db.planLimit.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planLimit records + +```typescript +const items = await db.planLimit.findMany({ + select: { id: true, limitName: true } +}).execute(); +``` + +### Create a planLimit + +```typescript +const item = await db.planLimit.create({ + data: { limitName: '', maxValue: '', planId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-meter-limit.md b/.agents/skills/orm-usage/references/plan-meter-limit.md new file mode 100644 index 0000000000..d22f29b54f --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-meter-limit.md @@ -0,0 +1,34 @@ +# planMeterLimit + + + +Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + +## Usage + +```typescript +db.planMeterLimit.findMany({ select: { id: true } }).execute() +db.planMeterLimit.findOne({ id: '', select: { id: true } }).execute() +db.planMeterLimit.create({ data: { meterSlug: '', planId: '', planLimit: '' }, select: { id: true } }).execute() +db.planMeterLimit.update({ where: { id: '' }, data: { meterSlug: '' }, select: { id: true } }).execute() +db.planMeterLimit.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planMeterLimit records + +```typescript +const items = await db.planMeterLimit.findMany({ + select: { id: true, meterSlug: true } +}).execute(); +``` + +### Create a planMeterLimit + +```typescript +const item = await db.planMeterLimit.create({ + data: { meterSlug: '', planId: '', planLimit: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-override.md b/.agents/skills/orm-usage/references/plan-override.md new file mode 100644 index 0000000000..eefb1a1d5a --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-override.md @@ -0,0 +1,34 @@ +# planOverride + + + +Per-entity limit overrides that take precedence over plan defaults + +## Usage + +```typescript +db.planOverride.findMany({ select: { id: true } }).execute() +db.planOverride.findOne({ id: '', select: { id: true } }).execute() +db.planOverride.create({ data: { entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }, select: { id: true } }).execute() +db.planOverride.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute() +db.planOverride.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planOverride records + +```typescript +const items = await db.planOverride.findMany({ + select: { id: true, entityId: true } +}).execute(); +``` + +### Create a planOverride + +```typescript +const item = await db.planOverride.create({ + data: { entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-pricing.md b/.agents/skills/orm-usage/references/plan-pricing.md new file mode 100644 index 0000000000..11acfc123e --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-pricing.md @@ -0,0 +1,34 @@ +# planPricing + + + +Billing intervals and pricing for each plan tier + +## Usage + +```typescript +db.planPricing.findMany({ select: { id: true } }).execute() +db.planPricing.findOne({ id: '', select: { id: true } }).execute() +db.planPricing.create({ data: { billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }, select: { id: true } }).execute() +db.planPricing.update({ where: { id: '' }, data: { billingInterval: '' }, select: { id: true } }).execute() +db.planPricing.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planPricing records + +```typescript +const items = await db.planPricing.findMany({ + select: { id: true, billingInterval: true } +}).execute(); +``` + +### Create a planPricing + +```typescript +const item = await db.planPricing.create({ + data: { billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan-subscription.md b/.agents/skills/orm-usage/references/plan-subscription.md new file mode 100644 index 0000000000..7a71c30d0c --- /dev/null +++ b/.agents/skills/orm-usage/references/plan-subscription.md @@ -0,0 +1,34 @@ +# planSubscription + + + +Assigns a plan to an entity with subscription lifecycle (start, end, active state) + +## Usage + +```typescript +db.planSubscription.findMany({ select: { id: true } }).execute() +db.planSubscription.findOne({ id: '', select: { id: true } }).execute() +db.planSubscription.create({ data: { endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }, select: { id: true } }).execute() +db.planSubscription.update({ where: { id: '' }, data: { endsAt: '' }, select: { id: true } }).execute() +db.planSubscription.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all planSubscription records + +```typescript +const items = await db.planSubscription.findMany({ + select: { id: true, endsAt: true } +}).execute(); +``` + +### Create a planSubscription + +```typescript +const item = await db.planSubscription.create({ + data: { endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/plan.md b/.agents/skills/orm-usage/references/plan.md new file mode 100644 index 0000000000..8b3777a382 --- /dev/null +++ b/.agents/skills/orm-usage/references/plan.md @@ -0,0 +1,34 @@ +# plan + + + +Defines plan tiers with named limit configurations + +## Usage + +```typescript +db.plan.findMany({ select: { id: true } }).execute() +db.plan.findOne({ id: '', select: { id: true } }).execute() +db.plan.create({ data: { description: '', isActive: '', name: '' }, select: { id: true } }).execute() +db.plan.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute() +db.plan.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all plan records + +```typescript +const items = await db.plan.findMany({ + select: { id: true, description: true } +}).execute(); +``` + +### Create a plan + +```typescript +const item = await db.plan.create({ + data: { description: '', isActive: '', name: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-usage/references/recompute-capabilities.md b/.agents/skills/orm-usage/references/recompute-capabilities.md new file mode 100644 index 0000000000..f440ff06d3 --- /dev/null +++ b/.agents/skills/orm-usage/references/recompute-capabilities.md @@ -0,0 +1,19 @@ +# recomputeCapabilities + + + +Execute the recomputeCapabilities mutation + +## Usage + +```typescript +db.mutation.recomputeCapabilities({ input: { actorId: '' } }).execute() +``` + +## Examples + +### Run recomputeCapabilities + +```typescript +const result = await db.mutation.recomputeCapabilities({ input: { actorId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/revoke-achievement.md b/.agents/skills/orm-usage/references/revoke-achievement.md new file mode 100644 index 0000000000..716d39274e --- /dev/null +++ b/.agents/skills/orm-usage/references/revoke-achievement.md @@ -0,0 +1,19 @@ +# revokeAchievement + + + +Execute the revokeAchievement mutation + +## Usage + +```typescript +db.mutation.revokeAchievement({ input: { actorId: '', levelName: '' } }).execute() +``` + +## Examples + +### Run revokeAchievement + +```typescript +const result = await db.mutation.revokeAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/seed-meter-defaults.md b/.agents/skills/orm-usage/references/seed-meter-defaults.md new file mode 100644 index 0000000000..50bc92ff31 --- /dev/null +++ b/.agents/skills/orm-usage/references/seed-meter-defaults.md @@ -0,0 +1,19 @@ +# seedMeterDefaults + + + +Execute the seedMeterDefaults mutation + +## Usage + +```typescript +db.mutation.seedMeterDefaults({ input: { defaults: '' } }).execute() +``` + +## Examples + +### Run seedMeterDefaults + +```typescript +const result = await db.mutation.seedMeterDefaults({ input: { defaults: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/seed-plan.md b/.agents/skills/orm-usage/references/seed-plan.md new file mode 100644 index 0000000000..c468d7f796 --- /dev/null +++ b/.agents/skills/orm-usage/references/seed-plan.md @@ -0,0 +1,19 @@ +# seedPlan + + + +Execute the seedPlan mutation + +## Usage + +```typescript +db.mutation.seedPlan({ input: { planConfig: '', planName: '' } }).execute() +``` + +## Examples + +### Run seedPlan + +```typescript +const result = await db.mutation.seedPlan({ input: { planConfig: '', planName: '' } }).execute(); +``` diff --git a/.agents/skills/orm-usage/references/seed-trust-ladder.md b/.agents/skills/orm-usage/references/seed-trust-ladder.md new file mode 100644 index 0000000000..943f243748 --- /dev/null +++ b/.agents/skills/orm-usage/references/seed-trust-ladder.md @@ -0,0 +1,19 @@ +# seedTrustLadder + + + +Execute the seedTrustLadder mutation + +## Usage + +```typescript +db.mutation.seedTrustLadder({ input: { ladder: '' } }).execute() +``` + +## Examples + +### Run seedTrustLadder + +```typescript +const result = await db.mutation.seedTrustLadder({ input: { ladder: '' } }).execute(); +``` diff --git a/sdk/constructive-react/src/admin/README.md b/sdk/constructive-react/src/admin/README.md index 99dd47ec2e..8cabd36b09 100644 --- a/sdk/constructive-react/src/admin/README.md +++ b/sdk/constructive-react/src/admin/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 30 +- **Tables:** 42 - **Custom queries:** 9 - **Custom mutations:** 3 diff --git a/sdk/constructive-react/src/admin/hooks/README.md b/sdk/constructive-react/src/admin/hooks/README.md index 5479468c79..3c2f10abec 100644 --- a/sdk/constructive-react/src/admin/hooks/README.md +++ b/sdk/constructive-react/src/admin/hooks/README.md @@ -37,56 +37,86 @@ function App() { | `useCreateAppAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | | `useUpdateAppAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | | `useDeleteAppAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | +| `useAppCapabilitiesQuery` | Query | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useAppCapabilityQuery` | Query | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useCreateAppCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useUpdateAppCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useDeleteAppCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useAppCapabilityDefaultCapabilitiesQuery` | Query | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useAppCapabilityDefaultCapabilityQuery` | Query | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useCreateAppCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useUpdateAppCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useDeleteAppCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useAppCapabilityDefaultsQuery` | Query | Stores the default capability bitmask assigned to new members upon joining | +| `useAppCapabilityDefaultQuery` | Query | Stores the default capability bitmask assigned to new members upon joining | +| `useCreateAppCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useUpdateAppCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useDeleteAppCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useAppCapabilityDefaultGrantsQuery` | Query | Audit log of capability additions and removals from the defaults bitmask | +| `useAppCapabilityDefaultGrantQuery` | Query | Audit log of capability additions and removals from the defaults bitmask | +| `useCreateAppCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | +| `useUpdateAppCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | +| `useDeleteAppCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | | `useAppClaimedInvitesQuery` | Query | Records of successfully claimed invitations, linking senders to receivers | | `useAppClaimedInviteQuery` | Query | Records of successfully claimed invitations, linking senders to receivers | | `useCreateAppClaimedInviteMutation` | Mutation | Records of successfully claimed invitations, linking senders to receivers | | `useUpdateAppClaimedInviteMutation` | Mutation | Records of successfully claimed invitations, linking senders to receivers | | `useDeleteAppClaimedInviteMutation` | Mutation | Records of successfully claimed invitations, linking senders to receivers | -| `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 | -| `useUpdateAppGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | -| `useDeleteAppGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | +| `useAppGrantsQuery` | Query | Records of individual capability grants and revocations for members via bitmask | +| `useAppGrantQuery` | Query | Records of individual capability grants and revocations for members via bitmask | +| `useCreateAppGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | +| `useUpdateAppGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | +| `useDeleteAppGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | | `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 | | `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 | -| `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 | -| `useUpdateAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | -| `useDeleteAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | +| `useAppMembershipsQuery` | Query | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useAppMembershipQuery` | Query | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useCreateAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useUpdateAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useDeleteAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | | `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 | | `useUpdateAppMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | | `useDeleteAppMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | +| `useAppMembershipProfilesQuery` | Query | Every profile a membership holds; memberships.profile_id points at one of them | +| `useAppMembershipProfileQuery` | Query | Every profile a membership holds; memberships.profile_id points at one of them | +| `useCreateAppMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | +| `useUpdateAppMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | +| `useDeleteAppMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | | `useAppOwnerGrantsQuery` | Query | Records of ownership transfers and grants between members | | `useAppOwnerGrantQuery` | Query | Records of ownership transfers and grants between members | | `useCreateAppOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useUpdateAppOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useDeleteAppOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | -| `useAppPermissionsQuery` | Query | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useAppPermissionQuery` | Query | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useCreateAppPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useUpdateAppPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useDeleteAppPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useAppPermissionDefaultsQuery` | Query | Stores the default permission bitmask assigned to new members upon joining | -| `useAppPermissionDefaultQuery` | Query | Stores the default permission bitmask assigned to new members upon joining | -| `useCreateAppPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useUpdateAppPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useDeleteAppPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useAppPermissionDefaultGrantsQuery` | Query | Audit log of permission additions and removals from the defaults bitmask | -| `useAppPermissionDefaultGrantQuery` | Query | Audit log of permission additions and removals from the defaults bitmask | -| `useCreateAppPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useUpdateAppPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useDeleteAppPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useAppPermissionDefaultPermissionsQuery` | Query | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useAppPermissionDefaultPermissionQuery` | Query | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useCreateAppPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useUpdateAppPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useDeleteAppPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | +| `useAppProfileCapabilitiesQuery` | Query | Join table linking profiles to individual capabilities they include | +| `useAppProfileCapabilityQuery` | Query | Join table linking profiles to individual capabilities they include | +| `useCreateAppProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useUpdateAppProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useDeleteAppProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useAppProfilesQuery` | Query | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useAppProfileQuery` | Query | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useCreateAppProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useUpdateAppProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useDeleteAppProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useAppProfileDefinitionGrantsQuery` | Query | Audit log of capability additions and removals from profile definitions | +| `useAppProfileDefinitionGrantQuery` | Query | Audit log of capability additions and removals from profile definitions | +| `useCreateAppProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useUpdateAppProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useDeleteAppProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useAppProfileGrantsQuery` | Query | Audit log of profile assignments and revocations for members | +| `useAppProfileGrantQuery` | Query | Audit log of profile assignments and revocations for members | +| `useCreateAppProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useUpdateAppProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useDeleteAppProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useAppProfileTemplatesQuery` | Query | Template profiles that are automatically seeded into new entities when created | +| `useAppProfileTemplateQuery` | Query | Template profiles that are automatically seeded into new entities when created | +| `useCreateAppProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | +| `useUpdateAppProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | +| `useDeleteAppProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | | `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) | @@ -97,6 +127,26 @@ function App() { | `useCreateOrgAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | | `useUpdateOrgAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | | `useDeleteOrgAdminGrantMutation` | Mutation | Records of admin role grants and revocations between members | +| `useOrgCapabilitiesQuery` | Query | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useOrgCapabilityQuery` | Query | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useCreateOrgCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useUpdateOrgCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useDeleteOrgCapabilityMutation` | Mutation | Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control | +| `useOrgCapabilityDefaultCapabilitiesQuery` | Query | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useOrgCapabilityDefaultCapabilityQuery` | Query | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useCreateOrgCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useUpdateOrgCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useDeleteOrgCapabilityDefaultCapabilityMutation` | Mutation | Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask | +| `useOrgCapabilityDefaultsQuery` | Query | Stores the default capability bitmask assigned to new members upon joining | +| `useOrgCapabilityDefaultQuery` | Query | Stores the default capability bitmask assigned to new members upon joining | +| `useCreateOrgCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useUpdateOrgCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useDeleteOrgCapabilityDefaultMutation` | Mutation | Stores the default capability bitmask assigned to new members upon joining | +| `useOrgCapabilityDefaultGrantsQuery` | Query | Audit log of capability additions and removals from the defaults bitmask | +| `useOrgCapabilityDefaultGrantQuery` | Query | Audit log of capability additions and removals from the defaults bitmask | +| `useCreateOrgCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | +| `useUpdateOrgCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | +| `useDeleteOrgCapabilityDefaultGrantMutation` | Mutation | Audit log of capability additions and removals from the defaults bitmask | | `useOrgChartEdgesQuery` | Query | Organizational chart edges defining parent-child reporting relationships between members within an entity | | `useOrgChartEdgeQuery` | Query | Organizational chart edges defining parent-child reporting relationships between members within an entity | | `useCreateOrgChartEdgeMutation` | Mutation | Organizational chart edges defining parent-child reporting relationships between members within an entity | @@ -116,11 +166,11 @@ function App() { | `useCreateOrgGetManagersRecordMutation` | Mutation | Create a orgGetManagersRecord | | `useOrgGetSubordinatesQuery` | Query | List all orgGetSubordinates | | `useCreateOrgGetSubordinatesRecordMutation` | Mutation | Create a orgGetSubordinatesRecord | -| `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 | -| `useUpdateOrgGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | -| `useDeleteOrgGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | +| `useOrgGrantsQuery` | Query | Records of individual capability grants and revocations for members via bitmask | +| `useOrgGrantQuery` | Query | Records of individual capability grants and revocations for members via bitmask | +| `useCreateOrgGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | +| `useUpdateOrgGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | +| `useDeleteOrgGrantMutation` | Mutation | Records of individual capability grants and revocations for members via bitmask | | `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 | @@ -136,16 +186,21 @@ function App() { | `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) | -| `useOrgMembershipsQuery` | Query | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | -| `useOrgMembershipQuery` | Query | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | -| `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 | +| `useOrgMembershipsQuery` | Query | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useOrgMembershipQuery` | Query | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useCreateOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useUpdateOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | +| `useDeleteOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status | | `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 | | `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 | +| `useOrgMembershipProfilesQuery` | Query | Every profile a membership holds; memberships.profile_id points at one of them | +| `useOrgMembershipProfileQuery` | Query | Every profile a membership holds; memberships.profile_id points at one of them | +| `useCreateOrgMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | +| `useUpdateOrgMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | +| `useDeleteOrgMembershipProfileMutation` | Mutation | Every profile a membership holds; memberships.profile_id points at one of them | | `useOrgMembershipSettingsQuery` | Query | Per-entity settings for the memberships module | | `useOrgMembershipSettingQuery` | Query | Per-entity settings for the memberships module | | `useCreateOrgMembershipSettingMutation` | Mutation | Per-entity settings for the memberships module | @@ -156,35 +211,40 @@ 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 | -| `useOrgPermissionsQuery` | Query | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useOrgPermissionQuery` | Query | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useCreateOrgPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useUpdateOrgPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useDeleteOrgPermissionMutation` | Mutation | Defines available permissions as named bits within a bitmask, used by the RBAC system for access control | -| `useOrgPermissionDefaultsQuery` | Query | Stores the default permission bitmask assigned to new members upon joining | -| `useOrgPermissionDefaultQuery` | Query | Stores the default permission bitmask assigned to new members upon joining | -| `useCreateOrgPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useUpdateOrgPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useDeleteOrgPermissionDefaultMutation` | Mutation | Stores the default permission bitmask assigned to new members upon joining | -| `useOrgPermissionDefaultGrantsQuery` | Query | Audit log of permission additions and removals from the defaults bitmask | -| `useOrgPermissionDefaultGrantQuery` | Query | Audit log of permission additions and removals from the defaults bitmask | -| `useCreateOrgPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useUpdateOrgPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useDeleteOrgPermissionDefaultGrantMutation` | Mutation | Audit log of permission additions and removals from the defaults bitmask | -| `useOrgPermissionDefaultPermissionsQuery` | Query | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useOrgPermissionDefaultPermissionQuery` | Query | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useCreateOrgPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useUpdateOrgPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useDeleteOrgPermissionDefaultPermissionMutation` | Mutation | Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask | -| `useAppPermissionsGetByMaskQuery` | Query | Reads and enables pagination through a set of `AppPermission`. | -| `useAppPermissionsGetMaskQuery` | Query | appPermissionsGetMask | -| `useAppPermissionsGetMaskByNamesQuery` | Query | appPermissionsGetMaskByNames | -| `useAppPermissionsGetPaddedMaskQuery` | Query | appPermissionsGetPaddedMask | +| `useOrgProfileCapabilitiesQuery` | Query | Join table linking profiles to individual capabilities they include | +| `useOrgProfileCapabilityQuery` | Query | Join table linking profiles to individual capabilities they include | +| `useCreateOrgProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useUpdateOrgProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useDeleteOrgProfileCapabilityMutation` | Mutation | Join table linking profiles to individual capabilities they include | +| `useOrgProfilesQuery` | Query | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useOrgProfileQuery` | Query | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useCreateOrgProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useUpdateOrgProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useDeleteOrgProfileMutation` | Mutation | Named capability bundles (roles) that group multiple capabilities into reusable profiles | +| `useOrgProfileDefinitionGrantsQuery` | Query | Audit log of capability additions and removals from profile definitions | +| `useOrgProfileDefinitionGrantQuery` | Query | Audit log of capability additions and removals from profile definitions | +| `useCreateOrgProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useUpdateOrgProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useDeleteOrgProfileDefinitionGrantMutation` | Mutation | Audit log of capability additions and removals from profile definitions | +| `useOrgProfileGrantsQuery` | Query | Audit log of profile assignments and revocations for members | +| `useOrgProfileGrantQuery` | Query | Audit log of profile assignments and revocations for members | +| `useCreateOrgProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useUpdateOrgProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useDeleteOrgProfileGrantMutation` | Mutation | Audit log of profile assignments and revocations for members | +| `useOrgProfileTemplatesQuery` | Query | Template profiles that are automatically seeded into new entities when created | +| `useOrgProfileTemplateQuery` | Query | Template profiles that are automatically seeded into new entities when created | +| `useCreateOrgProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | +| `useUpdateOrgProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | +| `useDeleteOrgProfileTemplateMutation` | Mutation | Template profiles that are automatically seeded into new entities when created | +| `useAppCapabilitiesGetByMaskQuery` | Query | Reads and enables pagination through a set of `AppCapability`. | +| `useAppCapabilitiesGetMaskQuery` | Query | appCapabilitiesGetMask | +| `useAppCapabilitiesGetMaskByNamesQuery` | Query | appCapabilitiesGetMaskByNames | +| `useAppCapabilitiesGetPaddedMaskQuery` | Query | appCapabilitiesGetPaddedMask | +| `useOrgCapabilitiesGetByMaskQuery` | Query | Reads and enables pagination through a set of `OrgCapability`. | +| `useOrgCapabilitiesGetMaskQuery` | Query | orgCapabilitiesGetMask | +| `useOrgCapabilitiesGetMaskByNamesQuery` | Query | orgCapabilitiesGetMaskByNames | +| `useOrgCapabilitiesGetPaddedMaskQuery` | Query | orgCapabilitiesGetPaddedMask | | `useOrgIsManagerOfQuery` | Query | orgIsManagerOf | -| `useOrgPermissionsGetByMaskQuery` | Query | Reads and enables pagination through a set of `OrgPermission`. | -| `useOrgPermissionsGetMaskQuery` | Query | orgPermissionsGetMask | -| `useOrgPermissionsGetMaskByNamesQuery` | Query | orgPermissionsGetMaskByNames | -| `useOrgPermissionsGetPaddedMaskQuery` | Query | orgPermissionsGetPaddedMask | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, @@ -215,6 +275,90 @@ const { mutate: create } = useCreateAppAdminGrantMutation({ create({ actorId: '', grantorId: '', isGrant: '' }); ``` +### AppCapability + +```typescript +// List all appCapabilities +const { data, isLoading } = useAppCapabilitiesQuery({ + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); + +// Get one appCapability +const { data: item } = useAppCapabilityQuery({ + id: '', + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); + +// Create a appCapability +const { mutate: create } = useCreateAppCapabilityMutation({ + selection: { fields: { id: true } }, +}); +create({ bitnum: '', bitstr: '', description: '', kind: '', name: '' }); +``` + +### AppCapabilityDefaultCapability + +```typescript +// List all appCapabilityDefaultCapabilities +const { data, isLoading } = useAppCapabilityDefaultCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }, +}); + +// Get one appCapabilityDefaultCapability +const { data: item } = useAppCapabilityDefaultCapabilityQuery({ + id: '', + selection: { fields: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }, +}); + +// Create a appCapabilityDefaultCapability +const { mutate: create } = useCreateAppCapabilityDefaultCapabilityMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilityId: '' }); +``` + +### AppCapabilityDefault + +```typescript +// List all appCapabilityDefaults +const { data, isLoading } = useAppCapabilityDefaultsQuery({ + selection: { fields: { capabilities: true, id: true } }, +}); + +// Get one appCapabilityDefault +const { data: item } = useAppCapabilityDefaultQuery({ + id: '', + selection: { fields: { capabilities: true, id: true } }, +}); + +// Create a appCapabilityDefault +const { mutate: create } = useCreateAppCapabilityDefaultMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilities: '' }); +``` + +### AppCapabilityDefaultGrant + +```typescript +// List all appCapabilityDefaultGrants +const { data, isLoading } = useAppCapabilityDefaultGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); + +// Get one appCapabilityDefaultGrant +const { data: item } = useAppCapabilityDefaultGrantQuery({ + id: '', + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); + +// Create a appCapabilityDefaultGrant +const { mutate: create } = useCreateAppCapabilityDefaultGrantMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilityId: '', grantorId: '', isGrant: '' }); +``` + ### AppClaimedInvite ```typescript @@ -241,20 +385,20 @@ create({ data: '', receiverId: '', senderId: '' }); ```typescript // List all appGrants const { data, isLoading } = useAppGrantsQuery({ - selection: { fields: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); // Get one appGrant const { data: item } = useAppGrantQuery({ id: '', - selection: { fields: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); // Create a appGrant const { mutate: create } = useCreateAppGrantMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', grantorId: '', isGrant: '', permissions: '' }); +create({ actorId: '', capabilities: '', grantorId: '', isGrant: '' }); ``` ### AppInvite @@ -283,20 +427,20 @@ create({ channel: '', data: '', email: '', expiresAt: '', - selection: { fields: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }, }); // Create a appMembership const { mutate: create } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }); +create({ actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }); ``` ### AppMembershipDefault @@ -320,6 +464,27 @@ const { mutate: create } = useCreateAppMembershipDefaultMutation({ create({ createdBy: '', isApproved: '', isVerified: '', updatedBy: '' }); ``` +### AppMembershipProfile + +```typescript +// List all appMembershipProfiles +const { data, isLoading } = useAppMembershipProfilesQuery({ + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); + +// Get one appMembershipProfile +const { data: item } = useAppMembershipProfileQuery({ + id: '', + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); + +// Create a appMembershipProfile +const { mutate: create } = useCreateAppMembershipProfileMutation({ + selection: { fields: { id: true } }, +}); +create({ actorId: '', membershipId: '', profileId: '' }); +``` + ### AppOwnerGrant ```typescript @@ -341,88 +506,109 @@ const { mutate: create } = useCreateAppOwnerGrantMutation({ create({ actorId: '', grantorId: '', isGrant: '' }); ``` -### AppPermission +### AppProfileCapability ```typescript -// List all appPermissions -const { data, isLoading } = useAppPermissionsQuery({ - selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, name: true } }, +// List all appProfileCapabilities +const { data, isLoading } = useAppProfileCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, }); -// Get one appPermission -const { data: item } = useAppPermissionQuery({ +// Get one appProfileCapability +const { data: item } = useAppProfileCapabilityQuery({ id: '', - selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, name: true } }, + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, }); -// Create a appPermission -const { mutate: create } = useCreateAppPermissionMutation({ +// Create a appProfileCapability +const { mutate: create } = useCreateAppProfileCapabilityMutation({ selection: { fields: { id: true } }, }); -create({ bitnum: '', bitstr: '', description: '', name: '' }); +create({ capabilityId: '', profileId: '' }); ``` -### AppPermissionDefault +### AppProfile ```typescript -// List all appPermissionDefaults -const { data, isLoading } = useAppPermissionDefaultsQuery({ - selection: { fields: { id: true, permissions: true } }, +// List all appProfiles +const { data, isLoading } = useAppProfilesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, }); -// Get one appPermissionDefault -const { data: item } = useAppPermissionDefaultQuery({ +// Get one appProfile +const { data: item } = useAppProfileQuery({ id: '', - selection: { fields: { id: true, permissions: true } }, + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, }); -// Create a appPermissionDefault -const { mutate: create } = useCreateAppPermissionDefaultMutation({ +// Create a appProfile +const { mutate: create } = useCreateAppProfileMutation({ selection: { fields: { id: true } }, }); -create({ permissions: '' }); +create({ capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }); ``` -### AppPermissionDefaultGrant +### AppProfileDefinitionGrant ```typescript -// List all appPermissionDefaultGrants -const { data, isLoading } = useAppPermissionDefaultGrantsQuery({ - selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }, +// List all appProfileDefinitionGrants +const { data, isLoading } = useAppProfileDefinitionGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, }); -// Get one appPermissionDefaultGrant -const { data: item } = useAppPermissionDefaultGrantQuery({ +// Get one appProfileDefinitionGrant +const { data: item } = useAppProfileDefinitionGrantQuery({ id: '', - selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }, + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, }); -// Create a appPermissionDefaultGrant -const { mutate: create } = useCreateAppPermissionDefaultGrantMutation({ +// Create a appProfileDefinitionGrant +const { mutate: create } = useCreateAppProfileDefinitionGrantMutation({ selection: { fields: { id: true } }, }); -create({ grantorId: '', isGrant: '', permissionId: '' }); +create({ capabilityId: '', grantorId: '', isGrant: '', profileId: '' }); ``` -### AppPermissionDefaultPermission +### AppProfileGrant ```typescript -// List all appPermissionDefaultPermissions -const { data, isLoading } = useAppPermissionDefaultPermissionsQuery({ - selection: { fields: { createdAt: true, id: true, permissionId: true, updatedAt: true } }, +// List all appProfileGrants +const { data, isLoading } = useAppProfileGrantsQuery({ + selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, }); -// Get one appPermissionDefaultPermission -const { data: item } = useAppPermissionDefaultPermissionQuery({ +// Get one appProfileGrant +const { data: item } = useAppProfileGrantQuery({ id: '', - selection: { fields: { createdAt: true, id: true, permissionId: true, updatedAt: true } }, + selection: { fields: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, }); -// Create a appPermissionDefaultPermission -const { mutate: create } = useCreateAppPermissionDefaultPermissionMutation({ +// Create a appProfileGrant +const { mutate: create } = useCreateAppProfileGrantMutation({ selection: { fields: { id: true } }, }); -create({ permissionId: '' }); +create({ grantorId: '', isGrant: '', membershipId: '', profileId: '' }); +``` + +### AppProfileTemplate + +```typescript +// List all appProfileTemplates +const { data, isLoading } = useAppProfileTemplatesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, +}); + +// Get one appProfileTemplate +const { data: item } = useAppProfileTemplateQuery({ + id: '', + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, +}); + +// Create a appProfileTemplate +const { mutate: create } = useCreateAppProfileTemplateMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilities: '', description: '', isDefault: '', name: '', slug: '' }); ``` ### MembershipType @@ -467,6 +653,90 @@ const { mutate: create } = useCreateOrgAdminGrantMutation({ create({ actorId: '', entityId: '', grantorId: '', isGrant: '' }); ``` +### OrgCapability + +```typescript +// List all orgCapabilities +const { data, isLoading } = useOrgCapabilitiesQuery({ + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); + +// Get one orgCapability +const { data: item } = useOrgCapabilityQuery({ + id: '', + selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }, +}); + +// Create a orgCapability +const { mutate: create } = useCreateOrgCapabilityMutation({ + selection: { fields: { id: true } }, +}); +create({ bitnum: '', bitstr: '', description: '', kind: '', name: '' }); +``` + +### OrgCapabilityDefaultCapability + +```typescript +// List all orgCapabilityDefaultCapabilities +const { data, isLoading } = useOrgCapabilityDefaultCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }, +}); + +// Get one orgCapabilityDefaultCapability +const { data: item } = useOrgCapabilityDefaultCapabilityQuery({ + id: '', + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }, +}); + +// Create a orgCapabilityDefaultCapability +const { mutate: create } = useCreateOrgCapabilityDefaultCapabilityMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilityId: '', entityId: '' }); +``` + +### OrgCapabilityDefault + +```typescript +// List all orgCapabilityDefaults +const { data, isLoading } = useOrgCapabilityDefaultsQuery({ + selection: { fields: { capabilities: true, entityId: true, id: true } }, +}); + +// Get one orgCapabilityDefault +const { data: item } = useOrgCapabilityDefaultQuery({ + id: '', + selection: { fields: { capabilities: true, entityId: true, id: true } }, +}); + +// Create a orgCapabilityDefault +const { mutate: create } = useCreateOrgCapabilityDefaultMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilities: '', entityId: '' }); +``` + +### OrgCapabilityDefaultGrant + +```typescript +// List all orgCapabilityDefaultGrants +const { data, isLoading } = useOrgCapabilityDefaultGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); + +// Get one orgCapabilityDefaultGrant +const { data: item } = useOrgCapabilityDefaultGrantQuery({ + id: '', + selection: { fields: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, +}); + +// Create a orgCapabilityDefaultGrant +const { mutate: create } = useCreateOrgCapabilityDefaultGrantMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilityId: '', entityId: '', grantorId: '', isGrant: '' }); +``` + ### OrgChartEdge ```typescript @@ -565,20 +835,20 @@ create({ depth: '', userId: '' }); ```typescript // List all orgGrants const { data, isLoading } = useOrgGrantsQuery({ - selection: { fields: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); // Get one orgGrant const { data: item } = useOrgGrantQuery({ id: '', - selection: { fields: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }, }); // Create a orgGrant const { mutate: create } = useCreateOrgGrantMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }); +create({ actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }); ``` ### OrgInvite @@ -649,20 +919,20 @@ create({ actorId: '', bio: '', displayName: '', email: '', - selection: { fields: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }, + selection: { fields: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }, }); // Create a orgMembership const { mutate: create } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -create({ actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }); +create({ actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }); ``` ### OrgMembershipDefault @@ -686,6 +956,27 @@ const { mutate: create } = useCreateOrgMembershipDefaultMutation({ create({ createdBy: '', entityId: '', isApproved: '', updatedBy: '' }); ``` +### OrgMembershipProfile + +```typescript +// List all orgMembershipProfiles +const { data, isLoading } = useOrgMembershipProfilesQuery({ + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); + +// Get one orgMembershipProfile +const { data: item } = useOrgMembershipProfileQuery({ + id: '', + selection: { fields: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }, +}); + +// Create a orgMembershipProfile +const { mutate: create } = useCreateOrgMembershipProfileMutation({ + selection: { fields: { id: true } }, +}); +create({ actorId: '', membershipId: '', profileId: '' }); +``` + ### OrgMembershipSetting ```typescript @@ -728,95 +1019,116 @@ const { mutate: create } = useCreateOrgOwnerGrantMutation({ create({ actorId: '', entityId: '', grantorId: '', isGrant: '' }); ``` -### OrgPermission +### OrgProfileCapability + +```typescript +// List all orgProfileCapabilities +const { data, isLoading } = useOrgProfileCapabilitiesQuery({ + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, +}); + +// Get one orgProfileCapability +const { data: item } = useOrgProfileCapabilityQuery({ + id: '', + selection: { fields: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }, +}); + +// Create a orgProfileCapability +const { mutate: create } = useCreateOrgProfileCapabilityMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilityId: '', profileId: '' }); +``` + +### OrgProfile ```typescript -// List all orgPermissions -const { data, isLoading } = useOrgPermissionsQuery({ - selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, name: true } }, +// List all orgProfiles +const { data, isLoading } = useOrgProfilesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, }); -// Get one orgPermission -const { data: item } = useOrgPermissionQuery({ +// Get one orgProfile +const { data: item } = useOrgProfileQuery({ id: '', - selection: { fields: { bitnum: true, bitstr: true, description: true, id: true, name: true } }, + selection: { fields: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }, }); -// Create a orgPermission -const { mutate: create } = useCreateOrgPermissionMutation({ +// Create a orgProfile +const { mutate: create } = useCreateOrgProfileMutation({ selection: { fields: { id: true } }, }); -create({ bitnum: '', bitstr: '', description: '', name: '' }); +create({ capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }); ``` -### OrgPermissionDefault +### OrgProfileDefinitionGrant ```typescript -// List all orgPermissionDefaults -const { data, isLoading } = useOrgPermissionDefaultsQuery({ - selection: { fields: { entityId: true, id: true, permissions: true } }, +// List all orgProfileDefinitionGrants +const { data, isLoading } = useOrgProfileDefinitionGrantsQuery({ + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, }); -// Get one orgPermissionDefault -const { data: item } = useOrgPermissionDefaultQuery({ +// Get one orgProfileDefinitionGrant +const { data: item } = useOrgProfileDefinitionGrantQuery({ id: '', - selection: { fields: { entityId: true, id: true, permissions: true } }, + selection: { fields: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }, }); -// Create a orgPermissionDefault -const { mutate: create } = useCreateOrgPermissionDefaultMutation({ +// Create a orgProfileDefinitionGrant +const { mutate: create } = useCreateOrgProfileDefinitionGrantMutation({ selection: { fields: { id: true } }, }); -create({ entityId: '', permissions: '' }); +create({ capabilityId: '', grantorId: '', isGrant: '', profileId: '' }); ``` -### OrgPermissionDefaultGrant +### OrgProfileGrant ```typescript -// List all orgPermissionDefaultGrants -const { data, isLoading } = useOrgPermissionDefaultGrantsQuery({ - selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }, +// List all orgProfileGrants +const { data, isLoading } = useOrgProfileGrantsQuery({ + selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, }); -// Get one orgPermissionDefaultGrant -const { data: item } = useOrgPermissionDefaultGrantQuery({ +// Get one orgProfileGrant +const { data: item } = useOrgProfileGrantQuery({ id: '', - selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }, + selection: { fields: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }, }); -// Create a orgPermissionDefaultGrant -const { mutate: create } = useCreateOrgPermissionDefaultGrantMutation({ +// Create a orgProfileGrant +const { mutate: create } = useCreateOrgProfileGrantMutation({ selection: { fields: { id: true } }, }); -create({ entityId: '', grantorId: '', isGrant: '', permissionId: '' }); +create({ entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }); ``` -### OrgPermissionDefaultPermission +### OrgProfileTemplate ```typescript -// List all orgPermissionDefaultPermissions -const { data, isLoading } = useOrgPermissionDefaultPermissionsQuery({ - selection: { fields: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }, +// List all orgProfileTemplates +const { data, isLoading } = useOrgProfileTemplatesQuery({ + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, }); -// Get one orgPermissionDefaultPermission -const { data: item } = useOrgPermissionDefaultPermissionQuery({ +// Get one orgProfileTemplate +const { data: item } = useOrgProfileTemplateQuery({ id: '', - selection: { fields: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }, + selection: { fields: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }, }); -// Create a orgPermissionDefaultPermission -const { mutate: create } = useCreateOrgPermissionDefaultPermissionMutation({ +// Create a orgProfileTemplate +const { mutate: create } = useCreateOrgProfileTemplateMutation({ selection: { fields: { id: true } }, }); -create({ entityId: '', permissionId: '' }); +create({ capabilities: '', description: '', isDefault: '', name: '', slug: '' }); ``` ## Custom Operation Hooks -### `useAppPermissionsGetByMaskQuery` +### `useAppCapabilitiesGetByMaskQuery` -Reads and enables pagination through a set of `AppPermission`. +Reads and enables pagination through a set of `AppCapability`. - **Type:** query - **Arguments:** @@ -828,9 +1140,9 @@ Reads and enables pagination through a set of `AppPermission`. | `mask` | BitString | | `offset` | Int | -### `useAppPermissionsGetMaskQuery` +### `useAppCapabilitiesGetMaskQuery` -appPermissionsGetMask +appCapabilitiesGetMask - **Type:** query - **Arguments:** @@ -839,9 +1151,9 @@ appPermissionsGetMask |----------|------| | `ids` | [UUID] | -### `useAppPermissionsGetMaskByNamesQuery` +### `useAppCapabilitiesGetMaskByNamesQuery` -appPermissionsGetMaskByNames +appCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** @@ -850,9 +1162,9 @@ appPermissionsGetMaskByNames |----------|------| | `names` | [String] | -### `useAppPermissionsGetPaddedMaskQuery` +### `useAppCapabilitiesGetPaddedMaskQuery` -appPermissionsGetPaddedMask +appCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** @@ -861,66 +1173,66 @@ appPermissionsGetPaddedMask |----------|------| | `mask` | BitString | -### `useOrgIsManagerOfQuery` +### `useOrgCapabilitiesGetByMaskQuery` -orgIsManagerOf +Reads and enables pagination through a set of `OrgCapability`. - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `managerId` | UUID | - | `maxDepth` | Int | - | `targetEntityId` | UUID | - | `userId` | UUID | + | `after` | Cursor | + | `first` | Int | + | `mask` | BitString | + | `offset` | Int | -### `useOrgPermissionsGetByMaskQuery` +### `useOrgCapabilitiesGetMaskQuery` -Reads and enables pagination through a set of `OrgPermission`. +orgCapabilitiesGetMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `after` | Cursor | - | `first` | Int | - | `mask` | BitString | - | `offset` | Int | + | `ids` | [UUID] | -### `useOrgPermissionsGetMaskQuery` +### `useOrgCapabilitiesGetMaskByNamesQuery` -orgPermissionsGetMask +orgCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `ids` | [UUID] | + | `names` | [String] | -### `useOrgPermissionsGetMaskByNamesQuery` +### `useOrgCapabilitiesGetPaddedMaskQuery` -orgPermissionsGetMaskByNames +orgCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `names` | [String] | + | `mask` | BitString | -### `useOrgPermissionsGetPaddedMaskQuery` +### `useOrgIsManagerOfQuery` -orgPermissionsGetPaddedMask +orgIsManagerOf - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `mask` | BitString | + | `managerId` | UUID | + | `maxDepth` | Int | + | `targetEntityId` | UUID | + | `userId` | UUID | ### `useProvisionBucketMutation` diff --git a/sdk/constructive-react/src/admin/hooks/index.ts b/sdk/constructive-react/src/admin/hooks/index.ts index a876e66797..3b5400195b 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: AppAdminGrant, AppClaimedInvite, AppGrant, AppInvite, AppMembership, AppMembershipDefault, AppOwnerGrant, AppPermission, AppPermissionDefault, AppPermissionDefaultGrant, AppPermissionDefaultPermission, MembershipType, OrgAdminGrant, OrgChartEdge, OrgChartEdgeGrant, OrgClaimedInvite, OrgGetManagersRecord, OrgGetSubordinatesRecord, OrgGrant, OrgInvite, OrgMember, OrgMemberProfile, OrgMembership, OrgMembershipDefault, OrgMembershipSetting, OrgOwnerGrant, OrgPermission, OrgPermissionDefault, OrgPermissionDefaultGrant, OrgPermissionDefaultPermission + * Tables: AppAdminGrant, AppCapability, AppCapabilityDefaultCapability, AppCapabilityDefault, AppCapabilityDefaultGrant, AppClaimedInvite, AppGrant, AppInvite, AppMembership, AppMembershipDefault, AppMembershipProfile, AppOwnerGrant, AppProfileCapability, AppProfile, AppProfileDefinitionGrant, AppProfileGrant, AppProfileTemplate, MembershipType, OrgAdminGrant, OrgCapability, OrgCapabilityDefaultCapability, OrgCapabilityDefault, OrgCapabilityDefaultGrant, OrgChartEdge, OrgChartEdgeGrant, OrgClaimedInvite, OrgGetManagersRecord, OrgGetSubordinatesRecord, OrgGrant, OrgInvite, OrgMember, OrgMemberProfile, OrgMembership, OrgMembershipDefault, OrgMembershipProfile, OrgMembershipSetting, OrgOwnerGrant, OrgProfileCapability, OrgProfile, OrgProfileDefinitionGrant, OrgProfileGrant, OrgProfileTemplate * * Usage: * diff --git a/sdk/constructive-react/src/admin/hooks/invalidation.ts b/sdk/constructive-react/src/admin/hooks/invalidation.ts index a75fef3e02..d29ce26241 100644 --- a/sdk/constructive-react/src/admin/hooks/invalidation.ts +++ b/sdk/constructive-react/src/admin/hooks/invalidation.ts @@ -16,18 +16,28 @@ import type { QueryClient } from '@tanstack/react-query'; import { appAdminGrantKeys, + appCapabilityKeys, + appCapabilityDefaultCapabilityKeys, + appCapabilityDefaultKeys, + appCapabilityDefaultGrantKeys, appClaimedInviteKeys, appGrantKeys, appInviteKeys, appMembershipKeys, appMembershipDefaultKeys, + appMembershipProfileKeys, appOwnerGrantKeys, - appPermissionKeys, - appPermissionDefaultKeys, - appPermissionDefaultGrantKeys, - appPermissionDefaultPermissionKeys, + appProfileCapabilityKeys, + appProfileKeys, + appProfileDefinitionGrantKeys, + appProfileGrantKeys, + appProfileTemplateKeys, membershipTypeKeys, orgAdminGrantKeys, + orgCapabilityKeys, + orgCapabilityDefaultCapabilityKeys, + orgCapabilityDefaultKeys, + orgCapabilityDefaultGrantKeys, orgChartEdgeKeys, orgChartEdgeGrantKeys, orgClaimedInviteKeys, @@ -39,12 +49,14 @@ import { orgMemberProfileKeys, orgMembershipKeys, orgMembershipDefaultKeys, + orgMembershipProfileKeys, orgMembershipSettingKeys, orgOwnerGrantKeys, - orgPermissionKeys, - orgPermissionDefaultKeys, - orgPermissionDefaultGrantKeys, - orgPermissionDefaultPermissionKeys, + orgProfileCapabilityKeys, + orgProfileKeys, + orgProfileDefinitionGrantKeys, + orgProfileGrantKeys, + orgProfileTemplateKeys, } from './query-keys'; /** // ============================================================================ @@ -83,6 +95,76 @@ export const invalidate = { queryKey: appAdminGrantKeys.detail(id), }), }, + /** Invalidate appCapability queries */ appCapability: { + /** Invalidate all appCapability queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityKeys.all, + }), + /** Invalidate appCapability list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityKeys.lists(), + }), + /** Invalidate a specific appCapability */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appCapabilityKeys.detail(id), + }), + }, + /** Invalidate appCapabilityDefaultCapability queries */ appCapabilityDefaultCapability: { + /** Invalidate all appCapabilityDefaultCapability queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.all, + }), + /** Invalidate appCapabilityDefaultCapability list queries */ lists: ( + queryClient: QueryClient + ) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.lists(), + }), + /** Invalidate a specific appCapabilityDefaultCapability */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.detail(id), + }), + }, + /** Invalidate appCapabilityDefault queries */ appCapabilityDefault: { + /** Invalidate all appCapabilityDefault queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultKeys.all, + }), + /** Invalidate appCapabilityDefault list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultKeys.lists(), + }), + /** Invalidate a specific appCapabilityDefault */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultKeys.detail(id), + }), + }, + /** Invalidate appCapabilityDefaultGrant queries */ appCapabilityDefaultGrant: { + /** Invalidate all appCapabilityDefaultGrant queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.all, + }), + /** Invalidate appCapabilityDefaultGrant list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.lists(), + }), + /** Invalidate a specific appCapabilityDefaultGrant */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.detail(id), + }), + }, /** Invalidate appClaimedInvite queries */ appClaimedInvite: { /** Invalidate all appClaimedInvite queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -165,6 +247,23 @@ export const invalidate = { queryKey: appMembershipDefaultKeys.detail(id), }), }, + /** Invalidate appMembershipProfile queries */ appMembershipProfile: { + /** Invalidate all appMembershipProfile queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.all, + }), + /** Invalidate appMembershipProfile list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.lists(), + }), + /** Invalidate a specific appMembershipProfile */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.detail(id), + }), + }, /** Invalidate appOwnerGrant queries */ appOwnerGrant: { /** Invalidate all appOwnerGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -182,74 +281,89 @@ export const invalidate = { queryKey: appOwnerGrantKeys.detail(id), }), }, - /** Invalidate appPermission queries */ appPermission: { - /** Invalidate all appPermission queries */ all: (queryClient: QueryClient) => + /** Invalidate appProfileCapability queries */ appProfileCapability: { + /** Invalidate all appProfileCapability queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionKeys.all, + queryKey: appProfileCapabilityKeys.all, }), - /** Invalidate appPermission list queries */ lists: (queryClient: QueryClient) => + /** Invalidate appProfileCapability list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionKeys.lists(), + queryKey: appProfileCapabilityKeys.lists(), }), - /** Invalidate a specific appPermission */ detail: ( + /** Invalidate a specific appProfileCapability */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: appPermissionKeys.detail(id), + queryKey: appProfileCapabilityKeys.detail(id), }), }, - /** Invalidate appPermissionDefault queries */ appPermissionDefault: { - /** Invalidate all appPermissionDefault queries */ all: (queryClient: QueryClient) => + /** Invalidate appProfile queries */ appProfile: { + /** Invalidate all appProfile queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.all, + queryKey: appProfileKeys.all, }), - /** Invalidate appPermissionDefault list queries */ lists: (queryClient: QueryClient) => + /** Invalidate appProfile list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.lists(), + queryKey: appProfileKeys.lists(), }), - /** Invalidate a specific appPermissionDefault */ detail: ( + /** Invalidate a specific appProfile */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.detail(id), + queryKey: appProfileKeys.detail(id), }), }, - /** Invalidate appPermissionDefaultGrant queries */ appPermissionDefaultGrant: { - /** Invalidate all appPermissionDefaultGrant queries */ all: (queryClient: QueryClient) => + /** Invalidate appProfileDefinitionGrant queries */ appProfileDefinitionGrant: { + /** Invalidate all appProfileDefinitionGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.all, + queryKey: appProfileDefinitionGrantKeys.all, }), - /** Invalidate appPermissionDefaultGrant list queries */ lists: (queryClient: QueryClient) => + /** Invalidate appProfileDefinitionGrant list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.lists(), + queryKey: appProfileDefinitionGrantKeys.lists(), }), - /** Invalidate a specific appPermissionDefaultGrant */ detail: ( + /** Invalidate a specific appProfileDefinitionGrant */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.detail(id), + queryKey: appProfileDefinitionGrantKeys.detail(id), }), }, - /** Invalidate appPermissionDefaultPermission queries */ appPermissionDefaultPermission: { - /** Invalidate all appPermissionDefaultPermission queries */ all: (queryClient: QueryClient) => + /** Invalidate appProfileGrant queries */ appProfileGrant: { + /** Invalidate all appProfileGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.all, + queryKey: appProfileGrantKeys.all, }), - /** Invalidate appPermissionDefaultPermission list queries */ lists: ( - queryClient: QueryClient + /** Invalidate appProfileGrant list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appProfileGrantKeys.lists(), + }), + /** Invalidate a specific appProfileGrant */ detail: ( + queryClient: QueryClient, + id: string | number ) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.lists(), + queryKey: appProfileGrantKeys.detail(id), + }), + }, + /** Invalidate appProfileTemplate queries */ appProfileTemplate: { + /** Invalidate all appProfileTemplate queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.all, + }), + /** Invalidate appProfileTemplate list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.lists(), }), - /** Invalidate a specific appPermissionDefaultPermission */ detail: ( + /** Invalidate a specific appProfileTemplate */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.detail(id), + queryKey: appProfileTemplateKeys.detail(id), }), }, /** Invalidate membershipType queries */ membershipType: { @@ -286,6 +400,76 @@ export const invalidate = { queryKey: orgAdminGrantKeys.detail(id), }), }, + /** Invalidate orgCapability queries */ orgCapability: { + /** Invalidate all orgCapability queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.all, + }), + /** Invalidate orgCapability list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.lists(), + }), + /** Invalidate a specific orgCapability */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.detail(id), + }), + }, + /** Invalidate orgCapabilityDefaultCapability queries */ orgCapabilityDefaultCapability: { + /** Invalidate all orgCapabilityDefaultCapability queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.all, + }), + /** Invalidate orgCapabilityDefaultCapability list queries */ lists: ( + queryClient: QueryClient + ) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.lists(), + }), + /** Invalidate a specific orgCapabilityDefaultCapability */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.detail(id), + }), + }, + /** Invalidate orgCapabilityDefault queries */ orgCapabilityDefault: { + /** Invalidate all orgCapabilityDefault queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultKeys.all, + }), + /** Invalidate orgCapabilityDefault list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultKeys.lists(), + }), + /** Invalidate a specific orgCapabilityDefault */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultKeys.detail(id), + }), + }, + /** Invalidate orgCapabilityDefaultGrant queries */ orgCapabilityDefaultGrant: { + /** Invalidate all orgCapabilityDefaultGrant queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.all, + }), + /** Invalidate orgCapabilityDefaultGrant list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.lists(), + }), + /** Invalidate a specific orgCapabilityDefaultGrant */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.detail(id), + }), + }, /** Invalidate orgChartEdge queries */ orgChartEdge: { /** Invalidate all orgChartEdge queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -470,6 +654,23 @@ export const invalidate = { queryKey: orgMembershipDefaultKeys.detail(id), }), }, + /** Invalidate orgMembershipProfile queries */ orgMembershipProfile: { + /** Invalidate all orgMembershipProfile queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.all, + }), + /** Invalidate orgMembershipProfile list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.lists(), + }), + /** Invalidate a specific orgMembershipProfile */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.detail(id), + }), + }, /** Invalidate orgMembershipSetting queries */ orgMembershipSetting: { /** Invalidate all orgMembershipSetting queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -504,74 +705,89 @@ export const invalidate = { queryKey: orgOwnerGrantKeys.detail(id), }), }, - /** Invalidate orgPermission queries */ orgPermission: { - /** Invalidate all orgPermission queries */ all: (queryClient: QueryClient) => + /** Invalidate orgProfileCapability queries */ orgProfileCapability: { + /** Invalidate all orgProfileCapability queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.all, + queryKey: orgProfileCapabilityKeys.all, }), - /** Invalidate orgPermission list queries */ lists: (queryClient: QueryClient) => + /** Invalidate orgProfileCapability list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.lists(), + queryKey: orgProfileCapabilityKeys.lists(), }), - /** Invalidate a specific orgPermission */ detail: ( + /** Invalidate a specific orgProfileCapability */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.detail(id), + queryKey: orgProfileCapabilityKeys.detail(id), }), }, - /** Invalidate orgPermissionDefault queries */ orgPermissionDefault: { - /** Invalidate all orgPermissionDefault queries */ all: (queryClient: QueryClient) => + /** Invalidate orgProfile queries */ orgProfile: { + /** Invalidate all orgProfile queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.all, + queryKey: orgProfileKeys.all, }), - /** Invalidate orgPermissionDefault list queries */ lists: (queryClient: QueryClient) => + /** Invalidate orgProfile list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.lists(), + queryKey: orgProfileKeys.lists(), }), - /** Invalidate a specific orgPermissionDefault */ detail: ( + /** Invalidate a specific orgProfile */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.detail(id), + queryKey: orgProfileKeys.detail(id), }), }, - /** Invalidate orgPermissionDefaultGrant queries */ orgPermissionDefaultGrant: { - /** Invalidate all orgPermissionDefaultGrant queries */ all: (queryClient: QueryClient) => + /** Invalidate orgProfileDefinitionGrant queries */ orgProfileDefinitionGrant: { + /** Invalidate all orgProfileDefinitionGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.all, + queryKey: orgProfileDefinitionGrantKeys.all, }), - /** Invalidate orgPermissionDefaultGrant list queries */ lists: (queryClient: QueryClient) => + /** Invalidate orgProfileDefinitionGrant list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.lists(), + queryKey: orgProfileDefinitionGrantKeys.lists(), }), - /** Invalidate a specific orgPermissionDefaultGrant */ detail: ( + /** Invalidate a specific orgProfileDefinitionGrant */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.detail(id), + queryKey: orgProfileDefinitionGrantKeys.detail(id), }), }, - /** Invalidate orgPermissionDefaultPermission queries */ orgPermissionDefaultPermission: { - /** Invalidate all orgPermissionDefaultPermission queries */ all: (queryClient: QueryClient) => + /** Invalidate orgProfileGrant queries */ orgProfileGrant: { + /** Invalidate all orgProfileGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.all, + queryKey: orgProfileGrantKeys.all, }), - /** Invalidate orgPermissionDefaultPermission list queries */ lists: ( - queryClient: QueryClient + /** Invalidate orgProfileGrant list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgProfileGrantKeys.lists(), + }), + /** Invalidate a specific orgProfileGrant */ detail: ( + queryClient: QueryClient, + id: string | number ) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.lists(), + queryKey: orgProfileGrantKeys.detail(id), + }), + }, + /** Invalidate orgProfileTemplate queries */ orgProfileTemplate: { + /** Invalidate all orgProfileTemplate queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.all, }), - /** Invalidate a specific orgPermissionDefaultPermission */ detail: ( + /** Invalidate orgProfileTemplate list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.lists(), + }), + /** Invalidate a specific orgProfileTemplate */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.detail(id), + queryKey: orgProfileTemplateKeys.detail(id), }), }, } as const; @@ -595,6 +811,38 @@ export const remove = { queryKey: appAdminGrantKeys.detail(id), }); }, + /** Remove appCapability from cache */ appCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appCapabilityKeys.detail(id), + }); + }, + /** Remove appCapabilityDefaultCapability from cache */ appCapabilityDefaultCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.detail(id), + }); + }, + /** Remove appCapabilityDefault from cache */ appCapabilityDefault: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appCapabilityDefaultKeys.detail(id), + }); + }, + /** Remove appCapabilityDefaultGrant from cache */ appCapabilityDefaultGrant: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appCapabilityDefaultGrantKeys.detail(id), + }); + }, /** Remove appClaimedInvite from cache */ appClaimedInvite: ( queryClient: QueryClient, id: string | number @@ -629,6 +877,14 @@ export const remove = { queryKey: appMembershipDefaultKeys.detail(id), }); }, + /** Remove appMembershipProfile from cache */ appMembershipProfile: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appMembershipProfileKeys.detail(id), + }); + }, /** Remove appOwnerGrant from cache */ appOwnerGrant: ( queryClient: QueryClient, id: string | number @@ -637,36 +893,44 @@ export const remove = { queryKey: appOwnerGrantKeys.detail(id), }); }, - /** Remove appPermission from cache */ appPermission: ( + /** Remove appProfileCapability from cache */ appProfileCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appProfileCapabilityKeys.detail(id), + }); + }, + /** Remove appProfile from cache */ appProfile: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: appPermissionKeys.detail(id), + queryKey: appProfileKeys.detail(id), }); }, - /** Remove appPermissionDefault from cache */ appPermissionDefault: ( + /** Remove appProfileDefinitionGrant from cache */ appProfileDefinitionGrant: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultKeys.detail(id), + queryKey: appProfileDefinitionGrantKeys.detail(id), }); }, - /** Remove appPermissionDefaultGrant from cache */ appPermissionDefaultGrant: ( + /** Remove appProfileGrant from cache */ appProfileGrant: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultGrantKeys.detail(id), + queryKey: appProfileGrantKeys.detail(id), }); }, - /** Remove appPermissionDefaultPermission from cache */ appPermissionDefaultPermission: ( + /** Remove appProfileTemplate from cache */ appProfileTemplate: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultPermissionKeys.detail(id), + queryKey: appProfileTemplateKeys.detail(id), }); }, /** Remove membershipType from cache */ membershipType: ( @@ -685,6 +949,38 @@ export const remove = { queryKey: orgAdminGrantKeys.detail(id), }); }, + /** Remove orgCapability from cache */ orgCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgCapabilityKeys.detail(id), + }); + }, + /** Remove orgCapabilityDefaultCapability from cache */ orgCapabilityDefaultCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.detail(id), + }); + }, + /** Remove orgCapabilityDefault from cache */ orgCapabilityDefault: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgCapabilityDefaultKeys.detail(id), + }); + }, + /** Remove orgCapabilityDefaultGrant from cache */ orgCapabilityDefaultGrant: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgCapabilityDefaultGrantKeys.detail(id), + }); + }, /** Remove orgChartEdge from cache */ orgChartEdge: ( queryClient: QueryClient, id: string | number @@ -764,6 +1060,14 @@ export const remove = { queryKey: orgMembershipDefaultKeys.detail(id), }); }, + /** Remove orgMembershipProfile from cache */ orgMembershipProfile: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgMembershipProfileKeys.detail(id), + }); + }, /** Remove orgMembershipSetting from cache */ orgMembershipSetting: ( queryClient: QueryClient, id: string | number @@ -780,36 +1084,44 @@ export const remove = { queryKey: orgOwnerGrantKeys.detail(id), }); }, - /** Remove orgPermission from cache */ orgPermission: ( + /** Remove orgProfileCapability from cache */ orgProfileCapability: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgProfileCapabilityKeys.detail(id), + }); + }, + /** Remove orgProfile from cache */ orgProfile: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: orgPermissionKeys.detail(id), + queryKey: orgProfileKeys.detail(id), }); }, - /** Remove orgPermissionDefault from cache */ orgPermissionDefault: ( + /** Remove orgProfileDefinitionGrant from cache */ orgProfileDefinitionGrant: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultKeys.detail(id), + queryKey: orgProfileDefinitionGrantKeys.detail(id), }); }, - /** Remove orgPermissionDefaultGrant from cache */ orgPermissionDefaultGrant: ( + /** Remove orgProfileGrant from cache */ orgProfileGrant: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultGrantKeys.detail(id), + queryKey: orgProfileGrantKeys.detail(id), }); }, - /** Remove orgPermissionDefaultPermission from cache */ orgPermissionDefaultPermission: ( + /** Remove orgProfileTemplate from cache */ orgProfileTemplate: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultPermissionKeys.detail(id), + queryKey: orgProfileTemplateKeys.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 4f6b7a0083..06afa0d5a1 100644 --- a/sdk/constructive-react/src/admin/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/admin/hooks/mutation-keys.ts @@ -27,6 +27,48 @@ export const appAdminGrantMutationKeys = { /** Delete appAdminGrant mutation key */ delete: (id: string | number) => ['mutation', 'appadmingrant', 'delete', id] as const, } as const; +export const appCapabilityMutationKeys = { + /** All appCapability mutation keys */ all: ['mutation', 'appcapability'] as const, + /** Create appCapability mutation key */ create: () => + ['mutation', 'appcapability', 'create'] as const, + /** Update appCapability mutation key */ update: (id: string | number) => + ['mutation', 'appcapability', 'update', id] as const, + /** Delete appCapability mutation key */ delete: (id: string | number) => + ['mutation', 'appcapability', 'delete', id] as const, +} as const; +export const appCapabilityDefaultCapabilityMutationKeys = { + /** All appCapabilityDefaultCapability mutation keys */ all: [ + 'mutation', + 'appcapabilitydefaultcapability', + ] as const, + /** Create appCapabilityDefaultCapability mutation key */ create: () => + ['mutation', 'appcapabilitydefaultcapability', 'create'] as const, + /** Update appCapabilityDefaultCapability mutation key */ update: (id: string | number) => + ['mutation', 'appcapabilitydefaultcapability', 'update', id] as const, + /** Delete appCapabilityDefaultCapability mutation key */ delete: (id: string | number) => + ['mutation', 'appcapabilitydefaultcapability', 'delete', id] as const, +} as const; +export const appCapabilityDefaultMutationKeys = { + /** All appCapabilityDefault mutation keys */ all: ['mutation', 'appcapabilitydefault'] as const, + /** Create appCapabilityDefault mutation key */ create: () => + ['mutation', 'appcapabilitydefault', 'create'] as const, + /** Update appCapabilityDefault mutation key */ update: (id: string | number) => + ['mutation', 'appcapabilitydefault', 'update', id] as const, + /** Delete appCapabilityDefault mutation key */ delete: (id: string | number) => + ['mutation', 'appcapabilitydefault', 'delete', id] as const, +} as const; +export const appCapabilityDefaultGrantMutationKeys = { + /** All appCapabilityDefaultGrant mutation keys */ all: [ + 'mutation', + 'appcapabilitydefaultgrant', + ] as const, + /** Create appCapabilityDefaultGrant mutation key */ create: () => + ['mutation', 'appcapabilitydefaultgrant', 'create'] as const, + /** Update appCapabilityDefaultGrant mutation key */ update: (id: string | number) => + ['mutation', 'appcapabilitydefaultgrant', 'update', id] as const, + /** Delete appCapabilityDefaultGrant mutation key */ delete: (id: string | number) => + ['mutation', 'appcapabilitydefaultgrant', 'delete', id] as const, +} as const; export const appClaimedInviteMutationKeys = { /** All appClaimedInvite mutation keys */ all: ['mutation', 'appclaimedinvite'] as const, /** Create appClaimedInvite mutation key */ create: () => @@ -70,6 +112,15 @@ export const appMembershipDefaultMutationKeys = { /** Delete appMembershipDefault mutation key */ delete: (id: string | number) => ['mutation', 'appmembershipdefault', 'delete', id] as const, } as const; +export const appMembershipProfileMutationKeys = { + /** All appMembershipProfile mutation keys */ all: ['mutation', 'appmembershipprofile'] as const, + /** Create appMembershipProfile mutation key */ create: () => + ['mutation', 'appmembershipprofile', 'create'] as const, + /** Update appMembershipProfile mutation key */ update: (id: string | number) => + ['mutation', 'appmembershipprofile', 'update', id] as const, + /** Delete appMembershipProfile mutation key */ delete: (id: string | number) => + ['mutation', 'appmembershipprofile', 'delete', id] as const, +} as const; export const appOwnerGrantMutationKeys = { /** All appOwnerGrant mutation keys */ all: ['mutation', 'appownergrant'] as const, /** Create appOwnerGrant mutation key */ create: () => @@ -79,47 +130,52 @@ export const appOwnerGrantMutationKeys = { /** Delete appOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'appownergrant', 'delete', id] as const, } as const; -export const appPermissionMutationKeys = { - /** All appPermission mutation keys */ all: ['mutation', 'apppermission'] as const, - /** Create appPermission mutation key */ create: () => - ['mutation', 'apppermission', 'create'] as const, - /** Update appPermission mutation key */ update: (id: string | number) => - ['mutation', 'apppermission', 'update', id] as const, - /** Delete appPermission mutation key */ delete: (id: string | number) => - ['mutation', 'apppermission', 'delete', id] as const, -} as const; -export const appPermissionDefaultMutationKeys = { - /** All appPermissionDefault mutation keys */ all: ['mutation', 'apppermissiondefault'] as const, - /** Create appPermissionDefault mutation key */ create: () => - ['mutation', 'apppermissiondefault', 'create'] as const, - /** Update appPermissionDefault mutation key */ update: (id: string | number) => - ['mutation', 'apppermissiondefault', 'update', id] as const, - /** Delete appPermissionDefault mutation key */ delete: (id: string | number) => - ['mutation', 'apppermissiondefault', 'delete', id] as const, -} as const; -export const appPermissionDefaultGrantMutationKeys = { - /** All appPermissionDefaultGrant mutation keys */ all: [ - 'mutation', - 'apppermissiondefaultgrant', - ] as const, - /** Create appPermissionDefaultGrant mutation key */ create: () => - ['mutation', 'apppermissiondefaultgrant', 'create'] as const, - /** Update appPermissionDefaultGrant mutation key */ update: (id: string | number) => - ['mutation', 'apppermissiondefaultgrant', 'update', id] as const, - /** Delete appPermissionDefaultGrant mutation key */ delete: (id: string | number) => - ['mutation', 'apppermissiondefaultgrant', 'delete', id] as const, -} as const; -export const appPermissionDefaultPermissionMutationKeys = { - /** All appPermissionDefaultPermission mutation keys */ all: [ +export const appProfileCapabilityMutationKeys = { + /** All appProfileCapability mutation keys */ all: ['mutation', 'appprofilecapability'] as const, + /** Create appProfileCapability mutation key */ create: () => + ['mutation', 'appprofilecapability', 'create'] as const, + /** Update appProfileCapability mutation key */ update: (id: string | number) => + ['mutation', 'appprofilecapability', 'update', id] as const, + /** Delete appProfileCapability mutation key */ delete: (id: string | number) => + ['mutation', 'appprofilecapability', 'delete', id] as const, +} as const; +export const appProfileMutationKeys = { + /** All appProfile mutation keys */ all: ['mutation', 'appprofile'] as const, + /** Create appProfile mutation key */ create: () => ['mutation', 'appprofile', 'create'] as const, + /** Update appProfile mutation key */ update: (id: string | number) => + ['mutation', 'appprofile', 'update', id] as const, + /** Delete appProfile mutation key */ delete: (id: string | number) => + ['mutation', 'appprofile', 'delete', id] as const, +} as const; +export const appProfileDefinitionGrantMutationKeys = { + /** All appProfileDefinitionGrant mutation keys */ all: [ 'mutation', - 'apppermissiondefaultpermission', + 'appprofiledefinitiongrant', ] as const, - /** Create appPermissionDefaultPermission mutation key */ create: () => - ['mutation', 'apppermissiondefaultpermission', 'create'] as const, - /** Update appPermissionDefaultPermission mutation key */ update: (id: string | number) => - ['mutation', 'apppermissiondefaultpermission', 'update', id] as const, - /** Delete appPermissionDefaultPermission mutation key */ delete: (id: string | number) => - ['mutation', 'apppermissiondefaultpermission', 'delete', id] as const, + /** Create appProfileDefinitionGrant mutation key */ create: () => + ['mutation', 'appprofiledefinitiongrant', 'create'] as const, + /** Update appProfileDefinitionGrant mutation key */ update: (id: string | number) => + ['mutation', 'appprofiledefinitiongrant', 'update', id] as const, + /** Delete appProfileDefinitionGrant mutation key */ delete: (id: string | number) => + ['mutation', 'appprofiledefinitiongrant', 'delete', id] as const, +} as const; +export const appProfileGrantMutationKeys = { + /** All appProfileGrant mutation keys */ all: ['mutation', 'appprofilegrant'] as const, + /** Create appProfileGrant mutation key */ create: () => + ['mutation', 'appprofilegrant', 'create'] as const, + /** Update appProfileGrant mutation key */ update: (id: string | number) => + ['mutation', 'appprofilegrant', 'update', id] as const, + /** Delete appProfileGrant mutation key */ delete: (id: string | number) => + ['mutation', 'appprofilegrant', 'delete', id] as const, +} as const; +export const appProfileTemplateMutationKeys = { + /** All appProfileTemplate mutation keys */ all: ['mutation', 'appprofiletemplate'] as const, + /** Create appProfileTemplate mutation key */ create: () => + ['mutation', 'appprofiletemplate', 'create'] as const, + /** Update appProfileTemplate mutation key */ update: (id: string | number) => + ['mutation', 'appprofiletemplate', 'update', id] as const, + /** Delete appProfileTemplate mutation key */ delete: (id: string | number) => + ['mutation', 'appprofiletemplate', 'delete', id] as const, } as const; export const membershipTypeMutationKeys = { /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, @@ -139,6 +195,48 @@ export const orgAdminGrantMutationKeys = { /** Delete orgAdminGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgadmingrant', 'delete', id] as const, } as const; +export const orgCapabilityMutationKeys = { + /** All orgCapability mutation keys */ all: ['mutation', 'orgcapability'] as const, + /** Create orgCapability mutation key */ create: () => + ['mutation', 'orgcapability', 'create'] as const, + /** Update orgCapability mutation key */ update: (id: string | number) => + ['mutation', 'orgcapability', 'update', id] as const, + /** Delete orgCapability mutation key */ delete: (id: string | number) => + ['mutation', 'orgcapability', 'delete', id] as const, +} as const; +export const orgCapabilityDefaultCapabilityMutationKeys = { + /** All orgCapabilityDefaultCapability mutation keys */ all: [ + 'mutation', + 'orgcapabilitydefaultcapability', + ] as const, + /** Create orgCapabilityDefaultCapability mutation key */ create: () => + ['mutation', 'orgcapabilitydefaultcapability', 'create'] as const, + /** Update orgCapabilityDefaultCapability mutation key */ update: (id: string | number) => + ['mutation', 'orgcapabilitydefaultcapability', 'update', id] as const, + /** Delete orgCapabilityDefaultCapability mutation key */ delete: (id: string | number) => + ['mutation', 'orgcapabilitydefaultcapability', 'delete', id] as const, +} as const; +export const orgCapabilityDefaultMutationKeys = { + /** All orgCapabilityDefault mutation keys */ all: ['mutation', 'orgcapabilitydefault'] as const, + /** Create orgCapabilityDefault mutation key */ create: () => + ['mutation', 'orgcapabilitydefault', 'create'] as const, + /** Update orgCapabilityDefault mutation key */ update: (id: string | number) => + ['mutation', 'orgcapabilitydefault', 'update', id] as const, + /** Delete orgCapabilityDefault mutation key */ delete: (id: string | number) => + ['mutation', 'orgcapabilitydefault', 'delete', id] as const, +} as const; +export const orgCapabilityDefaultGrantMutationKeys = { + /** All orgCapabilityDefaultGrant mutation keys */ all: [ + 'mutation', + 'orgcapabilitydefaultgrant', + ] as const, + /** Create orgCapabilityDefaultGrant mutation key */ create: () => + ['mutation', 'orgcapabilitydefaultgrant', 'create'] as const, + /** Update orgCapabilityDefaultGrant mutation key */ update: (id: string | number) => + ['mutation', 'orgcapabilitydefaultgrant', 'update', id] as const, + /** Delete orgCapabilityDefaultGrant mutation key */ delete: (id: string | number) => + ['mutation', 'orgcapabilitydefaultgrant', 'delete', id] as const, +} as const; export const orgChartEdgeMutationKeys = { /** All orgChartEdge mutation keys */ all: ['mutation', 'orgchartedge'] as const, /** Create orgChartEdge mutation key */ create: () => @@ -238,6 +336,15 @@ export const orgMembershipDefaultMutationKeys = { /** Delete orgMembershipDefault mutation key */ delete: (id: string | number) => ['mutation', 'orgmembershipdefault', 'delete', id] as const, } as const; +export const orgMembershipProfileMutationKeys = { + /** All orgMembershipProfile mutation keys */ all: ['mutation', 'orgmembershipprofile'] as const, + /** Create orgMembershipProfile mutation key */ create: () => + ['mutation', 'orgmembershipprofile', 'create'] as const, + /** Update orgMembershipProfile mutation key */ update: (id: string | number) => + ['mutation', 'orgmembershipprofile', 'update', id] as const, + /** Delete orgMembershipProfile mutation key */ delete: (id: string | number) => + ['mutation', 'orgmembershipprofile', 'delete', id] as const, +} as const; export const orgMembershipSettingMutationKeys = { /** All orgMembershipSetting mutation keys */ all: ['mutation', 'orgmembershipsetting'] as const, /** Create orgMembershipSetting mutation key */ create: () => @@ -256,47 +363,52 @@ export const orgOwnerGrantMutationKeys = { /** Delete orgOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgownergrant', 'delete', id] as const, } as const; -export const orgPermissionMutationKeys = { - /** All orgPermission mutation keys */ all: ['mutation', 'orgpermission'] as const, - /** Create orgPermission mutation key */ create: () => - ['mutation', 'orgpermission', 'create'] as const, - /** Update orgPermission mutation key */ update: (id: string | number) => - ['mutation', 'orgpermission', 'update', id] as const, - /** Delete orgPermission mutation key */ delete: (id: string | number) => - ['mutation', 'orgpermission', 'delete', id] as const, -} as const; -export const orgPermissionDefaultMutationKeys = { - /** All orgPermissionDefault mutation keys */ all: ['mutation', 'orgpermissiondefault'] as const, - /** Create orgPermissionDefault mutation key */ create: () => - ['mutation', 'orgpermissiondefault', 'create'] as const, - /** Update orgPermissionDefault mutation key */ update: (id: string | number) => - ['mutation', 'orgpermissiondefault', 'update', id] as const, - /** Delete orgPermissionDefault mutation key */ delete: (id: string | number) => - ['mutation', 'orgpermissiondefault', 'delete', id] as const, -} as const; -export const orgPermissionDefaultGrantMutationKeys = { - /** All orgPermissionDefaultGrant mutation keys */ all: [ - 'mutation', - 'orgpermissiondefaultgrant', - ] as const, - /** Create orgPermissionDefaultGrant mutation key */ create: () => - ['mutation', 'orgpermissiondefaultgrant', 'create'] as const, - /** Update orgPermissionDefaultGrant mutation key */ update: (id: string | number) => - ['mutation', 'orgpermissiondefaultgrant', 'update', id] as const, - /** Delete orgPermissionDefaultGrant mutation key */ delete: (id: string | number) => - ['mutation', 'orgpermissiondefaultgrant', 'delete', id] as const, -} as const; -export const orgPermissionDefaultPermissionMutationKeys = { - /** All orgPermissionDefaultPermission mutation keys */ all: [ +export const orgProfileCapabilityMutationKeys = { + /** All orgProfileCapability mutation keys */ all: ['mutation', 'orgprofilecapability'] as const, + /** Create orgProfileCapability mutation key */ create: () => + ['mutation', 'orgprofilecapability', 'create'] as const, + /** Update orgProfileCapability mutation key */ update: (id: string | number) => + ['mutation', 'orgprofilecapability', 'update', id] as const, + /** Delete orgProfileCapability mutation key */ delete: (id: string | number) => + ['mutation', 'orgprofilecapability', 'delete', id] as const, +} as const; +export const orgProfileMutationKeys = { + /** All orgProfile mutation keys */ all: ['mutation', 'orgprofile'] as const, + /** Create orgProfile mutation key */ create: () => ['mutation', 'orgprofile', 'create'] as const, + /** Update orgProfile mutation key */ update: (id: string | number) => + ['mutation', 'orgprofile', 'update', id] as const, + /** Delete orgProfile mutation key */ delete: (id: string | number) => + ['mutation', 'orgprofile', 'delete', id] as const, +} as const; +export const orgProfileDefinitionGrantMutationKeys = { + /** All orgProfileDefinitionGrant mutation keys */ all: [ 'mutation', - 'orgpermissiondefaultpermission', + 'orgprofiledefinitiongrant', ] as const, - /** Create orgPermissionDefaultPermission mutation key */ create: () => - ['mutation', 'orgpermissiondefaultpermission', 'create'] as const, - /** Update orgPermissionDefaultPermission mutation key */ update: (id: string | number) => - ['mutation', 'orgpermissiondefaultpermission', 'update', id] as const, - /** Delete orgPermissionDefaultPermission mutation key */ delete: (id: string | number) => - ['mutation', 'orgpermissiondefaultpermission', 'delete', id] as const, + /** Create orgProfileDefinitionGrant mutation key */ create: () => + ['mutation', 'orgprofiledefinitiongrant', 'create'] as const, + /** Update orgProfileDefinitionGrant mutation key */ update: (id: string | number) => + ['mutation', 'orgprofiledefinitiongrant', 'update', id] as const, + /** Delete orgProfileDefinitionGrant mutation key */ delete: (id: string | number) => + ['mutation', 'orgprofiledefinitiongrant', 'delete', id] as const, +} as const; +export const orgProfileGrantMutationKeys = { + /** All orgProfileGrant mutation keys */ all: ['mutation', 'orgprofilegrant'] as const, + /** Create orgProfileGrant mutation key */ create: () => + ['mutation', 'orgprofilegrant', 'create'] as const, + /** Update orgProfileGrant mutation key */ update: (id: string | number) => + ['mutation', 'orgprofilegrant', 'update', id] as const, + /** Delete orgProfileGrant mutation key */ delete: (id: string | number) => + ['mutation', 'orgprofilegrant', 'delete', id] as const, +} as const; +export const orgProfileTemplateMutationKeys = { + /** All orgProfileTemplate mutation keys */ all: ['mutation', 'orgprofiletemplate'] as const, + /** Create orgProfileTemplate mutation key */ create: () => + ['mutation', 'orgprofiletemplate', 'create'] as const, + /** Update orgProfileTemplate mutation key */ update: (id: string | number) => + ['mutation', 'orgprofiletemplate', 'update', id] as const, + /** Delete orgProfileTemplate mutation key */ delete: (id: string | number) => + ['mutation', 'orgprofiletemplate', 'delete', id] as const, } as const; // ============================================================================ @@ -341,18 +453,28 @@ export const customMutationKeys = { */ export const mutationKeys = { appAdminGrant: appAdminGrantMutationKeys, + appCapability: appCapabilityMutationKeys, + appCapabilityDefaultCapability: appCapabilityDefaultCapabilityMutationKeys, + appCapabilityDefault: appCapabilityDefaultMutationKeys, + appCapabilityDefaultGrant: appCapabilityDefaultGrantMutationKeys, appClaimedInvite: appClaimedInviteMutationKeys, appGrant: appGrantMutationKeys, appInvite: appInviteMutationKeys, appMembership: appMembershipMutationKeys, appMembershipDefault: appMembershipDefaultMutationKeys, + appMembershipProfile: appMembershipProfileMutationKeys, appOwnerGrant: appOwnerGrantMutationKeys, - appPermission: appPermissionMutationKeys, - appPermissionDefault: appPermissionDefaultMutationKeys, - appPermissionDefaultGrant: appPermissionDefaultGrantMutationKeys, - appPermissionDefaultPermission: appPermissionDefaultPermissionMutationKeys, + appProfileCapability: appProfileCapabilityMutationKeys, + appProfile: appProfileMutationKeys, + appProfileDefinitionGrant: appProfileDefinitionGrantMutationKeys, + appProfileGrant: appProfileGrantMutationKeys, + appProfileTemplate: appProfileTemplateMutationKeys, membershipType: membershipTypeMutationKeys, orgAdminGrant: orgAdminGrantMutationKeys, + orgCapability: orgCapabilityMutationKeys, + orgCapabilityDefaultCapability: orgCapabilityDefaultCapabilityMutationKeys, + orgCapabilityDefault: orgCapabilityDefaultMutationKeys, + orgCapabilityDefaultGrant: orgCapabilityDefaultGrantMutationKeys, orgChartEdge: orgChartEdgeMutationKeys, orgChartEdgeGrant: orgChartEdgeGrantMutationKeys, orgClaimedInvite: orgClaimedInviteMutationKeys, @@ -364,11 +486,13 @@ export const mutationKeys = { orgMemberProfile: orgMemberProfileMutationKeys, orgMembership: orgMembershipMutationKeys, orgMembershipDefault: orgMembershipDefaultMutationKeys, + orgMembershipProfile: orgMembershipProfileMutationKeys, orgMembershipSetting: orgMembershipSettingMutationKeys, orgOwnerGrant: orgOwnerGrantMutationKeys, - orgPermission: orgPermissionMutationKeys, - orgPermissionDefault: orgPermissionDefaultMutationKeys, - orgPermissionDefaultGrant: orgPermissionDefaultGrantMutationKeys, - orgPermissionDefaultPermission: orgPermissionDefaultPermissionMutationKeys, + orgProfileCapability: orgProfileCapabilityMutationKeys, + orgProfile: orgProfileMutationKeys, + orgProfileDefinitionGrant: orgProfileDefinitionGrantMutationKeys, + orgProfileGrant: orgProfileGrantMutationKeys, + orgProfileTemplate: orgProfileTemplateMutationKeys, 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 6220313876..4b6db5daea 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/index.ts @@ -6,6 +6,18 @@ export * from './useCreateAppAdminGrantMutation'; export * from './useUpdateAppAdminGrantMutation'; export * from './useDeleteAppAdminGrantMutation'; +export * from './useCreateAppCapabilityMutation'; +export * from './useUpdateAppCapabilityMutation'; +export * from './useDeleteAppCapabilityMutation'; +export * from './useCreateAppCapabilityDefaultCapabilityMutation'; +export * from './useUpdateAppCapabilityDefaultCapabilityMutation'; +export * from './useDeleteAppCapabilityDefaultCapabilityMutation'; +export * from './useCreateAppCapabilityDefaultMutation'; +export * from './useUpdateAppCapabilityDefaultMutation'; +export * from './useDeleteAppCapabilityDefaultMutation'; +export * from './useCreateAppCapabilityDefaultGrantMutation'; +export * from './useUpdateAppCapabilityDefaultGrantMutation'; +export * from './useDeleteAppCapabilityDefaultGrantMutation'; export * from './useCreateAppClaimedInviteMutation'; export * from './useUpdateAppClaimedInviteMutation'; export * from './useDeleteAppClaimedInviteMutation'; @@ -21,27 +33,45 @@ export * from './useDeleteAppMembershipMutation'; export * from './useCreateAppMembershipDefaultMutation'; export * from './useUpdateAppMembershipDefaultMutation'; export * from './useDeleteAppMembershipDefaultMutation'; +export * from './useCreateAppMembershipProfileMutation'; +export * from './useUpdateAppMembershipProfileMutation'; +export * from './useDeleteAppMembershipProfileMutation'; export * from './useCreateAppOwnerGrantMutation'; export * from './useUpdateAppOwnerGrantMutation'; export * from './useDeleteAppOwnerGrantMutation'; -export * from './useCreateAppPermissionMutation'; -export * from './useUpdateAppPermissionMutation'; -export * from './useDeleteAppPermissionMutation'; -export * from './useCreateAppPermissionDefaultMutation'; -export * from './useUpdateAppPermissionDefaultMutation'; -export * from './useDeleteAppPermissionDefaultMutation'; -export * from './useCreateAppPermissionDefaultGrantMutation'; -export * from './useUpdateAppPermissionDefaultGrantMutation'; -export * from './useDeleteAppPermissionDefaultGrantMutation'; -export * from './useCreateAppPermissionDefaultPermissionMutation'; -export * from './useUpdateAppPermissionDefaultPermissionMutation'; -export * from './useDeleteAppPermissionDefaultPermissionMutation'; +export * from './useCreateAppProfileCapabilityMutation'; +export * from './useUpdateAppProfileCapabilityMutation'; +export * from './useDeleteAppProfileCapabilityMutation'; +export * from './useCreateAppProfileMutation'; +export * from './useUpdateAppProfileMutation'; +export * from './useDeleteAppProfileMutation'; +export * from './useCreateAppProfileDefinitionGrantMutation'; +export * from './useUpdateAppProfileDefinitionGrantMutation'; +export * from './useDeleteAppProfileDefinitionGrantMutation'; +export * from './useCreateAppProfileGrantMutation'; +export * from './useUpdateAppProfileGrantMutation'; +export * from './useDeleteAppProfileGrantMutation'; +export * from './useCreateAppProfileTemplateMutation'; +export * from './useUpdateAppProfileTemplateMutation'; +export * from './useDeleteAppProfileTemplateMutation'; export * from './useCreateMembershipTypeMutation'; export * from './useUpdateMembershipTypeMutation'; export * from './useDeleteMembershipTypeMutation'; export * from './useCreateOrgAdminGrantMutation'; export * from './useUpdateOrgAdminGrantMutation'; export * from './useDeleteOrgAdminGrantMutation'; +export * from './useCreateOrgCapabilityMutation'; +export * from './useUpdateOrgCapabilityMutation'; +export * from './useDeleteOrgCapabilityMutation'; +export * from './useCreateOrgCapabilityDefaultCapabilityMutation'; +export * from './useUpdateOrgCapabilityDefaultCapabilityMutation'; +export * from './useDeleteOrgCapabilityDefaultCapabilityMutation'; +export * from './useCreateOrgCapabilityDefaultMutation'; +export * from './useUpdateOrgCapabilityDefaultMutation'; +export * from './useDeleteOrgCapabilityDefaultMutation'; +export * from './useCreateOrgCapabilityDefaultGrantMutation'; +export * from './useUpdateOrgCapabilityDefaultGrantMutation'; +export * from './useDeleteOrgCapabilityDefaultGrantMutation'; export * from './useCreateOrgChartEdgeMutation'; export * from './useUpdateOrgChartEdgeMutation'; export * from './useDeleteOrgChartEdgeMutation'; @@ -71,24 +101,30 @@ export * from './useDeleteOrgMembershipMutation'; export * from './useCreateOrgMembershipDefaultMutation'; export * from './useUpdateOrgMembershipDefaultMutation'; export * from './useDeleteOrgMembershipDefaultMutation'; +export * from './useCreateOrgMembershipProfileMutation'; +export * from './useUpdateOrgMembershipProfileMutation'; +export * from './useDeleteOrgMembershipProfileMutation'; export * from './useCreateOrgMembershipSettingMutation'; export * from './useUpdateOrgMembershipSettingMutation'; export * from './useDeleteOrgMembershipSettingMutation'; export * from './useCreateOrgOwnerGrantMutation'; export * from './useUpdateOrgOwnerGrantMutation'; export * from './useDeleteOrgOwnerGrantMutation'; -export * from './useCreateOrgPermissionMutation'; -export * from './useUpdateOrgPermissionMutation'; -export * from './useDeleteOrgPermissionMutation'; -export * from './useCreateOrgPermissionDefaultMutation'; -export * from './useUpdateOrgPermissionDefaultMutation'; -export * from './useDeleteOrgPermissionDefaultMutation'; -export * from './useCreateOrgPermissionDefaultGrantMutation'; -export * from './useUpdateOrgPermissionDefaultGrantMutation'; -export * from './useDeleteOrgPermissionDefaultGrantMutation'; -export * from './useCreateOrgPermissionDefaultPermissionMutation'; -export * from './useUpdateOrgPermissionDefaultPermissionMutation'; -export * from './useDeleteOrgPermissionDefaultPermissionMutation'; +export * from './useCreateOrgProfileCapabilityMutation'; +export * from './useUpdateOrgProfileCapabilityMutation'; +export * from './useDeleteOrgProfileCapabilityMutation'; +export * from './useCreateOrgProfileMutation'; +export * from './useUpdateOrgProfileMutation'; +export * from './useDeleteOrgProfileMutation'; +export * from './useCreateOrgProfileDefinitionGrantMutation'; +export * from './useUpdateOrgProfileDefinitionGrantMutation'; +export * from './useDeleteOrgProfileDefinitionGrantMutation'; +export * from './useCreateOrgProfileGrantMutation'; +export * from './useUpdateOrgProfileGrantMutation'; +export * from './useDeleteOrgProfileGrantMutation'; +export * from './useCreateOrgProfileTemplateMutation'; +export * from './useUpdateOrgProfileTemplateMutation'; +export * from './useDeleteOrgProfileTemplateMutation'; export * from './useProvisionBucketMutation'; export * from './useSubmitAppInviteCodeMutation'; export * from './useSubmitOrgInviteCodeMutation'; diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultCapabilityMutation.ts new file mode 100644 index 0000000000..5b49c8754a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultCapabilityMutation.ts @@ -0,0 +1,105 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { appCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { appCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + CreateAppCapabilityDefaultCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + CreateAppCapabilityDefaultCapabilityInput, +} from '../../orm/input-types'; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppCapabilityDefaultCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppCapabilityDefaultCapabilityMutation< + S extends AppCapabilityDefaultCapabilitySelect, +>( + params: { + selection: { + fields: S & AppCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] +>; +export function useCreateAppCapabilityDefaultCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityDefaultCapabilityMutationKeys.create(), + mutationFn: ( + data: CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] + ) => + getClient() + .appCapabilityDefaultCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultGrantMutation.ts new file mode 100644 index 0000000000..4d2382b594 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultGrantMutation.ts @@ -0,0 +1,97 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { appCapabilityDefaultGrantKeys } from '../query-keys'; +import { appCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; +import type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + CreateAppCapabilityDefaultGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + CreateAppCapabilityDefaultGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppCapabilityDefaultGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppCapabilityDefaultGrantMutation< + S extends AppCapabilityDefaultGrantSelect, +>( + params: { + selection: { + fields: S & AppCapabilityDefaultGrantSelect; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; + } & Omit< + UseMutationOptions< + { + createAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityDefaultGrantInput['appCapabilityDefaultGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityDefaultGrantInput['appCapabilityDefaultGrant'] +>; +export function useCreateAppCapabilityDefaultGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateAppCapabilityDefaultGrantInput['appCapabilityDefaultGrant'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityDefaultGrantMutationKeys.create(), + mutationFn: (data: CreateAppCapabilityDefaultGrantInput['appCapabilityDefaultGrant']) => + getClient() + .appCapabilityDefaultGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultMutation.ts new file mode 100644 index 0000000000..165cdc8151 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityDefaultMutation.ts @@ -0,0 +1,91 @@ +/** + * Stores the default capability bitmask assigned to new members upon joining + * @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 { appCapabilityDefaultKeys } from '../query-keys'; +import { appCapabilityDefaultMutationKeys } from '../mutation-keys'; +import type { + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + CreateAppCapabilityDefaultInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + CreateAppCapabilityDefaultInput, +} from '../../orm/input-types'; +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppCapabilityDefaultMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppCapabilityDefaultMutation( + params: { + selection: { + fields: S & AppCapabilityDefaultSelect; + } & HookStrictSelect, AppCapabilityDefaultSelect>; + } & Omit< + UseMutationOptions< + { + createAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityDefaultInput['appCapabilityDefault'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityDefaultInput['appCapabilityDefault'] +>; +export function useCreateAppCapabilityDefaultMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityDefaultMutationKeys.create(), + mutationFn: (data: CreateAppCapabilityDefaultInput['appCapabilityDefault']) => + getClient() + .appCapabilityDefault.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityMutation.ts new file mode 100644 index 0000000000..b163ecdaf5 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppCapabilityMutation.ts @@ -0,0 +1,88 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { appCapabilityKeys } from '../query-keys'; +import { appCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppCapabilitySelect, + AppCapabilityWithRelations, + CreateAppCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilitySelect, + AppCapabilityWithRelations, + CreateAppCapabilityInput, +} from '../../orm/input-types'; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppCapabilityMutation( + params: { + selection: { + fields: S & AppCapabilitySelect; + } & HookStrictSelect, AppCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createAppCapability: { + appCapability: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityInput['appCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppCapability: { + appCapability: InferSelectResult; + }; + }, + Error, + CreateAppCapabilityInput['appCapability'] +>; +export function useCreateAppCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityMutationKeys.create(), + mutationFn: (data: CreateAppCapabilityInput['appCapability']) => + getClient() + .appCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppGrantMutation.ts index c3ae518e14..f6dc880f4a 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateAppGrantInput, } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipMutation.ts index e991ed8fd6..99c40ea7e3 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateAppMembershipInput, } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipProfileMutation.ts new file mode 100644 index 0000000000..a4c004d439 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppMembershipProfileMutation.ts @@ -0,0 +1,91 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { appMembershipProfileKeys } from '../query-keys'; +import { appMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + CreateAppMembershipProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + CreateAppMembershipProfileInput, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppMembershipProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppMembershipProfileMutation( + params: { + selection: { + fields: S & AppMembershipProfileSelect; + } & HookStrictSelect, AppMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + createAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + CreateAppMembershipProfileInput['appMembershipProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + CreateAppMembershipProfileInput['appMembershipProfile'] +>; +export function useCreateAppMembershipProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appMembershipProfileMutationKeys.create(), + mutationFn: (data: CreateAppMembershipProfileInput['appMembershipProfile']) => + getClient() + .appMembershipProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultGrantMutation.ts deleted file mode 100644 index 695d905384..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultGrantMutation.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { appPermissionDefaultGrantKeys } from '../query-keys'; -import { appPermissionDefaultGrantMutationKeys } from '../mutation-keys'; -import type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - CreateAppPermissionDefaultGrantInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - CreateAppPermissionDefaultGrantInput, -} from '../../orm/input-types'; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateAppPermissionDefaultGrantMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateAppPermissionDefaultGrantMutation< - S extends AppPermissionDefaultGrantSelect, ->( - params: { - selection: { - fields: S & AppPermissionDefaultGrantSelect; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; - } & Omit< - UseMutationOptions< - { - createAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - CreateAppPermissionDefaultGrantInput['appPermissionDefaultGrant'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - CreateAppPermissionDefaultGrantInput['appPermissionDefaultGrant'] ->; -export function useCreateAppPermissionDefaultGrantMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - CreateAppPermissionDefaultGrantInput['appPermissionDefaultGrant'] - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionDefaultGrantMutationKeys.create(), - mutationFn: (data: CreateAppPermissionDefaultGrantInput['appPermissionDefaultGrant']) => - getClient() - .appPermissionDefaultGrant.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultMutation.ts deleted file mode 100644 index 1246a1892d..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Stores the default permission bitmask assigned to new members upon joining - * @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 { appPermissionDefaultKeys } from '../query-keys'; -import { appPermissionDefaultMutationKeys } from '../mutation-keys'; -import type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - CreateAppPermissionDefaultInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - CreateAppPermissionDefaultInput, -} from '../../orm/input-types'; -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateAppPermissionDefaultMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateAppPermissionDefaultMutation( - params: { - selection: { - fields: S & AppPermissionDefaultSelect; - } & HookStrictSelect, AppPermissionDefaultSelect>; - } & Omit< - UseMutationOptions< - { - createAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }, - Error, - CreateAppPermissionDefaultInput['appPermissionDefault'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }, - Error, - CreateAppPermissionDefaultInput['appPermissionDefault'] ->; -export function useCreateAppPermissionDefaultMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionDefaultMutationKeys.create(), - mutationFn: (data: CreateAppPermissionDefaultInput['appPermissionDefault']) => - getClient() - .appPermissionDefault.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultPermissionMutation.ts deleted file mode 100644 index e954908380..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionDefaultPermissionMutation.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { appPermissionDefaultPermissionKeys } from '../query-keys'; -import { appPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; -import type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - CreateAppPermissionDefaultPermissionInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - CreateAppPermissionDefaultPermissionInput, -} from '../../orm/input-types'; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateAppPermissionDefaultPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateAppPermissionDefaultPermissionMutation< - S extends AppPermissionDefaultPermissionSelect, ->( - params: { - selection: { - fields: S & AppPermissionDefaultPermissionSelect; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } & Omit< - UseMutationOptions< - { - createAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] ->; -export function useCreateAppPermissionDefaultPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionDefaultPermissionMutationKeys.create(), - mutationFn: ( - data: CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] - ) => - getClient() - .appPermissionDefaultPermission.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionMutation.ts deleted file mode 100644 index c76e9081ad..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppPermissionMutation.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { appPermissionKeys } from '../query-keys'; -import { appPermissionMutationKeys } from '../mutation-keys'; -import type { - AppPermissionSelect, - AppPermissionWithRelations, - CreateAppPermissionInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionSelect, - AppPermissionWithRelations, - CreateAppPermissionInput, -} from '../../orm/input-types'; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateAppPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateAppPermissionMutation( - params: { - selection: { - fields: S & AppPermissionSelect; - } & HookStrictSelect, AppPermissionSelect>; - } & Omit< - UseMutationOptions< - { - createAppPermission: { - appPermission: InferSelectResult; - }; - }, - Error, - CreateAppPermissionInput['appPermission'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createAppPermission: { - appPermission: InferSelectResult; - }; - }, - Error, - CreateAppPermissionInput['appPermission'] ->; -export function useCreateAppPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionMutationKeys.create(), - mutationFn: (data: CreateAppPermissionInput['appPermission']) => - getClient() - .appPermission.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: appPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileCapabilityMutation.ts new file mode 100644 index 0000000000..3c4d3f137f --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileCapabilityMutation.ts @@ -0,0 +1,91 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { appProfileCapabilityKeys } from '../query-keys'; +import { appProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + CreateAppProfileCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + CreateAppProfileCapabilityInput, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppProfileCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppProfileCapabilityMutation( + params: { + selection: { + fields: S & AppProfileCapabilitySelect; + } & HookStrictSelect, AppProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + CreateAppProfileCapabilityInput['appProfileCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + CreateAppProfileCapabilityInput['appProfileCapability'] +>; +export function useCreateAppProfileCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileCapabilityMutationKeys.create(), + mutationFn: (data: CreateAppProfileCapabilityInput['appProfileCapability']) => + getClient() + .appProfileCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..b7268bbbcb --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileDefinitionGrantMutation.ts @@ -0,0 +1,97 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { appProfileDefinitionGrantKeys } from '../query-keys'; +import { appProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + CreateAppProfileDefinitionGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + CreateAppProfileDefinitionGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppProfileDefinitionGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppProfileDefinitionGrantMutation< + S extends AppProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & AppProfileDefinitionGrantSelect; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + createAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + CreateAppProfileDefinitionGrantInput['appProfileDefinitionGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + CreateAppProfileDefinitionGrantInput['appProfileDefinitionGrant'] +>; +export function useCreateAppProfileDefinitionGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateAppProfileDefinitionGrantInput['appProfileDefinitionGrant'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileDefinitionGrantMutationKeys.create(), + mutationFn: (data: CreateAppProfileDefinitionGrantInput['appProfileDefinitionGrant']) => + getClient() + .appProfileDefinitionGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileGrantMutation.ts new file mode 100644 index 0000000000..849c3db9f5 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileGrantMutation.ts @@ -0,0 +1,91 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { appProfileGrantKeys } from '../query-keys'; +import { appProfileGrantMutationKeys } from '../mutation-keys'; +import type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + CreateAppProfileGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + CreateAppProfileGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppProfileGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppProfileGrantMutation( + params: { + selection: { + fields: S & AppProfileGrantSelect; + } & HookStrictSelect, AppProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + createAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + CreateAppProfileGrantInput['appProfileGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + CreateAppProfileGrantInput['appProfileGrant'] +>; +export function useCreateAppProfileGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileGrantMutationKeys.create(), + mutationFn: (data: CreateAppProfileGrantInput['appProfileGrant']) => + getClient() + .appProfileGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileMutation.ts new file mode 100644 index 0000000000..adc025b91c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileMutation.ts @@ -0,0 +1,88 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { appProfileKeys } from '../query-keys'; +import { appProfileMutationKeys } from '../mutation-keys'; +import type { + AppProfileSelect, + AppProfileWithRelations, + CreateAppProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileSelect, + AppProfileWithRelations, + CreateAppProfileInput, +} from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppProfileMutation( + params: { + selection: { + fields: S & AppProfileSelect; + } & HookStrictSelect, AppProfileSelect>; + } & Omit< + UseMutationOptions< + { + createAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + CreateAppProfileInput['appProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + CreateAppProfileInput['appProfile'] +>; +export function useCreateAppProfileMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileMutationKeys.create(), + mutationFn: (data: CreateAppProfileInput['appProfile']) => + getClient() + .appProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileTemplateMutation.ts new file mode 100644 index 0000000000..802811bfa2 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateAppProfileTemplateMutation.ts @@ -0,0 +1,91 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { appProfileTemplateKeys } from '../query-keys'; +import { appProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + CreateAppProfileTemplateInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + CreateAppProfileTemplateInput, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppProfileTemplateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppProfileTemplateMutation( + params: { + selection: { + fields: S & AppProfileTemplateSelect; + } & HookStrictSelect, AppProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + createAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + CreateAppProfileTemplateInput['appProfileTemplate'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + CreateAppProfileTemplateInput['appProfileTemplate'] +>; +export function useCreateAppProfileTemplateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileTemplateMutationKeys.create(), + mutationFn: (data: CreateAppProfileTemplateInput['appProfileTemplate']) => + getClient() + .appProfileTemplate.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultCapabilityMutation.ts new file mode 100644 index 0000000000..9fa2ece220 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultCapabilityMutation.ts @@ -0,0 +1,105 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { orgCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { orgCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + CreateOrgCapabilityDefaultCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + CreateOrgCapabilityDefaultCapabilityInput, +} from '../../orm/input-types'; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgCapabilityDefaultCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgCapabilityDefaultCapabilityMutation< + S extends OrgCapabilityDefaultCapabilitySelect, +>( + params: { + selection: { + fields: S & OrgCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] +>; +export function useCreateOrgCapabilityDefaultCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityDefaultCapabilityMutationKeys.create(), + mutationFn: ( + data: CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] + ) => + getClient() + .orgCapabilityDefaultCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultGrantMutation.ts new file mode 100644 index 0000000000..3194d60569 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultGrantMutation.ts @@ -0,0 +1,97 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { orgCapabilityDefaultGrantKeys } from '../query-keys'; +import { orgCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + CreateOrgCapabilityDefaultGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + CreateOrgCapabilityDefaultGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgCapabilityDefaultGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgCapabilityDefaultGrantMutation< + S extends OrgCapabilityDefaultGrantSelect, +>( + params: { + selection: { + fields: S & OrgCapabilityDefaultGrantSelect; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; + } & Omit< + UseMutationOptions< + { + createOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityDefaultGrantInput['orgCapabilityDefaultGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityDefaultGrantInput['orgCapabilityDefaultGrant'] +>; +export function useCreateOrgCapabilityDefaultGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateOrgCapabilityDefaultGrantInput['orgCapabilityDefaultGrant'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityDefaultGrantMutationKeys.create(), + mutationFn: (data: CreateOrgCapabilityDefaultGrantInput['orgCapabilityDefaultGrant']) => + getClient() + .orgCapabilityDefaultGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultMutation.ts new file mode 100644 index 0000000000..783491f191 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityDefaultMutation.ts @@ -0,0 +1,91 @@ +/** + * Stores the default capability bitmask assigned to new members upon joining + * @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 { orgCapabilityDefaultKeys } from '../query-keys'; +import { orgCapabilityDefaultMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + CreateOrgCapabilityDefaultInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + CreateOrgCapabilityDefaultInput, +} from '../../orm/input-types'; +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgCapabilityDefaultMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgCapabilityDefaultMutation( + params: { + selection: { + fields: S & OrgCapabilityDefaultSelect; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; + } & Omit< + UseMutationOptions< + { + createOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityDefaultInput['orgCapabilityDefault'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityDefaultInput['orgCapabilityDefault'] +>; +export function useCreateOrgCapabilityDefaultMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityDefaultMutationKeys.create(), + mutationFn: (data: CreateOrgCapabilityDefaultInput['orgCapabilityDefault']) => + getClient() + .orgCapabilityDefault.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityMutation.ts new file mode 100644 index 0000000000..06d7d2fad5 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgCapabilityMutation.ts @@ -0,0 +1,88 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { orgCapabilityKeys } from '../query-keys'; +import { orgCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + CreateOrgCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + CreateOrgCapabilityInput, +} from '../../orm/input-types'; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgCapabilityMutation( + params: { + selection: { + fields: S & OrgCapabilitySelect; + } & HookStrictSelect, OrgCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityInput['orgCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + CreateOrgCapabilityInput['orgCapability'] +>; +export function useCreateOrgCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityMutationKeys.create(), + mutationFn: (data: CreateOrgCapabilityInput['orgCapability']) => + getClient() + .orgCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgGrantMutation.ts index 7dc4d3025e..81267c5a82 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateOrgGrantInput, } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipMutation.ts index 84633ad1d6..8dc0f0a7dc 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateOrgMembershipInput, } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipProfileMutation.ts new file mode 100644 index 0000000000..f2e89836d7 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMembershipProfileMutation.ts @@ -0,0 +1,91 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { orgMembershipProfileKeys } from '../query-keys'; +import { orgMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + CreateOrgMembershipProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + CreateOrgMembershipProfileInput, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgMembershipProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgMembershipProfileMutation( + params: { + selection: { + fields: S & OrgMembershipProfileSelect; + } & HookStrictSelect, OrgMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + createOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMembershipProfileInput['orgMembershipProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMembershipProfileInput['orgMembershipProfile'] +>; +export function useCreateOrgMembershipProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMembershipProfileMutationKeys.create(), + mutationFn: (data: CreateOrgMembershipProfileInput['orgMembershipProfile']) => + getClient() + .orgMembershipProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultGrantMutation.ts deleted file mode 100644 index 03eb33d2c8..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultGrantMutation.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { orgPermissionDefaultGrantKeys } from '../query-keys'; -import { orgPermissionDefaultGrantMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - CreateOrgPermissionDefaultGrantInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - CreateOrgPermissionDefaultGrantInput, -} from '../../orm/input-types'; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateOrgPermissionDefaultGrantMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateOrgPermissionDefaultGrantMutation< - S extends OrgPermissionDefaultGrantSelect, ->( - params: { - selection: { - fields: S & OrgPermissionDefaultGrantSelect; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; - } & Omit< - UseMutationOptions< - { - createOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionDefaultGrantInput['orgPermissionDefaultGrant'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionDefaultGrantInput['orgPermissionDefaultGrant'] ->; -export function useCreateOrgPermissionDefaultGrantMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - CreateOrgPermissionDefaultGrantInput['orgPermissionDefaultGrant'] - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionDefaultGrantMutationKeys.create(), - mutationFn: (data: CreateOrgPermissionDefaultGrantInput['orgPermissionDefaultGrant']) => - getClient() - .orgPermissionDefaultGrant.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultMutation.ts deleted file mode 100644 index 1870514760..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Stores the default permission bitmask assigned to new members upon joining - * @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 { orgPermissionDefaultKeys } from '../query-keys'; -import { orgPermissionDefaultMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - CreateOrgPermissionDefaultInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - CreateOrgPermissionDefaultInput, -} from '../../orm/input-types'; -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateOrgPermissionDefaultMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateOrgPermissionDefaultMutation( - params: { - selection: { - fields: S & OrgPermissionDefaultSelect; - } & HookStrictSelect, OrgPermissionDefaultSelect>; - } & Omit< - UseMutationOptions< - { - createOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionDefaultInput['orgPermissionDefault'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionDefaultInput['orgPermissionDefault'] ->; -export function useCreateOrgPermissionDefaultMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionDefaultMutationKeys.create(), - mutationFn: (data: CreateOrgPermissionDefaultInput['orgPermissionDefault']) => - getClient() - .orgPermissionDefault.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultPermissionMutation.ts deleted file mode 100644 index 010f341f74..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionDefaultPermissionMutation.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { orgPermissionDefaultPermissionKeys } from '../query-keys'; -import { orgPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - CreateOrgPermissionDefaultPermissionInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - CreateOrgPermissionDefaultPermissionInput, -} from '../../orm/input-types'; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateOrgPermissionDefaultPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateOrgPermissionDefaultPermissionMutation< - S extends OrgPermissionDefaultPermissionSelect, ->( - params: { - selection: { - fields: S & OrgPermissionDefaultPermissionSelect; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } & Omit< - UseMutationOptions< - { - createOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] ->; -export function useCreateOrgPermissionDefaultPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionDefaultPermissionMutationKeys.create(), - mutationFn: ( - data: CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] - ) => - getClient() - .orgPermissionDefaultPermission.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionMutation.ts deleted file mode 100644 index 8c597cb085..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgPermissionMutation.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { orgPermissionKeys } from '../query-keys'; -import { orgPermissionMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionSelect, - OrgPermissionWithRelations, - CreateOrgPermissionInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionSelect, - OrgPermissionWithRelations, - CreateOrgPermissionInput, -} from '../../orm/input-types'; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateOrgPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateOrgPermissionMutation( - params: { - selection: { - fields: S & OrgPermissionSelect; - } & HookStrictSelect, OrgPermissionSelect>; - } & Omit< - UseMutationOptions< - { - createOrgPermission: { - orgPermission: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionInput['orgPermission'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createOrgPermission: { - orgPermission: InferSelectResult; - }; - }, - Error, - CreateOrgPermissionInput['orgPermission'] ->; -export function useCreateOrgPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionMutationKeys.create(), - mutationFn: (data: CreateOrgPermissionInput['orgPermission']) => - getClient() - .orgPermission.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileCapabilityMutation.ts new file mode 100644 index 0000000000..46b8645d02 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileCapabilityMutation.ts @@ -0,0 +1,91 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { orgProfileCapabilityKeys } from '../query-keys'; +import { orgProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + CreateOrgProfileCapabilityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + CreateOrgProfileCapabilityInput, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgProfileCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgProfileCapabilityMutation( + params: { + selection: { + fields: S & OrgProfileCapabilitySelect; + } & HookStrictSelect, OrgProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + createOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + CreateOrgProfileCapabilityInput['orgProfileCapability'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + CreateOrgProfileCapabilityInput['orgProfileCapability'] +>; +export function useCreateOrgProfileCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileCapabilityMutationKeys.create(), + mutationFn: (data: CreateOrgProfileCapabilityInput['orgProfileCapability']) => + getClient() + .orgProfileCapability.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..a81a8213ff --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileDefinitionGrantMutation.ts @@ -0,0 +1,97 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { orgProfileDefinitionGrantKeys } from '../query-keys'; +import { orgProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + CreateOrgProfileDefinitionGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + CreateOrgProfileDefinitionGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgProfileDefinitionGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgProfileDefinitionGrantMutation< + S extends OrgProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & OrgProfileDefinitionGrantSelect; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + createOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + CreateOrgProfileDefinitionGrantInput['orgProfileDefinitionGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + CreateOrgProfileDefinitionGrantInput['orgProfileDefinitionGrant'] +>; +export function useCreateOrgProfileDefinitionGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateOrgProfileDefinitionGrantInput['orgProfileDefinitionGrant'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileDefinitionGrantMutationKeys.create(), + mutationFn: (data: CreateOrgProfileDefinitionGrantInput['orgProfileDefinitionGrant']) => + getClient() + .orgProfileDefinitionGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileGrantMutation.ts new file mode 100644 index 0000000000..8697c53684 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileGrantMutation.ts @@ -0,0 +1,91 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { orgProfileGrantKeys } from '../query-keys'; +import { orgProfileGrantMutationKeys } from '../mutation-keys'; +import type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + CreateOrgProfileGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + CreateOrgProfileGrantInput, +} from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgProfileGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgProfileGrantMutation( + params: { + selection: { + fields: S & OrgProfileGrantSelect; + } & HookStrictSelect, OrgProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + createOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + CreateOrgProfileGrantInput['orgProfileGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + CreateOrgProfileGrantInput['orgProfileGrant'] +>; +export function useCreateOrgProfileGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileGrantMutationKeys.create(), + mutationFn: (data: CreateOrgProfileGrantInput['orgProfileGrant']) => + getClient() + .orgProfileGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileMutation.ts new file mode 100644 index 0000000000..169de63740 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileMutation.ts @@ -0,0 +1,88 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { orgProfileKeys } from '../query-keys'; +import { orgProfileMutationKeys } from '../mutation-keys'; +import type { + OrgProfileSelect, + OrgProfileWithRelations, + CreateOrgProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileSelect, + OrgProfileWithRelations, + CreateOrgProfileInput, +} from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgProfileMutation( + params: { + selection: { + fields: S & OrgProfileSelect; + } & HookStrictSelect, OrgProfileSelect>; + } & Omit< + UseMutationOptions< + { + createOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + CreateOrgProfileInput['orgProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + CreateOrgProfileInput['orgProfile'] +>; +export function useCreateOrgProfileMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileMutationKeys.create(), + mutationFn: (data: CreateOrgProfileInput['orgProfile']) => + getClient() + .orgProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileTemplateMutation.ts new file mode 100644 index 0000000000..a588d65c1f --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgProfileTemplateMutation.ts @@ -0,0 +1,91 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { orgProfileTemplateKeys } from '../query-keys'; +import { orgProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + CreateOrgProfileTemplateInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + CreateOrgProfileTemplateInput, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgProfileTemplateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgProfileTemplateMutation( + params: { + selection: { + fields: S & OrgProfileTemplateSelect; + } & HookStrictSelect, OrgProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + createOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + CreateOrgProfileTemplateInput['orgProfileTemplate'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + CreateOrgProfileTemplateInput['orgProfileTemplate'] +>; +export function useCreateOrgProfileTemplateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileTemplateMutationKeys.create(), + mutationFn: (data: CreateOrgProfileTemplateInput['orgProfileTemplate']) => + getClient() + .orgProfileTemplate.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultCapabilityMutation.ts similarity index 51% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultPermissionMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultCapabilityMutation.ts index 1efbf6a931..46c3c889f7 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultPermissionMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultCapabilityMutation.ts @@ -1,5 +1,5 @@ /** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,42 +9,42 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultPermissionKeys } from '../query-keys'; -import { appPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; +import { appCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { appCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; import type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, } from '../../orm/input-types'; /** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask * * @example * ```tsx - * const { mutate, isPending } = useDeleteAppPermissionDefaultPermissionMutation({ + * const { mutate, isPending } = useDeleteAppCapabilityDefaultCapabilityMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteAppPermissionDefaultPermissionMutation< - S extends AppPermissionDefaultPermissionSelect, +export function useDeleteAppCapabilityDefaultCapabilityMutation< + S extends AppCapabilityDefaultCapabilitySelect, >( params: { selection: { - fields: S & AppPermissionDefaultPermissionSelect; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; + fields: S & AppCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; } & Omit< UseMutationOptions< { - deleteAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, + deleteAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, S >; }; @@ -58,9 +58,9 @@ export function useDeleteAppPermissionDefaultPermissionMutation< > ): UseMutationResult< { - deleteAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, + deleteAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, S >; }; @@ -70,9 +70,9 @@ export function useDeleteAppPermissionDefaultPermissionMutation< id: string; } >; -export function useDeleteAppPermissionDefaultPermissionMutation( +export function useDeleteAppCapabilityDefaultCapabilityMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -84,15 +84,15 @@ export function useDeleteAppPermissionDefaultPermissionMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionDefaultPermissionMutationKeys.all, + mutationKey: appCapabilityDefaultCapabilityMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .appPermissionDefaultPermission.delete({ + .appCapabilityDefaultCapability.delete({ where: { id, }, @@ -101,10 +101,10 @@ export function useDeleteAppPermissionDefaultPermissionMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultPermissionKeys.detail(variables.id), + queryKey: appCapabilityDefaultCapabilityKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.lists(), + queryKey: appCapabilityDefaultCapabilityKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultGrantMutation.ts similarity index 55% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultGrantMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultGrantMutation.ts index 1b2e20d5bf..47b19ceaf3 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,41 +9,41 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultGrantKeys } from '../query-keys'; -import { orgPermissionDefaultGrantMutationKeys } from '../mutation-keys'; +import { appCapabilityDefaultGrantKeys } from '../query-keys'; +import { appCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; import type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```tsx - * const { mutate, isPending } = useDeleteOrgPermissionDefaultGrantMutation({ + * const { mutate, isPending } = useDeleteAppCapabilityDefaultGrantMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteOrgPermissionDefaultGrantMutation< - S extends OrgPermissionDefaultGrantSelect, +export function useDeleteAppCapabilityDefaultGrantMutation< + S extends AppCapabilityDefaultGrantSelect, >( params: { selection: { - fields: S & OrgPermissionDefaultGrantSelect; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; + fields: S & AppCapabilityDefaultGrantSelect; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; } & Omit< UseMutationOptions< { - deleteOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; + deleteAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; }; }, Error, @@ -55,8 +55,8 @@ export function useDeleteOrgPermissionDefaultGrantMutation< > ): UseMutationResult< { - deleteOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; + deleteAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; }; }, Error, @@ -64,9 +64,9 @@ export function useDeleteOrgPermissionDefaultGrantMutation< id: string; } >; -export function useDeleteOrgPermissionDefaultGrantMutation( +export function useDeleteAppCapabilityDefaultGrantMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -78,15 +78,15 @@ export function useDeleteOrgPermissionDefaultGrantMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionDefaultGrantMutationKeys.all, + mutationKey: appCapabilityDefaultGrantMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .orgPermissionDefaultGrant.delete({ + .appCapabilityDefaultGrant.delete({ where: { id, }, @@ -95,10 +95,10 @@ export function useDeleteOrgPermissionDefaultGrantMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultGrantKeys.detail(variables.id), + queryKey: appCapabilityDefaultGrantKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.lists(), + queryKey: appCapabilityDefaultGrantKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultMutation.ts similarity index 57% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultMutation.ts index a9b23c7473..350442001c 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityDefaultMutation.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,39 +9,39 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultKeys } from '../query-keys'; -import { appPermissionDefaultMutationKeys } from '../mutation-keys'; +import { appCapabilityDefaultKeys } from '../query-keys'; +import { appCapabilityDefaultMutationKeys } from '../mutation-keys'; import type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, } from '../../orm/input-types'; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { mutate, isPending } = useDeleteAppPermissionDefaultMutation({ + * const { mutate, isPending } = useDeleteAppCapabilityDefaultMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteAppPermissionDefaultMutation( +export function useDeleteAppCapabilityDefaultMutation( params: { selection: { - fields: S & AppPermissionDefaultSelect; - } & HookStrictSelect, AppPermissionDefaultSelect>; + fields: S & AppCapabilityDefaultSelect; + } & HookStrictSelect, AppCapabilityDefaultSelect>; } & Omit< UseMutationOptions< { - deleteAppPermissionDefault: { - appPermissionDefault: InferSelectResult; + deleteAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; }; }, Error, @@ -53,8 +53,8 @@ export function useDeleteAppPermissionDefaultMutation ): UseMutationResult< { - deleteAppPermissionDefault: { - appPermissionDefault: InferSelectResult; + deleteAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; }; }, Error, @@ -62,9 +62,9 @@ export function useDeleteAppPermissionDefaultMutation; -export function useDeleteAppPermissionDefaultMutation( +export function useDeleteAppCapabilityDefaultMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -76,15 +76,15 @@ export function useDeleteAppPermissionDefaultMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionDefaultMutationKeys.all, + mutationKey: appCapabilityDefaultMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .appPermissionDefault.delete({ + .appCapabilityDefault.delete({ where: { id, }, @@ -93,10 +93,10 @@ export function useDeleteAppPermissionDefaultMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultKeys.detail(variables.id), + queryKey: appCapabilityDefaultKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.lists(), + queryKey: appCapabilityDefaultKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityMutation.ts similarity index 56% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityMutation.ts index b50268261e..64180776fd 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppCapabilityMutation.ts @@ -1,5 +1,5 @@ /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control * @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 { appPermissionKeys } from '../query-keys'; -import { appPermissionMutationKeys } from '../mutation-keys'; -import type { AppPermissionSelect, AppPermissionWithRelations } from '../../orm/input-types'; +import { appCapabilityKeys } from '../query-keys'; +import { appCapabilityMutationKeys } from '../mutation-keys'; +import type { AppCapabilitySelect, AppCapabilityWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { AppPermissionSelect, AppPermissionWithRelations } from '../../orm/input-types'; +export type { AppCapabilitySelect, AppCapabilityWithRelations } from '../../orm/input-types'; /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control * * @example * ```tsx - * const { mutate, isPending } = useDeleteAppPermissionMutation({ + * const { mutate, isPending } = useDeleteAppCapabilityMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteAppPermissionMutation( +export function useDeleteAppCapabilityMutation( params: { selection: { - fields: S & AppPermissionSelect; - } & HookStrictSelect, AppPermissionSelect>; + fields: S & AppCapabilitySelect; + } & HookStrictSelect, AppCapabilitySelect>; } & Omit< UseMutationOptions< { - deleteAppPermission: { - appPermission: InferSelectResult; + deleteAppCapability: { + appCapability: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteAppPermissionMutation( > ): UseMutationResult< { - deleteAppPermission: { - appPermission: InferSelectResult; + deleteAppCapability: { + appCapability: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteAppPermissionMutation( id: string; } >; -export function useDeleteAppPermissionMutation( +export function useDeleteAppCapabilityMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteAppPermissionMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionMutationKeys.all, + mutationKey: appCapabilityMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .appPermission.delete({ + .appCapability.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteAppPermissionMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: appPermissionKeys.detail(variables.id), + queryKey: appCapabilityKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionKeys.lists(), + queryKey: appCapabilityKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppGrantMutation.ts index 16814431f7..1b48ee8e8d 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { AppGrantSelect, AppGrantWithRelations } from '../../orm/input-type import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { AppGrantSelect, AppGrantWithRelations } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipMutation.ts index 03a601e74f..11c5515e63 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { AppMembershipSelect, AppMembershipWithRelations } from '../../orm/ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { AppMembershipSelect, AppMembershipWithRelations } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipProfileMutation.ts new file mode 100644 index 0000000000..ae74327619 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppMembershipProfileMutation.ts @@ -0,0 +1,104 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { appMembershipProfileKeys } from '../query-keys'; +import { appMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppMembershipProfileMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppMembershipProfileMutation( + params: { + selection: { + fields: S & AppMembershipProfileSelect; + } & HookStrictSelect, AppMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppMembershipProfileMutation( + 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: appMembershipProfileMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appMembershipProfile.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appMembershipProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileCapabilityMutation.ts new file mode 100644 index 0000000000..1838fb53a3 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileCapabilityMutation.ts @@ -0,0 +1,104 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { appProfileCapabilityKeys } from '../query-keys'; +import { appProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppProfileCapabilityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppProfileCapabilityMutation( + params: { + selection: { + fields: S & AppProfileCapabilitySelect; + } & HookStrictSelect, AppProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + deleteAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppProfileCapabilityMutation( + 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: appProfileCapabilityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appProfileCapability.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appProfileCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..ae0ad7d2dd --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileDefinitionGrantMutation.ts @@ -0,0 +1,106 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { appProfileDefinitionGrantKeys } from '../query-keys'; +import { appProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppProfileDefinitionGrantMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppProfileDefinitionGrantMutation< + S extends AppProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & AppProfileDefinitionGrantSelect; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppProfileDefinitionGrantMutation( + 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: appProfileDefinitionGrantMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appProfileDefinitionGrant.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appProfileDefinitionGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileGrantMutation.ts new file mode 100644 index 0000000000..10cbd7e94b --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileGrantMutation.ts @@ -0,0 +1,98 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { appProfileGrantKeys } from '../query-keys'; +import { appProfileGrantMutationKeys } from '../mutation-keys'; +import type { AppProfileGrantSelect, AppProfileGrantWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppProfileGrantSelect, AppProfileGrantWithRelations } from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppProfileGrantMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppProfileGrantMutation( + params: { + selection: { + fields: S & AppProfileGrantSelect; + } & HookStrictSelect, AppProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppProfileGrantMutation( + 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: appProfileGrantMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appProfileGrant.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appProfileGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileMutation.ts new file mode 100644 index 0000000000..9308d75b0c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileMutation.ts @@ -0,0 +1,98 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { appProfileKeys } from '../query-keys'; +import { appProfileMutationKeys } from '../mutation-keys'; +import type { AppProfileSelect, AppProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppProfileSelect, AppProfileWithRelations } from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppProfileMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppProfileMutation( + params: { + selection: { + fields: S & AppProfileSelect; + } & HookStrictSelect, AppProfileSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppProfileMutation( + 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: appProfileMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appProfile.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileTemplateMutation.ts new file mode 100644 index 0000000000..feb2522f6b --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppProfileTemplateMutation.ts @@ -0,0 +1,104 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { appProfileTemplateKeys } from '../query-keys'; +import { appProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppProfileTemplateMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppProfileTemplateMutation( + params: { + selection: { + fields: S & AppProfileTemplateSelect; + } & HookStrictSelect, AppProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppProfileTemplateMutation( + 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: appProfileTemplateMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appProfileTemplate.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appProfileTemplateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultCapabilityMutation.ts similarity index 51% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultPermissionMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultCapabilityMutation.ts index 5cca833805..9d68244b82 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultPermissionMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultCapabilityMutation.ts @@ -1,5 +1,5 @@ /** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,42 +9,42 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultPermissionKeys } from '../query-keys'; -import { orgPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; +import { orgCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { orgCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; import type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, } from '../../orm/input-types'; /** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask * * @example * ```tsx - * const { mutate, isPending } = useDeleteOrgPermissionDefaultPermissionMutation({ + * const { mutate, isPending } = useDeleteOrgCapabilityDefaultCapabilityMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteOrgPermissionDefaultPermissionMutation< - S extends OrgPermissionDefaultPermissionSelect, +export function useDeleteOrgCapabilityDefaultCapabilityMutation< + S extends OrgCapabilityDefaultCapabilitySelect, >( params: { selection: { - fields: S & OrgPermissionDefaultPermissionSelect; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; + fields: S & OrgCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; } & Omit< UseMutationOptions< { - deleteOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, + deleteOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, S >; }; @@ -58,9 +58,9 @@ export function useDeleteOrgPermissionDefaultPermissionMutation< > ): UseMutationResult< { - deleteOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, + deleteOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, S >; }; @@ -70,9 +70,9 @@ export function useDeleteOrgPermissionDefaultPermissionMutation< id: string; } >; -export function useDeleteOrgPermissionDefaultPermissionMutation( +export function useDeleteOrgCapabilityDefaultCapabilityMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -84,15 +84,15 @@ export function useDeleteOrgPermissionDefaultPermissionMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionDefaultPermissionMutationKeys.all, + mutationKey: orgCapabilityDefaultCapabilityMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .orgPermissionDefaultPermission.delete({ + .orgCapabilityDefaultCapability.delete({ where: { id, }, @@ -101,10 +101,10 @@ export function useDeleteOrgPermissionDefaultPermissionMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultPermissionKeys.detail(variables.id), + queryKey: orgCapabilityDefaultCapabilityKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.lists(), + queryKey: orgCapabilityDefaultCapabilityKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultGrantMutation.ts similarity index 55% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultGrantMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultGrantMutation.ts index ad38391ff2..8ebfcc964a 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteAppPermissionDefaultGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,41 +9,41 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultGrantKeys } from '../query-keys'; -import { appPermissionDefaultGrantMutationKeys } from '../mutation-keys'; +import { orgCapabilityDefaultGrantKeys } from '../query-keys'; +import { orgCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; import type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```tsx - * const { mutate, isPending } = useDeleteAppPermissionDefaultGrantMutation({ + * const { mutate, isPending } = useDeleteOrgCapabilityDefaultGrantMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteAppPermissionDefaultGrantMutation< - S extends AppPermissionDefaultGrantSelect, +export function useDeleteOrgCapabilityDefaultGrantMutation< + S extends OrgCapabilityDefaultGrantSelect, >( params: { selection: { - fields: S & AppPermissionDefaultGrantSelect; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; + fields: S & OrgCapabilityDefaultGrantSelect; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; } & Omit< UseMutationOptions< { - deleteAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; + deleteOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; }; }, Error, @@ -55,8 +55,8 @@ export function useDeleteAppPermissionDefaultGrantMutation< > ): UseMutationResult< { - deleteAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; + deleteOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; }; }, Error, @@ -64,9 +64,9 @@ export function useDeleteAppPermissionDefaultGrantMutation< id: string; } >; -export function useDeleteAppPermissionDefaultGrantMutation( +export function useDeleteOrgCapabilityDefaultGrantMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -78,15 +78,15 @@ export function useDeleteAppPermissionDefaultGrantMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionDefaultGrantMutationKeys.all, + mutationKey: orgCapabilityDefaultGrantMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .appPermissionDefaultGrant.delete({ + .orgCapabilityDefaultGrant.delete({ where: { id, }, @@ -95,10 +95,10 @@ export function useDeleteAppPermissionDefaultGrantMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: appPermissionDefaultGrantKeys.detail(variables.id), + queryKey: orgCapabilityDefaultGrantKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.lists(), + queryKey: orgCapabilityDefaultGrantKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultMutation.ts similarity index 57% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultMutation.ts index a811eca533..3e7c90263d 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionDefaultMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityDefaultMutation.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,39 +9,39 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultKeys } from '../query-keys'; -import { orgPermissionDefaultMutationKeys } from '../mutation-keys'; +import { orgCapabilityDefaultKeys } from '../query-keys'; +import { orgCapabilityDefaultMutationKeys } from '../mutation-keys'; import type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, } from '../../orm/input-types'; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { mutate, isPending } = useDeleteOrgPermissionDefaultMutation({ + * const { mutate, isPending } = useDeleteOrgCapabilityDefaultMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteOrgPermissionDefaultMutation( +export function useDeleteOrgCapabilityDefaultMutation( params: { selection: { - fields: S & OrgPermissionDefaultSelect; - } & HookStrictSelect, OrgPermissionDefaultSelect>; + fields: S & OrgCapabilityDefaultSelect; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; } & Omit< UseMutationOptions< { - deleteOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; + deleteOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; }; }, Error, @@ -53,8 +53,8 @@ export function useDeleteOrgPermissionDefaultMutation ): UseMutationResult< { - deleteOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; + deleteOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; }; }, Error, @@ -62,9 +62,9 @@ export function useDeleteOrgPermissionDefaultMutation; -export function useDeleteOrgPermissionDefaultMutation( +export function useDeleteOrgCapabilityDefaultMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -76,15 +76,15 @@ export function useDeleteOrgPermissionDefaultMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionDefaultMutationKeys.all, + mutationKey: orgCapabilityDefaultMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .orgPermissionDefault.delete({ + .orgCapabilityDefault.delete({ where: { id, }, @@ -93,10 +93,10 @@ export function useDeleteOrgPermissionDefaultMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: orgPermissionDefaultKeys.detail(variables.id), + queryKey: orgCapabilityDefaultKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.lists(), + queryKey: orgCapabilityDefaultKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityMutation.ts new file mode 100644 index 0000000000..f8640e1983 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgCapabilityMutation.ts @@ -0,0 +1,98 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { orgCapabilityKeys } from '../query-keys'; +import { orgCapabilityMutationKeys } from '../mutation-keys'; +import type { OrgCapabilitySelect, OrgCapabilityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgCapabilitySelect, OrgCapabilityWithRelations } from '../../orm/input-types'; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgCapabilityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgCapabilityMutation( + params: { + selection: { + fields: S & OrgCapabilitySelect; + } & HookStrictSelect, OrgCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgCapabilityMutation( + 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: orgCapabilityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgCapability.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgGrantMutation.ts index 3a1d1d9678..9dc7d72ad2 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { OrgGrantSelect, OrgGrantWithRelations } from '../../orm/input-type import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { OrgGrantSelect, OrgGrantWithRelations } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipMutation.ts index 62654c7ee2..5c55e3e3a7 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { OrgMembershipSelect, OrgMembershipWithRelations } from '../../orm/ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { OrgMembershipSelect, OrgMembershipWithRelations } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipProfileMutation.ts new file mode 100644 index 0000000000..16634e9b7e --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMembershipProfileMutation.ts @@ -0,0 +1,104 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { orgMembershipProfileKeys } from '../query-keys'; +import { orgMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgMembershipProfileMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgMembershipProfileMutation( + params: { + selection: { + fields: S & OrgMembershipProfileSelect; + } & HookStrictSelect, OrgMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgMembershipProfileMutation( + 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: orgMembershipProfileMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgMembershipProfile.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgMembershipProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileCapabilityMutation.ts new file mode 100644 index 0000000000..3609e9dc5f --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileCapabilityMutation.ts @@ -0,0 +1,104 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { orgProfileCapabilityKeys } from '../query-keys'; +import { orgProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgProfileCapabilityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgProfileCapabilityMutation( + params: { + selection: { + fields: S & OrgProfileCapabilitySelect; + } & HookStrictSelect, OrgProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgProfileCapabilityMutation( + 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: orgProfileCapabilityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgProfileCapability.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgProfileCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..1d76117e70 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileDefinitionGrantMutation.ts @@ -0,0 +1,106 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { orgProfileDefinitionGrantKeys } from '../query-keys'; +import { orgProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgProfileDefinitionGrantMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgProfileDefinitionGrantMutation< + S extends OrgProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & OrgProfileDefinitionGrantSelect; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgProfileDefinitionGrantMutation( + 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: orgProfileDefinitionGrantMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgProfileDefinitionGrant.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgProfileDefinitionGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileGrantMutation.ts new file mode 100644 index 0000000000..71902bb38a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileGrantMutation.ts @@ -0,0 +1,98 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { orgProfileGrantKeys } from '../query-keys'; +import { orgProfileGrantMutationKeys } from '../mutation-keys'; +import type { OrgProfileGrantSelect, OrgProfileGrantWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgProfileGrantSelect, OrgProfileGrantWithRelations } from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgProfileGrantMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgProfileGrantMutation( + params: { + selection: { + fields: S & OrgProfileGrantSelect; + } & HookStrictSelect, OrgProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgProfileGrantMutation( + 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: orgProfileGrantMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgProfileGrant.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgProfileGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileMutation.ts new file mode 100644 index 0000000000..e605a83137 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileMutation.ts @@ -0,0 +1,98 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { orgProfileKeys } from '../query-keys'; +import { orgProfileMutationKeys } from '../mutation-keys'; +import type { OrgProfileSelect, OrgProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgProfileSelect, OrgProfileWithRelations } from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgProfileMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgProfileMutation( + params: { + selection: { + fields: S & OrgProfileSelect; + } & HookStrictSelect, OrgProfileSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgProfileMutation( + 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: orgProfileMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgProfile.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileTemplateMutation.ts new file mode 100644 index 0000000000..7c04499160 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgProfileTemplateMutation.ts @@ -0,0 +1,104 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { orgProfileTemplateKeys } from '../query-keys'; +import { orgProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOrgProfileTemplateMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOrgProfileTemplateMutation( + params: { + selection: { + fields: S & OrgProfileTemplateSelect; + } & HookStrictSelect, OrgProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + deleteOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOrgProfileTemplateMutation( + 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: orgProfileTemplateMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .orgProfileTemplate.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: orgProfileTemplateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultCapabilityMutation.ts new file mode 100644 index 0000000000..5f28cbb73e --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultCapabilityMutation.ts @@ -0,0 +1,124 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { appCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { appCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilityPatch, +} from '../../orm/input-types'; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppCapabilityDefaultCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appCapabilityDefaultCapabilityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppCapabilityDefaultCapabilityMutation< + S extends AppCapabilityDefaultCapabilitySelect, +>( + params: { + selection: { + fields: S & AppCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + updateAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + { + id: string; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + { + id: string; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; + } +>; +export function useUpdateAppCapabilityDefaultCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityDefaultCapabilityMutationKeys.all, + mutationFn: ({ + id, + appCapabilityDefaultCapabilityPatch, + }: { + id: string; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; + }) => + getClient() + .appCapabilityDefaultCapability.update({ + where: { + id, + }, + data: appCapabilityDefaultCapabilityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultGrantMutation.ts new file mode 100644 index 0000000000..414f0c1541 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultGrantMutation.ts @@ -0,0 +1,118 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { appCapabilityDefaultGrantKeys } from '../query-keys'; +import { appCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; +import type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppCapabilityDefaultGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appCapabilityDefaultGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppCapabilityDefaultGrantMutation< + S extends AppCapabilityDefaultGrantSelect, +>( + params: { + selection: { + fields: S & AppCapabilityDefaultGrantSelect; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; + } +>; +export function useUpdateAppCapabilityDefaultGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appCapabilityDefaultGrantMutationKeys.all, + mutationFn: ({ + id, + appCapabilityDefaultGrantPatch, + }: { + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; + }) => + getClient() + .appCapabilityDefaultGrant.update({ + where: { + id, + }, + data: appCapabilityDefaultGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appCapabilityDefaultGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultMutation.ts similarity index 50% rename from sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultMutation.ts index b53a85a676..a2b6a262fb 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityDefaultMutation.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,106 +9,106 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultKeys } from '../query-keys'; -import { orgPermissionDefaultMutationKeys } from '../mutation-keys'; +import { appCapabilityDefaultKeys } from '../query-keys'; +import { appCapabilityDefaultMutationKeys } from '../mutation-keys'; import type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultPatch, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultPatch, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultPatch, } from '../../orm/input-types'; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { mutate, isPending } = useUpdateOrgPermissionDefaultMutation({ + * const { mutate, isPending } = useUpdateAppCapabilityDefaultMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', orgPermissionDefaultPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', appCapabilityDefaultPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateOrgPermissionDefaultMutation( +export function useUpdateAppCapabilityDefaultMutation( params: { selection: { - fields: S & OrgPermissionDefaultSelect; - } & HookStrictSelect, OrgPermissionDefaultSelect>; + fields: S & AppCapabilityDefaultSelect; + } & HookStrictSelect, AppCapabilityDefaultSelect>; } & Omit< UseMutationOptions< { - updateOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; + updateAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; }; }, Error, { id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; + updateAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; }; }, Error, { id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; } >; -export function useUpdateOrgPermissionDefaultMutation( +export function useUpdateAppCapabilityDefaultMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionDefaultMutationKeys.all, + mutationKey: appCapabilityDefaultMutationKeys.all, mutationFn: ({ id, - orgPermissionDefaultPatch, + appCapabilityDefaultPatch, }: { id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; }) => getClient() - .orgPermissionDefault.update({ + .appCapabilityDefault.update({ where: { id, }, - data: orgPermissionDefaultPatch, + data: appCapabilityDefaultPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.detail(variables.id), + queryKey: appCapabilityDefaultKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultKeys.lists(), + queryKey: appCapabilityDefaultKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityMutation.ts similarity index 52% rename from sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityMutation.ts index 0b42bacb2f..d5621d884e 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppCapabilityMutation.ts @@ -1,5 +1,5 @@ /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,106 +9,106 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionKeys } from '../query-keys'; -import { appPermissionMutationKeys } from '../mutation-keys'; +import { appCapabilityKeys } from '../query-keys'; +import { appCapabilityMutationKeys } from '../mutation-keys'; import type { - AppPermissionSelect, - AppPermissionWithRelations, - AppPermissionPatch, + AppCapabilitySelect, + AppCapabilityWithRelations, + AppCapabilityPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionSelect, - AppPermissionWithRelations, - AppPermissionPatch, + AppCapabilitySelect, + AppCapabilityWithRelations, + AppCapabilityPatch, } from '../../orm/input-types'; /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control * * @example * ```tsx - * const { mutate, isPending } = useUpdateAppPermissionMutation({ + * const { mutate, isPending } = useUpdateAppCapabilityMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', appPermissionPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', appCapabilityPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateAppPermissionMutation( +export function useUpdateAppCapabilityMutation( params: { selection: { - fields: S & AppPermissionSelect; - } & HookStrictSelect, AppPermissionSelect>; + fields: S & AppCapabilitySelect; + } & HookStrictSelect, AppCapabilitySelect>; } & Omit< UseMutationOptions< { - updateAppPermission: { - appPermission: InferSelectResult; + updateAppCapability: { + appCapability: InferSelectResult; }; }, Error, { id: string; - appPermissionPatch: AppPermissionPatch; + appCapabilityPatch: AppCapabilityPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateAppPermission: { - appPermission: InferSelectResult; + updateAppCapability: { + appCapability: InferSelectResult; }; }, Error, { id: string; - appPermissionPatch: AppPermissionPatch; + appCapabilityPatch: AppCapabilityPatch; } >; -export function useUpdateAppPermissionMutation( +export function useUpdateAppCapabilityMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - appPermissionPatch: AppPermissionPatch; + appCapabilityPatch: AppCapabilityPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionMutationKeys.all, + mutationKey: appCapabilityMutationKeys.all, mutationFn: ({ id, - appPermissionPatch, + appCapabilityPatch, }: { id: string; - appPermissionPatch: AppPermissionPatch; + appCapabilityPatch: AppCapabilityPatch; }) => getClient() - .appPermission.update({ + .appCapability.update({ where: { id, }, - data: appPermissionPatch, + data: appCapabilityPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: appPermissionKeys.detail(variables.id), + queryKey: appCapabilityKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionKeys.lists(), + queryKey: appCapabilityKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppGrantMutation.ts index d0cb6ba8fc..aa8fd91ebc 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { AppGrantSelect, AppGrantWithRelations, AppGrantPatch } from '../.. import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { AppGrantSelect, AppGrantWithRelations, AppGrantPatch } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipMutation.ts index 7ead9bdc26..f0b1dd2000 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { AppMembershipPatch, } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipProfileMutation.ts new file mode 100644 index 0000000000..1028876f19 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppMembershipProfileMutation.ts @@ -0,0 +1,116 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { appMembershipProfileKeys } from '../query-keys'; +import { appMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + AppMembershipProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + AppMembershipProfilePatch, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppMembershipProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appMembershipProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppMembershipProfileMutation( + params: { + selection: { + fields: S & AppMembershipProfileSelect; + } & HookStrictSelect, AppMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; + } +>; +export function useUpdateAppMembershipProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appMembershipProfileMutationKeys.all, + mutationFn: ({ + id, + appMembershipProfilePatch, + }: { + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; + }) => + getClient() + .appMembershipProfile.update({ + where: { + id, + }, + data: appMembershipProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultGrantMutation.ts deleted file mode 100644 index 8977a55082..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultGrantMutation.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { appPermissionDefaultGrantKeys } from '../query-keys'; -import { appPermissionDefaultGrantMutationKeys } from '../mutation-keys'; -import type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantPatch, -} from '../../orm/input-types'; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateAppPermissionDefaultGrantMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', appPermissionDefaultGrantPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateAppPermissionDefaultGrantMutation< - S extends AppPermissionDefaultGrantSelect, ->( - params: { - selection: { - fields: S & AppPermissionDefaultGrantSelect; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; - } & Omit< - UseMutationOptions< - { - updateAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - { - id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - { - id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; - } ->; -export function useUpdateAppPermissionDefaultGrantMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionDefaultGrantMutationKeys.all, - mutationFn: ({ - id, - appPermissionDefaultGrantPatch, - }: { - id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; - }) => - getClient() - .appPermissionDefaultGrant.update({ - where: { - id, - }, - data: appPermissionDefaultGrantPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultGrantKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultPermissionMutation.ts deleted file mode 100644 index 80340cd64c..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultPermissionMutation.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { appPermissionDefaultPermissionKeys } from '../query-keys'; -import { appPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; -import type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionPatch, -} from '../../orm/input-types'; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateAppPermissionDefaultPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', appPermissionDefaultPermissionPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateAppPermissionDefaultPermissionMutation< - S extends AppPermissionDefaultPermissionSelect, ->( - params: { - selection: { - fields: S & AppPermissionDefaultPermissionSelect; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } & Omit< - UseMutationOptions< - { - updateAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - { - id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - { - id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; - } ->; -export function useUpdateAppPermissionDefaultPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: appPermissionDefaultPermissionMutationKeys.all, - mutationFn: ({ - id, - appPermissionDefaultPermissionPatch, - }: { - id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; - }) => - getClient() - .appPermissionDefaultPermission.update({ - where: { - id, - }, - data: appPermissionDefaultPermissionPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: appPermissionDefaultPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileCapabilityMutation.ts new file mode 100644 index 0000000000..240236faaf --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileCapabilityMutation.ts @@ -0,0 +1,116 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { appProfileCapabilityKeys } from '../query-keys'; +import { appProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + AppProfileCapabilityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + AppProfileCapabilityPatch, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppProfileCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appProfileCapabilityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppProfileCapabilityMutation( + params: { + selection: { + fields: S & AppProfileCapabilitySelect; + } & HookStrictSelect, AppProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + updateAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; + } +>; +export function useUpdateAppProfileCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileCapabilityMutationKeys.all, + mutationFn: ({ + id, + appProfileCapabilityPatch, + }: { + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; + }) => + getClient() + .appProfileCapability.update({ + where: { + id, + }, + data: appProfileCapabilityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appProfileCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..b5390550da --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileDefinitionGrantMutation.ts @@ -0,0 +1,118 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { appProfileDefinitionGrantKeys } from '../query-keys'; +import { appProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppProfileDefinitionGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appProfileDefinitionGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppProfileDefinitionGrantMutation< + S extends AppProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & AppProfileDefinitionGrantSelect; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; + } +>; +export function useUpdateAppProfileDefinitionGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileDefinitionGrantMutationKeys.all, + mutationFn: ({ + id, + appProfileDefinitionGrantPatch, + }: { + id: string; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; + }) => + getClient() + .appProfileDefinitionGrant.update({ + where: { + id, + }, + data: appProfileDefinitionGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appProfileDefinitionGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileGrantMutation.ts new file mode 100644 index 0000000000..57ec63e8c3 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileGrantMutation.ts @@ -0,0 +1,116 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { appProfileGrantKeys } from '../query-keys'; +import { appProfileGrantMutationKeys } from '../mutation-keys'; +import type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + AppProfileGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + AppProfileGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppProfileGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appProfileGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppProfileGrantMutation( + params: { + selection: { + fields: S & AppProfileGrantSelect; + } & HookStrictSelect, AppProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileGrantPatch: AppProfileGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileGrantPatch: AppProfileGrantPatch; + } +>; +export function useUpdateAppProfileGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appProfileGrantPatch: AppProfileGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileGrantMutationKeys.all, + mutationFn: ({ + id, + appProfileGrantPatch, + }: { + id: string; + appProfileGrantPatch: AppProfileGrantPatch; + }) => + getClient() + .appProfileGrant.update({ + where: { + id, + }, + data: appProfileGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appProfileGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileMutation.ts new file mode 100644 index 0000000000..14d4551ceb --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileMutation.ts @@ -0,0 +1,110 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { appProfileKeys } from '../query-keys'; +import { appProfileMutationKeys } from '../mutation-keys'; +import type { + AppProfileSelect, + AppProfileWithRelations, + AppProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileSelect, + AppProfileWithRelations, + AppProfilePatch, +} from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppProfileMutation( + params: { + selection: { + fields: S & AppProfileSelect; + } & HookStrictSelect, AppProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfilePatch: AppProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppProfile: { + appProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfilePatch: AppProfilePatch; + } +>; +export function useUpdateAppProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appProfilePatch: AppProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileMutationKeys.all, + mutationFn: ({ id, appProfilePatch }: { id: string; appProfilePatch: AppProfilePatch }) => + getClient() + .appProfile.update({ + where: { + id, + }, + data: appProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileTemplateMutation.ts new file mode 100644 index 0000000000..217726f4a3 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppProfileTemplateMutation.ts @@ -0,0 +1,116 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { appProfileTemplateKeys } from '../query-keys'; +import { appProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + AppProfileTemplatePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + AppProfileTemplatePatch, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppProfileTemplateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appProfileTemplatePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppProfileTemplateMutation( + params: { + selection: { + fields: S & AppProfileTemplateSelect; + } & HookStrictSelect, AppProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + updateAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileTemplatePatch: AppProfileTemplatePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + appProfileTemplatePatch: AppProfileTemplatePatch; + } +>; +export function useUpdateAppProfileTemplateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appProfileTemplatePatch: AppProfileTemplatePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appProfileTemplateMutationKeys.all, + mutationFn: ({ + id, + appProfileTemplatePatch, + }: { + id: string; + appProfileTemplatePatch: AppProfileTemplatePatch; + }) => + getClient() + .appProfileTemplate.update({ + where: { + id, + }, + data: appProfileTemplatePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appProfileTemplateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultCapabilityMutation.ts new file mode 100644 index 0000000000..9a89101fef --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultCapabilityMutation.ts @@ -0,0 +1,124 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { orgCapabilityDefaultCapabilityKeys } from '../query-keys'; +import { orgCapabilityDefaultCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilityPatch, +} from '../../orm/input-types'; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgCapabilityDefaultCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgCapabilityDefaultCapabilityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgCapabilityDefaultCapabilityMutation< + S extends OrgCapabilityDefaultCapabilitySelect, +>( + params: { + selection: { + fields: S & OrgCapabilityDefaultCapabilitySelect; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + updateOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + { + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }, + Error, + { + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; + } +>; +export function useUpdateOrgCapabilityDefaultCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityDefaultCapabilityMutationKeys.all, + mutationFn: ({ + id, + orgCapabilityDefaultCapabilityPatch, + }: { + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; + }) => + getClient() + .orgCapabilityDefaultCapability.update({ + where: { + id, + }, + data: orgCapabilityDefaultCapabilityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultGrantMutation.ts new file mode 100644 index 0000000000..d5d59078d2 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultGrantMutation.ts @@ -0,0 +1,118 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { orgCapabilityDefaultGrantKeys } from '../query-keys'; +import { orgCapabilityDefaultGrantMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgCapabilityDefaultGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgCapabilityDefaultGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgCapabilityDefaultGrantMutation< + S extends OrgCapabilityDefaultGrantSelect, +>( + params: { + selection: { + fields: S & OrgCapabilityDefaultGrantSelect; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; + } +>; +export function useUpdateOrgCapabilityDefaultGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityDefaultGrantMutationKeys.all, + mutationFn: ({ + id, + orgCapabilityDefaultGrantPatch, + }: { + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; + }) => + getClient() + .orgCapabilityDefaultGrant.update({ + where: { + id, + }, + data: orgCapabilityDefaultGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgCapabilityDefaultGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultMutation.ts similarity index 50% rename from sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultMutation.ts index 9933bb8ebc..8c04e8e7d7 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateAppPermissionDefaultMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityDefaultMutation.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,106 +9,106 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultKeys } from '../query-keys'; -import { appPermissionDefaultMutationKeys } from '../mutation-keys'; +import { orgCapabilityDefaultKeys } from '../query-keys'; +import { orgCapabilityDefaultMutationKeys } from '../mutation-keys'; import type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - AppPermissionDefaultPatch, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - AppPermissionDefaultPatch, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultPatch, } from '../../orm/input-types'; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { mutate, isPending } = useUpdateAppPermissionDefaultMutation({ + * const { mutate, isPending } = useUpdateOrgCapabilityDefaultMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', appPermissionDefaultPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', orgCapabilityDefaultPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateAppPermissionDefaultMutation( +export function useUpdateOrgCapabilityDefaultMutation( params: { selection: { - fields: S & AppPermissionDefaultSelect; - } & HookStrictSelect, AppPermissionDefaultSelect>; + fields: S & OrgCapabilityDefaultSelect; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; } & Omit< UseMutationOptions< { - updateAppPermissionDefault: { - appPermissionDefault: InferSelectResult; + updateOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; }; }, Error, { id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateAppPermissionDefault: { - appPermissionDefault: InferSelectResult; + updateOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; }; }, Error, { id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; } >; -export function useUpdateAppPermissionDefaultMutation( +export function useUpdateOrgCapabilityDefaultMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: appPermissionDefaultMutationKeys.all, + mutationKey: orgCapabilityDefaultMutationKeys.all, mutationFn: ({ id, - appPermissionDefaultPatch, + orgCapabilityDefaultPatch, }: { id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; }) => getClient() - .appPermissionDefault.update({ + .orgCapabilityDefault.update({ where: { id, }, - data: appPermissionDefaultPatch, + data: orgCapabilityDefaultPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.detail(variables.id), + queryKey: orgCapabilityDefaultKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: appPermissionDefaultKeys.lists(), + queryKey: orgCapabilityDefaultKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityMutation.ts new file mode 100644 index 0000000000..347c8e173e --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgCapabilityMutation.ts @@ -0,0 +1,116 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { orgCapabilityKeys } from '../query-keys'; +import { orgCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + OrgCapabilityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + OrgCapabilityPatch, +} from '../../orm/input-types'; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgCapabilityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgCapabilityMutation( + params: { + selection: { + fields: S & OrgCapabilitySelect; + } & HookStrictSelect, OrgCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + updateOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + orgCapabilityPatch: OrgCapabilityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgCapability: { + orgCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + orgCapabilityPatch: OrgCapabilityPatch; + } +>; +export function useUpdateOrgCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgCapabilityPatch: OrgCapabilityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgCapabilityMutationKeys.all, + mutationFn: ({ + id, + orgCapabilityPatch, + }: { + id: string; + orgCapabilityPatch: OrgCapabilityPatch; + }) => + getClient() + .orgCapability.update({ + where: { + id, + }, + data: orgCapabilityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgGrantMutation.ts index 50e7255807..2b56867d8d 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgGrantMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -15,7 +15,7 @@ import type { OrgGrantSelect, OrgGrantWithRelations, OrgGrantPatch } from '../.. import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { OrgGrantSelect, OrgGrantWithRelations, OrgGrantPatch } from '../../orm/input-types'; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipMutation.ts index af8939d5ed..13a8a1b06b 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipMutation.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { OrgMembershipPatch, } from '../../orm/input-types'; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipProfileMutation.ts new file mode 100644 index 0000000000..f96d22a5f3 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMembershipProfileMutation.ts @@ -0,0 +1,116 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { orgMembershipProfileKeys } from '../query-keys'; +import { orgMembershipProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + OrgMembershipProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + OrgMembershipProfilePatch, +} from '../../orm/input-types'; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgMembershipProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgMembershipProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgMembershipProfileMutation( + params: { + selection: { + fields: S & OrgMembershipProfileSelect; + } & HookStrictSelect, OrgMembershipProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; + } +>; +export function useUpdateOrgMembershipProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMembershipProfileMutationKeys.all, + mutationFn: ({ + id, + orgMembershipProfilePatch, + }: { + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; + }) => + getClient() + .orgMembershipProfile.update({ + where: { + id, + }, + data: orgMembershipProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgMembershipProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultGrantMutation.ts deleted file mode 100644 index 1f119f098b..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultGrantMutation.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { orgPermissionDefaultGrantKeys } from '../query-keys'; -import { orgPermissionDefaultGrantMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantPatch, -} from '../../orm/input-types'; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateOrgPermissionDefaultGrantMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', orgPermissionDefaultGrantPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateOrgPermissionDefaultGrantMutation< - S extends OrgPermissionDefaultGrantSelect, ->( - params: { - selection: { - fields: S & OrgPermissionDefaultGrantSelect; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; - } & Omit< - UseMutationOptions< - { - updateOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - { - id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }, - Error, - { - id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; - } ->; -export function useUpdateOrgPermissionDefaultGrantMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionDefaultGrantMutationKeys.all, - mutationFn: ({ - id, - orgPermissionDefaultGrantPatch, - }: { - id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; - }) => - getClient() - .orgPermissionDefaultGrant.update({ - where: { - id, - }, - data: orgPermissionDefaultGrantPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultGrantKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultPermissionMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultPermissionMutation.ts deleted file mode 100644 index b5cfa27980..0000000000 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionDefaultPermissionMutation.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { orgPermissionDefaultPermissionKeys } from '../query-keys'; -import { orgPermissionDefaultPermissionMutationKeys } from '../mutation-keys'; -import type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionPatch, -} from '../../orm/input-types'; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateOrgPermissionDefaultPermissionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', orgPermissionDefaultPermissionPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateOrgPermissionDefaultPermissionMutation< - S extends OrgPermissionDefaultPermissionSelect, ->( - params: { - selection: { - fields: S & OrgPermissionDefaultPermissionSelect; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } & Omit< - UseMutationOptions< - { - updateOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - { - id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }, - Error, - { - id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; - } ->; -export function useUpdateOrgPermissionDefaultPermissionMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: orgPermissionDefaultPermissionMutationKeys.all, - mutationFn: ({ - id, - orgPermissionDefaultPermissionPatch, - }: { - id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; - }) => - getClient() - .orgPermissionDefaultPermission.update({ - where: { - id, - }, - data: orgPermissionDefaultPermissionPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: orgPermissionDefaultPermissionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileCapabilityMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileCapabilityMutation.ts new file mode 100644 index 0000000000..49220770fd --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileCapabilityMutation.ts @@ -0,0 +1,116 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { orgProfileCapabilityKeys } from '../query-keys'; +import { orgProfileCapabilityMutationKeys } from '../mutation-keys'; +import type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilityPatch, +} from '../../orm/input-types'; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgProfileCapabilityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgProfileCapabilityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgProfileCapabilityMutation( + params: { + selection: { + fields: S & OrgProfileCapabilitySelect; + } & HookStrictSelect, OrgProfileCapabilitySelect>; + } & Omit< + UseMutationOptions< + { + updateOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; + } +>; +export function useUpdateOrgProfileCapabilityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileCapabilityMutationKeys.all, + mutationFn: ({ + id, + orgProfileCapabilityPatch, + }: { + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; + }) => + getClient() + .orgProfileCapability.update({ + where: { + id, + }, + data: orgProfileCapabilityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgProfileCapabilityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileCapabilityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileDefinitionGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileDefinitionGrantMutation.ts new file mode 100644 index 0000000000..eaadd6e91b --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileDefinitionGrantMutation.ts @@ -0,0 +1,118 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { orgProfileDefinitionGrantKeys } from '../query-keys'; +import { orgProfileDefinitionGrantMutationKeys } from '../mutation-keys'; +import type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgProfileDefinitionGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgProfileDefinitionGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgProfileDefinitionGrantMutation< + S extends OrgProfileDefinitionGrantSelect, +>( + params: { + selection: { + fields: S & OrgProfileDefinitionGrantSelect; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; + } +>; +export function useUpdateOrgProfileDefinitionGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileDefinitionGrantMutationKeys.all, + mutationFn: ({ + id, + orgProfileDefinitionGrantPatch, + }: { + id: string; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; + }) => + getClient() + .orgProfileDefinitionGrant.update({ + where: { + id, + }, + data: orgProfileDefinitionGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgProfileDefinitionGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileDefinitionGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileGrantMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileGrantMutation.ts new file mode 100644 index 0000000000..99c3f955a2 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileGrantMutation.ts @@ -0,0 +1,116 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { orgProfileGrantKeys } from '../query-keys'; +import { orgProfileGrantMutationKeys } from '../mutation-keys'; +import type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + OrgProfileGrantPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + OrgProfileGrantPatch, +} from '../../orm/input-types'; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgProfileGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgProfileGrantPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgProfileGrantMutation( + params: { + selection: { + fields: S & OrgProfileGrantSelect; + } & HookStrictSelect, OrgProfileGrantSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileGrantPatch: OrgProfileGrantPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileGrantPatch: OrgProfileGrantPatch; + } +>; +export function useUpdateOrgProfileGrantMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgProfileGrantPatch: OrgProfileGrantPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileGrantMutationKeys.all, + mutationFn: ({ + id, + orgProfileGrantPatch, + }: { + id: string; + orgProfileGrantPatch: OrgProfileGrantPatch; + }) => + getClient() + .orgProfileGrant.update({ + where: { + id, + }, + data: orgProfileGrantPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgProfileGrantKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileMutation.ts new file mode 100644 index 0000000000..b417412e37 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileMutation.ts @@ -0,0 +1,110 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { orgProfileKeys } from '../query-keys'; +import { orgProfileMutationKeys } from '../mutation-keys'; +import type { + OrgProfileSelect, + OrgProfileWithRelations, + OrgProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileSelect, + OrgProfileWithRelations, + OrgProfilePatch, +} from '../../orm/input-types'; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgProfileMutation( + params: { + selection: { + fields: S & OrgProfileSelect; + } & HookStrictSelect, OrgProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfilePatch: OrgProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgProfile: { + orgProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfilePatch: OrgProfilePatch; + } +>; +export function useUpdateOrgProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgProfilePatch: OrgProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileMutationKeys.all, + mutationFn: ({ id, orgProfilePatch }: { id: string; orgProfilePatch: OrgProfilePatch }) => + getClient() + .orgProfile.update({ + where: { + id, + }, + data: orgProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileTemplateMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileTemplateMutation.ts new file mode 100644 index 0000000000..f6f8aca027 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgProfileTemplateMutation.ts @@ -0,0 +1,116 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { orgProfileTemplateKeys } from '../query-keys'; +import { orgProfileTemplateMutationKeys } from '../mutation-keys'; +import type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + OrgProfileTemplatePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + OrgProfileTemplatePatch, +} from '../../orm/input-types'; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgProfileTemplateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgProfileTemplatePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgProfileTemplateMutation( + params: { + selection: { + fields: S & OrgProfileTemplateSelect; + } & HookStrictSelect, OrgProfileTemplateSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileTemplatePatch: OrgProfileTemplatePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }, + Error, + { + id: string; + orgProfileTemplatePatch: OrgProfileTemplatePatch; + } +>; +export function useUpdateOrgProfileTemplateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgProfileTemplatePatch: OrgProfileTemplatePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgProfileTemplateMutationKeys.all, + mutationFn: ({ + id, + orgProfileTemplatePatch, + }: { + id: string; + orgProfileTemplatePatch: OrgProfileTemplatePatch; + }) => + getClient() + .orgProfileTemplate.update({ + where: { + id, + }, + data: orgProfileTemplatePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgProfileTemplateKeys.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 5b44dbf6e4..50f3951b9e 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/index.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/index.ts @@ -5,6 +5,14 @@ */ export * from './useAppAdminGrantsQuery'; export * from './useAppAdminGrantQuery'; +export * from './useAppCapabilitiesQuery'; +export * from './useAppCapabilityQuery'; +export * from './useAppCapabilityDefaultCapabilitiesQuery'; +export * from './useAppCapabilityDefaultCapabilityQuery'; +export * from './useAppCapabilityDefaultsQuery'; +export * from './useAppCapabilityDefaultQuery'; +export * from './useAppCapabilityDefaultGrantsQuery'; +export * from './useAppCapabilityDefaultGrantQuery'; export * from './useAppClaimedInvitesQuery'; export * from './useAppClaimedInviteQuery'; export * from './useAppGrantsQuery'; @@ -15,20 +23,32 @@ export * from './useAppMembershipsQuery'; export * from './useAppMembershipQuery'; export * from './useAppMembershipDefaultsQuery'; export * from './useAppMembershipDefaultQuery'; +export * from './useAppMembershipProfilesQuery'; +export * from './useAppMembershipProfileQuery'; export * from './useAppOwnerGrantsQuery'; export * from './useAppOwnerGrantQuery'; -export * from './useAppPermissionsQuery'; -export * from './useAppPermissionQuery'; -export * from './useAppPermissionDefaultsQuery'; -export * from './useAppPermissionDefaultQuery'; -export * from './useAppPermissionDefaultGrantsQuery'; -export * from './useAppPermissionDefaultGrantQuery'; -export * from './useAppPermissionDefaultPermissionsQuery'; -export * from './useAppPermissionDefaultPermissionQuery'; +export * from './useAppProfileCapabilitiesQuery'; +export * from './useAppProfileCapabilityQuery'; +export * from './useAppProfilesQuery'; +export * from './useAppProfileQuery'; +export * from './useAppProfileDefinitionGrantsQuery'; +export * from './useAppProfileDefinitionGrantQuery'; +export * from './useAppProfileGrantsQuery'; +export * from './useAppProfileGrantQuery'; +export * from './useAppProfileTemplatesQuery'; +export * from './useAppProfileTemplateQuery'; export * from './useMembershipTypesQuery'; export * from './useMembershipTypeQuery'; export * from './useOrgAdminGrantsQuery'; export * from './useOrgAdminGrantQuery'; +export * from './useOrgCapabilitiesQuery'; +export * from './useOrgCapabilityQuery'; +export * from './useOrgCapabilityDefaultCapabilitiesQuery'; +export * from './useOrgCapabilityDefaultCapabilityQuery'; +export * from './useOrgCapabilityDefaultsQuery'; +export * from './useOrgCapabilityDefaultQuery'; +export * from './useOrgCapabilityDefaultGrantsQuery'; +export * from './useOrgCapabilityDefaultGrantQuery'; export * from './useOrgChartEdgesQuery'; export * from './useOrgChartEdgeQuery'; export * from './useOrgChartEdgeGrantsQuery'; @@ -49,24 +69,28 @@ export * from './useOrgMembershipsQuery'; export * from './useOrgMembershipQuery'; export * from './useOrgMembershipDefaultsQuery'; export * from './useOrgMembershipDefaultQuery'; +export * from './useOrgMembershipProfilesQuery'; +export * from './useOrgMembershipProfileQuery'; export * from './useOrgMembershipSettingsQuery'; export * from './useOrgMembershipSettingQuery'; export * from './useOrgOwnerGrantsQuery'; export * from './useOrgOwnerGrantQuery'; -export * from './useOrgPermissionsQuery'; -export * from './useOrgPermissionQuery'; -export * from './useOrgPermissionDefaultsQuery'; -export * from './useOrgPermissionDefaultQuery'; -export * from './useOrgPermissionDefaultGrantsQuery'; -export * from './useOrgPermissionDefaultGrantQuery'; -export * from './useOrgPermissionDefaultPermissionsQuery'; -export * from './useOrgPermissionDefaultPermissionQuery'; -export * from './useAppPermissionsGetByMaskQuery'; -export * from './useAppPermissionsGetMaskQuery'; -export * from './useAppPermissionsGetMaskByNamesQuery'; -export * from './useAppPermissionsGetPaddedMaskQuery'; +export * from './useOrgProfileCapabilitiesQuery'; +export * from './useOrgProfileCapabilityQuery'; +export * from './useOrgProfilesQuery'; +export * from './useOrgProfileQuery'; +export * from './useOrgProfileDefinitionGrantsQuery'; +export * from './useOrgProfileDefinitionGrantQuery'; +export * from './useOrgProfileGrantsQuery'; +export * from './useOrgProfileGrantQuery'; +export * from './useOrgProfileTemplatesQuery'; +export * from './useOrgProfileTemplateQuery'; +export * from './useAppCapabilitiesGetByMaskQuery'; +export * from './useAppCapabilitiesGetMaskQuery'; +export * from './useAppCapabilitiesGetMaskByNamesQuery'; +export * from './useAppCapabilitiesGetPaddedMaskQuery'; +export * from './useOrgCapabilitiesGetByMaskQuery'; +export * from './useOrgCapabilitiesGetMaskQuery'; +export * from './useOrgCapabilitiesGetMaskByNamesQuery'; +export * from './useOrgCapabilitiesGetPaddedMaskQuery'; export * from './useOrgIsManagerOfQuery'; -export * from './useOrgPermissionsGetByMaskQuery'; -export * from './useOrgPermissionsGetMaskQuery'; -export * from './useOrgPermissionsGetMaskByNamesQuery'; -export * from './useOrgPermissionsGetPaddedMaskQuery'; diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetByMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetByMaskQuery.ts new file mode 100644 index 0000000000..564589991c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetByMaskQuery.ts @@ -0,0 +1,108 @@ +/** + * Custom query hook for appCapabilitiesGetByMask + * @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 { AppCapabilitiesGetByMaskVariables } from '../../orm/query'; +import type { AppCapabilityConnection } from '../../orm/input-types'; +export type { AppCapabilitiesGetByMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilitiesGetByMaskQueryKey = customQueryKeys.appCapabilitiesGetByMask; +/** + * Reads and enables pagination through a set of `AppCapability`. + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilitiesGetByMaskQuery({ variables: { after, first, mask, offset } }); + * + * if (data?.appCapabilitiesGetByMask) { + * console.log(data.appCapabilitiesGetByMask); + * } + * ``` + */ +export function useAppCapabilitiesGetByMaskQuery< + TData = { + appCapabilitiesGetByMask: AppCapabilityConnection | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetByMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetByMask: AppCapabilityConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilitiesGetByMaskQuery< + TData = { + appCapabilitiesGetByMask: AppCapabilityConnection | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetByMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetByMask: AppCapabilityConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: appCapabilitiesGetByMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetByMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch appCapabilitiesGetByMask without React hooks + * + * @example + * ```ts + * const data = await fetchAppCapabilitiesGetByMaskQuery({ variables: { after, first, mask, offset } }); + * ``` + */ +export async function fetchAppCapabilitiesGetByMaskQuery(params?: { + variables?: AppCapabilitiesGetByMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.appCapabilitiesGetByMask(variables).unwrap(); +} +/** + * Prefetch appCapabilitiesGetByMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchAppCapabilitiesGetByMaskQuery(queryClient, { variables: { after, first, mask, offset } }); + * ``` + */ +export async function prefetchAppCapabilitiesGetByMaskQuery( + queryClient: QueryClient, + params?: { + variables?: AppCapabilitiesGetByMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: appCapabilitiesGetByMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetByMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskByNamesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskByNamesQuery.ts new file mode 100644 index 0000000000..8f1a9cd2eb --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskByNamesQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for appCapabilitiesGetMaskByNames + * @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 { AppCapabilitiesGetMaskByNamesVariables } from '../../orm/query'; +export type { AppCapabilitiesGetMaskByNamesVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilitiesGetMaskByNamesQueryKey = customQueryKeys.appCapabilitiesGetMaskByNames; +/** + * Query hook for appCapabilitiesGetMaskByNames + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilitiesGetMaskByNamesQuery({ variables: { names } }); + * + * if (data?.appCapabilitiesGetMaskByNames) { + * console.log(data.appCapabilitiesGetMaskByNames); + * } + * ``` + */ +export function useAppCapabilitiesGetMaskByNamesQuery< + TData = { + appCapabilitiesGetMaskByNames: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetMaskByNamesVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetMaskByNames: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilitiesGetMaskByNamesQuery< + TData = { + appCapabilitiesGetMaskByNames: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetMaskByNamesVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetMaskByNames: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: appCapabilitiesGetMaskByNamesQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetMaskByNames(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch appCapabilitiesGetMaskByNames without React hooks + * + * @example + * ```ts + * const data = await fetchAppCapabilitiesGetMaskByNamesQuery({ variables: { names } }); + * ``` + */ +export async function fetchAppCapabilitiesGetMaskByNamesQuery(params?: { + variables?: AppCapabilitiesGetMaskByNamesVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.appCapabilitiesGetMaskByNames(variables).unwrap(); +} +/** + * Prefetch appCapabilitiesGetMaskByNames for SSR or cache warming + * + * @example + * ```ts + * await prefetchAppCapabilitiesGetMaskByNamesQuery(queryClient, { variables: { names } }); + * ``` + */ +export async function prefetchAppCapabilitiesGetMaskByNamesQuery( + queryClient: QueryClient, + params?: { + variables?: AppCapabilitiesGetMaskByNamesVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: appCapabilitiesGetMaskByNamesQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetMaskByNames(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskQuery.ts new file mode 100644 index 0000000000..13af5ba5e5 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetMaskQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for appCapabilitiesGetMask + * @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 { AppCapabilitiesGetMaskVariables } from '../../orm/query'; +export type { AppCapabilitiesGetMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilitiesGetMaskQueryKey = customQueryKeys.appCapabilitiesGetMask; +/** + * Query hook for appCapabilitiesGetMask + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilitiesGetMaskQuery({ variables: { ids } }); + * + * if (data?.appCapabilitiesGetMask) { + * console.log(data.appCapabilitiesGetMask); + * } + * ``` + */ +export function useAppCapabilitiesGetMaskQuery< + TData = { + appCapabilitiesGetMask: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilitiesGetMaskQuery< + TData = { + appCapabilitiesGetMask: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: appCapabilitiesGetMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch appCapabilitiesGetMask without React hooks + * + * @example + * ```ts + * const data = await fetchAppCapabilitiesGetMaskQuery({ variables: { ids } }); + * ``` + */ +export async function fetchAppCapabilitiesGetMaskQuery(params?: { + variables?: AppCapabilitiesGetMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.appCapabilitiesGetMask(variables).unwrap(); +} +/** + * Prefetch appCapabilitiesGetMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchAppCapabilitiesGetMaskQuery(queryClient, { variables: { ids } }); + * ``` + */ +export async function prefetchAppCapabilitiesGetMaskQuery( + queryClient: QueryClient, + params?: { + variables?: AppCapabilitiesGetMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: appCapabilitiesGetMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetPaddedMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetPaddedMaskQuery.ts new file mode 100644 index 0000000000..db35f3e8bf --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesGetPaddedMaskQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for appCapabilitiesGetPaddedMask + * @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 { AppCapabilitiesGetPaddedMaskVariables } from '../../orm/query'; +export type { AppCapabilitiesGetPaddedMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilitiesGetPaddedMaskQueryKey = customQueryKeys.appCapabilitiesGetPaddedMask; +/** + * Query hook for appCapabilitiesGetPaddedMask + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilitiesGetPaddedMaskQuery({ variables: { mask } }); + * + * if (data?.appCapabilitiesGetPaddedMask) { + * console.log(data.appCapabilitiesGetPaddedMask); + * } + * ``` + */ +export function useAppCapabilitiesGetPaddedMaskQuery< + TData = { + appCapabilitiesGetPaddedMask: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetPaddedMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetPaddedMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilitiesGetPaddedMaskQuery< + TData = { + appCapabilitiesGetPaddedMask: string | null; + }, +>( + params?: { + variables?: AppCapabilitiesGetPaddedMaskVariables; + } & Omit< + UseQueryOptions< + { + appCapabilitiesGetPaddedMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: appCapabilitiesGetPaddedMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetPaddedMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch appCapabilitiesGetPaddedMask without React hooks + * + * @example + * ```ts + * const data = await fetchAppCapabilitiesGetPaddedMaskQuery({ variables: { mask } }); + * ``` + */ +export async function fetchAppCapabilitiesGetPaddedMaskQuery(params?: { + variables?: AppCapabilitiesGetPaddedMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.appCapabilitiesGetPaddedMask(variables).unwrap(); +} +/** + * Prefetch appCapabilitiesGetPaddedMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchAppCapabilitiesGetPaddedMaskQuery(queryClient, { variables: { mask } }); + * ``` + */ +export async function prefetchAppCapabilitiesGetPaddedMaskQuery( + queryClient: QueryClient, + params?: { + variables?: AppCapabilitiesGetPaddedMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: appCapabilitiesGetPaddedMaskQueryKey(variables), + queryFn: () => getClient().query.appCapabilitiesGetPaddedMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesQuery.ts new file mode 100644 index 0000000000..7d1f09a74a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilitiesQuery.ts @@ -0,0 +1,151 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { appCapabilityKeys } from '../query-keys'; +import type { + AppCapabilitySelect, + AppCapabilityWithRelations, + AppCapabilityFilter, + AppCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppCapabilitySelect, + AppCapabilityWithRelations, + AppCapabilityFilter, + AppCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilitiesQueryKey = appCapabilityKeys.list; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppCapabilitiesQuery< + S extends AppCapabilitySelect, + TData = { + appCapabilities: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appCapabilities: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilitiesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppCapabilitySelect, + AppCapabilityFilter, + AppCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityKeys.list(args), + queryFn: () => getClient().appCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * const data = await fetchAppCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppCapabilitiesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppCapabilitySelect>; +}): Promise<{ + appCapabilities: ConnectionResult>; +}>; +export async function fetchAppCapabilitiesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + AppCapabilitySelect, + AppCapabilityFilter, + AppCapabilityOrderBy + >(params.selection); + return getClient().appCapability.findMany(args).unwrap(); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * await prefetchAppCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppCapabilitySelect>; + } +): Promise; +export async function prefetchAppCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + AppCapabilitySelect, + AppCapabilityFilter, + AppCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityKeys.list(args), + queryFn: () => getClient().appCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilitiesQuery.ts new file mode 100644 index 0000000000..957b434cc5 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilitiesQuery.ts @@ -0,0 +1,194 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { appCapabilityDefaultCapabilityKeys } from '../query-keys'; +import type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilityDefaultCapabilitiesQueryKey = appCapabilityDefaultCapabilityKeys.list; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilityDefaultCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppCapabilityDefaultCapabilitiesQuery< + S extends AppCapabilityDefaultCapabilitySelect, + TData = { + appCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilityDefaultCapabilitiesQuery( + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityDefaultCapabilityKeys.list(args), + queryFn: () => getClient().appCapabilityDefaultCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * const data = await fetchAppCapabilityDefaultCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppCapabilityDefaultCapabilitiesQuery< + S extends AppCapabilityDefaultCapabilitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; +}): Promise<{ + appCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchAppCapabilityDefaultCapabilitiesQuery(params: { + selection: ListSelectionConfig< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >(params.selection); + return getClient().appCapabilityDefaultCapability.findMany(args).unwrap(); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * await prefetchAppCapabilityDefaultCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppCapabilityDefaultCapabilitiesQuery< + S extends AppCapabilityDefaultCapabilitySelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } +): Promise; +export async function prefetchAppCapabilityDefaultCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityDefaultCapabilityKeys.list(args), + queryFn: () => getClient().appCapabilityDefaultCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilityQuery.ts new file mode 100644 index 0000000000..b53c0b660c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultCapabilityQuery.ts @@ -0,0 +1,157 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { appCapabilityDefaultCapabilityKeys } from '../query-keys'; +import type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilityDefaultCapabilityQueryKey = appCapabilityDefaultCapabilityKeys.detail; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilityDefaultCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppCapabilityDefaultCapabilityQuery< + S extends AppCapabilityDefaultCapabilitySelect, + TData = { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilityDefaultCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityDefaultCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * const data = await fetchAppCapabilityDefaultCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppCapabilityDefaultCapabilityQuery< + S extends AppCapabilityDefaultCapabilitySelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; +}): Promise<{ + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; +}>; +export async function fetchAppCapabilityDefaultCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * await prefetchAppCapabilityDefaultCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppCapabilityDefaultCapabilityQuery< + S extends AppCapabilityDefaultCapabilitySelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilityDefaultCapabilitySelect>; + } +): Promise; +export async function prefetchAppCapabilityDefaultCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityDefaultCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantQuery.ts similarity index 50% rename from sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantQuery.ts rename to sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantQuery.ts index a2cec4a441..62415841bb 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantQuery.ts @@ -1,5 +1,5 @@ /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,45 +9,45 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultGrantKeys } from '../query-keys'; +import { appCapabilityDefaultGrantKeys } from '../query-keys'; import type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultGrantQueryKey = orgPermissionDefaultGrantKeys.detail; +export const appCapabilityDefaultGrantQueryKey = appCapabilityDefaultGrantKeys.detail; /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultGrantQuery({ + * const { data, isLoading } = useAppCapabilityDefaultGrantQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function useOrgPermissionDefaultGrantQuery< - S extends OrgPermissionDefaultGrantSelect, +export function useAppCapabilityDefaultGrantQuery< + S extends AppCapabilityDefaultGrantSelect, TData = { - orgPermissionDefaultGrant: InferSelectResult | null; + appCapabilityDefaultGrant: InferSelectResult | null; }, >( params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; } & Omit< UseQueryOptions< { - orgPermissionDefaultGrant: InferSelectResult< - OrgPermissionDefaultGrantWithRelations, + appCapabilityDefaultGrant: InferSelectResult< + AppCapabilityDefaultGrantWithRelations, S > | null; }, @@ -57,20 +57,20 @@ export function useOrgPermissionDefaultGrantQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function useOrgPermissionDefaultGrantQuery( +export function useAppCapabilityDefaultGrantQuery( params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: orgPermissionDefaultGrantKeys.detail(params.id), + queryKey: appCapabilityDefaultGrantKeys.detail(params.id), queryFn: () => getClient() - .orgPermissionDefaultGrant.findOne({ + .appCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) @@ -79,70 +79,70 @@ export function useOrgPermissionDefaultGrantQuery( }); } /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```ts - * const data = await fetchOrgPermissionDefaultGrantQuery({ + * const data = await fetchAppCapabilityDefaultGrantQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchOrgPermissionDefaultGrantQuery< - S extends OrgPermissionDefaultGrantSelect, +export async function fetchAppCapabilityDefaultGrantQuery< + S extends AppCapabilityDefaultGrantSelect, >(params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; }): Promise<{ - orgPermissionDefaultGrant: InferSelectResult | null; + appCapabilityDefaultGrant: InferSelectResult | null; }>; -export async function fetchOrgPermissionDefaultGrantQuery(params: { +export async function fetchAppCapabilityDefaultGrantQuery(params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .orgPermissionDefaultGrant.findOne({ + .appCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```ts - * await prefetchOrgPermissionDefaultGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchAppCapabilityDefaultGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchOrgPermissionDefaultGrantQuery< - S extends OrgPermissionDefaultGrantSelect, +export async function prefetchAppCapabilityDefaultGrantQuery< + S extends AppCapabilityDefaultGrantSelect, >( queryClient: QueryClient, params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultGrantSelect>; + } & HookStrictSelect, AppCapabilityDefaultGrantSelect>; } ): Promise; -export async function prefetchOrgPermissionDefaultGrantQuery( +export async function prefetchAppCapabilityDefaultGrantQuery( queryClient: QueryClient, params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultGrantKeys.detail(params.id), + queryKey: appCapabilityDefaultGrantKeys.detail(params.id), queryFn: () => getClient() - .orgPermissionDefaultGrant.findOne({ + .appCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantsQuery.ts new file mode 100644 index 0000000000..bf97b4315f --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultGrantsQuery.ts @@ -0,0 +1,182 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { appCapabilityDefaultGrantKeys } from '../query-keys'; +import type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilityDefaultGrantsQueryKey = appCapabilityDefaultGrantKeys.list; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilityDefaultGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppCapabilityDefaultGrantsQuery< + S extends AppCapabilityDefaultGrantSelect, + TData = { + appCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultGrantSelect>; + } & Omit< + UseQueryOptions< + { + appCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilityDefaultGrantsQuery( + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityDefaultGrantKeys.list(args), + queryFn: () => getClient().appCapabilityDefaultGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```ts + * const data = await fetchAppCapabilityDefaultGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppCapabilityDefaultGrantsQuery< + S extends AppCapabilityDefaultGrantSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultGrantSelect>; +}): Promise<{ + appCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchAppCapabilityDefaultGrantsQuery(params: { + selection: ListSelectionConfig< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >(params.selection); + return getClient().appCapabilityDefaultGrant.findMany(args).unwrap(); +} +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```ts + * await prefetchAppCapabilityDefaultGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppCapabilityDefaultGrantsQuery< + S extends AppCapabilityDefaultGrantSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultGrantSelect>; + } +): Promise; +export async function prefetchAppCapabilityDefaultGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityDefaultGrantKeys.list(args), + queryFn: () => getClient().appCapabilityDefaultGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultQuery.ts similarity index 51% rename from sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts rename to sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultQuery.ts index 9dc118fc7c..0b8f20d2d6 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultQuery.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,44 +9,44 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionDefaultKeys } from '../query-keys'; +import { appCapabilityDefaultKeys } from '../query-keys'; import type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultQueryKey = orgPermissionDefaultKeys.detail; +export const appCapabilityDefaultQueryKey = appCapabilityDefaultKeys.detail; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultQuery({ + * const { data, isLoading } = useAppCapabilityDefaultQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function useOrgPermissionDefaultQuery< - S extends OrgPermissionDefaultSelect, +export function useAppCapabilityDefaultQuery< + S extends AppCapabilityDefaultSelect, TData = { - orgPermissionDefault: InferSelectResult | null; + appCapabilityDefault: InferSelectResult | null; }, >( params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultSelect>; + } & HookStrictSelect, AppCapabilityDefaultSelect>; } & Omit< UseQueryOptions< { - orgPermissionDefault: InferSelectResult | null; + appCapabilityDefault: InferSelectResult | null; }, Error, TData @@ -54,20 +54,20 @@ export function useOrgPermissionDefaultQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function useOrgPermissionDefaultQuery( +export function useAppCapabilityDefaultQuery( params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: orgPermissionDefaultKeys.detail(params.id), + queryKey: appCapabilityDefaultKeys.detail(params.id), queryFn: () => getClient() - .orgPermissionDefault.findOne({ + .appCapabilityDefault.findOne({ id: params.id, select: args.select, }) @@ -76,66 +76,66 @@ export function useOrgPermissionDefaultQuery( }); } /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```ts - * const data = await fetchOrgPermissionDefaultQuery({ + * const data = await fetchAppCapabilityDefaultQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchOrgPermissionDefaultQuery(params: { +export async function fetchAppCapabilityDefaultQuery(params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultSelect>; + } & HookStrictSelect, AppCapabilityDefaultSelect>; }): Promise<{ - orgPermissionDefault: InferSelectResult | null; + appCapabilityDefault: InferSelectResult | null; }>; -export async function fetchOrgPermissionDefaultQuery(params: { +export async function fetchAppCapabilityDefaultQuery(params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .orgPermissionDefault.findOne({ + .appCapabilityDefault.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```ts - * await prefetchOrgPermissionDefaultQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchAppCapabilityDefaultQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchOrgPermissionDefaultQuery( +export async function prefetchAppCapabilityDefaultQuery( queryClient: QueryClient, params: { id: string; selection: { fields: S; - } & HookStrictSelect, OrgPermissionDefaultSelect>; + } & HookStrictSelect, AppCapabilityDefaultSelect>; } ): Promise; -export async function prefetchOrgPermissionDefaultQuery( +export async function prefetchAppCapabilityDefaultQuery( queryClient: QueryClient, params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultKeys.detail(params.id), + queryKey: appCapabilityDefaultKeys.detail(params.id), queryFn: () => getClient() - .orgPermissionDefault.findOne({ + .appCapabilityDefault.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultsQuery.ts new file mode 100644 index 0000000000..23241126ed --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityDefaultsQuery.ts @@ -0,0 +1,178 @@ +/** + * Stores the default capability bitmask assigned to new members upon joining + * @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 { appCapabilityDefaultKeys } from '../query-keys'; +import type { + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppCapabilityDefaultSelect, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilityDefaultsQueryKey = appCapabilityDefaultKeys.list; +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilityDefaultsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppCapabilityDefaultsQuery< + S extends AppCapabilityDefaultSelect, + TData = { + appCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultSelect>; + } & Omit< + UseQueryOptions< + { + appCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilityDefaultsQuery( + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityDefaultKeys.list(args), + queryFn: () => getClient().appCapabilityDefault.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```ts + * const data = await fetchAppCapabilityDefaultsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppCapabilityDefaultsQuery< + S extends AppCapabilityDefaultSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultSelect>; +}): Promise<{ + appCapabilityDefaults: ConnectionResult>; +}>; +export async function fetchAppCapabilityDefaultsQuery(params: { + selection: ListSelectionConfig< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >(params.selection); + return getClient().appCapabilityDefault.findMany(args).unwrap(); +} +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```ts + * await prefetchAppCapabilityDefaultsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppCapabilityDefaultsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppCapabilityDefaultSelect>; + } +): Promise; +export async function prefetchAppCapabilityDefaultsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityDefaultKeys.list(args), + queryFn: () => getClient().appCapabilityDefault.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityQuery.ts new file mode 100644 index 0000000000..d5972c1d31 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppCapabilityQuery.ts @@ -0,0 +1,138 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { appCapabilityKeys } from '../query-keys'; +import type { AppCapabilitySelect, AppCapabilityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppCapabilitySelect, AppCapabilityWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appCapabilityQueryKey = appCapabilityKeys.detail; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { data, isLoading } = useAppCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppCapabilityQuery< + S extends AppCapabilitySelect, + TData = { + appCapability: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appCapability: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * const data = await fetchAppCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppCapabilityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilitySelect>; +}): Promise<{ + appCapability: InferSelectResult | null; +}>; +export async function fetchAppCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * await prefetchAppCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppCapabilitySelect>; + } +): Promise; +export async function prefetchAppCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts index a7a5d3304b..b134a063d5 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -16,7 +16,7 @@ export type { AppGrantSelect, AppGrantWithRelations } from '../../orm/input-type /** Query key factory - re-exported from query-keys.ts */ export const appGrantQueryKey = appGrantKeys.detail; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx @@ -70,7 +70,7 @@ export function useAppGrantQuery( }); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts @@ -101,7 +101,7 @@ export async function fetchAppGrantQuery(params: { .unwrap(); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantsQuery.ts index de0684b897..52634b033f 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantsQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantsQuery.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const appGrantsQueryKey = appGrantKeys.list; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx @@ -84,7 +84,7 @@ export function useAppGrantsQuery( }); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts @@ -113,7 +113,7 @@ export async function fetchAppGrantsQuery(params: { return getClient().appGrant.findMany(args).unwrap(); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfileQuery.ts new file mode 100644 index 0000000000..ab5de0bec9 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfileQuery.ts @@ -0,0 +1,144 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { appMembershipProfileKeys } from '../query-keys'; +import type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appMembershipProfileQueryKey = appMembershipProfileKeys.detail; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { data, isLoading } = useAppMembershipProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppMembershipProfileQuery< + S extends AppMembershipProfileSelect, + TData = { + appMembershipProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppMembershipProfileSelect>; + } & Omit< + UseQueryOptions< + { + appMembershipProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppMembershipProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appMembershipProfileKeys.detail(params.id), + queryFn: () => + getClient() + .appMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * const data = await fetchAppMembershipProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppMembershipProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppMembershipProfileSelect>; +}): Promise<{ + appMembershipProfile: InferSelectResult | null; +}>; +export async function fetchAppMembershipProfileQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * await prefetchAppMembershipProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppMembershipProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppMembershipProfileSelect>; + } +): Promise; +export async function prefetchAppMembershipProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appMembershipProfileKeys.detail(params.id), + queryFn: () => + getClient() + .appMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfilesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfilesQuery.ts new file mode 100644 index 0000000000..f0a46d6d2d --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipProfilesQuery.ts @@ -0,0 +1,178 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { appMembershipProfileKeys } from '../query-keys'; +import type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppMembershipProfileSelect, + AppMembershipProfileWithRelations, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appMembershipProfilesQueryKey = appMembershipProfileKeys.list; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { data, isLoading } = useAppMembershipProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppMembershipProfilesQuery< + S extends AppMembershipProfileSelect, + TData = { + appMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppMembershipProfileSelect>; + } & Omit< + UseQueryOptions< + { + appMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppMembershipProfilesQuery( + params: { + selection: ListSelectionConfig< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appMembershipProfileKeys.list(args), + queryFn: () => getClient().appMembershipProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * const data = await fetchAppMembershipProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppMembershipProfilesQuery< + S extends AppMembershipProfileSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppMembershipProfileSelect>; +}): Promise<{ + appMembershipProfiles: ConnectionResult>; +}>; +export async function fetchAppMembershipProfilesQuery(params: { + selection: ListSelectionConfig< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >(params.selection); + return getClient().appMembershipProfile.findMany(args).unwrap(); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * await prefetchAppMembershipProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppMembershipProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppMembershipProfileSelect>; + } +): Promise; +export async function prefetchAppMembershipProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appMembershipProfileKeys.list(args), + queryFn: () => getClient().appMembershipProfile.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts index 53a941d1a3..904494cfeb 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -16,7 +16,7 @@ export type { AppMembershipSelect, AppMembershipWithRelations } from '../../orm/ /** Query key factory - re-exported from query-keys.ts */ export const appMembershipQueryKey = appMembershipKeys.detail; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx @@ -70,7 +70,7 @@ export function useAppMembershipQuery( }); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts @@ -101,7 +101,7 @@ export async function fetchAppMembershipQuery(params: { .unwrap(); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipsQuery.ts index 4a7406a964..71e56028e8 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipsQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipsQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const appMembershipsQueryKey = appMembershipKeys.list; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx @@ -86,7 +86,7 @@ export function useAppMembershipsQuery( }); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts @@ -117,7 +117,7 @@ export async function fetchAppMembershipsQuery(params: { return getClient().appMembership.findMany(args).unwrap(); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantsQuery.ts deleted file mode 100644 index eeae2ad10f..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantsQuery.ts +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { appPermissionDefaultGrantKeys } from '../query-keys'; -import type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultGrantsQueryKey = appPermissionDefaultGrantKeys.list; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionDefaultGrantsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useAppPermissionDefaultGrantsQuery< - S extends AppPermissionDefaultGrantSelect, - TData = { - appPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultGrantSelect>; - } & Omit< - UseQueryOptions< - { - appPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionDefaultGrantsQuery( - params: { - selection: ListSelectionConfig< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionDefaultGrantKeys.list(args), - queryFn: () => getClient().appPermissionDefaultGrant.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```ts - * const data = await fetchAppPermissionDefaultGrantsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchAppPermissionDefaultGrantsQuery< - S extends AppPermissionDefaultGrantSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultGrantSelect>; -}): Promise<{ - appPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; -}>; -export async function fetchAppPermissionDefaultGrantsQuery(params: { - selection: ListSelectionConfig< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >; -}) { - const args = buildListSelectionArgs< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >(params.selection); - return getClient().appPermissionDefaultGrant.findMany(args).unwrap(); -} -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```ts - * await prefetchAppPermissionDefaultGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchAppPermissionDefaultGrantsQuery< - S extends AppPermissionDefaultGrantSelect, ->( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultGrantSelect>; - } -): Promise; -export async function prefetchAppPermissionDefaultGrantsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultGrantKeys.list(args), - queryFn: () => getClient().appPermissionDefaultGrant.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionQuery.ts deleted file mode 100644 index 06aeafb892..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionQuery.ts +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { appPermissionDefaultPermissionKeys } from '../query-keys'; -import type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultPermissionQueryKey = appPermissionDefaultPermissionKeys.detail; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionDefaultPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useAppPermissionDefaultPermissionQuery< - S extends AppPermissionDefaultPermissionSelect, - TData = { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } & Omit< - UseQueryOptions< - { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionDefaultPermissionQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionDefaultPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .appPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * const data = await fetchAppPermissionDefaultPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchAppPermissionDefaultPermissionQuery< - S extends AppPermissionDefaultPermissionSelect, ->(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; -}): Promise<{ - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; -}>; -export async function fetchAppPermissionDefaultPermissionQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .appPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * await prefetchAppPermissionDefaultPermissionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchAppPermissionDefaultPermissionQuery< - S extends AppPermissionDefaultPermissionSelect, ->( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } -): Promise; -export async function prefetchAppPermissionDefaultPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .appPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionsQuery.ts deleted file mode 100644 index c83281765a..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultPermissionsQuery.ts +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { appPermissionDefaultPermissionKeys } from '../query-keys'; -import type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultPermissionsQueryKey = appPermissionDefaultPermissionKeys.list; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionDefaultPermissionsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useAppPermissionDefaultPermissionsQuery< - S extends AppPermissionDefaultPermissionSelect, - TData = { - appPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } & Omit< - UseQueryOptions< - { - appPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionDefaultPermissionsQuery( - params: { - selection: ListSelectionConfig< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionDefaultPermissionKeys.list(args), - queryFn: () => getClient().appPermissionDefaultPermission.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * const data = await fetchAppPermissionDefaultPermissionsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchAppPermissionDefaultPermissionsQuery< - S extends AppPermissionDefaultPermissionSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultPermissionSelect>; -}): Promise<{ - appPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; -}>; -export async function fetchAppPermissionDefaultPermissionsQuery(params: { - selection: ListSelectionConfig< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >; -}) { - const args = buildListSelectionArgs< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >(params.selection); - return getClient().appPermissionDefaultPermission.findMany(args).unwrap(); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * await prefetchAppPermissionDefaultPermissionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchAppPermissionDefaultPermissionsQuery< - S extends AppPermissionDefaultPermissionSelect, ->( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultPermissionSelect>; - } -): Promise; -export async function prefetchAppPermissionDefaultPermissionsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultPermissionKeys.list(args), - queryFn: () => getClient().appPermissionDefaultPermission.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultsQuery.ts deleted file mode 100644 index 44cdda731c..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultsQuery.ts +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Stores the default permission bitmask assigned to new members upon joining - * @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 { appPermissionDefaultKeys } from '../query-keys'; -import type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultsQueryKey = appPermissionDefaultKeys.list; -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionDefaultsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useAppPermissionDefaultsQuery< - S extends AppPermissionDefaultSelect, - TData = { - appPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultSelect>; - } & Omit< - UseQueryOptions< - { - appPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionDefaultsQuery( - params: { - selection: ListSelectionConfig< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionDefaultKeys.list(args), - queryFn: () => getClient().appPermissionDefault.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```ts - * const data = await fetchAppPermissionDefaultsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchAppPermissionDefaultsQuery< - S extends AppPermissionDefaultSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultSelect>; -}): Promise<{ - appPermissionDefaults: ConnectionResult>; -}>; -export async function fetchAppPermissionDefaultsQuery(params: { - selection: ListSelectionConfig< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >; -}) { - const args = buildListSelectionArgs< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >(params.selection); - return getClient().appPermissionDefault.findMany(args).unwrap(); -} -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```ts - * await prefetchAppPermissionDefaultsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchAppPermissionDefaultsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, AppPermissionDefaultSelect>; - } -): Promise; -export async function prefetchAppPermissionDefaultsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultKeys.list(args), - queryFn: () => getClient().appPermissionDefault.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts deleted file mode 100644 index b89353ec63..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { appPermissionKeys } from '../query-keys'; -import type { AppPermissionSelect, AppPermissionWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { AppPermissionSelect, AppPermissionWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionQueryKey = appPermissionKeys.detail; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useAppPermissionQuery< - S extends AppPermissionSelect, - TData = { - appPermission: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionSelect>; - } & Omit< - UseQueryOptions< - { - appPermission: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .appPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * const data = await fetchAppPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchAppPermissionQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionSelect>; -}): Promise<{ - appPermission: InferSelectResult | null; -}>; -export async function fetchAppPermissionQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .appPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * await prefetchAppPermissionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchAppPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, AppPermissionSelect>; - } -): Promise; -export async function prefetchAppPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .appPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetByMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetByMaskQuery.ts deleted file mode 100644 index f735051548..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetByMaskQuery.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Custom query hook for appPermissionsGetByMask - * @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 { AppPermissionsGetByMaskVariables } from '../../orm/query'; -import type { AppPermissionConnection } from '../../orm/input-types'; -export type { AppPermissionsGetByMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionsGetByMaskQueryKey = customQueryKeys.appPermissionsGetByMask; -/** - * Reads and enables pagination through a set of `AppPermission`. - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionsGetByMaskQuery({ variables: { after, first, mask, offset } }); - * - * if (data?.appPermissionsGetByMask) { - * console.log(data.appPermissionsGetByMask); - * } - * ``` - */ -export function useAppPermissionsGetByMaskQuery< - TData = { - appPermissionsGetByMask: AppPermissionConnection | null; - }, ->( - params?: { - variables?: AppPermissionsGetByMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetByMask: AppPermissionConnection | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionsGetByMaskQuery< - TData = { - appPermissionsGetByMask: AppPermissionConnection | null; - }, ->( - params?: { - variables?: AppPermissionsGetByMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetByMask: AppPermissionConnection | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: appPermissionsGetByMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetByMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch appPermissionsGetByMask without React hooks - * - * @example - * ```ts - * const data = await fetchAppPermissionsGetByMaskQuery({ variables: { after, first, mask, offset } }); - * ``` - */ -export async function fetchAppPermissionsGetByMaskQuery(params?: { - variables?: AppPermissionsGetByMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.appPermissionsGetByMask(variables).unwrap(); -} -/** - * Prefetch appPermissionsGetByMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchAppPermissionsGetByMaskQuery(queryClient, { variables: { after, first, mask, offset } }); - * ``` - */ -export async function prefetchAppPermissionsGetByMaskQuery( - queryClient: QueryClient, - params?: { - variables?: AppPermissionsGetByMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: appPermissionsGetByMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetByMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskByNamesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskByNamesQuery.ts deleted file mode 100644 index cbfe1fad8f..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskByNamesQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for appPermissionsGetMaskByNames - * @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 { AppPermissionsGetMaskByNamesVariables } from '../../orm/query'; -export type { AppPermissionsGetMaskByNamesVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionsGetMaskByNamesQueryKey = customQueryKeys.appPermissionsGetMaskByNames; -/** - * Query hook for appPermissionsGetMaskByNames - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionsGetMaskByNamesQuery({ variables: { names } }); - * - * if (data?.appPermissionsGetMaskByNames) { - * console.log(data.appPermissionsGetMaskByNames); - * } - * ``` - */ -export function useAppPermissionsGetMaskByNamesQuery< - TData = { - appPermissionsGetMaskByNames: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetMaskByNamesVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetMaskByNames: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionsGetMaskByNamesQuery< - TData = { - appPermissionsGetMaskByNames: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetMaskByNamesVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetMaskByNames: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: appPermissionsGetMaskByNamesQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetMaskByNames(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch appPermissionsGetMaskByNames without React hooks - * - * @example - * ```ts - * const data = await fetchAppPermissionsGetMaskByNamesQuery({ variables: { names } }); - * ``` - */ -export async function fetchAppPermissionsGetMaskByNamesQuery(params?: { - variables?: AppPermissionsGetMaskByNamesVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.appPermissionsGetMaskByNames(variables).unwrap(); -} -/** - * Prefetch appPermissionsGetMaskByNames for SSR or cache warming - * - * @example - * ```ts - * await prefetchAppPermissionsGetMaskByNamesQuery(queryClient, { variables: { names } }); - * ``` - */ -export async function prefetchAppPermissionsGetMaskByNamesQuery( - queryClient: QueryClient, - params?: { - variables?: AppPermissionsGetMaskByNamesVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: appPermissionsGetMaskByNamesQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetMaskByNames(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskQuery.ts deleted file mode 100644 index b1e3289da9..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetMaskQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for appPermissionsGetMask - * @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 { AppPermissionsGetMaskVariables } from '../../orm/query'; -export type { AppPermissionsGetMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionsGetMaskQueryKey = customQueryKeys.appPermissionsGetMask; -/** - * Query hook for appPermissionsGetMask - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionsGetMaskQuery({ variables: { ids } }); - * - * if (data?.appPermissionsGetMask) { - * console.log(data.appPermissionsGetMask); - * } - * ``` - */ -export function useAppPermissionsGetMaskQuery< - TData = { - appPermissionsGetMask: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionsGetMaskQuery< - TData = { - appPermissionsGetMask: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: appPermissionsGetMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch appPermissionsGetMask without React hooks - * - * @example - * ```ts - * const data = await fetchAppPermissionsGetMaskQuery({ variables: { ids } }); - * ``` - */ -export async function fetchAppPermissionsGetMaskQuery(params?: { - variables?: AppPermissionsGetMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.appPermissionsGetMask(variables).unwrap(); -} -/** - * Prefetch appPermissionsGetMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchAppPermissionsGetMaskQuery(queryClient, { variables: { ids } }); - * ``` - */ -export async function prefetchAppPermissionsGetMaskQuery( - queryClient: QueryClient, - params?: { - variables?: AppPermissionsGetMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: appPermissionsGetMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetPaddedMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetPaddedMaskQuery.ts deleted file mode 100644 index cb504f8105..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsGetPaddedMaskQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for appPermissionsGetPaddedMask - * @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 { AppPermissionsGetPaddedMaskVariables } from '../../orm/query'; -export type { AppPermissionsGetPaddedMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionsGetPaddedMaskQueryKey = customQueryKeys.appPermissionsGetPaddedMask; -/** - * Query hook for appPermissionsGetPaddedMask - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionsGetPaddedMaskQuery({ variables: { mask } }); - * - * if (data?.appPermissionsGetPaddedMask) { - * console.log(data.appPermissionsGetPaddedMask); - * } - * ``` - */ -export function useAppPermissionsGetPaddedMaskQuery< - TData = { - appPermissionsGetPaddedMask: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetPaddedMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetPaddedMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionsGetPaddedMaskQuery< - TData = { - appPermissionsGetPaddedMask: string | null; - }, ->( - params?: { - variables?: AppPermissionsGetPaddedMaskVariables; - } & Omit< - UseQueryOptions< - { - appPermissionsGetPaddedMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: appPermissionsGetPaddedMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetPaddedMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch appPermissionsGetPaddedMask without React hooks - * - * @example - * ```ts - * const data = await fetchAppPermissionsGetPaddedMaskQuery({ variables: { mask } }); - * ``` - */ -export async function fetchAppPermissionsGetPaddedMaskQuery(params?: { - variables?: AppPermissionsGetPaddedMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.appPermissionsGetPaddedMask(variables).unwrap(); -} -/** - * Prefetch appPermissionsGetPaddedMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchAppPermissionsGetPaddedMaskQuery(queryClient, { variables: { mask } }); - * ``` - */ -export async function prefetchAppPermissionsGetPaddedMaskQuery( - queryClient: QueryClient, - params?: { - variables?: AppPermissionsGetPaddedMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: appPermissionsGetPaddedMaskQueryKey(variables), - queryFn: () => getClient().query.appPermissionsGetPaddedMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsQuery.ts deleted file mode 100644 index 67d25dcdce..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionsQuery.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { appPermissionKeys } from '../query-keys'; -import type { - AppPermissionSelect, - AppPermissionWithRelations, - AppPermissionFilter, - AppPermissionOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - AppPermissionSelect, - AppPermissionWithRelations, - AppPermissionFilter, - AppPermissionOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const appPermissionsQueryKey = appPermissionKeys.list; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { data, isLoading } = useAppPermissionsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useAppPermissionsQuery< - S extends AppPermissionSelect, - TData = { - appPermissions: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AppPermissionSelect>; - } & Omit< - UseQueryOptions< - { - appPermissions: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAppPermissionsQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - AppPermissionSelect, - AppPermissionFilter, - AppPermissionOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: appPermissionKeys.list(args), - queryFn: () => getClient().appPermission.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * const data = await fetchAppPermissionsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchAppPermissionsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AppPermissionSelect>; -}): Promise<{ - appPermissions: ConnectionResult>; -}>; -export async function fetchAppPermissionsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs< - AppPermissionSelect, - AppPermissionFilter, - AppPermissionOrderBy - >(params.selection); - return getClient().appPermission.findMany(args).unwrap(); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * await prefetchAppPermissionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchAppPermissionsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AppPermissionSelect>; - } -): Promise; -export async function prefetchAppPermissionsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs< - AppPermissionSelect, - AppPermissionFilter, - AppPermissionOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: appPermissionKeys.list(args), - queryFn: () => getClient().appPermission.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilitiesQuery.ts new file mode 100644 index 0000000000..9cb58c4b58 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilitiesQuery.ts @@ -0,0 +1,178 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { appProfileCapabilityKeys } from '../query-keys'; +import type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileCapabilitiesQueryKey = appProfileCapabilityKeys.list; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppProfileCapabilitiesQuery< + S extends AppProfileCapabilitySelect, + TData = { + appProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileCapabilitiesQuery( + params: { + selection: ListSelectionConfig< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileCapabilityKeys.list(args), + queryFn: () => getClient().appProfileCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * const data = await fetchAppProfileCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppProfileCapabilitiesQuery< + S extends AppProfileCapabilitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileCapabilitySelect>; +}): Promise<{ + appProfileCapabilities: ConnectionResult>; +}>; +export async function fetchAppProfileCapabilitiesQuery(params: { + selection: ListSelectionConfig< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >(params.selection); + return getClient().appProfileCapability.findMany(args).unwrap(); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * await prefetchAppProfileCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppProfileCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileCapabilitySelect>; + } +): Promise; +export async function prefetchAppProfileCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileCapabilityKeys.list(args), + queryFn: () => getClient().appProfileCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilityQuery.ts new file mode 100644 index 0000000000..55708a53f6 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileCapabilityQuery.ts @@ -0,0 +1,144 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { appProfileCapabilityKeys } from '../query-keys'; +import type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileCapabilitySelect, + AppProfileCapabilityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileCapabilityQueryKey = appProfileCapabilityKeys.detail; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppProfileCapabilityQuery< + S extends AppProfileCapabilitySelect, + TData = { + appProfileCapability: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + appProfileCapability: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * const data = await fetchAppProfileCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppProfileCapabilityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileCapabilitySelect>; +}): Promise<{ + appProfileCapability: InferSelectResult | null; +}>; +export async function fetchAppProfileCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * await prefetchAppProfileCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppProfileCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileCapabilitySelect>; + } +): Promise; +export async function prefetchAppProfileCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantQuery.ts new file mode 100644 index 0000000000..fd23b1fbe7 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantQuery.ts @@ -0,0 +1,151 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { appProfileDefinitionGrantKeys } from '../query-keys'; +import type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileDefinitionGrantQueryKey = appProfileDefinitionGrantKeys.detail; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileDefinitionGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppProfileDefinitionGrantQuery< + S extends AppProfileDefinitionGrantSelect, + TData = { + appProfileDefinitionGrant: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; + } & Omit< + UseQueryOptions< + { + appProfileDefinitionGrant: InferSelectResult< + AppProfileDefinitionGrantWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileDefinitionGrantQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileDefinitionGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * const data = await fetchAppProfileDefinitionGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppProfileDefinitionGrantQuery< + S extends AppProfileDefinitionGrantSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; +}): Promise<{ + appProfileDefinitionGrant: InferSelectResult | null; +}>; +export async function fetchAppProfileDefinitionGrantQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * await prefetchAppProfileDefinitionGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppProfileDefinitionGrantQuery< + S extends AppProfileDefinitionGrantSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileDefinitionGrantSelect>; + } +): Promise; +export async function prefetchAppProfileDefinitionGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileDefinitionGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantsQuery.ts new file mode 100644 index 0000000000..e63ba9da50 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileDefinitionGrantsQuery.ts @@ -0,0 +1,182 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { appProfileDefinitionGrantKeys } from '../query-keys'; +import type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileDefinitionGrantsQueryKey = appProfileDefinitionGrantKeys.list; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileDefinitionGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppProfileDefinitionGrantsQuery< + S extends AppProfileDefinitionGrantSelect, + TData = { + appProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileDefinitionGrantSelect>; + } & Omit< + UseQueryOptions< + { + appProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileDefinitionGrantsQuery( + params: { + selection: ListSelectionConfig< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileDefinitionGrantKeys.list(args), + queryFn: () => getClient().appProfileDefinitionGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * const data = await fetchAppProfileDefinitionGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppProfileDefinitionGrantsQuery< + S extends AppProfileDefinitionGrantSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileDefinitionGrantSelect>; +}): Promise<{ + appProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchAppProfileDefinitionGrantsQuery(params: { + selection: ListSelectionConfig< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >(params.selection); + return getClient().appProfileDefinitionGrant.findMany(args).unwrap(); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * await prefetchAppProfileDefinitionGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppProfileDefinitionGrantsQuery< + S extends AppProfileDefinitionGrantSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileDefinitionGrantSelect>; + } +): Promise; +export async function prefetchAppProfileDefinitionGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileDefinitionGrantKeys.list(args), + queryFn: () => getClient().appProfileDefinitionGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantQuery.ts new file mode 100644 index 0000000000..c826b96aca --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantQuery.ts @@ -0,0 +1,138 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { appProfileGrantKeys } from '../query-keys'; +import type { AppProfileGrantSelect, AppProfileGrantWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppProfileGrantSelect, AppProfileGrantWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileGrantQueryKey = appProfileGrantKeys.detail; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppProfileGrantQuery< + S extends AppProfileGrantSelect, + TData = { + appProfileGrant: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileGrantSelect>; + } & Omit< + UseQueryOptions< + { + appProfileGrant: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileGrantQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * const data = await fetchAppProfileGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppProfileGrantQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileGrantSelect>; +}): Promise<{ + appProfileGrant: InferSelectResult | null; +}>; +export async function fetchAppProfileGrantQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * await prefetchAppProfileGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppProfileGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileGrantSelect>; + } +): Promise; +export async function prefetchAppProfileGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantsQuery.ts new file mode 100644 index 0000000000..e01fe7e01a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileGrantsQuery.ts @@ -0,0 +1,163 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { appProfileGrantKeys } from '../query-keys'; +import type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + AppProfileGrantFilter, + AppProfileGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppProfileGrantSelect, + AppProfileGrantWithRelations, + AppProfileGrantFilter, + AppProfileGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileGrantsQueryKey = appProfileGrantKeys.list; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppProfileGrantsQuery< + S extends AppProfileGrantSelect, + TData = { + appProfileGrants: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileGrantSelect>; + } & Omit< + UseQueryOptions< + { + appProfileGrants: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileGrantsQuery( + params: { + selection: ListSelectionConfig< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileGrantKeys.list(args), + queryFn: () => getClient().appProfileGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * const data = await fetchAppProfileGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppProfileGrantsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileGrantSelect>; +}): Promise<{ + appProfileGrants: ConnectionResult>; +}>; +export async function fetchAppProfileGrantsQuery(params: { + selection: ListSelectionConfig< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >(params.selection); + return getClient().appProfileGrant.findMany(args).unwrap(); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * await prefetchAppProfileGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppProfileGrantsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileGrantSelect>; + } +): Promise; +export async function prefetchAppProfileGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileGrantKeys.list(args), + queryFn: () => getClient().appProfileGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileQuery.ts new file mode 100644 index 0000000000..5a90a27748 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileQuery.ts @@ -0,0 +1,138 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { appProfileKeys } from '../query-keys'; +import type { AppProfileSelect, AppProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppProfileSelect, AppProfileWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileQueryKey = appProfileKeys.detail; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppProfileQuery< + S extends AppProfileSelect, + TData = { + appProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileSelect>; + } & Omit< + UseQueryOptions< + { + appProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileKeys.detail(params.id), + queryFn: () => + getClient() + .appProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * const data = await fetchAppProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileSelect>; +}): Promise<{ + appProfile: InferSelectResult | null; +}>; +export async function fetchAppProfileQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * await prefetchAppProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileSelect>; + } +): Promise; +export async function prefetchAppProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileKeys.detail(params.id), + queryFn: () => + getClient() + .appProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplateQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplateQuery.ts new file mode 100644 index 0000000000..f9afdfc959 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplateQuery.ts @@ -0,0 +1,144 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { appProfileTemplateKeys } from '../query-keys'; +import type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileTemplateQueryKey = appProfileTemplateKeys.detail; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileTemplateQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppProfileTemplateQuery< + S extends AppProfileTemplateSelect, + TData = { + appProfileTemplate: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileTemplateSelect>; + } & Omit< + UseQueryOptions< + { + appProfileTemplate: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileTemplateQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileTemplateKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * const data = await fetchAppProfileTemplateQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppProfileTemplateQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileTemplateSelect>; +}): Promise<{ + appProfileTemplate: InferSelectResult | null; +}>; +export async function fetchAppProfileTemplateQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * await prefetchAppProfileTemplateQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppProfileTemplateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppProfileTemplateSelect>; + } +): Promise; +export async function prefetchAppProfileTemplateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileTemplateKeys.detail(params.id), + queryFn: () => + getClient() + .appProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplatesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplatesQuery.ts new file mode 100644 index 0000000000..e0843709bd --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfileTemplatesQuery.ts @@ -0,0 +1,171 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { appProfileTemplateKeys } from '../query-keys'; +import type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppProfileTemplateSelect, + AppProfileTemplateWithRelations, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfileTemplatesQueryKey = appProfileTemplateKeys.list; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfileTemplatesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppProfileTemplatesQuery< + S extends AppProfileTemplateSelect, + TData = { + appProfileTemplates: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileTemplateSelect>; + } & Omit< + UseQueryOptions< + { + appProfileTemplates: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfileTemplatesQuery( + params: { + selection: ListSelectionConfig< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileTemplateKeys.list(args), + queryFn: () => getClient().appProfileTemplate.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * const data = await fetchAppProfileTemplatesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppProfileTemplatesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileTemplateSelect>; +}): Promise<{ + appProfileTemplates: ConnectionResult>; +}>; +export async function fetchAppProfileTemplatesQuery(params: { + selection: ListSelectionConfig< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >(params.selection); + return getClient().appProfileTemplate.findMany(args).unwrap(); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * await prefetchAppProfileTemplatesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppProfileTemplatesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppProfileTemplateSelect>; + } +): Promise; +export async function prefetchAppProfileTemplatesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appProfileTemplateKeys.list(args), + queryFn: () => getClient().appProfileTemplate.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppProfilesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppProfilesQuery.ts new file mode 100644 index 0000000000..f2a6989aa9 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppProfilesQuery.ts @@ -0,0 +1,145 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { appProfileKeys } from '../query-keys'; +import type { + AppProfileSelect, + AppProfileWithRelations, + AppProfileFilter, + AppProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppProfileSelect, + AppProfileWithRelations, + AppProfileFilter, + AppProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appProfilesQueryKey = appProfileKeys.list; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { data, isLoading } = useAppProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppProfilesQuery< + S extends AppProfileSelect, + TData = { + appProfiles: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileSelect>; + } & Omit< + UseQueryOptions< + { + appProfiles: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppProfilesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appProfileKeys.list(args), + queryFn: () => getClient().appProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * const data = await fetchAppProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppProfilesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileSelect>; +}): Promise<{ + appProfiles: ConnectionResult>; +}>; +export async function fetchAppProfilesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().appProfile.findMany(args).unwrap(); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * await prefetchAppProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppProfileSelect>; + } +): Promise; +export async function prefetchAppProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: appProfileKeys.list(args), + queryFn: () => getClient().appProfile.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetByMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetByMaskQuery.ts new file mode 100644 index 0000000000..e8bd46eb1a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetByMaskQuery.ts @@ -0,0 +1,108 @@ +/** + * Custom query hook for orgCapabilitiesGetByMask + * @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 { OrgCapabilitiesGetByMaskVariables } from '../../orm/query'; +import type { OrgCapabilityConnection } from '../../orm/input-types'; +export type { OrgCapabilitiesGetByMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilitiesGetByMaskQueryKey = customQueryKeys.orgCapabilitiesGetByMask; +/** + * Reads and enables pagination through a set of `OrgCapability`. + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilitiesGetByMaskQuery({ variables: { after, first, mask, offset } }); + * + * if (data?.orgCapabilitiesGetByMask) { + * console.log(data.orgCapabilitiesGetByMask); + * } + * ``` + */ +export function useOrgCapabilitiesGetByMaskQuery< + TData = { + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetByMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilitiesGetByMaskQuery< + TData = { + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetByMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: orgCapabilitiesGetByMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetByMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch orgCapabilitiesGetByMask without React hooks + * + * @example + * ```ts + * const data = await fetchOrgCapabilitiesGetByMaskQuery({ variables: { after, first, mask, offset } }); + * ``` + */ +export async function fetchOrgCapabilitiesGetByMaskQuery(params?: { + variables?: OrgCapabilitiesGetByMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.orgCapabilitiesGetByMask(variables).unwrap(); +} +/** + * Prefetch orgCapabilitiesGetByMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgCapabilitiesGetByMaskQuery(queryClient, { variables: { after, first, mask, offset } }); + * ``` + */ +export async function prefetchOrgCapabilitiesGetByMaskQuery( + queryClient: QueryClient, + params?: { + variables?: OrgCapabilitiesGetByMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: orgCapabilitiesGetByMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetByMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskByNamesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskByNamesQuery.ts new file mode 100644 index 0000000000..41ddf7ea2c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskByNamesQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for orgCapabilitiesGetMaskByNames + * @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 { OrgCapabilitiesGetMaskByNamesVariables } from '../../orm/query'; +export type { OrgCapabilitiesGetMaskByNamesVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilitiesGetMaskByNamesQueryKey = customQueryKeys.orgCapabilitiesGetMaskByNames; +/** + * Query hook for orgCapabilitiesGetMaskByNames + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilitiesGetMaskByNamesQuery({ variables: { names } }); + * + * if (data?.orgCapabilitiesGetMaskByNames) { + * console.log(data.orgCapabilitiesGetMaskByNames); + * } + * ``` + */ +export function useOrgCapabilitiesGetMaskByNamesQuery< + TData = { + orgCapabilitiesGetMaskByNames: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetMaskByNamesVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetMaskByNames: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilitiesGetMaskByNamesQuery< + TData = { + orgCapabilitiesGetMaskByNames: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetMaskByNamesVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetMaskByNames: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: orgCapabilitiesGetMaskByNamesQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetMaskByNames(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch orgCapabilitiesGetMaskByNames without React hooks + * + * @example + * ```ts + * const data = await fetchOrgCapabilitiesGetMaskByNamesQuery({ variables: { names } }); + * ``` + */ +export async function fetchOrgCapabilitiesGetMaskByNamesQuery(params?: { + variables?: OrgCapabilitiesGetMaskByNamesVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.orgCapabilitiesGetMaskByNames(variables).unwrap(); +} +/** + * Prefetch orgCapabilitiesGetMaskByNames for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgCapabilitiesGetMaskByNamesQuery(queryClient, { variables: { names } }); + * ``` + */ +export async function prefetchOrgCapabilitiesGetMaskByNamesQuery( + queryClient: QueryClient, + params?: { + variables?: OrgCapabilitiesGetMaskByNamesVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: orgCapabilitiesGetMaskByNamesQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetMaskByNames(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskQuery.ts new file mode 100644 index 0000000000..50a3a909f0 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetMaskQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for orgCapabilitiesGetMask + * @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 { OrgCapabilitiesGetMaskVariables } from '../../orm/query'; +export type { OrgCapabilitiesGetMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilitiesGetMaskQueryKey = customQueryKeys.orgCapabilitiesGetMask; +/** + * Query hook for orgCapabilitiesGetMask + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilitiesGetMaskQuery({ variables: { ids } }); + * + * if (data?.orgCapabilitiesGetMask) { + * console.log(data.orgCapabilitiesGetMask); + * } + * ``` + */ +export function useOrgCapabilitiesGetMaskQuery< + TData = { + orgCapabilitiesGetMask: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilitiesGetMaskQuery< + TData = { + orgCapabilitiesGetMask: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: orgCapabilitiesGetMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch orgCapabilitiesGetMask without React hooks + * + * @example + * ```ts + * const data = await fetchOrgCapabilitiesGetMaskQuery({ variables: { ids } }); + * ``` + */ +export async function fetchOrgCapabilitiesGetMaskQuery(params?: { + variables?: OrgCapabilitiesGetMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.orgCapabilitiesGetMask(variables).unwrap(); +} +/** + * Prefetch orgCapabilitiesGetMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgCapabilitiesGetMaskQuery(queryClient, { variables: { ids } }); + * ``` + */ +export async function prefetchOrgCapabilitiesGetMaskQuery( + queryClient: QueryClient, + params?: { + variables?: OrgCapabilitiesGetMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: orgCapabilitiesGetMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetPaddedMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetPaddedMaskQuery.ts new file mode 100644 index 0000000000..4ea238eec2 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesGetPaddedMaskQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for orgCapabilitiesGetPaddedMask + * @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 { OrgCapabilitiesGetPaddedMaskVariables } from '../../orm/query'; +export type { OrgCapabilitiesGetPaddedMaskVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilitiesGetPaddedMaskQueryKey = customQueryKeys.orgCapabilitiesGetPaddedMask; +/** + * Query hook for orgCapabilitiesGetPaddedMask + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilitiesGetPaddedMaskQuery({ variables: { mask } }); + * + * if (data?.orgCapabilitiesGetPaddedMask) { + * console.log(data.orgCapabilitiesGetPaddedMask); + * } + * ``` + */ +export function useOrgCapabilitiesGetPaddedMaskQuery< + TData = { + orgCapabilitiesGetPaddedMask: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetPaddedMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetPaddedMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilitiesGetPaddedMaskQuery< + TData = { + orgCapabilitiesGetPaddedMask: string | null; + }, +>( + params?: { + variables?: OrgCapabilitiesGetPaddedMaskVariables; + } & Omit< + UseQueryOptions< + { + orgCapabilitiesGetPaddedMask: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: orgCapabilitiesGetPaddedMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetPaddedMask(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch orgCapabilitiesGetPaddedMask without React hooks + * + * @example + * ```ts + * const data = await fetchOrgCapabilitiesGetPaddedMaskQuery({ variables: { mask } }); + * ``` + */ +export async function fetchOrgCapabilitiesGetPaddedMaskQuery(params?: { + variables?: OrgCapabilitiesGetPaddedMaskVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.orgCapabilitiesGetPaddedMask(variables).unwrap(); +} +/** + * Prefetch orgCapabilitiesGetPaddedMask for SSR or cache warming + * + * @example + * ```ts + * await prefetchOrgCapabilitiesGetPaddedMaskQuery(queryClient, { variables: { mask } }); + * ``` + */ +export async function prefetchOrgCapabilitiesGetPaddedMaskQuery( + queryClient: QueryClient, + params?: { + variables?: OrgCapabilitiesGetPaddedMaskVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: orgCapabilitiesGetPaddedMaskQueryKey(variables), + queryFn: () => getClient().query.orgCapabilitiesGetPaddedMask(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesQuery.ts new file mode 100644 index 0000000000..8102ae4bd3 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilitiesQuery.ts @@ -0,0 +1,151 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { orgCapabilityKeys } from '../query-keys'; +import type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + OrgCapabilityFilter, + OrgCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgCapabilitySelect, + OrgCapabilityWithRelations, + OrgCapabilityFilter, + OrgCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilitiesQueryKey = orgCapabilityKeys.list; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgCapabilitiesQuery< + S extends OrgCapabilitySelect, + TData = { + orgCapabilities: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgCapabilities: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilitiesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgCapabilitySelect, + OrgCapabilityFilter, + OrgCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityKeys.list(args), + queryFn: () => getClient().orgCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * const data = await fetchOrgCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgCapabilitiesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgCapabilitySelect>; +}): Promise<{ + orgCapabilities: ConnectionResult>; +}>; +export async function fetchOrgCapabilitiesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + OrgCapabilitySelect, + OrgCapabilityFilter, + OrgCapabilityOrderBy + >(params.selection); + return getClient().orgCapability.findMany(args).unwrap(); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * await prefetchOrgCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgCapabilitySelect>; + } +): Promise; +export async function prefetchOrgCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + OrgCapabilitySelect, + OrgCapabilityFilter, + OrgCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityKeys.list(args), + queryFn: () => getClient().orgCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilitiesQuery.ts new file mode 100644 index 0000000000..34e77b894e --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilitiesQuery.ts @@ -0,0 +1,194 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { orgCapabilityDefaultCapabilityKeys } from '../query-keys'; +import type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilityDefaultCapabilitiesQueryKey = orgCapabilityDefaultCapabilityKeys.list; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilityDefaultCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgCapabilityDefaultCapabilitiesQuery< + S extends OrgCapabilityDefaultCapabilitySelect, + TData = { + orgCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilityDefaultCapabilitiesQuery( + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityDefaultCapabilityKeys.list(args), + queryFn: () => getClient().orgCapabilityDefaultCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * const data = await fetchOrgCapabilityDefaultCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgCapabilityDefaultCapabilitiesQuery< + S extends OrgCapabilityDefaultCapabilitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; +}): Promise<{ + orgCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchOrgCapabilityDefaultCapabilitiesQuery(params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >(params.selection); + return getClient().orgCapabilityDefaultCapability.findMany(args).unwrap(); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * await prefetchOrgCapabilityDefaultCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgCapabilityDefaultCapabilitiesQuery< + S extends OrgCapabilityDefaultCapabilitySelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } +): Promise; +export async function prefetchOrgCapabilityDefaultCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityDefaultCapabilityKeys.list(args), + queryFn: () => getClient().orgCapabilityDefaultCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilityQuery.ts new file mode 100644 index 0000000000..15305aebdd --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultCapabilityQuery.ts @@ -0,0 +1,157 @@ +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * @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 { orgCapabilityDefaultCapabilityKeys } from '../query-keys'; +import type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilityDefaultCapabilityQueryKey = orgCapabilityDefaultCapabilityKeys.detail; +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilityDefaultCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgCapabilityDefaultCapabilityQuery< + S extends OrgCapabilityDefaultCapabilitySelect, + TData = { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilityDefaultCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityDefaultCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * const data = await fetchOrgCapabilityDefaultCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgCapabilityDefaultCapabilityQuery< + S extends OrgCapabilityDefaultCapabilitySelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; +}): Promise<{ + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; +}>; +export async function fetchOrgCapabilityDefaultCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask + * + * @example + * ```ts + * await prefetchOrgCapabilityDefaultCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgCapabilityDefaultCapabilityQuery< + S extends OrgCapabilityDefaultCapabilitySelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilityDefaultCapabilitySelect>; + } +): Promise; +export async function prefetchOrgCapabilityDefaultCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityDefaultCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgCapabilityDefaultCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantQuery.ts similarity index 50% rename from sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantQuery.ts rename to sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantQuery.ts index 1d596eba6e..f55cb45ef9 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantQuery.ts @@ -1,5 +1,5 @@ /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,45 +9,45 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultGrantKeys } from '../query-keys'; +import { orgCapabilityDefaultGrantKeys } from '../query-keys'; import type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultGrantQueryKey = appPermissionDefaultGrantKeys.detail; +export const orgCapabilityDefaultGrantQueryKey = orgCapabilityDefaultGrantKeys.detail; /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```tsx - * const { data, isLoading } = useAppPermissionDefaultGrantQuery({ + * const { data, isLoading } = useOrgCapabilityDefaultGrantQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function useAppPermissionDefaultGrantQuery< - S extends AppPermissionDefaultGrantSelect, +export function useOrgCapabilityDefaultGrantQuery< + S extends OrgCapabilityDefaultGrantSelect, TData = { - appPermissionDefaultGrant: InferSelectResult | null; + orgCapabilityDefaultGrant: InferSelectResult | null; }, >( params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; } & Omit< UseQueryOptions< { - appPermissionDefaultGrant: InferSelectResult< - AppPermissionDefaultGrantWithRelations, + orgCapabilityDefaultGrant: InferSelectResult< + OrgCapabilityDefaultGrantWithRelations, S > | null; }, @@ -57,20 +57,20 @@ export function useAppPermissionDefaultGrantQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function useAppPermissionDefaultGrantQuery( +export function useOrgCapabilityDefaultGrantQuery( params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: appPermissionDefaultGrantKeys.detail(params.id), + queryKey: orgCapabilityDefaultGrantKeys.detail(params.id), queryFn: () => getClient() - .appPermissionDefaultGrant.findOne({ + .orgCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) @@ -79,70 +79,70 @@ export function useAppPermissionDefaultGrantQuery( }); } /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```ts - * const data = await fetchAppPermissionDefaultGrantQuery({ + * const data = await fetchOrgCapabilityDefaultGrantQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchAppPermissionDefaultGrantQuery< - S extends AppPermissionDefaultGrantSelect, +export async function fetchOrgCapabilityDefaultGrantQuery< + S extends OrgCapabilityDefaultGrantSelect, >(params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; }): Promise<{ - appPermissionDefaultGrant: InferSelectResult | null; + orgCapabilityDefaultGrant: InferSelectResult | null; }>; -export async function fetchAppPermissionDefaultGrantQuery(params: { +export async function fetchOrgCapabilityDefaultGrantQuery(params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .appPermissionDefaultGrant.findOne({ + .orgCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Audit log of permission additions and removals from the defaults bitmask + * Audit log of capability additions and removals from the defaults bitmask * * @example * ```ts - * await prefetchAppPermissionDefaultGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchOrgCapabilityDefaultGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchAppPermissionDefaultGrantQuery< - S extends AppPermissionDefaultGrantSelect, +export async function prefetchOrgCapabilityDefaultGrantQuery< + S extends OrgCapabilityDefaultGrantSelect, >( queryClient: QueryClient, params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultGrantSelect>; + } & HookStrictSelect, OrgCapabilityDefaultGrantSelect>; } ): Promise; -export async function prefetchAppPermissionDefaultGrantQuery( +export async function prefetchOrgCapabilityDefaultGrantQuery( queryClient: QueryClient, params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultGrantKeys.detail(params.id), + queryKey: orgCapabilityDefaultGrantKeys.detail(params.id), queryFn: () => getClient() - .appPermissionDefaultGrant.findOne({ + .orgCapabilityDefaultGrant.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantsQuery.ts new file mode 100644 index 0000000000..ad31bb3529 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultGrantsQuery.ts @@ -0,0 +1,182 @@ +/** + * Audit log of capability additions and removals from the defaults bitmask + * @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 { orgCapabilityDefaultGrantKeys } from '../query-keys'; +import type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilityDefaultGrantsQueryKey = orgCapabilityDefaultGrantKeys.list; +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilityDefaultGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgCapabilityDefaultGrantsQuery< + S extends OrgCapabilityDefaultGrantSelect, + TData = { + orgCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultGrantSelect>; + } & Omit< + UseQueryOptions< + { + orgCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilityDefaultGrantsQuery( + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityDefaultGrantKeys.list(args), + queryFn: () => getClient().orgCapabilityDefaultGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```ts + * const data = await fetchOrgCapabilityDefaultGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgCapabilityDefaultGrantsQuery< + S extends OrgCapabilityDefaultGrantSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultGrantSelect>; +}): Promise<{ + orgCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchOrgCapabilityDefaultGrantsQuery(params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >(params.selection); + return getClient().orgCapabilityDefaultGrant.findMany(args).unwrap(); +} +/** + * Audit log of capability additions and removals from the defaults bitmask + * + * @example + * ```ts + * await prefetchOrgCapabilityDefaultGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgCapabilityDefaultGrantsQuery< + S extends OrgCapabilityDefaultGrantSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultGrantSelect>; + } +): Promise; +export async function prefetchOrgCapabilityDefaultGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityDefaultGrantKeys.list(args), + queryFn: () => getClient().orgCapabilityDefaultGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultQuery.ts similarity index 51% rename from sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts rename to sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultQuery.ts index d7c76c2a3a..5b9dbb5ed5 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultQuery.ts @@ -1,5 +1,5 @@ /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,44 +9,44 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { appPermissionDefaultKeys } from '../query-keys'; +import { orgCapabilityDefaultKeys } from '../query-keys'; import type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - AppPermissionDefaultSelect, - AppPermissionDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const appPermissionDefaultQueryKey = appPermissionDefaultKeys.detail; +export const orgCapabilityDefaultQueryKey = orgCapabilityDefaultKeys.detail; /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```tsx - * const { data, isLoading } = useAppPermissionDefaultQuery({ + * const { data, isLoading } = useOrgCapabilityDefaultQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function useAppPermissionDefaultQuery< - S extends AppPermissionDefaultSelect, +export function useOrgCapabilityDefaultQuery< + S extends OrgCapabilityDefaultSelect, TData = { - appPermissionDefault: InferSelectResult | null; + orgCapabilityDefault: InferSelectResult | null; }, >( params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultSelect>; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; } & Omit< UseQueryOptions< { - appPermissionDefault: InferSelectResult | null; + orgCapabilityDefault: InferSelectResult | null; }, Error, TData @@ -54,20 +54,20 @@ export function useAppPermissionDefaultQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function useAppPermissionDefaultQuery( +export function useOrgCapabilityDefaultQuery( params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: appPermissionDefaultKeys.detail(params.id), + queryKey: orgCapabilityDefaultKeys.detail(params.id), queryFn: () => getClient() - .appPermissionDefault.findOne({ + .orgCapabilityDefault.findOne({ id: params.id, select: args.select, }) @@ -76,66 +76,66 @@ export function useAppPermissionDefaultQuery( }); } /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```ts - * const data = await fetchAppPermissionDefaultQuery({ + * const data = await fetchOrgCapabilityDefaultQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchAppPermissionDefaultQuery(params: { +export async function fetchOrgCapabilityDefaultQuery(params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultSelect>; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; }): Promise<{ - appPermissionDefault: InferSelectResult | null; + orgCapabilityDefault: InferSelectResult | null; }>; -export async function fetchAppPermissionDefaultQuery(params: { +export async function fetchOrgCapabilityDefaultQuery(params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .appPermissionDefault.findOne({ + .orgCapabilityDefault.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Stores the default permission bitmask assigned to new members upon joining + * Stores the default capability bitmask assigned to new members upon joining * * @example * ```ts - * await prefetchAppPermissionDefaultQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchOrgCapabilityDefaultQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchAppPermissionDefaultQuery( +export async function prefetchOrgCapabilityDefaultQuery( queryClient: QueryClient, params: { id: string; selection: { fields: S; - } & HookStrictSelect, AppPermissionDefaultSelect>; + } & HookStrictSelect, OrgCapabilityDefaultSelect>; } ): Promise; -export async function prefetchAppPermissionDefaultQuery( +export async function prefetchOrgCapabilityDefaultQuery( queryClient: QueryClient, params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: appPermissionDefaultKeys.detail(params.id), + queryKey: orgCapabilityDefaultKeys.detail(params.id), queryFn: () => getClient() - .appPermissionDefault.findOne({ + .orgCapabilityDefault.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultsQuery.ts new file mode 100644 index 0000000000..1624d3ad53 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityDefaultsQuery.ts @@ -0,0 +1,178 @@ +/** + * Stores the default capability bitmask assigned to new members upon joining + * @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 { orgCapabilityDefaultKeys } from '../query-keys'; +import type { + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilityDefaultsQueryKey = orgCapabilityDefaultKeys.list; +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilityDefaultsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgCapabilityDefaultsQuery< + S extends OrgCapabilityDefaultSelect, + TData = { + orgCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultSelect>; + } & Omit< + UseQueryOptions< + { + orgCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilityDefaultsQuery( + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityDefaultKeys.list(args), + queryFn: () => getClient().orgCapabilityDefault.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```ts + * const data = await fetchOrgCapabilityDefaultsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgCapabilityDefaultsQuery< + S extends OrgCapabilityDefaultSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultSelect>; +}): Promise<{ + orgCapabilityDefaults: ConnectionResult>; +}>; +export async function fetchOrgCapabilityDefaultsQuery(params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >(params.selection); + return getClient().orgCapabilityDefault.findMany(args).unwrap(); +} +/** + * Stores the default capability bitmask assigned to new members upon joining + * + * @example + * ```ts + * await prefetchOrgCapabilityDefaultsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgCapabilityDefaultsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgCapabilityDefaultSelect>; + } +): Promise; +export async function prefetchOrgCapabilityDefaultsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityDefaultKeys.list(args), + queryFn: () => getClient().orgCapabilityDefault.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityQuery.ts new file mode 100644 index 0000000000..66fdbdc523 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgCapabilityQuery.ts @@ -0,0 +1,138 @@ +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * @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 { orgCapabilityKeys } from '../query-keys'; +import type { OrgCapabilitySelect, OrgCapabilityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgCapabilitySelect, OrgCapabilityWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgCapabilityQueryKey = orgCapabilityKeys.detail; +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```tsx + * const { data, isLoading } = useOrgCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgCapabilityQuery< + S extends OrgCapabilitySelect, + TData = { + orgCapability: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgCapability: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * const data = await fetchOrgCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgCapabilityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilitySelect>; +}): Promise<{ + orgCapability: InferSelectResult | null; +}>; +export async function fetchOrgCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control + * + * @example + * ```ts + * await prefetchOrgCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgCapabilitySelect>; + } +): Promise; +export async function prefetchOrgCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts index 3d02f5cd44..6a13a7f145 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -16,7 +16,7 @@ export type { OrgGrantSelect, OrgGrantWithRelations } from '../../orm/input-type /** Query key factory - re-exported from query-keys.ts */ export const orgGrantQueryKey = orgGrantKeys.detail; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx @@ -70,7 +70,7 @@ export function useOrgGrantQuery( }); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts @@ -101,7 +101,7 @@ export async function fetchOrgGrantQuery(params: { .unwrap(); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantsQuery.ts index f402141302..d7ca4e0f8d 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantsQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantsQuery.ts @@ -1,5 +1,5 @@ /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const orgGrantsQueryKey = orgGrantKeys.list; /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```tsx @@ -84,7 +84,7 @@ export function useOrgGrantsQuery( }); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts @@ -113,7 +113,7 @@ export async function fetchOrgGrantsQuery(params: { return getClient().orgGrant.findMany(args).unwrap(); } /** - * Records of individual permission grants and revocations for members via bitmask + * Records of individual capability grants and revocations for members via bitmask * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfileQuery.ts new file mode 100644 index 0000000000..500bfd3d2c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfileQuery.ts @@ -0,0 +1,144 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { orgMembershipProfileKeys } from '../query-keys'; +import type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMembershipProfileQueryKey = orgMembershipProfileKeys.detail; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMembershipProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgMembershipProfileQuery< + S extends OrgMembershipProfileSelect, + TData = { + orgMembershipProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMembershipProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMembershipProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMembershipProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMembershipProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * const data = await fetchOrgMembershipProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgMembershipProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMembershipProfileSelect>; +}): Promise<{ + orgMembershipProfile: InferSelectResult | null; +}>; +export async function fetchOrgMembershipProfileQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * await prefetchOrgMembershipProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgMembershipProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMembershipProfileSelect>; + } +): Promise; +export async function prefetchOrgMembershipProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMembershipProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMembershipProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfilesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfilesQuery.ts new file mode 100644 index 0000000000..dd3c628cb6 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipProfilesQuery.ts @@ -0,0 +1,178 @@ +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * @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 { orgMembershipProfileKeys } from '../query-keys'; +import type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgMembershipProfileSelect, + OrgMembershipProfileWithRelations, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMembershipProfilesQueryKey = orgMembershipProfileKeys.list; +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMembershipProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgMembershipProfilesQuery< + S extends OrgMembershipProfileSelect, + TData = { + orgMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgMembershipProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMembershipProfilesQuery( + params: { + selection: ListSelectionConfig< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMembershipProfileKeys.list(args), + queryFn: () => getClient().orgMembershipProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * const data = await fetchOrgMembershipProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgMembershipProfilesQuery< + S extends OrgMembershipProfileSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgMembershipProfileSelect>; +}): Promise<{ + orgMembershipProfiles: ConnectionResult>; +}>; +export async function fetchOrgMembershipProfilesQuery(params: { + selection: ListSelectionConfig< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >(params.selection); + return getClient().orgMembershipProfile.findMany(args).unwrap(); +} +/** + * Every profile a membership holds; memberships.profile_id points at one of them + * + * @example + * ```ts + * await prefetchOrgMembershipProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgMembershipProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgMembershipProfileSelect>; + } +): Promise; +export async function prefetchOrgMembershipProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMembershipProfileKeys.list(args), + queryFn: () => getClient().orgMembershipProfile.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts index c251c5b23b..726bca9932 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -16,7 +16,7 @@ export type { OrgMembershipSelect, OrgMembershipWithRelations } from '../../orm/ /** Query key factory - re-exported from query-keys.ts */ export const orgMembershipQueryKey = orgMembershipKeys.detail; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx @@ -70,7 +70,7 @@ export function useOrgMembershipQuery( }); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts @@ -101,7 +101,7 @@ export async function fetchOrgMembershipQuery(params: { .unwrap(); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipsQuery.ts index 2e620b4850..bdf0c4dd65 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipsQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipsQuery.ts @@ -1,5 +1,5 @@ /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const orgMembershipsQueryKey = orgMembershipKeys.list; /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```tsx @@ -86,7 +86,7 @@ export function useOrgMembershipsQuery( }); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts @@ -117,7 +117,7 @@ export async function fetchOrgMembershipsQuery(params: { return getClient().orgMembership.findMany(args).unwrap(); } /** - * Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status + * Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status * * @example * ```ts diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantsQuery.ts deleted file mode 100644 index 606103b3e7..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultGrantsQuery.ts +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Audit log of permission additions and removals from the defaults bitmask - * @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 { orgPermissionDefaultGrantKeys } from '../query-keys'; -import type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultGrantsQueryKey = orgPermissionDefaultGrantKeys.list; -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultGrantsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useOrgPermissionDefaultGrantsQuery< - S extends OrgPermissionDefaultGrantSelect, - TData = { - orgPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultGrantSelect>; - } & Omit< - UseQueryOptions< - { - orgPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionDefaultGrantsQuery( - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionDefaultGrantKeys.list(args), - queryFn: () => getClient().orgPermissionDefaultGrant.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```ts - * const data = await fetchOrgPermissionDefaultGrantsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchOrgPermissionDefaultGrantsQuery< - S extends OrgPermissionDefaultGrantSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultGrantSelect>; -}): Promise<{ - orgPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; -}>; -export async function fetchOrgPermissionDefaultGrantsQuery(params: { - selection: ListSelectionConfig< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >; -}) { - const args = buildListSelectionArgs< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >(params.selection); - return getClient().orgPermissionDefaultGrant.findMany(args).unwrap(); -} -/** - * Audit log of permission additions and removals from the defaults bitmask - * - * @example - * ```ts - * await prefetchOrgPermissionDefaultGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchOrgPermissionDefaultGrantsQuery< - S extends OrgPermissionDefaultGrantSelect, ->( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultGrantSelect>; - } -): Promise; -export async function prefetchOrgPermissionDefaultGrantsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultGrantKeys.list(args), - queryFn: () => getClient().orgPermissionDefaultGrant.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionQuery.ts deleted file mode 100644 index a8d75d8141..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionQuery.ts +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { orgPermissionDefaultPermissionKeys } from '../query-keys'; -import type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultPermissionQueryKey = orgPermissionDefaultPermissionKeys.detail; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useOrgPermissionDefaultPermissionQuery< - S extends OrgPermissionDefaultPermissionSelect, - TData = { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } & Omit< - UseQueryOptions< - { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionDefaultPermissionQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionDefaultPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .orgPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * const data = await fetchOrgPermissionDefaultPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchOrgPermissionDefaultPermissionQuery< - S extends OrgPermissionDefaultPermissionSelect, ->(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; -}): Promise<{ - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; -}>; -export async function fetchOrgPermissionDefaultPermissionQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .orgPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * await prefetchOrgPermissionDefaultPermissionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchOrgPermissionDefaultPermissionQuery< - S extends OrgPermissionDefaultPermissionSelect, ->( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } -): Promise; -export async function prefetchOrgPermissionDefaultPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .orgPermissionDefaultPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionsQuery.ts deleted file mode 100644 index 331c112c08..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultPermissionsQuery.ts +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * @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 { orgPermissionDefaultPermissionKeys } from '../query-keys'; -import type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultPermissionsQueryKey = orgPermissionDefaultPermissionKeys.list; -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultPermissionsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useOrgPermissionDefaultPermissionsQuery< - S extends OrgPermissionDefaultPermissionSelect, - TData = { - orgPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } & Omit< - UseQueryOptions< - { - orgPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionDefaultPermissionsQuery( - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionDefaultPermissionKeys.list(args), - queryFn: () => getClient().orgPermissionDefaultPermission.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * const data = await fetchOrgPermissionDefaultPermissionsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchOrgPermissionDefaultPermissionsQuery< - S extends OrgPermissionDefaultPermissionSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultPermissionSelect>; -}): Promise<{ - orgPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; -}>; -export async function fetchOrgPermissionDefaultPermissionsQuery(params: { - selection: ListSelectionConfig< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >; -}) { - const args = buildListSelectionArgs< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >(params.selection); - return getClient().orgPermissionDefaultPermission.findMany(args).unwrap(); -} -/** - * Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask - * - * @example - * ```ts - * await prefetchOrgPermissionDefaultPermissionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchOrgPermissionDefaultPermissionsQuery< - S extends OrgPermissionDefaultPermissionSelect, ->( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultPermissionSelect>; - } -): Promise; -export async function prefetchOrgPermissionDefaultPermissionsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultPermissionKeys.list(args), - queryFn: () => getClient().orgPermissionDefaultPermission.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultsQuery.ts deleted file mode 100644 index 8bbff22406..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultsQuery.ts +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Stores the default permission bitmask assigned to new members upon joining - * @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 { orgPermissionDefaultKeys } from '../query-keys'; -import type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - OrgPermissionDefaultSelect, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionDefaultsQueryKey = orgPermissionDefaultKeys.list; -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionDefaultsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useOrgPermissionDefaultsQuery< - S extends OrgPermissionDefaultSelect, - TData = { - orgPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultSelect>; - } & Omit< - UseQueryOptions< - { - orgPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionDefaultsQuery( - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionDefaultKeys.list(args), - queryFn: () => getClient().orgPermissionDefault.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```ts - * const data = await fetchOrgPermissionDefaultsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchOrgPermissionDefaultsQuery< - S extends OrgPermissionDefaultSelect, ->(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultSelect>; -}): Promise<{ - orgPermissionDefaults: ConnectionResult>; -}>; -export async function fetchOrgPermissionDefaultsQuery(params: { - selection: ListSelectionConfig< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >; -}) { - const args = buildListSelectionArgs< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >(params.selection); - return getClient().orgPermissionDefault.findMany(args).unwrap(); -} -/** - * Stores the default permission bitmask assigned to new members upon joining - * - * @example - * ```ts - * await prefetchOrgPermissionDefaultsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchOrgPermissionDefaultsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, OrgPermissionDefaultSelect>; - } -): Promise; -export async function prefetchOrgPermissionDefaultsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionDefaultKeys.list(args), - queryFn: () => getClient().orgPermissionDefault.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts deleted file mode 100644 index 4407aaeddb..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { orgPermissionKeys } from '../query-keys'; -import type { OrgPermissionSelect, OrgPermissionWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { OrgPermissionSelect, OrgPermissionWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionQueryKey = orgPermissionKeys.detail; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useOrgPermissionQuery< - S extends OrgPermissionSelect, - TData = { - orgPermission: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionSelect>; - } & Omit< - UseQueryOptions< - { - orgPermission: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .orgPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * const data = await fetchOrgPermissionQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchOrgPermissionQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionSelect>; -}): Promise<{ - orgPermission: InferSelectResult | null; -}>; -export async function fetchOrgPermissionQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .orgPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * await prefetchOrgPermissionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchOrgPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, OrgPermissionSelect>; - } -): Promise; -export async function prefetchOrgPermissionQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionKeys.detail(params.id), - queryFn: () => - getClient() - .orgPermission.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetByMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetByMaskQuery.ts deleted file mode 100644 index db38f6b5eb..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetByMaskQuery.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Custom query hook for orgPermissionsGetByMask - * @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 { OrgPermissionsGetByMaskVariables } from '../../orm/query'; -import type { OrgPermissionConnection } from '../../orm/input-types'; -export type { OrgPermissionsGetByMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionsGetByMaskQueryKey = customQueryKeys.orgPermissionsGetByMask; -/** - * Reads and enables pagination through a set of `OrgPermission`. - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionsGetByMaskQuery({ variables: { after, first, mask, offset } }); - * - * if (data?.orgPermissionsGetByMask) { - * console.log(data.orgPermissionsGetByMask); - * } - * ``` - */ -export function useOrgPermissionsGetByMaskQuery< - TData = { - orgPermissionsGetByMask: OrgPermissionConnection | null; - }, ->( - params?: { - variables?: OrgPermissionsGetByMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetByMask: OrgPermissionConnection | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionsGetByMaskQuery< - TData = { - orgPermissionsGetByMask: OrgPermissionConnection | null; - }, ->( - params?: { - variables?: OrgPermissionsGetByMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetByMask: OrgPermissionConnection | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: orgPermissionsGetByMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetByMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch orgPermissionsGetByMask without React hooks - * - * @example - * ```ts - * const data = await fetchOrgPermissionsGetByMaskQuery({ variables: { after, first, mask, offset } }); - * ``` - */ -export async function fetchOrgPermissionsGetByMaskQuery(params?: { - variables?: OrgPermissionsGetByMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.orgPermissionsGetByMask(variables).unwrap(); -} -/** - * Prefetch orgPermissionsGetByMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchOrgPermissionsGetByMaskQuery(queryClient, { variables: { after, first, mask, offset } }); - * ``` - */ -export async function prefetchOrgPermissionsGetByMaskQuery( - queryClient: QueryClient, - params?: { - variables?: OrgPermissionsGetByMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: orgPermissionsGetByMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetByMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskByNamesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskByNamesQuery.ts deleted file mode 100644 index 99199bceeb..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskByNamesQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for orgPermissionsGetMaskByNames - * @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 { OrgPermissionsGetMaskByNamesVariables } from '../../orm/query'; -export type { OrgPermissionsGetMaskByNamesVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionsGetMaskByNamesQueryKey = customQueryKeys.orgPermissionsGetMaskByNames; -/** - * Query hook for orgPermissionsGetMaskByNames - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionsGetMaskByNamesQuery({ variables: { names } }); - * - * if (data?.orgPermissionsGetMaskByNames) { - * console.log(data.orgPermissionsGetMaskByNames); - * } - * ``` - */ -export function useOrgPermissionsGetMaskByNamesQuery< - TData = { - orgPermissionsGetMaskByNames: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetMaskByNamesVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetMaskByNames: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionsGetMaskByNamesQuery< - TData = { - orgPermissionsGetMaskByNames: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetMaskByNamesVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetMaskByNames: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: orgPermissionsGetMaskByNamesQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetMaskByNames(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch orgPermissionsGetMaskByNames without React hooks - * - * @example - * ```ts - * const data = await fetchOrgPermissionsGetMaskByNamesQuery({ variables: { names } }); - * ``` - */ -export async function fetchOrgPermissionsGetMaskByNamesQuery(params?: { - variables?: OrgPermissionsGetMaskByNamesVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.orgPermissionsGetMaskByNames(variables).unwrap(); -} -/** - * Prefetch orgPermissionsGetMaskByNames for SSR or cache warming - * - * @example - * ```ts - * await prefetchOrgPermissionsGetMaskByNamesQuery(queryClient, { variables: { names } }); - * ``` - */ -export async function prefetchOrgPermissionsGetMaskByNamesQuery( - queryClient: QueryClient, - params?: { - variables?: OrgPermissionsGetMaskByNamesVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: orgPermissionsGetMaskByNamesQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetMaskByNames(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskQuery.ts deleted file mode 100644 index dad45181bf..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetMaskQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for orgPermissionsGetMask - * @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 { OrgPermissionsGetMaskVariables } from '../../orm/query'; -export type { OrgPermissionsGetMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionsGetMaskQueryKey = customQueryKeys.orgPermissionsGetMask; -/** - * Query hook for orgPermissionsGetMask - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionsGetMaskQuery({ variables: { ids } }); - * - * if (data?.orgPermissionsGetMask) { - * console.log(data.orgPermissionsGetMask); - * } - * ``` - */ -export function useOrgPermissionsGetMaskQuery< - TData = { - orgPermissionsGetMask: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionsGetMaskQuery< - TData = { - orgPermissionsGetMask: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: orgPermissionsGetMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch orgPermissionsGetMask without React hooks - * - * @example - * ```ts - * const data = await fetchOrgPermissionsGetMaskQuery({ variables: { ids } }); - * ``` - */ -export async function fetchOrgPermissionsGetMaskQuery(params?: { - variables?: OrgPermissionsGetMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.orgPermissionsGetMask(variables).unwrap(); -} -/** - * Prefetch orgPermissionsGetMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchOrgPermissionsGetMaskQuery(queryClient, { variables: { ids } }); - * ``` - */ -export async function prefetchOrgPermissionsGetMaskQuery( - queryClient: QueryClient, - params?: { - variables?: OrgPermissionsGetMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: orgPermissionsGetMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetPaddedMaskQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetPaddedMaskQuery.ts deleted file mode 100644 index 4b4f80e725..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsGetPaddedMaskQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for orgPermissionsGetPaddedMask - * @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 { OrgPermissionsGetPaddedMaskVariables } from '../../orm/query'; -export type { OrgPermissionsGetPaddedMaskVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionsGetPaddedMaskQueryKey = customQueryKeys.orgPermissionsGetPaddedMask; -/** - * Query hook for orgPermissionsGetPaddedMask - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionsGetPaddedMaskQuery({ variables: { mask } }); - * - * if (data?.orgPermissionsGetPaddedMask) { - * console.log(data.orgPermissionsGetPaddedMask); - * } - * ``` - */ -export function useOrgPermissionsGetPaddedMaskQuery< - TData = { - orgPermissionsGetPaddedMask: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetPaddedMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetPaddedMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionsGetPaddedMaskQuery< - TData = { - orgPermissionsGetPaddedMask: string | null; - }, ->( - params?: { - variables?: OrgPermissionsGetPaddedMaskVariables; - } & Omit< - UseQueryOptions< - { - orgPermissionsGetPaddedMask: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: orgPermissionsGetPaddedMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetPaddedMask(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch orgPermissionsGetPaddedMask without React hooks - * - * @example - * ```ts - * const data = await fetchOrgPermissionsGetPaddedMaskQuery({ variables: { mask } }); - * ``` - */ -export async function fetchOrgPermissionsGetPaddedMaskQuery(params?: { - variables?: OrgPermissionsGetPaddedMaskVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.orgPermissionsGetPaddedMask(variables).unwrap(); -} -/** - * Prefetch orgPermissionsGetPaddedMask for SSR or cache warming - * - * @example - * ```ts - * await prefetchOrgPermissionsGetPaddedMaskQuery(queryClient, { variables: { mask } }); - * ``` - */ -export async function prefetchOrgPermissionsGetPaddedMaskQuery( - queryClient: QueryClient, - params?: { - variables?: OrgPermissionsGetPaddedMaskVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: orgPermissionsGetPaddedMaskQueryKey(variables), - queryFn: () => getClient().query.orgPermissionsGetPaddedMask(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsQuery.ts deleted file mode 100644 index b5272fe6fe..0000000000 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionsQuery.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * @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 { orgPermissionKeys } from '../query-keys'; -import type { - OrgPermissionSelect, - OrgPermissionWithRelations, - OrgPermissionFilter, - OrgPermissionOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - OrgPermissionSelect, - OrgPermissionWithRelations, - OrgPermissionFilter, - OrgPermissionOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const orgPermissionsQueryKey = orgPermissionKeys.list; -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```tsx - * const { data, isLoading } = useOrgPermissionsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useOrgPermissionsQuery< - S extends OrgPermissionSelect, - TData = { - orgPermissions: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, OrgPermissionSelect>; - } & Omit< - UseQueryOptions< - { - orgPermissions: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useOrgPermissionsQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - OrgPermissionSelect, - OrgPermissionFilter, - OrgPermissionOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: orgPermissionKeys.list(args), - queryFn: () => getClient().orgPermission.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * const data = await fetchOrgPermissionsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchOrgPermissionsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, OrgPermissionSelect>; -}): Promise<{ - orgPermissions: ConnectionResult>; -}>; -export async function fetchOrgPermissionsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs< - OrgPermissionSelect, - OrgPermissionFilter, - OrgPermissionOrderBy - >(params.selection); - return getClient().orgPermission.findMany(args).unwrap(); -} -/** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control - * - * @example - * ```ts - * await prefetchOrgPermissionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchOrgPermissionsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, OrgPermissionSelect>; - } -): Promise; -export async function prefetchOrgPermissionsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs< - OrgPermissionSelect, - OrgPermissionFilter, - OrgPermissionOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: orgPermissionKeys.list(args), - queryFn: () => getClient().orgPermission.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilitiesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilitiesQuery.ts new file mode 100644 index 0000000000..1b723aa67a --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilitiesQuery.ts @@ -0,0 +1,178 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { orgProfileCapabilityKeys } from '../query-keys'; +import type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileCapabilitiesQueryKey = orgProfileCapabilityKeys.list; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileCapabilitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgProfileCapabilitiesQuery< + S extends OrgProfileCapabilitySelect, + TData = { + orgProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileCapabilitiesQuery( + params: { + selection: ListSelectionConfig< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileCapabilityKeys.list(args), + queryFn: () => getClient().orgProfileCapability.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * const data = await fetchOrgProfileCapabilitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgProfileCapabilitiesQuery< + S extends OrgProfileCapabilitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileCapabilitySelect>; +}): Promise<{ + orgProfileCapabilities: ConnectionResult>; +}>; +export async function fetchOrgProfileCapabilitiesQuery(params: { + selection: ListSelectionConfig< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >(params.selection); + return getClient().orgProfileCapability.findMany(args).unwrap(); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * await prefetchOrgProfileCapabilitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgProfileCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileCapabilitySelect>; + } +): Promise; +export async function prefetchOrgProfileCapabilitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileCapabilityKeys.list(args), + queryFn: () => getClient().orgProfileCapability.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilityQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilityQuery.ts new file mode 100644 index 0000000000..3a7f290b0f --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileCapabilityQuery.ts @@ -0,0 +1,144 @@ +/** + * Join table linking profiles to individual capabilities they include + * @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 { orgProfileCapabilityKeys } from '../query-keys'; +import type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileCapabilitySelect, + OrgProfileCapabilityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileCapabilityQueryKey = orgProfileCapabilityKeys.detail; +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgProfileCapabilityQuery< + S extends OrgProfileCapabilitySelect, + TData = { + orgProfileCapability: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileCapabilitySelect>; + } & Omit< + UseQueryOptions< + { + orgProfileCapability: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileCapabilityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * const data = await fetchOrgProfileCapabilityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgProfileCapabilityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileCapabilitySelect>; +}): Promise<{ + orgProfileCapability: InferSelectResult | null; +}>; +export async function fetchOrgProfileCapabilityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Join table linking profiles to individual capabilities they include + * + * @example + * ```ts + * await prefetchOrgProfileCapabilityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgProfileCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileCapabilitySelect>; + } +): Promise; +export async function prefetchOrgProfileCapabilityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileCapabilityKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileCapability.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantQuery.ts new file mode 100644 index 0000000000..e538ced00d --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantQuery.ts @@ -0,0 +1,151 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { orgProfileDefinitionGrantKeys } from '../query-keys'; +import type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileDefinitionGrantQueryKey = orgProfileDefinitionGrantKeys.detail; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileDefinitionGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgProfileDefinitionGrantQuery< + S extends OrgProfileDefinitionGrantSelect, + TData = { + orgProfileDefinitionGrant: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileDefinitionGrant: InferSelectResult< + OrgProfileDefinitionGrantWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileDefinitionGrantQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileDefinitionGrantKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * const data = await fetchOrgProfileDefinitionGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgProfileDefinitionGrantQuery< + S extends OrgProfileDefinitionGrantSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; +}): Promise<{ + orgProfileDefinitionGrant: InferSelectResult | null; +}>; +export async function fetchOrgProfileDefinitionGrantQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * await prefetchOrgProfileDefinitionGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgProfileDefinitionGrantQuery< + S extends OrgProfileDefinitionGrantSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } +): Promise; +export async function prefetchOrgProfileDefinitionGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileDefinitionGrantKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileDefinitionGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantsQuery.ts new file mode 100644 index 0000000000..94b8c57686 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileDefinitionGrantsQuery.ts @@ -0,0 +1,182 @@ +/** + * Audit log of capability additions and removals from profile definitions + * @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 { orgProfileDefinitionGrantKeys } from '../query-keys'; +import type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileDefinitionGrantsQueryKey = orgProfileDefinitionGrantKeys.list; +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileDefinitionGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgProfileDefinitionGrantsQuery< + S extends OrgProfileDefinitionGrantSelect, + TData = { + orgProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileDefinitionGrantsQuery( + params: { + selection: ListSelectionConfig< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileDefinitionGrantKeys.list(args), + queryFn: () => getClient().orgProfileDefinitionGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * const data = await fetchOrgProfileDefinitionGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgProfileDefinitionGrantsQuery< + S extends OrgProfileDefinitionGrantSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileDefinitionGrantSelect>; +}): Promise<{ + orgProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchOrgProfileDefinitionGrantsQuery(params: { + selection: ListSelectionConfig< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >(params.selection); + return getClient().orgProfileDefinitionGrant.findMany(args).unwrap(); +} +/** + * Audit log of capability additions and removals from profile definitions + * + * @example + * ```ts + * await prefetchOrgProfileDefinitionGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgProfileDefinitionGrantsQuery< + S extends OrgProfileDefinitionGrantSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileDefinitionGrantSelect>; + } +): Promise; +export async function prefetchOrgProfileDefinitionGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileDefinitionGrantKeys.list(args), + queryFn: () => getClient().orgProfileDefinitionGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantQuery.ts new file mode 100644 index 0000000000..488088dfdf --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantQuery.ts @@ -0,0 +1,138 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { orgProfileGrantKeys } from '../query-keys'; +import type { OrgProfileGrantSelect, OrgProfileGrantWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgProfileGrantSelect, OrgProfileGrantWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileGrantQueryKey = orgProfileGrantKeys.detail; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgProfileGrantQuery< + S extends OrgProfileGrantSelect, + TData = { + orgProfileGrant: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileGrantSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileGrant: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileGrantQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileGrantKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * const data = await fetchOrgProfileGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgProfileGrantQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileGrantSelect>; +}): Promise<{ + orgProfileGrant: InferSelectResult | null; +}>; +export async function fetchOrgProfileGrantQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * await prefetchOrgProfileGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgProfileGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileGrantSelect>; + } +): Promise; +export async function prefetchOrgProfileGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileGrantKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantsQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantsQuery.ts new file mode 100644 index 0000000000..cb5522bb17 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileGrantsQuery.ts @@ -0,0 +1,163 @@ +/** + * Audit log of profile assignments and revocations for members + * @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 { orgProfileGrantKeys } from '../query-keys'; +import type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgProfileGrantSelect, + OrgProfileGrantWithRelations, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileGrantsQueryKey = orgProfileGrantKeys.list; +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgProfileGrantsQuery< + S extends OrgProfileGrantSelect, + TData = { + orgProfileGrants: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileGrantSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileGrants: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileGrantsQuery( + params: { + selection: ListSelectionConfig< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileGrantKeys.list(args), + queryFn: () => getClient().orgProfileGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * const data = await fetchOrgProfileGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgProfileGrantsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileGrantSelect>; +}): Promise<{ + orgProfileGrants: ConnectionResult>; +}>; +export async function fetchOrgProfileGrantsQuery(params: { + selection: ListSelectionConfig< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >(params.selection); + return getClient().orgProfileGrant.findMany(args).unwrap(); +} +/** + * Audit log of profile assignments and revocations for members + * + * @example + * ```ts + * await prefetchOrgProfileGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgProfileGrantsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileGrantSelect>; + } +): Promise; +export async function prefetchOrgProfileGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileGrantKeys.list(args), + queryFn: () => getClient().orgProfileGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileQuery.ts new file mode 100644 index 0000000000..860d95dd48 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileQuery.ts @@ -0,0 +1,138 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { orgProfileKeys } from '../query-keys'; +import type { OrgProfileSelect, OrgProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgProfileSelect, OrgProfileWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileQueryKey = orgProfileKeys.detail; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgProfileQuery< + S extends OrgProfileSelect, + TData = { + orgProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * const data = await fetchOrgProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileSelect>; +}): Promise<{ + orgProfile: InferSelectResult | null; +}>; +export async function fetchOrgProfileQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * await prefetchOrgProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileSelect>; + } +): Promise; +export async function prefetchOrgProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplateQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplateQuery.ts new file mode 100644 index 0000000000..32088d302c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplateQuery.ts @@ -0,0 +1,144 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { orgProfileTemplateKeys } from '../query-keys'; +import type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileTemplateQueryKey = orgProfileTemplateKeys.detail; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileTemplateQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgProfileTemplateQuery< + S extends OrgProfileTemplateSelect, + TData = { + orgProfileTemplate: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileTemplateSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileTemplate: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileTemplateQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileTemplateKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * const data = await fetchOrgProfileTemplateQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgProfileTemplateQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileTemplateSelect>; +}): Promise<{ + orgProfileTemplate: InferSelectResult | null; +}>; +export async function fetchOrgProfileTemplateQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * await prefetchOrgProfileTemplateQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgProfileTemplateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgProfileTemplateSelect>; + } +): Promise; +export async function prefetchOrgProfileTemplateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileTemplateKeys.detail(params.id), + queryFn: () => + getClient() + .orgProfileTemplate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplatesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplatesQuery.ts new file mode 100644 index 0000000000..eaaf07d376 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfileTemplatesQuery.ts @@ -0,0 +1,171 @@ +/** + * Template profiles that are automatically seeded into new entities when created + * @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 { orgProfileTemplateKeys } from '../query-keys'; +import type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgProfileTemplateSelect, + OrgProfileTemplateWithRelations, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfileTemplatesQueryKey = orgProfileTemplateKeys.list; +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfileTemplatesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgProfileTemplatesQuery< + S extends OrgProfileTemplateSelect, + TData = { + orgProfileTemplates: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileTemplateSelect>; + } & Omit< + UseQueryOptions< + { + orgProfileTemplates: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfileTemplatesQuery( + params: { + selection: ListSelectionConfig< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileTemplateKeys.list(args), + queryFn: () => getClient().orgProfileTemplate.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * const data = await fetchOrgProfileTemplatesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgProfileTemplatesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileTemplateSelect>; +}): Promise<{ + orgProfileTemplates: ConnectionResult>; +}>; +export async function fetchOrgProfileTemplatesQuery(params: { + selection: ListSelectionConfig< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >(params.selection); + return getClient().orgProfileTemplate.findMany(args).unwrap(); +} +/** + * Template profiles that are automatically seeded into new entities when created + * + * @example + * ```ts + * await prefetchOrgProfileTemplatesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgProfileTemplatesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OrgProfileTemplateSelect>; + } +): Promise; +export async function prefetchOrgProfileTemplatesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgProfileTemplateKeys.list(args), + queryFn: () => getClient().orgProfileTemplate.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgProfilesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfilesQuery.ts new file mode 100644 index 0000000000..94d637108d --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgProfilesQuery.ts @@ -0,0 +1,145 @@ +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * @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 { orgProfileKeys } from '../query-keys'; +import type { + OrgProfileSelect, + OrgProfileWithRelations, + OrgProfileFilter, + OrgProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgProfileSelect, + OrgProfileWithRelations, + OrgProfileFilter, + OrgProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgProfilesQueryKey = orgProfileKeys.list; +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```tsx + * const { data, isLoading } = useOrgProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgProfilesQuery< + S extends OrgProfileSelect, + TData = { + orgProfiles: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgProfiles: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgProfilesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgProfileKeys.list(args), + queryFn: () => getClient().orgProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * const data = await fetchOrgProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgProfilesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileSelect>; +}): Promise<{ + orgProfiles: ConnectionResult>; +}>; +export async function fetchOrgProfilesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().orgProfile.findMany(args).unwrap(); +} +/** + * Named capability bundles (roles) that group multiple capabilities into reusable profiles + * + * @example + * ```ts + * await prefetchOrgProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgProfileSelect>; + } +): Promise; +export async function prefetchOrgProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: orgProfileKeys.list(args), + queryFn: () => getClient().orgProfile.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 fc847018db..b9dba76e38 100644 --- a/sdk/constructive-react/src/admin/hooks/query-keys.ts +++ b/sdk/constructive-react/src/admin/hooks/query-keys.ts @@ -28,6 +28,45 @@ export const appAdminGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...appAdminGrantKeys.details(), id] as const, } as const; +export const appCapabilityKeys = { + /** All appCapability queries */ all: ['appcapability'] as const, + /** List query keys */ lists: () => [...appCapabilityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appCapabilityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appCapabilityKeys.details(), id] as const, +} as const; +export const appCapabilityDefaultCapabilityKeys = { + /** All appCapabilityDefaultCapability queries */ all: [ + 'appcapabilitydefaultcapability', + ] as const, + /** List query keys */ lists: () => [...appCapabilityDefaultCapabilityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appCapabilityDefaultCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => + [...appCapabilityDefaultCapabilityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appCapabilityDefaultCapabilityKeys.details(), id] as const, +} as const; +export const appCapabilityDefaultKeys = { + /** All appCapabilityDefault queries */ all: ['appcapabilitydefault'] as const, + /** List query keys */ lists: () => [...appCapabilityDefaultKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appCapabilityDefaultKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appCapabilityDefaultKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appCapabilityDefaultKeys.details(), id] as const, +} as const; +export const appCapabilityDefaultGrantKeys = { + /** All appCapabilityDefaultGrant queries */ all: ['appcapabilitydefaultgrant'] as const, + /** List query keys */ lists: () => [...appCapabilityDefaultGrantKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appCapabilityDefaultGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appCapabilityDefaultGrantKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appCapabilityDefaultGrantKeys.details(), id] as const, +} as const; export const appClaimedInviteKeys = { /** All appClaimedInvite queries */ all: ['appclaimedinvite'] as const, /** List query keys */ lists: () => [...appClaimedInviteKeys.all, 'list'] as const, @@ -73,6 +112,15 @@ export const appMembershipDefaultKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...appMembershipDefaultKeys.details(), id] as const, } as const; +export const appMembershipProfileKeys = { + /** All appMembershipProfile queries */ all: ['appmembershipprofile'] as const, + /** List query keys */ lists: () => [...appMembershipProfileKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appMembershipProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appMembershipProfileKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appMembershipProfileKeys.details(), id] as const, +} as const; export const appOwnerGrantKeys = { /** All appOwnerGrant queries */ all: ['appownergrant'] as const, /** List query keys */ lists: () => [...appOwnerGrantKeys.all, 'list'] as const, @@ -82,44 +130,50 @@ export const appOwnerGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...appOwnerGrantKeys.details(), id] as const, } as const; -export const appPermissionKeys = { - /** All appPermission queries */ all: ['apppermission'] as const, - /** List query keys */ lists: () => [...appPermissionKeys.all, 'list'] as const, +export const appProfileCapabilityKeys = { + /** All appProfileCapability queries */ all: ['appprofilecapability'] as const, + /** List query keys */ lists: () => [...appProfileCapabilityKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...appPermissionKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...appPermissionKeys.all, 'detail'] as const, + [...appProfileCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appProfileCapabilityKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...appPermissionKeys.details(), id] as const, + [...appProfileCapabilityKeys.details(), id] as const, } as const; -export const appPermissionDefaultKeys = { - /** All appPermissionDefault queries */ all: ['apppermissiondefault'] as const, - /** List query keys */ lists: () => [...appPermissionDefaultKeys.all, 'list'] as const, +export const appProfileKeys = { + /** All appProfile queries */ all: ['appprofile'] as const, + /** List query keys */ lists: () => [...appProfileKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...appPermissionDefaultKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...appPermissionDefaultKeys.all, 'detail'] as const, + [...appProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appProfileKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...appPermissionDefaultKeys.details(), id] as const, + [...appProfileKeys.details(), id] as const, } as const; -export const appPermissionDefaultGrantKeys = { - /** All appPermissionDefaultGrant queries */ all: ['apppermissiondefaultgrant'] as const, - /** List query keys */ lists: () => [...appPermissionDefaultGrantKeys.all, 'list'] as const, +export const appProfileDefinitionGrantKeys = { + /** All appProfileDefinitionGrant queries */ all: ['appprofiledefinitiongrant'] as const, + /** List query keys */ lists: () => [...appProfileDefinitionGrantKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...appPermissionDefaultGrantKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...appPermissionDefaultGrantKeys.all, 'detail'] as const, + [...appProfileDefinitionGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appProfileDefinitionGrantKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...appPermissionDefaultGrantKeys.details(), id] as const, + [...appProfileDefinitionGrantKeys.details(), id] as const, } as const; -export const appPermissionDefaultPermissionKeys = { - /** All appPermissionDefaultPermission queries */ all: [ - 'apppermissiondefaultpermission', - ] as const, - /** List query keys */ lists: () => [...appPermissionDefaultPermissionKeys.all, 'list'] as const, +export const appProfileGrantKeys = { + /** All appProfileGrant queries */ all: ['appprofilegrant'] as const, + /** List query keys */ lists: () => [...appProfileGrantKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...appPermissionDefaultPermissionKeys.lists(), variables] as const, - /** Detail query keys */ details: () => - [...appPermissionDefaultPermissionKeys.all, 'detail'] as const, + [...appProfileGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appProfileGrantKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appProfileGrantKeys.details(), id] as const, +} as const; +export const appProfileTemplateKeys = { + /** All appProfileTemplate queries */ all: ['appprofiletemplate'] as const, + /** List query keys */ lists: () => [...appProfileTemplateKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appProfileTemplateKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appProfileTemplateKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...appPermissionDefaultPermissionKeys.details(), id] as const, + [...appProfileTemplateKeys.details(), id] as const, } as const; export const membershipTypeKeys = { /** All membershipType queries */ all: ['membershiptype'] as const, @@ -139,6 +193,45 @@ export const orgAdminGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgAdminGrantKeys.details(), id] as const, } as const; +export const orgCapabilityKeys = { + /** All orgCapability queries */ all: ['orgcapability'] as const, + /** List query keys */ lists: () => [...orgCapabilityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgCapabilityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgCapabilityKeys.details(), id] as const, +} as const; +export const orgCapabilityDefaultCapabilityKeys = { + /** All orgCapabilityDefaultCapability queries */ all: [ + 'orgcapabilitydefaultcapability', + ] as const, + /** List query keys */ lists: () => [...orgCapabilityDefaultCapabilityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgCapabilityDefaultCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => + [...orgCapabilityDefaultCapabilityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgCapabilityDefaultCapabilityKeys.details(), id] as const, +} as const; +export const orgCapabilityDefaultKeys = { + /** All orgCapabilityDefault queries */ all: ['orgcapabilitydefault'] as const, + /** List query keys */ lists: () => [...orgCapabilityDefaultKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgCapabilityDefaultKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgCapabilityDefaultKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgCapabilityDefaultKeys.details(), id] as const, +} as const; +export const orgCapabilityDefaultGrantKeys = { + /** All orgCapabilityDefaultGrant queries */ all: ['orgcapabilitydefaultgrant'] as const, + /** List query keys */ lists: () => [...orgCapabilityDefaultGrantKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgCapabilityDefaultGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgCapabilityDefaultGrantKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgCapabilityDefaultGrantKeys.details(), id] as const, +} as const; export const orgChartEdgeKeys = { /** All orgChartEdge queries */ all: ['orgchartedge'] as const, /** List query keys */ lists: () => [...orgChartEdgeKeys.all, 'list'] as const, @@ -238,6 +331,15 @@ export const orgMembershipDefaultKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgMembershipDefaultKeys.details(), id] as const, } as const; +export const orgMembershipProfileKeys = { + /** All orgMembershipProfile queries */ all: ['orgmembershipprofile'] as const, + /** List query keys */ lists: () => [...orgMembershipProfileKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgMembershipProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgMembershipProfileKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgMembershipProfileKeys.details(), id] as const, +} as const; export const orgMembershipSettingKeys = { /** All orgMembershipSetting queries */ all: ['orgmembershipsetting'] as const, /** List query keys */ lists: () => [...orgMembershipSettingKeys.all, 'list'] as const, @@ -256,44 +358,50 @@ export const orgOwnerGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgOwnerGrantKeys.details(), id] as const, } as const; -export const orgPermissionKeys = { - /** All orgPermission queries */ all: ['orgpermission'] as const, - /** List query keys */ lists: () => [...orgPermissionKeys.all, 'list'] as const, +export const orgProfileCapabilityKeys = { + /** All orgProfileCapability queries */ all: ['orgprofilecapability'] as const, + /** List query keys */ lists: () => [...orgProfileCapabilityKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...orgPermissionKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...orgPermissionKeys.all, 'detail'] as const, + [...orgProfileCapabilityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgProfileCapabilityKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...orgPermissionKeys.details(), id] as const, + [...orgProfileCapabilityKeys.details(), id] as const, } as const; -export const orgPermissionDefaultKeys = { - /** All orgPermissionDefault queries */ all: ['orgpermissiondefault'] as const, - /** List query keys */ lists: () => [...orgPermissionDefaultKeys.all, 'list'] as const, +export const orgProfileKeys = { + /** All orgProfile queries */ all: ['orgprofile'] as const, + /** List query keys */ lists: () => [...orgProfileKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...orgPermissionDefaultKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...orgPermissionDefaultKeys.all, 'detail'] as const, + [...orgProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgProfileKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...orgPermissionDefaultKeys.details(), id] as const, + [...orgProfileKeys.details(), id] as const, } as const; -export const orgPermissionDefaultGrantKeys = { - /** All orgPermissionDefaultGrant queries */ all: ['orgpermissiondefaultgrant'] as const, - /** List query keys */ lists: () => [...orgPermissionDefaultGrantKeys.all, 'list'] as const, +export const orgProfileDefinitionGrantKeys = { + /** All orgProfileDefinitionGrant queries */ all: ['orgprofiledefinitiongrant'] as const, + /** List query keys */ lists: () => [...orgProfileDefinitionGrantKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...orgPermissionDefaultGrantKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...orgPermissionDefaultGrantKeys.all, 'detail'] as const, + [...orgProfileDefinitionGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgProfileDefinitionGrantKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...orgPermissionDefaultGrantKeys.details(), id] as const, + [...orgProfileDefinitionGrantKeys.details(), id] as const, } as const; -export const orgPermissionDefaultPermissionKeys = { - /** All orgPermissionDefaultPermission queries */ all: [ - 'orgpermissiondefaultpermission', - ] as const, - /** List query keys */ lists: () => [...orgPermissionDefaultPermissionKeys.all, 'list'] as const, +export const orgProfileGrantKeys = { + /** All orgProfileGrant queries */ all: ['orgprofilegrant'] as const, + /** List query keys */ lists: () => [...orgProfileGrantKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...orgPermissionDefaultPermissionKeys.lists(), variables] as const, - /** Detail query keys */ details: () => - [...orgPermissionDefaultPermissionKeys.all, 'detail'] as const, + [...orgProfileGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgProfileGrantKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgProfileGrantKeys.details(), id] as const, +} as const; +export const orgProfileTemplateKeys = { + /** All orgProfileTemplate queries */ all: ['orgprofiletemplate'] as const, + /** List query keys */ lists: () => [...orgProfileTemplateKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgProfileTemplateKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgProfileTemplateKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...orgPermissionDefaultPermissionKeys.details(), id] as const, + [...orgProfileTemplateKeys.details(), id] as const, } as const; // ============================================================================ @@ -301,28 +409,28 @@ export const orgPermissionDefaultPermissionKeys = { // ============================================================================ export const customQueryKeys = { - /** Query key for appPermissionsGetByMask */ appPermissionsGetByMask: (variables?: object) => - ['appPermissionsGetByMask', variables] as const, - /** Query key for appPermissionsGetMask */ appPermissionsGetMask: (variables?: object) => - ['appPermissionsGetMask', variables] as const, - /** Query key for appPermissionsGetMaskByNames */ appPermissionsGetMaskByNames: ( + /** Query key for appCapabilitiesGetByMask */ appCapabilitiesGetByMask: (variables?: object) => + ['appCapabilitiesGetByMask', variables] as const, + /** Query key for appCapabilitiesGetMask */ appCapabilitiesGetMask: (variables?: object) => + ['appCapabilitiesGetMask', variables] as const, + /** Query key for appCapabilitiesGetMaskByNames */ appCapabilitiesGetMaskByNames: ( variables?: object - ) => ['appPermissionsGetMaskByNames', variables] as const, - /** Query key for appPermissionsGetPaddedMask */ appPermissionsGetPaddedMask: ( + ) => ['appCapabilitiesGetMaskByNames', variables] as const, + /** Query key for appCapabilitiesGetPaddedMask */ appCapabilitiesGetPaddedMask: ( variables?: object - ) => ['appPermissionsGetPaddedMask', variables] as const, - /** Query key for orgIsManagerOf */ orgIsManagerOf: (variables?: object) => - ['orgIsManagerOf', variables] as const, - /** Query key for orgPermissionsGetByMask */ orgPermissionsGetByMask: (variables?: object) => - ['orgPermissionsGetByMask', variables] as const, - /** Query key for orgPermissionsGetMask */ orgPermissionsGetMask: (variables?: object) => - ['orgPermissionsGetMask', variables] as const, - /** Query key for orgPermissionsGetMaskByNames */ orgPermissionsGetMaskByNames: ( + ) => ['appCapabilitiesGetPaddedMask', variables] as const, + /** Query key for orgCapabilitiesGetByMask */ orgCapabilitiesGetByMask: (variables?: object) => + ['orgCapabilitiesGetByMask', variables] as const, + /** Query key for orgCapabilitiesGetMask */ orgCapabilitiesGetMask: (variables?: object) => + ['orgCapabilitiesGetMask', variables] as const, + /** Query key for orgCapabilitiesGetMaskByNames */ orgCapabilitiesGetMaskByNames: ( variables?: object - ) => ['orgPermissionsGetMaskByNames', variables] as const, - /** Query key for orgPermissionsGetPaddedMask */ orgPermissionsGetPaddedMask: ( + ) => ['orgCapabilitiesGetMaskByNames', variables] as const, + /** Query key for orgCapabilitiesGetPaddedMask */ orgCapabilitiesGetPaddedMask: ( variables?: object - ) => ['orgPermissionsGetPaddedMask', variables] as const, + ) => ['orgCapabilitiesGetPaddedMask', variables] as const, + /** Query key for orgIsManagerOf */ orgIsManagerOf: (variables?: object) => + ['orgIsManagerOf', variables] as const, } as const; /** @@ -348,18 +456,28 @@ export const customQueryKeys = { */ export const queryKeys = { appAdminGrant: appAdminGrantKeys, + appCapability: appCapabilityKeys, + appCapabilityDefaultCapability: appCapabilityDefaultCapabilityKeys, + appCapabilityDefault: appCapabilityDefaultKeys, + appCapabilityDefaultGrant: appCapabilityDefaultGrantKeys, appClaimedInvite: appClaimedInviteKeys, appGrant: appGrantKeys, appInvite: appInviteKeys, appMembership: appMembershipKeys, appMembershipDefault: appMembershipDefaultKeys, + appMembershipProfile: appMembershipProfileKeys, appOwnerGrant: appOwnerGrantKeys, - appPermission: appPermissionKeys, - appPermissionDefault: appPermissionDefaultKeys, - appPermissionDefaultGrant: appPermissionDefaultGrantKeys, - appPermissionDefaultPermission: appPermissionDefaultPermissionKeys, + appProfileCapability: appProfileCapabilityKeys, + appProfile: appProfileKeys, + appProfileDefinitionGrant: appProfileDefinitionGrantKeys, + appProfileGrant: appProfileGrantKeys, + appProfileTemplate: appProfileTemplateKeys, membershipType: membershipTypeKeys, orgAdminGrant: orgAdminGrantKeys, + orgCapability: orgCapabilityKeys, + orgCapabilityDefaultCapability: orgCapabilityDefaultCapabilityKeys, + orgCapabilityDefault: orgCapabilityDefaultKeys, + orgCapabilityDefaultGrant: orgCapabilityDefaultGrantKeys, orgChartEdge: orgChartEdgeKeys, orgChartEdgeGrant: orgChartEdgeGrantKeys, orgClaimedInvite: orgClaimedInviteKeys, @@ -371,12 +489,14 @@ export const queryKeys = { orgMemberProfile: orgMemberProfileKeys, orgMembership: orgMembershipKeys, orgMembershipDefault: orgMembershipDefaultKeys, + orgMembershipProfile: orgMembershipProfileKeys, orgMembershipSetting: orgMembershipSettingKeys, orgOwnerGrant: orgOwnerGrantKeys, - orgPermission: orgPermissionKeys, - orgPermissionDefault: orgPermissionDefaultKeys, - orgPermissionDefaultGrant: orgPermissionDefaultGrantKeys, - orgPermissionDefaultPermission: orgPermissionDefaultPermissionKeys, + orgProfileCapability: orgProfileCapabilityKeys, + orgProfile: orgProfileKeys, + orgProfileDefinitionGrant: orgProfileDefinitionGrantKeys, + orgProfileGrant: orgProfileGrantKeys, + orgProfileTemplate: orgProfileTemplateKeys, 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 c5a36159a7..a0d3b13a12 100644 --- a/sdk/constructive-react/src/admin/orm/README.md +++ b/sdk/constructive-react/src/admin/orm/README.md @@ -22,18 +22,28 @@ const db = createClient({ | Model | Operations | |-------|------------| | `appAdminGrant` | findMany, findOne, create, update, delete | +| `appCapability` | findMany, findOne, create, update, delete | +| `appCapabilityDefaultCapability` | findMany, findOne, create, update, delete | +| `appCapabilityDefault` | findMany, findOne, create, update, delete | +| `appCapabilityDefaultGrant` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `appGrant` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | | `appMembership` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | +| `appMembershipProfile` | findMany, findOne, create, update, delete | | `appOwnerGrant` | findMany, findOne, create, update, delete | -| `appPermission` | findMany, findOne, create, update, delete | -| `appPermissionDefault` | findMany, findOne, create, update, delete | -| `appPermissionDefaultGrant` | findMany, findOne, create, update, delete | -| `appPermissionDefaultPermission` | findMany, findOne, create, update, delete | +| `appProfileCapability` | findMany, findOne, create, update, delete | +| `appProfile` | findMany, findOne, create, update, delete | +| `appProfileDefinitionGrant` | findMany, findOne, create, update, delete | +| `appProfileGrant` | findMany, findOne, create, update, delete | +| `appProfileTemplate` | findMany, findOne, create, update, delete | | `membershipType` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | +| `orgCapability` | findMany, findOne, create, update, delete | +| `orgCapabilityDefaultCapability` | findMany, findOne, create, update, delete | +| `orgCapabilityDefault` | findMany, findOne, create, update, delete | +| `orgCapabilityDefaultGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | | `orgClaimedInvite` | findMany, findOne, create, update, delete | @@ -45,12 +55,14 @@ const db = createClient({ | `orgMemberProfile` | findMany, findOne, create, update, delete | | `orgMembership` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | +| `orgMembershipProfile` | findMany, findOne, create, update, delete | | `orgMembershipSetting` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | -| `orgPermission` | findMany, findOne, create, update, delete | -| `orgPermissionDefault` | findMany, findOne, create, update, delete | -| `orgPermissionDefaultGrant` | findMany, findOne, create, update, delete | -| `orgPermissionDefaultPermission` | findMany, findOne, create, update, delete | +| `orgProfileCapability` | findMany, findOne, create, update, delete | +| `orgProfile` | findMany, findOne, create, update, delete | +| `orgProfileDefinitionGrant` | findMany, findOne, create, update, delete | +| `orgProfileGrant` | findMany, findOne, create, update, delete | +| `orgProfileTemplate` | findMany, findOne, create, update, delete | ## Table Operations @@ -88,6 +100,136 @@ const updated = await db.appAdminGrant.update({ where: { id: '' }, data: { const deleted = await db.appAdminGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.appCapability` + +CRUD operations for AppCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bitnum` | Int | Yes | +| `bitstr` | BitString | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all appCapability records +const items = await db.appCapability.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Get one by id +const item = await db.appCapability.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Create +const created = await db.appCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefaultCapability` + +CRUD operations for AppCapabilityDefaultCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appCapabilityDefaultCapability records +const items = await db.appCapabilityDefaultCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefaultCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appCapabilityDefaultCapability.create({ data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefaultCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefault` + +CRUD operations for AppCapabilityDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `id` | UUID | No | + +**Operations:** + +```typescript +// List all appCapabilityDefault records +const items = await db.appCapabilityDefault.findMany({ select: { capabilities: true, id: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefault.findOne({ id: '', select: { capabilities: true, id: true } }).execute(); + +// Create +const created = await db.appCapabilityDefault.create({ data: { capabilities: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefaultGrant` + +CRUD operations for AppCapabilityDefaultGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | +| `id` | UUID | No | +| `isGrant` | Boolean | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appCapabilityDefaultGrant records +const items = await db.appCapabilityDefaultGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefaultGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appCapabilityDefaultGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefaultGrant.delete({ where: { id: '' } }).execute(); +``` + ### `db.appClaimedInvite` CRUD operations for AppClaimedInvite records. @@ -131,24 +273,24 @@ CRUD operations for AppGrant records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissions` | BitString | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript // List all appGrant records -const items = await db.appGrant.findMany({ select: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const items = await db.appGrant.findMany({ select: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appGrant.findOne({ id: '', select: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const item = await db.appGrant.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Create -const created = await db.appGrant.create({ data: { actorId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.appGrant.create({ data: { actorId: '', capabilities: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); // Update const updated = await db.appGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -209,6 +351,7 @@ CRUD operations for AppMembership records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `createdBy` | UUID | Yes | | `granted` | BitString | Yes | @@ -220,7 +363,6 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isVerified` | Boolean | Yes | -| `permissions` | BitString | Yes | | `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | | `updatedBy` | UUID | Yes | @@ -229,13 +371,13 @@ CRUD operations for AppMembership records. ```typescript // List all appMembership records -const items = await db.appMembership.findMany({ select: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const items = await db.appMembership.findMany({ select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); // Update const updated = await db.appMembership.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -279,6 +421,40 @@ const updated = await db.appMembershipDefault.update({ where: { id: '' }, const deleted = await db.appMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.appMembershipProfile` + +CRUD operations for AppMembershipProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appMembershipProfile records +const items = await db.appMembershipProfile.findMany({ select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appMembershipProfile.findOne({ id: '', select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appMembershipProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.appOwnerGrant` CRUD operations for AppOwnerGrant records. @@ -313,72 +489,114 @@ const updated = await db.appOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.appOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermission` +### `db.appProfileCapability` -CRUD operations for AppPermission records. +CRUD operations for AppProfileCapability records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `bitnum` | Int | Yes | -| `bitstr` | BitString | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appProfileCapability records +const items = await db.appProfileCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appProfileCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appProfileCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appProfile` + +CRUD operations for AppProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `createdAt` | Datetime | No | | `description` | String | Yes | | `id` | UUID | No | +| `isDefault` | Boolean | Yes | +| `isSystem` | Boolean | Yes | | `name` | String | Yes | +| `slug` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermission records -const items = await db.appPermission.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +// List all appProfile records +const items = await db.appProfile.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermission.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +const item = await db.appProfile.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermission.create({ data: { bitnum: '', bitstr: '', description: '', name: '' }, select: { id: true } }).execute(); +const created = await db.appProfile.create({ data: { capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermission.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); +const updated = await db.appProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfile.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefault` +### `db.appProfileDefinitionGrant` -CRUD operations for AppPermissionDefault records. +CRUD operations for AppProfileDefinitionGrant records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | | `id` | UUID | No | -| `permissions` | BitString | Yes | +| `isGrant` | Boolean | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefault records -const items = await db.appPermissionDefault.findMany({ select: { id: true, permissions: true } }).execute(); +// List all appProfileDefinitionGrant records +const items = await db.appProfileDefinitionGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefault.findOne({ id: '', select: { id: true, permissions: true } }).execute(); +const item = await db.appProfileDefinitionGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefault.create({ data: { permissions: '' }, select: { id: true } }).execute(); +const created = await db.appProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefault.update({ where: { id: '' }, data: { permissions: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileDefinitionGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefaultGrant` +### `db.appProfileGrant` -CRUD operations for AppPermissionDefaultGrant records. +CRUD operations for AppProfileGrant records. **Fields:** @@ -388,58 +606,63 @@ CRUD operations for AppPermissionDefaultGrant records. | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissionId` | UUID | Yes | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefaultGrant records -const items = await db.appPermissionDefaultGrant.findMany({ select: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +// List all appProfileGrant records +const items = await db.appProfileGrant.findMany({ select: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefaultGrant.findOne({ id: '', select: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.appProfileGrant.findOne({ id: '', select: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefaultGrant.create({ data: { grantorId: '', isGrant: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.appProfileGrant.create({ data: { grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefaultGrant.update({ where: { id: '' }, data: { grantorId: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileGrant.update({ where: { id: '' }, data: { grantorId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefaultGrant.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefaultPermission` +### `db.appProfileTemplate` -CRUD operations for AppPermissionDefaultPermission records. +CRUD operations for AppProfileTemplate records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | +| `description` | String | Yes | | `id` | UUID | No | -| `permissionId` | UUID | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefaultPermission records -const items = await db.appPermissionDefaultPermission.findMany({ select: { createdAt: true, id: true, permissionId: true, updatedAt: true } }).execute(); +// List all appProfileTemplate records +const items = await db.appProfileTemplate.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefaultPermission.findOne({ id: '', select: { createdAt: true, id: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.appProfileTemplate.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefaultPermission.create({ data: { permissionId: '' }, select: { id: true } }).execute(); +const created = await db.appProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefaultPermission.update({ where: { id: '' }, data: { permissionId: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefaultPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileTemplate.delete({ where: { id: '' } }).execute(); ``` ### `db.membershipType` @@ -511,6 +734,139 @@ const updated = await db.orgAdminGrant.update({ where: { id: '' }, data: { const deleted = await db.orgAdminGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.orgCapability` + +CRUD operations for OrgCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bitnum` | Int | Yes | +| `bitstr` | BitString | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgCapability records +const items = await db.orgCapability.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgCapability.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Create +const created = await db.orgCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefaultCapability` + +CRUD operations for OrgCapabilityDefaultCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `entityId` | UUID | Yes | +| `id` | UUID | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefaultCapability records +const items = await db.orgCapabilityDefaultCapability.findMany({ select: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefaultCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefaultCapability.create({ data: { capabilityId: '', entityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefaultCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefault` + +CRUD operations for OrgCapabilityDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `entityId` | UUID | Yes | +| `id` | UUID | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefault records +const items = await db.orgCapabilityDefault.findMany({ select: { capabilities: true, entityId: true, id: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefault.findOne({ id: '', select: { capabilities: true, entityId: true, id: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefault.create({ data: { capabilities: '', entityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefaultGrant` + +CRUD operations for OrgCapabilityDefaultGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `entityId` | UUID | Yes | +| `grantorId` | UUID | Yes | +| `id` | UUID | No | +| `isGrant` | Boolean | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefaultGrant records +const items = await db.orgCapabilityDefaultGrant.findMany({ select: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefaultGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefaultGrant.create({ data: { capabilityId: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefaultGrant.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgChartEdge` CRUD operations for OrgChartEdge records. @@ -688,25 +1044,25 @@ CRUD operations for OrgGrant records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `entityId` | UUID | Yes | | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissions` | BitString | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript // List all orgGrant records -const items = await db.orgGrant.findMany({ select: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const items = await db.orgGrant.findMany({ select: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgGrant.findOne({ id: '', select: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const item = await db.orgGrant.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Create -const created = await db.orgGrant.create({ data: { actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.orgGrant.create({ data: { actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -841,6 +1197,7 @@ CRUD operations for OrgMembership records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `createdBy` | UUID | Yes | | `entityId` | UUID | Yes | @@ -854,7 +1211,6 @@ CRUD operations for OrgMembership records. | `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isReadOnly` | Boolean | Yes | -| `permissions` | BitString | Yes | | `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | | `updatedBy` | UUID | Yes | @@ -863,13 +1219,13 @@ CRUD operations for OrgMembership records. ```typescript // List all orgMembership records -const items = await db.orgMembership.findMany({ select: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const items = await db.orgMembership.findMany({ select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgMembership.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -913,6 +1269,40 @@ const updated = await db.orgMembershipDefault.update({ where: { id: '' }, const deleted = await db.orgMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMembershipProfile` + +CRUD operations for OrgMembershipProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgMembershipProfile records +const items = await db.orgMembershipProfile.findMany({ select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgMembershipProfile.findOne({ id: '', select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMembershipProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgMembershipSetting` CRUD operations for OrgMembershipSetting records. @@ -990,73 +1380,115 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermission` +### `db.orgProfileCapability` -CRUD operations for OrgPermission records. +CRUD operations for OrgProfileCapability records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `bitnum` | Int | Yes | -| `bitstr` | BitString | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgProfileCapability records +const items = await db.orgProfileCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgProfileCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgProfileCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgProfile` + +CRUD operations for OrgProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `createdAt` | Datetime | No | | `description` | String | Yes | +| `entityId` | UUID | Yes | | `id` | UUID | No | +| `isDefault` | Boolean | Yes | +| `isSystem` | Boolean | Yes | | `name` | String | Yes | +| `slug` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermission records -const items = await db.orgPermission.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +// List all orgProfile records +const items = await db.orgProfile.findMany({ select: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermission.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +const item = await db.orgProfile.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermission.create({ data: { bitnum: '', bitstr: '', description: '', name: '' }, select: { id: true } }).execute(); +const created = await db.orgProfile.create({ data: { capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermission.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfile.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefault` +### `db.orgProfileDefinitionGrant` -CRUD operations for OrgPermissionDefault records. +CRUD operations for OrgProfileDefinitionGrant records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `entityId` | UUID | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | | `id` | UUID | No | -| `permissions` | BitString | Yes | +| `isGrant` | Boolean | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefault records -const items = await db.orgPermissionDefault.findMany({ select: { entityId: true, id: true, permissions: true } }).execute(); +// List all orgProfileDefinitionGrant records +const items = await db.orgProfileDefinitionGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefault.findOne({ id: '', select: { entityId: true, id: true, permissions: true } }).execute(); +const item = await db.orgProfileDefinitionGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefault.create({ data: { entityId: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefault.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileDefinitionGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefaultGrant` +### `db.orgProfileGrant` -CRUD operations for OrgPermissionDefaultGrant records. +CRUD operations for OrgProfileGrant records. **Fields:** @@ -1067,66 +1499,70 @@ CRUD operations for OrgPermissionDefaultGrant records. | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissionId` | UUID | Yes | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefaultGrant records -const items = await db.orgPermissionDefaultGrant.findMany({ select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +// List all orgProfileGrant records +const items = await db.orgProfileGrant.findMany({ select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefaultGrant.findOne({ id: '', select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.orgProfileGrant.findOne({ id: '', select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefaultGrant.create({ data: { entityId: '', grantorId: '', isGrant: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileGrant.create({ data: { entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefaultGrant.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileGrant.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefaultGrant.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefaultPermission` +### `db.orgProfileTemplate` -CRUD operations for OrgPermissionDefaultPermission records. +CRUD operations for OrgProfileTemplate records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | -| `entityId` | UUID | Yes | +| `description` | String | Yes | | `id` | UUID | No | -| `permissionId` | UUID | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefaultPermission records -const items = await db.orgPermissionDefaultPermission.findMany({ select: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }).execute(); +// List all orgProfileTemplate records +const items = await db.orgProfileTemplate.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefaultPermission.findOne({ id: '', select: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.orgProfileTemplate.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefaultPermission.create({ data: { entityId: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefaultPermission.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefaultPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileTemplate.delete({ where: { id: '' } }).execute(); ``` ## Custom Operations -### `db.query.appPermissionsGetByMask` +### `db.query.appCapabilitiesGetByMask` -Reads and enables pagination through a set of `AppPermission`. +Reads and enables pagination through a set of `AppCapability`. - **Type:** query - **Arguments:** @@ -1139,12 +1575,12 @@ Reads and enables pagination through a set of `AppPermission`. | `offset` | Int | ```typescript -const result = await db.query.appPermissionsGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +const result = await db.query.appCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); ``` -### `db.query.appPermissionsGetMask` +### `db.query.appCapabilitiesGetMask` -appPermissionsGetMask +appCapabilitiesGetMask - **Type:** query - **Arguments:** @@ -1154,12 +1590,12 @@ appPermissionsGetMask | `ids` | [UUID] | ```typescript -const result = await db.query.appPermissionsGetMask({ ids: '' }).execute(); +const result = await db.query.appCapabilitiesGetMask({ ids: '' }).execute(); ``` -### `db.query.appPermissionsGetMaskByNames` +### `db.query.appCapabilitiesGetMaskByNames` -appPermissionsGetMaskByNames +appCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** @@ -1169,12 +1605,12 @@ appPermissionsGetMaskByNames | `names` | [String] | ```typescript -const result = await db.query.appPermissionsGetMaskByNames({ names: '' }).execute(); +const result = await db.query.appCapabilitiesGetMaskByNames({ names: '' }).execute(); ``` -### `db.query.appPermissionsGetPaddedMask` +### `db.query.appCapabilitiesGetPaddedMask` -appPermissionsGetPaddedMask +appCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** @@ -1184,88 +1620,88 @@ appPermissionsGetPaddedMask | `mask` | BitString | ```typescript -const result = await db.query.appPermissionsGetPaddedMask({ mask: '' }).execute(); +const result = await db.query.appCapabilitiesGetPaddedMask({ mask: '' }).execute(); ``` -### `db.query.orgIsManagerOf` +### `db.query.orgCapabilitiesGetByMask` -orgIsManagerOf +Reads and enables pagination through a set of `OrgCapability`. - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `managerId` | UUID | - | `maxDepth` | Int | - | `targetEntityId` | UUID | - | `userId` | UUID | + | `after` | Cursor | + | `first` | Int | + | `mask` | BitString | + | `offset` | Int | ```typescript -const result = await db.query.orgIsManagerOf({ managerId: '', maxDepth: '', targetEntityId: '', userId: '' }).execute(); +const result = await db.query.orgCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); ``` -### `db.query.orgPermissionsGetByMask` +### `db.query.orgCapabilitiesGetMask` -Reads and enables pagination through a set of `OrgPermission`. +orgCapabilitiesGetMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `after` | Cursor | - | `first` | Int | - | `mask` | BitString | - | `offset` | Int | + | `ids` | [UUID] | ```typescript -const result = await db.query.orgPermissionsGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +const result = await db.query.orgCapabilitiesGetMask({ ids: '' }).execute(); ``` -### `db.query.orgPermissionsGetMask` +### `db.query.orgCapabilitiesGetMaskByNames` -orgPermissionsGetMask +orgCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `ids` | [UUID] | + | `names` | [String] | ```typescript -const result = await db.query.orgPermissionsGetMask({ ids: '' }).execute(); +const result = await db.query.orgCapabilitiesGetMaskByNames({ names: '' }).execute(); ``` -### `db.query.orgPermissionsGetMaskByNames` +### `db.query.orgCapabilitiesGetPaddedMask` -orgPermissionsGetMaskByNames +orgCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `names` | [String] | + | `mask` | BitString | ```typescript -const result = await db.query.orgPermissionsGetMaskByNames({ names: '' }).execute(); +const result = await db.query.orgCapabilitiesGetPaddedMask({ mask: '' }).execute(); ``` -### `db.query.orgPermissionsGetPaddedMask` +### `db.query.orgIsManagerOf` -orgPermissionsGetPaddedMask +orgIsManagerOf - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `mask` | BitString | + | `managerId` | UUID | + | `maxDepth` | Int | + | `targetEntityId` | UUID | + | `userId` | UUID | ```typescript -const result = await db.query.orgPermissionsGetPaddedMask({ mask: '' }).execute(); +const result = await db.query.orgIsManagerOf({ managerId: '', maxDepth: '', targetEntityId: '', userId: '' }).execute(); ``` ### `db.mutation.provisionBucket` diff --git a/sdk/constructive-react/src/admin/orm/index.ts b/sdk/constructive-react/src/admin/orm/index.ts index 5a87e5498e..6da89c57c7 100644 --- a/sdk/constructive-react/src/admin/orm/index.ts +++ b/sdk/constructive-react/src/admin/orm/index.ts @@ -6,18 +6,28 @@ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; import { AppAdminGrantModel } from './models/appAdminGrant'; +import { AppCapabilityModel } from './models/appCapability'; +import { AppCapabilityDefaultCapabilityModel } from './models/appCapabilityDefaultCapability'; +import { AppCapabilityDefaultModel } from './models/appCapabilityDefault'; +import { AppCapabilityDefaultGrantModel } from './models/appCapabilityDefaultGrant'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { AppGrantModel } from './models/appGrant'; import { AppInviteModel } from './models/appInvite'; import { AppMembershipModel } from './models/appMembership'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; +import { AppMembershipProfileModel } from './models/appMembershipProfile'; import { AppOwnerGrantModel } from './models/appOwnerGrant'; -import { AppPermissionModel } from './models/appPermission'; -import { AppPermissionDefaultModel } from './models/appPermissionDefault'; -import { AppPermissionDefaultGrantModel } from './models/appPermissionDefaultGrant'; -import { AppPermissionDefaultPermissionModel } from './models/appPermissionDefaultPermission'; +import { AppProfileCapabilityModel } from './models/appProfileCapability'; +import { AppProfileModel } from './models/appProfile'; +import { AppProfileDefinitionGrantModel } from './models/appProfileDefinitionGrant'; +import { AppProfileGrantModel } from './models/appProfileGrant'; +import { AppProfileTemplateModel } from './models/appProfileTemplate'; import { MembershipTypeModel } from './models/membershipType'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; +import { OrgCapabilityModel } from './models/orgCapability'; +import { OrgCapabilityDefaultCapabilityModel } from './models/orgCapabilityDefaultCapability'; +import { OrgCapabilityDefaultModel } from './models/orgCapabilityDefault'; +import { OrgCapabilityDefaultGrantModel } from './models/orgCapabilityDefaultGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; import { OrgClaimedInviteModel } from './models/orgClaimedInvite'; @@ -29,12 +39,14 @@ import { OrgMemberModel } from './models/orgMember'; import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { OrgMembershipModel } from './models/orgMembership'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; +import { OrgMembershipProfileModel } from './models/orgMembershipProfile'; import { OrgMembershipSettingModel } from './models/orgMembershipSetting'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; -import { OrgPermissionModel } from './models/orgPermission'; -import { OrgPermissionDefaultModel } from './models/orgPermissionDefault'; -import { OrgPermissionDefaultGrantModel } from './models/orgPermissionDefaultGrant'; -import { OrgPermissionDefaultPermissionModel } from './models/orgPermissionDefaultPermission'; +import { OrgProfileCapabilityModel } from './models/orgProfileCapability'; +import { OrgProfileModel } from './models/orgProfile'; +import { OrgProfileDefinitionGrantModel } from './models/orgProfileDefinitionGrant'; +import { OrgProfileGrantModel } from './models/orgProfileGrant'; +import { OrgProfileTemplateModel } from './models/orgProfileTemplate'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; @@ -71,18 +83,28 @@ export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { appAdminGrant: new AppAdminGrantModel(client), + appCapability: new AppCapabilityModel(client), + appCapabilityDefaultCapability: new AppCapabilityDefaultCapabilityModel(client), + appCapabilityDefault: new AppCapabilityDefaultModel(client), + appCapabilityDefaultGrant: new AppCapabilityDefaultGrantModel(client), appClaimedInvite: new AppClaimedInviteModel(client), appGrant: new AppGrantModel(client), appInvite: new AppInviteModel(client), appMembership: new AppMembershipModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), + appMembershipProfile: new AppMembershipProfileModel(client), appOwnerGrant: new AppOwnerGrantModel(client), - appPermission: new AppPermissionModel(client), - appPermissionDefault: new AppPermissionDefaultModel(client), - appPermissionDefaultGrant: new AppPermissionDefaultGrantModel(client), - appPermissionDefaultPermission: new AppPermissionDefaultPermissionModel(client), + appProfileCapability: new AppProfileCapabilityModel(client), + appProfile: new AppProfileModel(client), + appProfileDefinitionGrant: new AppProfileDefinitionGrantModel(client), + appProfileGrant: new AppProfileGrantModel(client), + appProfileTemplate: new AppProfileTemplateModel(client), membershipType: new MembershipTypeModel(client), orgAdminGrant: new OrgAdminGrantModel(client), + orgCapability: new OrgCapabilityModel(client), + orgCapabilityDefaultCapability: new OrgCapabilityDefaultCapabilityModel(client), + orgCapabilityDefault: new OrgCapabilityDefaultModel(client), + orgCapabilityDefaultGrant: new OrgCapabilityDefaultGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), orgClaimedInvite: new OrgClaimedInviteModel(client), @@ -94,12 +116,14 @@ export function createClient(config: OrmClientConfig) { orgMemberProfile: new OrgMemberProfileModel(client), orgMembership: new OrgMembershipModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), + orgMembershipProfile: new OrgMembershipProfileModel(client), orgMembershipSetting: new OrgMembershipSettingModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), - orgPermission: new OrgPermissionModel(client), - orgPermissionDefault: new OrgPermissionDefaultModel(client), - orgPermissionDefaultGrant: new OrgPermissionDefaultGrantModel(client), - orgPermissionDefaultPermission: new OrgPermissionDefaultPermissionModel(client), + orgProfileCapability: new OrgProfileCapabilityModel(client), + orgProfile: new OrgProfileModel(client), + orgProfileDefinitionGrant: new OrgProfileDefinitionGrantModel(client), + orgProfileGrant: new OrgProfileGrantModel(client), + orgProfileTemplate: new OrgProfileTemplateModel(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 8942c14919..cfe70fd2f2 100644 --- a/sdk/constructive-react/src/admin/orm/input-types.ts +++ b/sdk/constructive-react/src/admin/orm/input-types.ts @@ -245,6 +245,45 @@ export interface AppAdminGrant { isGrant?: boolean | null; updatedAt?: string | null; } +/** Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control */ +export interface AppCapability { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number | null; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string | null; + /** Human-readable description of what this capability allows */ + description?: string | null; + id: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string | null; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string | null; +} +/** Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask */ +export interface AppCapabilityDefaultCapability { + /** References the capability included in the defaults bundle */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + updatedAt?: string | null; +} +/** Stores the default capability bitmask assigned to new members upon joining */ +export interface AppCapabilityDefault { + /** Default capability bitmask applied to new members */ + capabilities?: string | null; + id: string; +} +/** Audit log of capability additions and removals from the defaults bitmask */ +export interface AppCapabilityDefaultGrant { + /** References the capability being added to or removed from defaults */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; + id: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean | null; + updatedAt?: string | null; +} /** Records of successfully claimed invitations, linking senders to receivers */ export interface AppClaimedInvite { createdAt?: string | null; @@ -257,17 +296,17 @@ export interface AppClaimedInvite { senderId?: string | null; updatedAt?: string | null; } -/** Records of individual permission grants and revocations for members via bitmask */ +/** Records of individual capability grants and revocations for members via bitmask */ export interface AppGrant { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string | null; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string | null; createdAt?: string | null; grantorId?: string | null; id: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean | null; - /** Bitmask of permissions being granted or revoked */ - permissions?: string | null; updatedAt?: string | null; } /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ @@ -300,13 +339,15 @@ export interface AppInvite { senderId?: string | null; updatedAt?: string | null; } -/** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ +/** Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status */ export interface AppMembership { /** References the user who holds this membership */ actorId?: string | null; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string | null; createdAt?: string | null; createdBy?: string | null; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string | null; id: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -323,8 +364,6 @@ export interface AppMembership { isOwner?: boolean | null; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean | null; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string | null; profileId?: string | null; updatedAt?: string | null; updatedBy?: string | null; @@ -341,6 +380,18 @@ export interface AppMembershipDefault { updatedAt?: string | null; updatedBy?: string | null; } +/** Every profile a membership holds; memberships.profile_id points at one of them */ +export interface AppMembershipProfile { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string | null; + createdAt?: string | null; + id: string; + /** References the membership holding the profile */ + membershipId?: string | null; + /** References the held profile */ + profileId?: string | null; + updatedAt?: string | null; +} /** Records of ownership transfers and grants between members */ export interface AppOwnerGrant { /** The member receiving or losing the ownership grant; NULL if user was deleted */ @@ -352,41 +403,74 @@ export interface AppOwnerGrant { isGrant?: boolean | null; updatedAt?: string | null; } -/** Defines available permissions as named bits within a bitmask, used by the RBAC system for access control */ -export interface AppPermission { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number | null; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string | null; - /** Human-readable description of what this permission allows */ +/** Join table linking profiles to individual capabilities they include */ +export interface AppProfileCapability { + /** References the capability included in this profile */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + /** References the profile this capability belongs to */ + profileId?: string | null; + updatedAt?: string | null; +} +/** Named capability bundles (roles) that group multiple capabilities into reusable profiles */ +export interface AppProfile { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string | null; + createdAt?: string | null; + /** Human-readable description of this profile and its intended use */ description?: string | null; id: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean | null; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean | null; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ name?: string | null; + /** URL-safe identifier for this profile, used in API references */ + slug?: string | null; + updatedAt?: string | null; } -/** Stores the default permission bitmask assigned to new members upon joining */ -export interface AppPermissionDefault { +/** Audit log of capability additions and removals from profile definitions */ +export interface AppProfileDefinitionGrant { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; id: string; - /** Default permission bitmask applied to new members */ - permissions?: string | null; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean | null; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string | null; + updatedAt?: string | null; } -/** Audit log of permission additions and removals from the defaults bitmask */ -export interface AppPermissionDefaultGrant { +/** Audit log of profile assignments and revocations for members */ +export interface AppProfileGrant { createdAt?: string | null; grantorId?: string | null; id: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean | null; - /** References the permission being added to or removed from defaults */ - permissionId?: string | null; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string | null; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string | null; updatedAt?: string | null; } -/** Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask */ -export interface AppPermissionDefaultPermission { +/** Template profiles that are automatically seeded into new entities when created */ +export interface AppProfileTemplate { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string | null; createdAt?: string | null; + /** Human-readable description of this template profile */ + description?: string | null; id: string; - /** References the permission included in the defaults bundle */ - permissionId?: string | null; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean | null; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name?: string | null; + /** URL-safe identifier for the template profile */ + slug?: string | null; updatedAt?: string | null; } /** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ @@ -417,6 +501,51 @@ export interface OrgAdminGrant { isGrant?: boolean | null; updatedAt?: string | null; } +/** Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control */ +export interface OrgCapability { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number | null; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string | null; + /** Human-readable description of what this capability allows */ + description?: string | null; + id: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string | null; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string | null; +} +/** Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask */ +export interface OrgCapabilityDefaultCapability { + /** References the capability included in the defaults bundle */ + capabilityId?: string | null; + createdAt?: string | null; + /** Scopes this default capability to a specific entity */ + entityId?: string | null; + id: string; + updatedAt?: string | null; +} +/** Stores the default capability bitmask assigned to new members upon joining */ +export interface OrgCapabilityDefault { + /** Default capability bitmask applied to new members */ + capabilities?: string | null; + /** References the entity these default capabilities apply to */ + entityId?: string | null; + id: string; +} +/** Audit log of capability additions and removals from the defaults bitmask */ +export interface OrgCapabilityDefaultGrant { + /** References the capability being added to or removed from defaults */ + capabilityId?: string | null; + createdAt?: string | null; + /** Scopes this audit entry to a specific entity */ + entityId?: string | null; + grantorId?: string | null; + id: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean | null; + updatedAt?: string | null; +} /** Organizational chart edges defining parent-child reporting relationships between members within an entity */ export interface OrgChartEdge { /** User ID of the subordinate (employee) in this reporting relationship */ @@ -474,19 +603,19 @@ export interface OrgGetSubordinatesRecord { depth?: number | null; userId?: string | null; } -/** Records of individual permission grants and revocations for members via bitmask */ +/** Records of individual capability grants and revocations for members via bitmask */ export interface OrgGrant { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string | null; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string | null; createdAt?: string | null; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId?: string | null; grantorId?: string | null; id: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean | null; - /** Bitmask of permissions being granted or revoked */ - permissions?: string | null; updatedAt?: string | null; } /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ @@ -556,15 +685,17 @@ export interface OrgMemberProfile { title?: string | null; updatedAt?: string | null; } -/** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ +/** Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status */ export interface OrgMembership { /** References the user who holds this membership */ actorId?: string | null; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string | null; createdAt?: string | null; createdBy?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string | null; id: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -577,14 +708,12 @@ export interface OrgMembership { isBanned?: boolean | null; /** Whether this membership is temporarily disabled */ isDisabled?: boolean | null; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean | null; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string | null; profileId?: string | null; updatedAt?: string | null; updatedBy?: string | null; @@ -601,6 +730,18 @@ export interface OrgMembershipDefault { updatedAt?: string | null; updatedBy?: string | null; } +/** Every profile a membership holds; memberships.profile_id points at one of them */ +export interface OrgMembershipProfile { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string | null; + createdAt?: string | null; + id: string; + /** References the membership holding the profile */ + membershipId?: string | null; + /** References the held profile */ + profileId?: string | null; + updatedAt?: string | null; +} /** Per-entity settings for the memberships module */ export interface OrgMembershipSetting { /** Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) */ @@ -618,7 +759,7 @@ export interface OrgMembershipSetting { /** References the entity these settings apply to */ entityId?: string | null; id: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string | null; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string | null; @@ -640,47 +781,78 @@ export interface OrgOwnerGrant { isGrant?: boolean | null; updatedAt?: string | null; } -/** Defines available permissions as named bits within a bitmask, used by the RBAC system for access control */ -export interface OrgPermission { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number | null; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string | null; - /** Human-readable description of what this permission allows */ +/** Join table linking profiles to individual capabilities they include */ +export interface OrgProfileCapability { + /** References the capability included in this profile */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + /** References the profile this capability belongs to */ + profileId?: string | null; + updatedAt?: string | null; +} +/** Named capability bundles (roles) that group multiple capabilities into reusable profiles */ +export interface OrgProfile { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string | null; + createdAt?: string | null; + /** Human-readable description of this profile and its intended use */ description?: string | null; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ + entityId?: string | null; id: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean | null; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean | null; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ name?: string | null; + /** URL-safe identifier for this profile, used in API references */ + slug?: string | null; + updatedAt?: string | null; } -/** Stores the default permission bitmask assigned to new members upon joining */ -export interface OrgPermissionDefault { - /** References the entity these default permissions apply to */ - entityId?: string | null; +/** Audit log of capability additions and removals from profile definitions */ +export interface OrgProfileDefinitionGrant { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; id: string; - /** Default permission bitmask applied to new members */ - permissions?: string | null; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean | null; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string | null; + updatedAt?: string | null; } -/** Audit log of permission additions and removals from the defaults bitmask */ -export interface OrgPermissionDefaultGrant { +/** Audit log of profile assignments and revocations for members */ +export interface OrgProfileGrant { createdAt?: string | null; - /** Scopes this audit entry to a specific entity */ + /** The entity (org or group) scope for this profile grant */ entityId?: string | null; grantorId?: string | null; id: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean | null; - /** References the permission being added to or removed from defaults */ - permissionId?: string | null; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string | null; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string | null; updatedAt?: string | null; } -/** Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask */ -export interface OrgPermissionDefaultPermission { +/** Template profiles that are automatically seeded into new entities when created */ +export interface OrgProfileTemplate { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string | null; createdAt?: string | null; - /** Scopes this default permission to a specific entity */ - entityId?: string | null; + /** Human-readable description of this template profile */ + description?: string | null; id: string; - /** References the permission included in the defaults bundle */ - permissionId?: string | null; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean | null; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name?: string | null; + /** URL-safe identifier for the template profile */ + slug?: string | null; updatedAt?: string | null; } // ============ Relation Helper Types ============ @@ -697,71 +869,152 @@ export interface PageInfo { } // ============ Entity Relation Types ============ export interface AppAdminGrantRelations {} +export interface AppCapabilityRelations { + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultGrantsByCapabilityId?: ConnectionResult; + appProfileCapabilitiesByCapabilityId?: ConnectionResult; + appProfileDefinitionGrantsByCapabilityId?: ConnectionResult; +} +export interface AppCapabilityDefaultCapabilityRelations { + capability?: AppCapability | null; +} +export interface AppCapabilityDefaultRelations {} +export interface AppCapabilityDefaultGrantRelations { + capability?: AppCapability | null; +} export interface AppClaimedInviteRelations {} export interface AppGrantRelations {} -export interface AppInviteRelations {} -export interface AppMembershipRelations {} -export interface AppMembershipDefaultRelations {} -export interface AppOwnerGrantRelations {} -export interface AppPermissionRelations { - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermission | null; - appPermissionDefaultGrantsByPermissionId?: ConnectionResult; +export interface AppInviteRelations { + profile?: AppProfile | null; } -export interface AppPermissionDefaultRelations {} -export interface AppPermissionDefaultGrantRelations { - permission?: AppPermission | null; +export interface AppMembershipRelations { + profile?: AppProfile | null; + appMembershipProfilesByMembershipId?: ConnectionResult; + appProfileGrantsByMembershipId?: ConnectionResult; } -export interface AppPermissionDefaultPermissionRelations { - permission?: AppPermission | null; +export interface AppMembershipDefaultRelations {} +export interface AppMembershipProfileRelations { + membership?: AppMembership | null; + profile?: AppProfile | null; } +export interface AppOwnerGrantRelations {} +export interface AppProfileCapabilityRelations { + capability?: AppCapability | null; + profile?: AppProfile | null; +} +export interface AppProfileRelations { + appInvitesByProfileId?: ConnectionResult; + appMembershipProfilesByProfileId?: ConnectionResult; + appMembershipsByProfileId?: ConnectionResult; + appProfileCapabilitiesByProfileId?: ConnectionResult; + appProfileDefinitionGrantsByProfileId?: ConnectionResult; + appProfileGrantsByProfileId?: ConnectionResult; +} +export interface AppProfileDefinitionGrantRelations { + capability?: AppCapability | null; + profile?: AppProfile | null; +} +export interface AppProfileGrantRelations { + membership?: AppMembership | null; + profile?: AppProfile | null; +} +export interface AppProfileTemplateRelations {} export interface MembershipTypeRelations {} export interface OrgAdminGrantRelations {} +export interface OrgCapabilityRelations { + orgCapabilityDefaultCapabilitiesByCapabilityId?: ConnectionResult; + orgCapabilityDefaultGrantsByCapabilityId?: ConnectionResult; + orgProfileCapabilitiesByCapabilityId?: ConnectionResult; + orgProfileDefinitionGrantsByCapabilityId?: ConnectionResult; +} +export interface OrgCapabilityDefaultCapabilityRelations { + capability?: OrgCapability | null; +} +export interface OrgCapabilityDefaultRelations {} +export interface OrgCapabilityDefaultGrantRelations { + capability?: OrgCapability | null; +} export interface OrgChartEdgeRelations {} export interface OrgChartEdgeGrantRelations {} export interface OrgClaimedInviteRelations {} export interface OrgGetManagersRecordRelations {} export interface OrgGetSubordinatesRecordRelations {} export interface OrgGrantRelations {} -export interface OrgInviteRelations {} +export interface OrgInviteRelations { + profile?: OrgProfile | null; +} export interface OrgMemberRelations {} export interface OrgMemberProfileRelations { membership?: OrgMembership | null; } export interface OrgMembershipRelations { orgMemberProfileByMembershipId?: OrgMemberProfile | null; + profile?: OrgProfile | null; + orgMembershipProfilesByMembershipId?: ConnectionResult; + orgProfileGrantsByMembershipId?: ConnectionResult; } export interface OrgMembershipDefaultRelations {} +export interface OrgMembershipProfileRelations { + membership?: OrgMembership | null; + profile?: OrgProfile | null; +} export interface OrgMembershipSettingRelations {} export interface OrgOwnerGrantRelations {} -export interface OrgPermissionRelations { - orgPermissionDefaultGrantsByPermissionId?: ConnectionResult; - orgPermissionDefaultPermissionsByPermissionId?: ConnectionResult; -} -export interface OrgPermissionDefaultRelations {} -export interface OrgPermissionDefaultGrantRelations { - permission?: OrgPermission | null; -} -export interface OrgPermissionDefaultPermissionRelations { - permission?: OrgPermission | null; +export interface OrgProfileCapabilityRelations { + capability?: OrgCapability | null; + profile?: OrgProfile | null; +} +export interface OrgProfileRelations { + orgInvitesByProfileId?: ConnectionResult; + orgMembershipProfilesByProfileId?: ConnectionResult; + orgMembershipsByProfileId?: ConnectionResult; + orgProfileCapabilitiesByProfileId?: ConnectionResult; + orgProfileDefinitionGrantsByProfileId?: ConnectionResult; + orgProfileGrantsByProfileId?: ConnectionResult; +} +export interface OrgProfileDefinitionGrantRelations { + capability?: OrgCapability | null; + profile?: OrgProfile | null; +} +export interface OrgProfileGrantRelations { + membership?: OrgMembership | null; + profile?: OrgProfile | null; } +export interface OrgProfileTemplateRelations {} // ============ Entity Types With Relations ============ export type AppAdminGrantWithRelations = AppAdminGrant & AppAdminGrantRelations; +export type AppCapabilityWithRelations = AppCapability & AppCapabilityRelations; +export type AppCapabilityDefaultCapabilityWithRelations = AppCapabilityDefaultCapability & + AppCapabilityDefaultCapabilityRelations; +export type AppCapabilityDefaultWithRelations = AppCapabilityDefault & + AppCapabilityDefaultRelations; +export type AppCapabilityDefaultGrantWithRelations = AppCapabilityDefaultGrant & + AppCapabilityDefaultGrantRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type AppGrantWithRelations = AppGrant & AppGrantRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; export type AppMembershipWithRelations = AppMembership & AppMembershipRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; +export type AppMembershipProfileWithRelations = AppMembershipProfile & + AppMembershipProfileRelations; export type AppOwnerGrantWithRelations = AppOwnerGrant & AppOwnerGrantRelations; -export type AppPermissionWithRelations = AppPermission & AppPermissionRelations; -export type AppPermissionDefaultWithRelations = AppPermissionDefault & - AppPermissionDefaultRelations; -export type AppPermissionDefaultGrantWithRelations = AppPermissionDefaultGrant & - AppPermissionDefaultGrantRelations; -export type AppPermissionDefaultPermissionWithRelations = AppPermissionDefaultPermission & - AppPermissionDefaultPermissionRelations; +export type AppProfileCapabilityWithRelations = AppProfileCapability & + AppProfileCapabilityRelations; +export type AppProfileWithRelations = AppProfile & AppProfileRelations; +export type AppProfileDefinitionGrantWithRelations = AppProfileDefinitionGrant & + AppProfileDefinitionGrantRelations; +export type AppProfileGrantWithRelations = AppProfileGrant & AppProfileGrantRelations; +export type AppProfileTemplateWithRelations = AppProfileTemplate & AppProfileTemplateRelations; export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; +export type OrgCapabilityWithRelations = OrgCapability & OrgCapabilityRelations; +export type OrgCapabilityDefaultCapabilityWithRelations = OrgCapabilityDefaultCapability & + OrgCapabilityDefaultCapabilityRelations; +export type OrgCapabilityDefaultWithRelations = OrgCapabilityDefault & + OrgCapabilityDefaultRelations; +export type OrgCapabilityDefaultGrantWithRelations = OrgCapabilityDefaultGrant & + OrgCapabilityDefaultGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; export type OrgClaimedInviteWithRelations = OrgClaimedInvite & OrgClaimedInviteRelations; @@ -776,16 +1029,18 @@ export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileR export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; +export type OrgMembershipProfileWithRelations = OrgMembershipProfile & + OrgMembershipProfileRelations; export type OrgMembershipSettingWithRelations = OrgMembershipSetting & OrgMembershipSettingRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; -export type OrgPermissionWithRelations = OrgPermission & OrgPermissionRelations; -export type OrgPermissionDefaultWithRelations = OrgPermissionDefault & - OrgPermissionDefaultRelations; -export type OrgPermissionDefaultGrantWithRelations = OrgPermissionDefaultGrant & - OrgPermissionDefaultGrantRelations; -export type OrgPermissionDefaultPermissionWithRelations = OrgPermissionDefaultPermission & - OrgPermissionDefaultPermissionRelations; +export type OrgProfileCapabilityWithRelations = OrgProfileCapability & + OrgProfileCapabilityRelations; +export type OrgProfileWithRelations = OrgProfile & OrgProfileRelations; +export type OrgProfileDefinitionGrantWithRelations = OrgProfileDefinitionGrant & + OrgProfileDefinitionGrantRelations; +export type OrgProfileGrantWithRelations = OrgProfileGrant & OrgProfileGrantRelations; +export type OrgProfileTemplateWithRelations = OrgProfileTemplate & OrgProfileTemplateRelations; // ============ Entity Select Types ============ export type AppAdminGrantSelect = { actorId?: boolean; @@ -795,6 +1050,59 @@ export type AppAdminGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; +export type AppCapabilitySelect = { + bitnum?: boolean; + bitstr?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + name?: boolean; + appCapabilityDefaultCapabilityByCapabilityId?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultGrantsByCapabilityId?: { + select: AppCapabilityDefaultGrantSelect; + first?: number; + filter?: AppCapabilityDefaultGrantFilter; + orderBy?: AppCapabilityDefaultGrantOrderBy[]; + }; + appProfileCapabilitiesByCapabilityId?: { + select: AppProfileCapabilitySelect; + first?: number; + filter?: AppProfileCapabilityFilter; + orderBy?: AppProfileCapabilityOrderBy[]; + }; + appProfileDefinitionGrantsByCapabilityId?: { + select: AppProfileDefinitionGrantSelect; + first?: number; + filter?: AppProfileDefinitionGrantFilter; + orderBy?: AppProfileDefinitionGrantOrderBy[]; + }; +}; +export type AppCapabilityDefaultCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + id?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; +}; +export type AppCapabilityDefaultSelect = { + capabilities?: boolean; + id?: boolean; +}; +export type AppCapabilityDefaultGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; +}; export type AppClaimedInviteSelect = { createdAt?: boolean; data?: boolean; @@ -805,11 +1113,11 @@ export type AppClaimedInviteSelect = { }; export type AppGrantSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissions?: boolean; updatedAt?: boolean; }; export type AppInviteSelect = { @@ -828,9 +1136,13 @@ export type AppInviteSelect = { profileId?: boolean; senderId?: boolean; updatedAt?: boolean; + profile?: { + select: AppProfileSelect; + }; }; export type AppMembershipSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; createdBy?: boolean; granted?: boolean; @@ -842,10 +1154,24 @@ export type AppMembershipSelect = { isDisabled?: boolean; isOwner?: boolean; isVerified?: boolean; - permissions?: boolean; profileId?: boolean; updatedAt?: boolean; updatedBy?: boolean; + profile?: { + select: AppProfileSelect; + }; + appMembershipProfilesByMembershipId?: { + select: AppMembershipProfileSelect; + first?: number; + filter?: AppMembershipProfileFilter; + orderBy?: AppMembershipProfileOrderBy[]; + }; + appProfileGrantsByMembershipId?: { + select: AppProfileGrantSelect; + first?: number; + filter?: AppProfileGrantFilter; + orderBy?: AppProfileGrantOrderBy[]; + }; }; export type AppMembershipDefaultSelect = { createdAt?: boolean; @@ -856,6 +1182,20 @@ export type AppMembershipDefaultSelect = { updatedAt?: boolean; updatedBy?: boolean; }; +export type AppMembershipProfileSelect = { + actorId?: boolean; + createdAt?: boolean; + id?: boolean; + membershipId?: boolean; + profileId?: boolean; + updatedAt?: boolean; + membership?: { + select: AppMembershipSelect; + }; + profile?: { + select: AppProfileSelect; + }; +}; export type AppOwnerGrantSelect = { actorId?: boolean; createdAt?: boolean; @@ -864,45 +1204,105 @@ export type AppOwnerGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; -export type AppPermissionSelect = { - bitnum?: boolean; - bitstr?: boolean; +export type AppProfileCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + id?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; + profile?: { + select: AppProfileSelect; + }; +}; +export type AppProfileSelect = { + capabilities?: boolean; + createdAt?: boolean; description?: boolean; id?: boolean; + isDefault?: boolean; + isSystem?: boolean; name?: boolean; - appPermissionDefaultPermissionByPermissionId?: { - select: AppPermissionDefaultPermissionSelect; + slug?: boolean; + updatedAt?: boolean; + appInvitesByProfileId?: { + select: AppInviteSelect; + first?: number; + filter?: AppInviteFilter; + orderBy?: AppInviteOrderBy[]; + }; + appMembershipProfilesByProfileId?: { + select: AppMembershipProfileSelect; + first?: number; + filter?: AppMembershipProfileFilter; + orderBy?: AppMembershipProfileOrderBy[]; + }; + appMembershipsByProfileId?: { + select: AppMembershipSelect; + first?: number; + filter?: AppMembershipFilter; + orderBy?: AppMembershipOrderBy[]; + }; + appProfileCapabilitiesByProfileId?: { + select: AppProfileCapabilitySelect; + first?: number; + filter?: AppProfileCapabilityFilter; + orderBy?: AppProfileCapabilityOrderBy[]; + }; + appProfileDefinitionGrantsByProfileId?: { + select: AppProfileDefinitionGrantSelect; + first?: number; + filter?: AppProfileDefinitionGrantFilter; + orderBy?: AppProfileDefinitionGrantOrderBy[]; }; - appPermissionDefaultGrantsByPermissionId?: { - select: AppPermissionDefaultGrantSelect; + appProfileGrantsByProfileId?: { + select: AppProfileGrantSelect; first?: number; - filter?: AppPermissionDefaultGrantFilter; - orderBy?: AppPermissionDefaultGrantOrderBy[]; + filter?: AppProfileGrantFilter; + orderBy?: AppProfileGrantOrderBy[]; }; }; -export type AppPermissionDefaultSelect = { +export type AppProfileDefinitionGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; id?: boolean; - permissions?: boolean; + isGrant?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; + profile?: { + select: AppProfileSelect; + }; }; -export type AppPermissionDefaultGrantSelect = { +export type AppProfileGrantSelect = { createdAt?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissionId?: boolean; + membershipId?: boolean; + profileId?: boolean; updatedAt?: boolean; - permission?: { - select: AppPermissionSelect; + membership?: { + select: AppMembershipSelect; + }; + profile?: { + select: AppProfileSelect; }; }; -export type AppPermissionDefaultPermissionSelect = { +export type AppProfileTemplateSelect = { + capabilities?: boolean; createdAt?: boolean; + description?: boolean; id?: boolean; - permissionId?: boolean; + isDefault?: boolean; + name?: boolean; + slug?: boolean; updatedAt?: boolean; - permission?: { - select: AppPermissionSelect; - }; }; export type MembershipTypeSelect = { description?: boolean; @@ -921,6 +1321,65 @@ export type OrgAdminGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; +export type OrgCapabilitySelect = { + bitnum?: boolean; + bitstr?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + name?: boolean; + orgCapabilityDefaultCapabilitiesByCapabilityId?: { + select: OrgCapabilityDefaultCapabilitySelect; + first?: number; + filter?: OrgCapabilityDefaultCapabilityFilter; + orderBy?: OrgCapabilityDefaultCapabilityOrderBy[]; + }; + orgCapabilityDefaultGrantsByCapabilityId?: { + select: OrgCapabilityDefaultGrantSelect; + first?: number; + filter?: OrgCapabilityDefaultGrantFilter; + orderBy?: OrgCapabilityDefaultGrantOrderBy[]; + }; + orgProfileCapabilitiesByCapabilityId?: { + select: OrgProfileCapabilitySelect; + first?: number; + filter?: OrgProfileCapabilityFilter; + orderBy?: OrgProfileCapabilityOrderBy[]; + }; + orgProfileDefinitionGrantsByCapabilityId?: { + select: OrgProfileDefinitionGrantSelect; + first?: number; + filter?: OrgProfileDefinitionGrantFilter; + orderBy?: OrgProfileDefinitionGrantOrderBy[]; + }; +}; +export type OrgCapabilityDefaultCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + entityId?: boolean; + id?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; +}; +export type OrgCapabilityDefaultSelect = { + capabilities?: boolean; + entityId?: boolean; + id?: boolean; +}; +export type OrgCapabilityDefaultGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + entityId?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; +}; export type OrgChartEdgeSelect = { childId?: boolean; createdAt?: boolean; @@ -961,12 +1420,12 @@ export type OrgGetSubordinatesRecordSelect = { }; export type OrgGrantSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; entityId?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissions?: boolean; updatedAt?: boolean; }; export type OrgInviteSelect = { @@ -988,6 +1447,9 @@ export type OrgInviteSelect = { receiverId?: boolean; senderId?: boolean; updatedAt?: boolean; + profile?: { + select: OrgProfileSelect; + }; }; export type OrgMemberSelect = { actorId?: boolean; @@ -1013,6 +1475,7 @@ export type OrgMemberProfileSelect = { }; export type OrgMembershipSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; createdBy?: boolean; entityId?: boolean; @@ -1026,13 +1489,27 @@ export type OrgMembershipSelect = { isExternal?: boolean; isOwner?: boolean; isReadOnly?: boolean; - permissions?: boolean; profileId?: boolean; updatedAt?: boolean; updatedBy?: boolean; orgMemberProfileByMembershipId?: { select: OrgMemberProfileSelect; }; + profile?: { + select: OrgProfileSelect; + }; + orgMembershipProfilesByMembershipId?: { + select: OrgMembershipProfileSelect; + first?: number; + filter?: OrgMembershipProfileFilter; + orderBy?: OrgMembershipProfileOrderBy[]; + }; + orgProfileGrantsByMembershipId?: { + select: OrgProfileGrantSelect; + first?: number; + filter?: OrgProfileGrantFilter; + orderBy?: OrgProfileGrantOrderBy[]; + }; }; export type OrgMembershipDefaultSelect = { createdAt?: boolean; @@ -1043,6 +1520,20 @@ export type OrgMembershipDefaultSelect = { updatedAt?: boolean; updatedBy?: boolean; }; +export type OrgMembershipProfileSelect = { + actorId?: boolean; + createdAt?: boolean; + id?: boolean; + membershipId?: boolean; + profileId?: boolean; + updatedAt?: boolean; + membership?: { + select: OrgMembershipSelect; + }; + profile?: { + select: OrgProfileSelect; + }; +}; export type OrgMembershipSettingSelect = { allowExternalMembers?: boolean; createChildCascadeAdmins?: boolean; @@ -1068,52 +1559,108 @@ export type OrgOwnerGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; -export type OrgPermissionSelect = { - bitnum?: boolean; - bitstr?: boolean; - description?: boolean; +export type OrgProfileCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; id?: boolean; - name?: boolean; - orgPermissionDefaultGrantsByPermissionId?: { - select: OrgPermissionDefaultGrantSelect; - first?: number; - filter?: OrgPermissionDefaultGrantFilter; - orderBy?: OrgPermissionDefaultGrantOrderBy[]; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; }; - orgPermissionDefaultPermissionsByPermissionId?: { - select: OrgPermissionDefaultPermissionSelect; - first?: number; - filter?: OrgPermissionDefaultPermissionFilter; - orderBy?: OrgPermissionDefaultPermissionOrderBy[]; + profile?: { + select: OrgProfileSelect; }; }; -export type OrgPermissionDefaultSelect = { - entityId?: boolean; - id?: boolean; - permissions?: boolean; -}; -export type OrgPermissionDefaultGrantSelect = { +export type OrgProfileSelect = { + capabilities?: boolean; createdAt?: boolean; + description?: boolean; entityId?: boolean; - grantorId?: boolean; id?: boolean; - isGrant?: boolean; - permissionId?: boolean; + isDefault?: boolean; + isSystem?: boolean; + name?: boolean; + slug?: boolean; updatedAt?: boolean; - permission?: { - select: OrgPermissionSelect; - }; + orgInvitesByProfileId?: { + select: OrgInviteSelect; + first?: number; + filter?: OrgInviteFilter; + orderBy?: OrgInviteOrderBy[]; + }; + orgMembershipProfilesByProfileId?: { + select: OrgMembershipProfileSelect; + first?: number; + filter?: OrgMembershipProfileFilter; + orderBy?: OrgMembershipProfileOrderBy[]; + }; + orgMembershipsByProfileId?: { + select: OrgMembershipSelect; + first?: number; + filter?: OrgMembershipFilter; + orderBy?: OrgMembershipOrderBy[]; + }; + orgProfileCapabilitiesByProfileId?: { + select: OrgProfileCapabilitySelect; + first?: number; + filter?: OrgProfileCapabilityFilter; + orderBy?: OrgProfileCapabilityOrderBy[]; + }; + orgProfileDefinitionGrantsByProfileId?: { + select: OrgProfileDefinitionGrantSelect; + first?: number; + filter?: OrgProfileDefinitionGrantFilter; + orderBy?: OrgProfileDefinitionGrantOrderBy[]; + }; + orgProfileGrantsByProfileId?: { + select: OrgProfileGrantSelect; + first?: number; + filter?: OrgProfileGrantFilter; + orderBy?: OrgProfileGrantOrderBy[]; + }; +}; +export type OrgProfileDefinitionGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; + profile?: { + select: OrgProfileSelect; + }; }; -export type OrgPermissionDefaultPermissionSelect = { +export type OrgProfileGrantSelect = { createdAt?: boolean; entityId?: boolean; + grantorId?: boolean; id?: boolean; - permissionId?: boolean; + isGrant?: boolean; + membershipId?: boolean; + profileId?: boolean; updatedAt?: boolean; - permission?: { - select: OrgPermissionSelect; + membership?: { + select: OrgMembershipSelect; + }; + profile?: { + select: OrgProfileSelect; }; }; +export type OrgProfileTemplateSelect = { + capabilities?: boolean; + createdAt?: boolean; + description?: boolean; + id?: boolean; + isDefault?: boolean; + name?: boolean; + slug?: boolean; + updatedAt?: boolean; +}; // ============ Table Filter Types ============ export interface AppAdminGrantFilter { /** Filter by the object’s `actorId` field. */ @@ -1135,6 +1682,94 @@ export interface AppAdminGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface AppCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityFilter[]; + /** Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. */ + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapabilityFilter; + /** A related `appCapabilityDefaultCapabilityByCapabilityId` exists. */ + appCapabilityDefaultCapabilityByCapabilityIdExists?: boolean; + /** Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. */ + appCapabilityDefaultGrantsByCapabilityId?: AppCapabilityToManyAppCapabilityDefaultGrantFilter; + /** `appCapabilityDefaultGrantsByCapabilityId` exist. */ + appCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. */ + appProfileCapabilitiesByCapabilityId?: AppCapabilityToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByCapabilityId` exist. */ + appProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. */ + appProfileDefinitionGrantsByCapabilityId?: AppCapabilityToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByCapabilityId` exist. */ + appProfileDefinitionGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityFilter[]; +} +export interface AppCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultFilter[]; +} +export interface AppCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface AppClaimedInviteFilter { /** Checks for all expressions in this list. */ and?: AppClaimedInviteFilter[]; @@ -1158,6 +1793,8 @@ export interface AppGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -1170,8 +1807,6 @@ export interface AppGrantFilter { not?: AppGrantFilter; /** Checks for any expressions in this list. */ or?: AppGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1204,6 +1839,10 @@ export interface AppInviteFilter { or?: AppInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `senderId` field. */ @@ -1216,6 +1855,16 @@ export interface AppMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppMembershipFilter[]; + /** Filter by the object’s `appMembershipProfilesByMembershipId` relation. */ + appMembershipProfilesByMembershipId?: AppMembershipToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByMembershipId` exist. */ + appMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByMembershipId` relation. */ + appProfileGrantsByMembershipId?: AppMembershipToManyAppProfileGrantFilter; + /** `appProfileGrantsByMembershipId` exist. */ + appProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -1242,8 +1891,10 @@ export interface AppMembershipFilter { not?: AppMembershipFilter; /** Checks for any expressions in this list. */ or?: AppMembershipFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -1273,6 +1924,30 @@ export interface AppMembershipDefaultFilter { /** Filter by the object’s `updatedBy` field. */ updatedBy?: UUIDFilter; } +export interface AppMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: AppMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface AppOwnerGrantFilter { /** Filter by the object’s `actorId` field. */ actorId?: UUIDFilter; @@ -1293,47 +1968,111 @@ export interface AppOwnerGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AppPermissionFilter { +export interface AppProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionFilter[]; - /** Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. */ - appPermissionDefaultGrantsByPermissionId?: AppPermissionToManyAppPermissionDefaultGrantFilter; - /** `appPermissionDefaultGrantsByPermissionId` exist. */ - appPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. */ - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermissionFilter; - /** A related `appPermissionDefaultPermissionByPermissionId` exists. */ - appPermissionDefaultPermissionByPermissionIdExists?: boolean; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppProfileFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileFilter[]; + /** Filter by the object’s `appInvitesByProfileId` relation. */ + appInvitesByProfileId?: AppProfileToManyAppInviteFilter; + /** `appInvitesByProfileId` exist. */ + appInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipProfilesByProfileId` relation. */ + appMembershipProfilesByProfileId?: AppProfileToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByProfileId` exist. */ + appMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipsByProfileId` relation. */ + appMembershipsByProfileId?: AppProfileToManyAppMembershipFilter; + /** `appMembershipsByProfileId` exist. */ + appMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByProfileId` relation. */ + appProfileCapabilitiesByProfileId?: AppProfileToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByProfileId` exist. */ + appProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. */ + appProfileDefinitionGrantsByProfileId?: AppProfileToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByProfileId` exist. */ + appProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByProfileId` relation. */ + appProfileGrantsByProfileId?: AppProfileToManyAppProfileGrantFilter; + /** `appProfileGrantsByProfileId` exist. */ + appProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppPermissionFilter; + not?: AppProfileFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionFilter[]; + or?: AppProfileFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultFilter { +export interface AppProfileDefinitionGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultFilter[]; + and?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultFilter; + not?: AppProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultGrantFilter { +export interface AppProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultGrantFilter[]; + and?: AppProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -1342,32 +2081,46 @@ export interface AppPermissionDefaultGrantFilter { id?: UUIDFilter; /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: AppPermissionDefaultGrantFilter; + not?: AppProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultPermissionFilter { +export interface AppProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultPermissionFilter[]; + and?: AppProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: AppPermissionDefaultPermissionFilter; + not?: AppProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1413,6 +2166,100 @@ export interface OrgAdminGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface OrgCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityFilter[]; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityFilter[]; + /** Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. */ + orgCapabilityDefaultCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter; + /** `orgCapabilityDefaultCapabilitiesByCapabilityId` exist. */ + orgCapabilityDefaultCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. */ + orgCapabilityDefaultGrantsByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter; + /** `orgCapabilityDefaultGrantsByCapabilityId` exist. */ + orgCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. */ + orgProfileCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByCapabilityId` exist. */ + orgProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. */ + orgProfileDefinitionGrantsByCapabilityId?: OrgCapabilityToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByCapabilityId` exist. */ + orgProfileDefinitionGrantsByCapabilityIdExist?: boolean; +} +export interface OrgCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultFilter[]; +} +export interface OrgCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface OrgChartEdgeFilter { /** Checks for all expressions in this list. */ and?: OrgChartEdgeFilter[]; @@ -1502,6 +2349,8 @@ export interface OrgGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -1516,8 +2365,6 @@ export interface OrgGrantFilter { not?: OrgGrantFilter; /** Checks for any expressions in this list. */ or?: OrgGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1554,6 +2401,10 @@ export interface OrgInviteFilter { or?: OrgInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `receiverId` field. */ @@ -1616,6 +2467,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgMembershipFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -1650,8 +2503,18 @@ export interface OrgMembershipFilter { orgMemberProfileByMembershipId?: OrgMemberProfileFilter; /** A related `orgMemberProfileByMembershipId` exists. */ orgMemberProfileByMembershipIdExists?: boolean; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `orgMembershipProfilesByMembershipId` relation. */ + orgMembershipProfilesByMembershipId?: OrgMembershipToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByMembershipId` exist. */ + orgMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByMembershipId` relation. */ + orgProfileGrantsByMembershipId?: OrgMembershipToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByMembershipId` exist. */ + orgProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -1681,6 +2544,30 @@ export interface OrgMembershipDefaultFilter { /** Filter by the object’s `updatedBy` field. */ updatedBy?: UUIDFilter; } +export interface OrgMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface OrgMembershipSettingFilter { /** Filter by the object’s `allowExternalMembers` field. */ allowExternalMembers?: BooleanFilter; @@ -1739,49 +2626,113 @@ export interface OrgOwnerGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface OrgPermissionFilter { +export interface OrgProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionFilter[]; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgProfileFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionFilter; + not?: OrgProfileFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionFilter[]; - /** Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. */ - orgPermissionDefaultGrantsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultGrantFilter; - /** `orgPermissionDefaultGrantsByPermissionId` exist. */ - orgPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. */ - orgPermissionDefaultPermissionsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultPermissionFilter; - /** `orgPermissionDefaultPermissionsByPermissionId` exist. */ - orgPermissionDefaultPermissionsByPermissionIdExist?: boolean; -} -export interface OrgPermissionDefaultFilter { + or?: OrgProfileFilter[]; + /** Filter by the object’s `orgInvitesByProfileId` relation. */ + orgInvitesByProfileId?: OrgProfileToManyOrgInviteFilter; + /** `orgInvitesByProfileId` exist. */ + orgInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipProfilesByProfileId` relation. */ + orgMembershipProfilesByProfileId?: OrgProfileToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByProfileId` exist. */ + orgMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipsByProfileId` relation. */ + orgMembershipsByProfileId?: OrgProfileToManyOrgMembershipFilter; + /** `orgMembershipsByProfileId` exist. */ + orgMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByProfileId` relation. */ + orgProfileCapabilitiesByProfileId?: OrgProfileToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByProfileId` exist. */ + orgProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. */ + orgProfileDefinitionGrantsByProfileId?: OrgProfileToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByProfileId` exist. */ + orgProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByProfileId` relation. */ + orgProfileGrantsByProfileId?: OrgProfileToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByProfileId` exist. */ + orgProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgProfileDefinitionGrantFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultFilter[]; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + and?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultFilter; + not?: OrgProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface OrgPermissionDefaultGrantFilter { +export interface OrgProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultGrantFilter[]; + and?: OrgProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -1792,34 +2743,46 @@ export interface OrgPermissionDefaultGrantFilter { id?: UUIDFilter; /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultGrantFilter; + not?: OrgProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface OrgPermissionDefaultPermissionFilter { +export interface OrgProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultPermissionFilter[]; + and?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultPermissionFilter; + not?: OrgProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1840,12 +2803,64 @@ export type AppAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppClaimedInviteOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'ID_ASC' +export type AppCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppClaimedInviteOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'ID_ASC' | 'ID_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1859,6 +2874,8 @@ export type AppClaimedInviteOrderBy = export type AppGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -1868,8 +2885,6 @@ export type AppGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -1911,6 +2926,8 @@ export type AppInviteOrderBy = export type AppMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -1934,8 +2951,6 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -1962,6 +2977,22 @@ export type AppMembershipDefaultOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +export type AppMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppOwnerGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' @@ -1978,29 +3009,61 @@ export type AppOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +export type AppProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type AppPermissionDefaultOrderBy = + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type AppPermissionDefaultGrantOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileGrantOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -2009,23 +3072,33 @@ export type AppPermissionDefaultGrantOrderBy = | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppPermissionDefaultPermissionOrderBy = +export type AppProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; export type MembershipTypeOrderBy = @@ -2062,6 +3135,64 @@ export type OrgAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type OrgCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type OrgCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type OrgChartEdgeOrderBy = | 'CHILD_ID_ASC' | 'CHILD_ID_DESC' @@ -2141,6 +3272,8 @@ export type OrgGetSubordinatesRecordsOrderBy = export type OrgGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' @@ -2152,8 +3285,6 @@ export type OrgGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -2239,6 +3370,8 @@ export type OrgMemberProfileOrderBy = export type OrgMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -2266,8 +3399,6 @@ export type OrgMembershipOrderBy = | 'IS_READ_ONLY_ASC' | 'IS_READ_ONLY_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -2294,6 +3425,22 @@ export type OrgMembershipDefaultOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +export type OrgMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type OrgMembershipSettingOrderBy = | 'ALLOW_EXTERNAL_MEMBERS_ASC' | 'ALLOW_EXTERNAL_MEMBERS_DESC' @@ -2344,31 +3491,63 @@ export type OrgOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type OrgPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +export type OrgProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type OrgPermissionDefaultOrderBy = - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type OrgPermissionDefaultGrantOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileGrantOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' @@ -2379,25 +3558,33 @@ export type OrgPermissionDefaultGrantOrderBy = | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type OrgPermissionDefaultPermissionOrderBy = +export type OrgProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; // ============ CRUD Input Types ============ @@ -2423,67 +3610,151 @@ export interface DeleteAppAdminGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppClaimedInviteInput { +export interface CreateAppCapabilityInput { clientMutationId?: string; - appClaimedInvite: { - data?: Record; - receiverId?: string; - senderId?: string; + appCapability: { + bitnum?: number; + bitstr?: string; + description?: string; + kind?: string; + name?: string; }; } -export interface AppClaimedInvitePatch { - data?: Record | null; - receiverId?: string | null; - senderId?: string | null; +export interface AppCapabilityPatch { + bitnum?: number | null; + bitstr?: string | null; + description?: string | null; + kind?: string | null; + name?: string | null; } -export interface UpdateAppClaimedInviteInput { +export interface UpdateAppCapabilityInput { clientMutationId?: string; id: string; - appClaimedInvitePatch: AppClaimedInvitePatch; + appCapabilityPatch: AppCapabilityPatch; } -export interface DeleteAppClaimedInviteInput { +export interface DeleteAppCapabilityInput { clientMutationId?: string; id: string; } -export interface CreateAppGrantInput { +export interface CreateAppCapabilityDefaultCapabilityInput { clientMutationId?: string; - appGrant: { - actorId?: string; - grantorId?: string; - isGrant?: boolean; - permissions?: string; + appCapabilityDefaultCapability: { + capabilityId: string; }; } -export interface AppGrantPatch { - actorId?: string | null; - grantorId?: string | null; - isGrant?: boolean | null; - permissions?: string | null; +export interface AppCapabilityDefaultCapabilityPatch { + capabilityId?: string | null; } -export interface UpdateAppGrantInput { +export interface UpdateAppCapabilityDefaultCapabilityInput { clientMutationId?: string; id: string; - appGrantPatch: AppGrantPatch; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; } -export interface DeleteAppGrantInput { +export interface DeleteAppCapabilityDefaultCapabilityInput { clientMutationId?: string; id: string; } -export interface CreateAppInviteInput { +export interface CreateAppCapabilityDefaultInput { clientMutationId?: string; - appInvite: { - channel?: string; - data?: Record; - email?: ConstructiveInternalTypeEmail; - expiresAt?: string; - inviteCount?: number; - inviteLimit?: number; - inviteToken?: string; - inviteValid?: boolean; - multiple?: boolean; - phone?: string; - profileId?: string; - senderId?: string; + appCapabilityDefault: { + capabilities?: string; + }; +} +export interface AppCapabilityDefaultPatch { + capabilities?: string | null; +} +export interface UpdateAppCapabilityDefaultInput { + clientMutationId?: string; + id: string; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; +} +export interface DeleteAppCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppCapabilityDefaultGrantInput { + clientMutationId?: string; + appCapabilityDefaultGrant: { + capabilityId: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface AppCapabilityDefaultGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateAppCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; +} +export interface DeleteAppCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppClaimedInviteInput { + clientMutationId?: string; + appClaimedInvite: { + data?: Record; + receiverId?: string; + senderId?: string; + }; +} +export interface AppClaimedInvitePatch { + data?: Record | null; + receiverId?: string | null; + senderId?: string | null; +} +export interface UpdateAppClaimedInviteInput { + clientMutationId?: string; + id: string; + appClaimedInvitePatch: AppClaimedInvitePatch; +} +export interface DeleteAppClaimedInviteInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppGrantInput { + clientMutationId?: string; + appGrant: { + actorId?: string; + capabilities?: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface AppGrantPatch { + actorId?: string | null; + capabilities?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateAppGrantInput { + clientMutationId?: string; + id: string; + appGrantPatch: AppGrantPatch; +} +export interface DeleteAppGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppInviteInput { + clientMutationId?: string; + appInvite: { + channel?: string; + data?: Record; + email?: ConstructiveInternalTypeEmail; + expiresAt?: string; + inviteCount?: number; + inviteLimit?: number; + inviteToken?: string; + inviteValid?: boolean; + multiple?: boolean; + phone?: string; + profileId?: string; + senderId?: string; }; } export interface AppInvitePatch { @@ -2513,6 +3784,7 @@ export interface CreateAppMembershipInput { clientMutationId?: string; appMembership: { actorId: string; + capabilities?: string; createdBy?: string; granted?: string; isActive?: boolean; @@ -2522,13 +3794,13 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isOwner?: boolean; isVerified?: boolean; - permissions?: string; profileId?: string; updatedBy?: string; }; } export interface AppMembershipPatch { actorId?: string | null; + capabilities?: string | null; createdBy?: string | null; granted?: string | null; isActive?: boolean | null; @@ -2538,7 +3810,6 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isOwner?: boolean | null; isVerified?: boolean | null; - permissions?: string | null; profileId?: string | null; updatedBy?: string | null; } @@ -2575,6 +3846,28 @@ export interface DeleteAppMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateAppMembershipProfileInput { + clientMutationId?: string; + appMembershipProfile: { + actorId: string; + membershipId: string; + profileId: string; + }; +} +export interface AppMembershipProfilePatch { + actorId?: string | null; + membershipId?: string | null; + profileId?: string | null; +} +export interface UpdateAppMembershipProfileInput { + clientMutationId?: string; + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; +} +export interface DeleteAppMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateAppOwnerGrantInput { clientMutationId?: string; appOwnerGrant: { @@ -2597,85 +3890,125 @@ export interface DeleteAppOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionInput { +export interface CreateAppProfileCapabilityInput { clientMutationId?: string; - appPermission: { - bitnum?: number; - bitstr?: string; + appProfileCapability: { + capabilityId: string; + profileId: string; + }; +} +export interface AppProfileCapabilityPatch { + capabilityId?: string | null; + profileId?: string | null; +} +export interface UpdateAppProfileCapabilityInput { + clientMutationId?: string; + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; +} +export interface DeleteAppProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppProfileInput { + clientMutationId?: string; + appProfile: { + capabilities?: string; description?: string; - name?: string; + isDefault?: boolean; + isSystem?: boolean; + name: string; + slug: string; }; } -export interface AppPermissionPatch { - bitnum?: number | null; - bitstr?: string | null; +export interface AppProfilePatch { + capabilities?: string | null; description?: string | null; + isDefault?: boolean | null; + isSystem?: boolean | null; name?: string | null; + slug?: string | null; } -export interface UpdateAppPermissionInput { +export interface UpdateAppProfileInput { clientMutationId?: string; id: string; - appPermissionPatch: AppPermissionPatch; + appProfilePatch: AppProfilePatch; } -export interface DeleteAppPermissionInput { +export interface DeleteAppProfileInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultInput { +export interface CreateAppProfileDefinitionGrantInput { clientMutationId?: string; - appPermissionDefault: { - permissions?: string; + appProfileDefinitionGrant: { + capabilityId?: string; + grantorId?: string; + isGrant?: boolean; + profileId?: string; }; } -export interface AppPermissionDefaultPatch { - permissions?: string | null; +export interface AppProfileDefinitionGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; + profileId?: string | null; } -export interface UpdateAppPermissionDefaultInput { +export interface UpdateAppProfileDefinitionGrantInput { clientMutationId?: string; id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; } -export interface DeleteAppPermissionDefaultInput { +export interface DeleteAppProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultGrantInput { +export interface CreateAppProfileGrantInput { clientMutationId?: string; - appPermissionDefaultGrant: { + appProfileGrant: { grantorId?: string; isGrant?: boolean; - permissionId: string; + membershipId?: string; + profileId?: string; }; } -export interface AppPermissionDefaultGrantPatch { +export interface AppProfileGrantPatch { grantorId?: string | null; isGrant?: boolean | null; - permissionId?: string | null; + membershipId?: string | null; + profileId?: string | null; } -export interface UpdateAppPermissionDefaultGrantInput { +export interface UpdateAppProfileGrantInput { clientMutationId?: string; id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; + appProfileGrantPatch: AppProfileGrantPatch; } -export interface DeleteAppPermissionDefaultGrantInput { +export interface DeleteAppProfileGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultPermissionInput { +export interface CreateAppProfileTemplateInput { clientMutationId?: string; - appPermissionDefaultPermission: { - permissionId: string; + appProfileTemplate: { + capabilities?: string; + description?: string; + isDefault?: boolean; + name: string; + slug: string; }; } -export interface AppPermissionDefaultPermissionPatch { - permissionId?: string | null; +export interface AppProfileTemplatePatch { + capabilities?: string | null; + description?: string | null; + isDefault?: boolean | null; + name?: string | null; + slug?: string | null; } -export interface UpdateAppPermissionDefaultPermissionInput { +export interface UpdateAppProfileTemplateInput { clientMutationId?: string; id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; + appProfileTemplatePatch: AppProfileTemplatePatch; } -export interface DeleteAppPermissionDefaultPermissionInput { +export interface DeleteAppProfileTemplateInput { clientMutationId?: string; id: string; } @@ -2729,6 +4062,96 @@ export interface DeleteOrgAdminGrantInput { clientMutationId?: string; id: string; } +export interface CreateOrgCapabilityInput { + clientMutationId?: string; + orgCapability: { + bitnum?: number; + bitstr?: string; + description?: string; + kind?: string; + name?: string; + }; +} +export interface OrgCapabilityPatch { + bitnum?: number | null; + bitstr?: string | null; + description?: string | null; + kind?: string | null; + name?: string | null; +} +export interface UpdateOrgCapabilityInput { + clientMutationId?: string; + id: string; + orgCapabilityPatch: OrgCapabilityPatch; +} +export interface DeleteOrgCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + orgCapabilityDefaultCapability: { + capabilityId: string; + entityId: string; + }; +} +export interface OrgCapabilityDefaultCapabilityPatch { + capabilityId?: string | null; + entityId?: string | null; +} +export interface UpdateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; +} +export interface DeleteOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultInput { + clientMutationId?: string; + orgCapabilityDefault: { + capabilities?: string; + entityId: string; + }; +} +export interface OrgCapabilityDefaultPatch { + capabilities?: string | null; + entityId?: string | null; +} +export interface UpdateOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; +} +export interface DeleteOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + orgCapabilityDefaultGrant: { + capabilityId: string; + entityId: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface OrgCapabilityDefaultGrantPatch { + capabilityId?: string | null; + entityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; +} +export interface DeleteOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgChartEdgeInput { clientMutationId?: string; orgChartEdge: { @@ -2853,18 +4276,18 @@ export interface CreateOrgGrantInput { clientMutationId?: string; orgGrant: { actorId?: string; + capabilities?: string; entityId: string; grantorId?: string; isGrant?: boolean; - permissions?: string; }; } export interface OrgGrantPatch { actorId?: string | null; + capabilities?: string | null; entityId?: string | null; grantorId?: string | null; isGrant?: boolean | null; - permissions?: string | null; } export interface UpdateOrgGrantInput { clientMutationId?: string; @@ -2980,6 +4403,7 @@ export interface CreateOrgMembershipInput { clientMutationId?: string; orgMembership: { actorId: string; + capabilities?: string; createdBy?: string; entityId: string; granted?: string; @@ -2991,13 +4415,13 @@ export interface CreateOrgMembershipInput { isExternal?: boolean; isOwner?: boolean; isReadOnly?: boolean; - permissions?: string; profileId?: string; updatedBy?: string; }; } export interface OrgMembershipPatch { actorId?: string | null; + capabilities?: string | null; createdBy?: string | null; entityId?: string | null; granted?: string | null; @@ -3009,7 +4433,6 @@ export interface OrgMembershipPatch { isExternal?: boolean | null; isOwner?: boolean | null; isReadOnly?: boolean | null; - permissions?: string | null; profileId?: string | null; updatedBy?: string | null; } @@ -3046,6 +4469,28 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateOrgMembershipProfileInput { + clientMutationId?: string; + orgMembershipProfile: { + actorId: string; + membershipId: string; + profileId: string; + }; +} +export interface OrgMembershipProfilePatch { + actorId?: string | null; + membershipId?: string | null; + profileId?: string | null; +} +export interface UpdateOrgMembershipProfileInput { + clientMutationId?: string; + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; +} +export interface DeleteOrgMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgMembershipSettingInput { clientMutationId?: string; orgMembershipSetting: { @@ -3108,102 +4553,168 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionInput { +export interface CreateOrgProfileCapabilityInput { clientMutationId?: string; - orgPermission: { - bitnum?: number; - bitstr?: string; + orgProfileCapability: { + capabilityId: string; + profileId: string; + }; +} +export interface OrgProfileCapabilityPatch { + capabilityId?: string | null; + profileId?: string | null; +} +export interface UpdateOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; +} +export interface DeleteOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgProfileInput { + clientMutationId?: string; + orgProfile: { + capabilities?: string; description?: string; - name?: string; + entityId?: string; + isDefault?: boolean; + isSystem?: boolean; + name: string; + slug: string; }; } -export interface OrgPermissionPatch { - bitnum?: number | null; - bitstr?: string | null; +export interface OrgProfilePatch { + capabilities?: string | null; description?: string | null; + entityId?: string | null; + isDefault?: boolean | null; + isSystem?: boolean | null; name?: string | null; + slug?: string | null; } -export interface UpdateOrgPermissionInput { +export interface UpdateOrgProfileInput { clientMutationId?: string; id: string; - orgPermissionPatch: OrgPermissionPatch; + orgProfilePatch: OrgProfilePatch; } -export interface DeleteOrgPermissionInput { +export interface DeleteOrgProfileInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultInput { +export interface CreateOrgProfileDefinitionGrantInput { clientMutationId?: string; - orgPermissionDefault: { - entityId: string; - permissions?: string; + orgProfileDefinitionGrant: { + capabilityId?: string; + grantorId?: string; + isGrant?: boolean; + profileId?: string; }; } -export interface OrgPermissionDefaultPatch { - entityId?: string | null; - permissions?: string | null; +export interface OrgProfileDefinitionGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; + profileId?: string | null; } -export interface UpdateOrgPermissionDefaultInput { +export interface UpdateOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; } -export interface DeleteOrgPermissionDefaultInput { +export interface DeleteOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultGrantInput { +export interface CreateOrgProfileGrantInput { clientMutationId?: string; - orgPermissionDefaultGrant: { - entityId: string; + orgProfileGrant: { + entityId?: string; grantorId?: string; isGrant?: boolean; - permissionId: string; + membershipId?: string; + profileId?: string; }; } -export interface OrgPermissionDefaultGrantPatch { +export interface OrgProfileGrantPatch { entityId?: string | null; grantorId?: string | null; isGrant?: boolean | null; - permissionId?: string | null; + membershipId?: string | null; + profileId?: string | null; } -export interface UpdateOrgPermissionDefaultGrantInput { +export interface UpdateOrgProfileGrantInput { clientMutationId?: string; id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; + orgProfileGrantPatch: OrgProfileGrantPatch; } -export interface DeleteOrgPermissionDefaultGrantInput { +export interface DeleteOrgProfileGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultPermissionInput { +export interface CreateOrgProfileTemplateInput { clientMutationId?: string; - orgPermissionDefaultPermission: { - entityId: string; - permissionId: string; + orgProfileTemplate: { + capabilities?: string; + description?: string; + isDefault?: boolean; + name: string; + slug: string; }; } -export interface OrgPermissionDefaultPermissionPatch { - entityId?: string | null; - permissionId?: string | null; +export interface OrgProfileTemplatePatch { + capabilities?: string | null; + description?: string | null; + isDefault?: boolean | null; + name?: string | null; + slug?: string | null; } -export interface UpdateOrgPermissionDefaultPermissionInput { +export interface UpdateOrgProfileTemplateInput { clientMutationId?: string; id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; + orgProfileTemplatePatch: OrgProfileTemplatePatch; } -export interface DeleteOrgPermissionDefaultPermissionInput { +export interface DeleteOrgProfileTemplateInput { clientMutationId?: string; id: string; } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - AppPermission: { - appPermissionDefaultGrantsByPermissionId: 'AppPermissionDefaultGrant', + AppCapability: { + appCapabilityDefaultGrantsByCapabilityId: 'AppCapabilityDefaultGrant', + appProfileCapabilitiesByCapabilityId: 'AppProfileCapability', + appProfileDefinitionGrantsByCapabilityId: 'AppProfileDefinitionGrant', + }, + AppMembership: { + appMembershipProfilesByMembershipId: 'AppMembershipProfile', + appProfileGrantsByMembershipId: 'AppProfileGrant', + }, + AppProfile: { + appInvitesByProfileId: 'AppInvite', + appMembershipProfilesByProfileId: 'AppMembershipProfile', + appMembershipsByProfileId: 'AppMembership', + appProfileCapabilitiesByProfileId: 'AppProfileCapability', + appProfileDefinitionGrantsByProfileId: 'AppProfileDefinitionGrant', + appProfileGrantsByProfileId: 'AppProfileGrant', + }, + OrgCapability: { + orgCapabilityDefaultCapabilitiesByCapabilityId: 'OrgCapabilityDefaultCapability', + orgCapabilityDefaultGrantsByCapabilityId: 'OrgCapabilityDefaultGrant', + orgProfileCapabilitiesByCapabilityId: 'OrgProfileCapability', + orgProfileDefinitionGrantsByCapabilityId: 'OrgProfileDefinitionGrant', + }, + OrgMembership: { + orgMembershipProfilesByMembershipId: 'OrgMembershipProfile', + orgProfileGrantsByMembershipId: 'OrgProfileGrant', }, - OrgPermission: { - orgPermissionDefaultGrantsByPermissionId: 'OrgPermissionDefaultGrant', - orgPermissionDefaultPermissionsByPermissionId: 'OrgPermissionDefaultPermission', + OrgProfile: { + orgInvitesByProfileId: 'OrgInvite', + orgMembershipProfilesByProfileId: 'OrgMembershipProfile', + orgMembershipsByProfileId: 'OrgMembership', + orgProfileCapabilitiesByProfileId: 'OrgProfileCapability', + orgProfileDefinitionGrantsByProfileId: 'OrgProfileDefinitionGrant', + orgProfileGrantsByProfileId: 'OrgProfileGrant', }, } as Record>; // ============ Custom Input Types (from schema) ============ @@ -3224,6 +4735,33 @@ export interface SubmitOrgInviteCodeInput { clientMutationId?: string; token?: string; } +/** A filter to be used against many `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -3301,19 +4839,118 @@ export interface ConstructiveInternalTypeEmailFilter { /** Starts with the specified string (case-insensitive). */ startsWithInsensitive?: ConstructiveInternalTypeEmail; } -/** A filter to be used against many `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionToManyAppPermissionDefaultGrantFilter { +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppMembershipProfileFilter { /** Filters to entities where every related entity matches. */ - every?: AppPermissionDefaultGrantFilter; + every?: AppMembershipProfileFilter; /** Filters to entities where no related entity matches. */ - none?: AppPermissionDefaultGrantFilter; + none?: AppMembershipProfileFilter; /** Filters to entities where at least one related entity matches. */ - some?: AppPermissionDefaultGrantFilter; + some?: AppMembershipProfileFilter; } -/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ -export interface ConstructiveInternalTypeImageFilter { - /** Contained by the specified JSON. */ - containedBy?: ConstructiveInternalTypeImage; +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; +} +/** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppInviteFilter { + /** Filters to entities where every related entity matches. */ + every?: AppInviteFilter; + /** Filters to entities where no related entity matches. */ + none?: AppInviteFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppInviteFilter; +} +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipProfileFilter; +} +/** A filter to be used against many `AppMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; +} +/** A filter to be used against many `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultCapabilityFilter; +} +/** A filter to be used against many `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} +/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeImageFilter { + /** Contained by the specified JSON. */ + containedBy?: ConstructiveInternalTypeImage; /** Contains the specified JSON. */ contains?: ConstructiveInternalTypeImage; /** Contains all of the specified keys. */ @@ -3345,23 +4982,77 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -/** A filter to be used against many `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultGrantFilter { +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipProfileFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; +} +/** A filter to be used against many `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgInviteFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgInviteFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgInviteFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgInviteFilter; +} +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipProfileFilter; +} +/** A filter to be used against many `OrgMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultGrantFilter; + every?: OrgMembershipFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultGrantFilter; + none?: OrgMembershipFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultGrantFilter; + some?: OrgMembershipFilter; } -/** A filter to be used against many `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultPermissionFilter { +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileCapabilityFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultPermissionFilter; + every?: OrgProfileCapabilityFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultPermissionFilter; + none?: OrgProfileCapabilityFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultPermissionFilter; + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; } /** An input for mutations affecting `AppAdminGrant` */ export interface AppAdminGrantInput { @@ -3374,6 +5065,45 @@ export interface AppAdminGrantInput { isGrant?: boolean; updatedAt?: string; } +/** An input for mutations affecting `AppCapability` */ +export interface AppCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** An input for mutations affecting `AppCapabilityDefaultCapability` */ +export interface AppCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + id?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppCapabilityDefault` */ +export interface AppCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + id?: string; +} +/** An input for mutations affecting `AppCapabilityDefaultGrant` */ +export interface AppCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} /** An input for mutations affecting `AppClaimedInvite` */ export interface AppClaimedInviteInput { createdAt?: string; @@ -3388,15 +5118,15 @@ export interface AppClaimedInviteInput { } /** An input for mutations affecting `AppGrant` */ export interface AppGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** An input for mutations affecting `AppInvite` */ @@ -3433,9 +5163,11 @@ export interface AppInviteInput { export interface AppMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -3452,8 +5184,6 @@ export interface AppMembershipInput { isOwner?: boolean; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -3470,6 +5200,18 @@ export interface AppMembershipDefaultInput { updatedAt?: string; updatedBy?: string; } +/** An input for mutations affecting `AppMembershipProfile` */ +export interface AppMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} /** An input for mutations affecting `AppOwnerGrant` */ export interface AppOwnerGrantInput { /** The member receiving or losing the ownership grant; NULL if user was deleted */ @@ -3481,41 +5223,74 @@ export interface AppOwnerGrantInput { isGrant?: boolean; updatedAt?: string; } -/** An input for mutations affecting `AppPermission` */ -export interface AppPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** An input for mutations affecting `AppProfileCapability` */ +export interface AppProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppProfile` */ +export interface AppProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this profile and its intended use */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; + updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefault` */ -export interface AppPermissionDefaultInput { +/** An input for mutations affecting `AppProfileDefinitionGrant` */ +export interface AppProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; + updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefaultGrant` */ -export interface AppPermissionDefaultGrantInput { +/** An input for mutations affecting `AppProfileGrant` */ +export interface AppProfileGrantInput { createdAt?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefaultPermission` */ -export interface AppPermissionDefaultPermissionInput { +/** An input for mutations affecting `AppProfileTemplate` */ +export interface AppProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; createdAt?: string; + /** Human-readable description of this template profile */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; updatedAt?: string; } /** An input for mutations affecting `MembershipType` */ @@ -3546,6 +5321,51 @@ export interface OrgAdminGrantInput { isGrant?: boolean; updatedAt?: string; } +/** An input for mutations affecting `OrgCapability` */ +export interface OrgCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** An input for mutations affecting `OrgCapabilityDefaultCapability` */ +export interface OrgCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + /** Scopes this default capability to a specific entity */ + entityId: string; + id?: string; + updatedAt?: string; +} +/** An input for mutations affecting `OrgCapabilityDefault` */ +export interface OrgCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + /** References the entity these default capabilities apply to */ + entityId: string; + id?: string; +} +/** An input for mutations affecting `OrgCapabilityDefaultGrant` */ +export interface OrgCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + /** Scopes this audit entry to a specific entity */ + entityId: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} /** An input for mutations affecting `OrgChartEdge` */ export interface OrgChartEdgeInput { /** User ID of the subordinate (employee) in this reporting relationship */ @@ -3597,17 +5417,17 @@ export interface OrgClaimedInviteInput { } /** An input for mutations affecting `OrgGrant` */ export interface OrgGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** An input for mutations affecting `OrgInvite` */ @@ -3681,11 +5501,13 @@ export interface OrgMemberProfileInput { export interface OrgMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; /** References the entity (org or group) this membership belongs to */ entityId: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -3698,14 +5520,12 @@ export interface OrgMembershipInput { isBanned?: boolean; /** Whether this membership is temporarily disabled */ isDisabled?: boolean; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -3722,6 +5542,18 @@ export interface OrgMembershipDefaultInput { updatedAt?: string; updatedBy?: string; } +/** An input for mutations affecting `OrgMembershipProfile` */ +export interface OrgMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} /** An input for mutations affecting `OrgMembershipSetting` */ export interface OrgMembershipSettingInput { /** Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) */ @@ -3739,7 +5571,7 @@ export interface OrgMembershipSettingInput { /** References the entity these settings apply to */ entityId: string; id?: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string; @@ -3761,53 +5593,88 @@ export interface OrgOwnerGrantInput { isGrant?: boolean; updatedAt?: string; } -/** An input for mutations affecting `OrgPermission` */ -export interface OrgPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** An input for mutations affecting `OrgProfileCapability` */ +export interface OrgProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** An input for mutations affecting `OrgProfile` */ +export interface OrgProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this profile and its intended use */ description?: string; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ + entityId?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; + updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefault` */ -export interface OrgPermissionDefaultInput { - /** References the entity these default permissions apply to */ - entityId: string; +/** An input for mutations affecting `OrgProfileDefinitionGrant` */ +export interface OrgProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; + updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefaultGrant` */ -export interface OrgPermissionDefaultGrantInput { +/** An input for mutations affecting `OrgProfileGrant` */ +export interface OrgProfileGrantInput { createdAt?: string; - /** Scopes this audit entry to a specific entity */ - entityId: string; + /** The entity (org or group) scope for this profile grant */ + entityId?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefaultPermission` */ -export interface OrgPermissionDefaultPermissionInput { +/** An input for mutations affecting `OrgProfileTemplate` */ +export interface OrgProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; createdAt?: string; - /** Scopes this default permission to a specific entity */ - entityId: string; + /** Human-readable description of this template profile */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; updatedAt?: string; } -/** A filter to be used against `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultGrantFilter { +/** A filter to be used against `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultGrantFilter[]; + and?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -3817,24 +5684,47 @@ export interface AppPermissionDefaultGrantFilter { /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultGrantFilter; + not?: AppCapabilityDefaultGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppCapabilityDefaultGrantFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultGrantFilter { +/** A filter to be used against `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultGrantFilter[]; + and?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileDefinitionGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `grantorId` field. */ grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ @@ -3842,234 +5732,596 @@ export interface OrgPermissionDefaultGrantFilter { /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultGrantFilter; + not?: AppProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultPermissionFilter { +/** A filter to be used against `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultPermissionFilter[]; + and?: AppMembershipProfileFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultPermissionFilter; + not?: AppMembershipProfileFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Included in the specified list. */ - in?: string[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not included in the specified list. */ - notIn?: string[]; -} -/** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ -export interface UUIDFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Included in the specified list. */ - in?: string[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not included in the specified list. */ - notIn?: string[]; +/** A filter to be used against `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ -export interface BooleanFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: boolean; - /** Equal to the specified value. */ - equalTo?: boolean; - /** Greater than the specified value. */ - greaterThan?: boolean; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: boolean; - /** Included in the specified list. */ - in?: boolean[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: boolean; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: boolean; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: boolean; - /** Not equal to the specified value. */ - notEqualTo?: boolean; - /** Not included in the specified list. */ - notIn?: boolean[]; +/** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface AppInviteFilter { + /** Checks for all expressions in this list. */ + and?: AppInviteFilter[]; + /** Filter by the object’s `channel` field. */ + channel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Negates the expression. */ + not?: AppInviteFilter; + /** Checks for any expressions in this list. */ + or?: AppInviteFilter[]; + /** Filter by the object’s `phone` field. */ + phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionFilter { +/** 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 `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: AppPermissionFilter[]; - /** Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. */ - appPermissionDefaultGrantsByPermissionId?: AppPermissionToManyAppPermissionDefaultGrantFilter; - /** `appPermissionDefaultGrantsByPermissionId` exist. */ - appPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. */ - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermissionFilter; - /** A related `appPermissionDefaultPermissionByPermissionId` exists. */ - appPermissionDefaultPermissionByPermissionIdExists?: boolean; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + and?: AppMembershipFilter[]; + /** Filter by the object’s `appMembershipProfilesByMembershipId` relation. */ + appMembershipProfilesByMembershipId?: AppMembershipToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByMembershipId` exist. */ + appMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByMembershipId` relation. */ + appProfileGrantsByMembershipId?: AppMembershipToManyAppProfileGrantFilter; + /** `appProfileGrantsByMembershipId` exist. */ + appProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `granted` field. */ + granted?: BitStringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** 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 `isOwner` field. */ + isOwner?: BooleanFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionFilter; + not?: AppMembershipFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionFilter[]; + or?: AppMembershipFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; } -/** A filter to be used against `OrgPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionFilter { +/** A filter to be used against `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionFilter[]; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + and?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionFilter; + not?: OrgCapabilityDefaultCapabilityFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionFilter[]; - /** Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. */ - orgPermissionDefaultGrantsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultGrantFilter; - /** `orgPermissionDefaultGrantsByPermissionId` exist. */ - orgPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. */ - orgPermissionDefaultPermissionsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultPermissionFilter; - /** `orgPermissionDefaultPermissionsByPermissionId` exist. */ - orgPermissionDefaultPermissionsByPermissionIdExist?: boolean; -} -/** A filter to be used against `AppPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultPermissionFilter { + or?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultPermissionFilter[]; + and?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultPermissionFilter; + not?: OrgCapabilityDefaultGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgCapabilityDefaultGrantFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { +/** A filter to be used against `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileDefinitionGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgProfileDefinitionGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgInviteFilter { + /** Checks for all expressions in this list. */ + and?: OrgInviteFilter[]; + /** Filter by the object’s `channel` field. */ + channel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Negates the expression. */ + not?: OrgInviteFilter; + /** Checks for any expressions in this list. */ + or?: OrgInviteFilter[]; + /** Filter by the object’s `phone` field. */ + phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** 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 `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `granted` field. */ + granted?: BitStringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** 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 `isExternal` field. */ + isExternal?: BooleanFilter; + /** Filter by the object’s `isOwner` field. */ + isOwner?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Negates the expression. */ + not?: OrgMembershipFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipFilter[]; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; + /** Filter by the object’s `orgMembershipProfilesByMembershipId` relation. */ + orgMembershipProfilesByMembershipId?: OrgMembershipToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByMembershipId` exist. */ + orgMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByMembershipId` relation. */ + orgProfileGrantsByMembershipId?: OrgMembershipToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByMembershipId` exist. */ + orgProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; +} +/** A filter to be used against `AppCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityFilter[]; + /** Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. */ + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapabilityFilter; + /** A related `appCapabilityDefaultCapabilityByCapabilityId` exists. */ + appCapabilityDefaultCapabilityByCapabilityIdExists?: boolean; + /** Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. */ + appCapabilityDefaultGrantsByCapabilityId?: AppCapabilityToManyAppCapabilityDefaultGrantFilter; + /** `appCapabilityDefaultGrantsByCapabilityId` exist. */ + appCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. */ + appProfileCapabilitiesByCapabilityId?: AppCapabilityToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByCapabilityId` exist. */ + appProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. */ + appProfileDefinitionGrantsByCapabilityId?: AppCapabilityToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByCapabilityId` exist. */ + appProfileDefinitionGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityFilter[]; +} +/** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ +export interface UUIDFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; + distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: number; + equalTo?: string; /** Greater than the specified value. */ - greaterThan?: number; + greaterThan?: string; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; + greaterThanOrEqualTo?: string; /** Included in the specified list. */ - in?: number[]; + in?: string[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: number; + lessThan?: string; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; + lessThanOrEqualTo?: string; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; + notDistinctFrom?: string; /** Not equal to the specified value. */ - notEqualTo?: number; + notEqualTo?: string; /** Not included in the specified list. */ - notIn?: number[]; + notIn?: string[]; } -/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ -export interface BitStringFilter { +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { /** Not equal to the specified value, treating null like an ordinary value. */ distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: string; + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: boolean; + /** Equal to the specified value. */ + equalTo?: boolean; /** Greater than the specified value. */ - greaterThan?: string; + greaterThan?: boolean; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; + greaterThanOrEqualTo?: boolean; /** Included in the specified list. */ - in?: string[]; + in?: boolean[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: string; + lessThan?: boolean; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; + lessThanOrEqualTo?: boolean; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; + notDistinctFrom?: boolean; /** Not equal to the specified value. */ - notEqualTo?: string; + notEqualTo?: boolean; /** Not included in the specified list. */ - notIn?: string[]; + notIn?: boolean[]; +} +/** A filter to be used against `AppProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileFilter[]; + /** Filter by the object’s `appInvitesByProfileId` relation. */ + appInvitesByProfileId?: AppProfileToManyAppInviteFilter; + /** `appInvitesByProfileId` exist. */ + appInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipProfilesByProfileId` relation. */ + appMembershipProfilesByProfileId?: AppProfileToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByProfileId` exist. */ + appMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipsByProfileId` relation. */ + appMembershipsByProfileId?: AppProfileToManyAppMembershipFilter; + /** `appMembershipsByProfileId` exist. */ + appMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByProfileId` relation. */ + appProfileCapabilitiesByProfileId?: AppProfileToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByProfileId` exist. */ + appProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. */ + appProfileDefinitionGrantsByProfileId?: AppProfileToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByProfileId` exist. */ + appProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByProfileId` relation. */ + appProfileGrantsByProfileId?: AppProfileToManyAppProfileGrantFilter; + /** `appProfileGrantsByProfileId` exist. */ + appProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } /** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ export interface StringFilter { @@ -4148,39 +6400,231 @@ export interface StringFilter { /** Starts with the specified string (case-insensitive). */ startsWithInsensitive?: string; } -/** A connection to a list of `AppPermission` values. */ +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value. */ + equalTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; + /** Included in the specified list. */ + in?: number[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not included in the specified list. */ + notIn?: number[]; +} +/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ +export interface BitStringFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against `OrgCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityFilter[]; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityFilter[]; + /** Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. */ + orgCapabilityDefaultCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter; + /** `orgCapabilityDefaultCapabilitiesByCapabilityId` exist. */ + orgCapabilityDefaultCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. */ + orgCapabilityDefaultGrantsByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter; + /** `orgCapabilityDefaultGrantsByCapabilityId` exist. */ + orgCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. */ + orgProfileCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByCapabilityId` exist. */ + orgProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. */ + orgProfileDefinitionGrantsByCapabilityId?: OrgCapabilityToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByCapabilityId` exist. */ + orgProfileDefinitionGrantsByCapabilityIdExist?: boolean; +} +/** A filter to be used against `OrgProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileFilter[]; + /** Filter by the object’s `orgInvitesByProfileId` relation. */ + orgInvitesByProfileId?: OrgProfileToManyOrgInviteFilter; + /** `orgInvitesByProfileId` exist. */ + orgInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipProfilesByProfileId` relation. */ + orgMembershipProfilesByProfileId?: OrgProfileToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByProfileId` exist. */ + orgMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipsByProfileId` relation. */ + orgMembershipsByProfileId?: OrgProfileToManyOrgMembershipFilter; + /** `orgMembershipsByProfileId` exist. */ + orgMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByProfileId` relation. */ + orgProfileCapabilitiesByProfileId?: OrgProfileToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByProfileId` exist. */ + orgProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. */ + orgProfileDefinitionGrantsByProfileId?: OrgProfileToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByProfileId` exist. */ + orgProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByProfileId` relation. */ + orgProfileGrantsByProfileId?: OrgProfileToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByProfileId` exist. */ + orgProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** 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 `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `AppCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A connection to a list of `AppCapability` values. */ // ============ Payload/Return Types (for custom operations) ============ -export interface AppPermissionConnection { - edges: AppPermissionEdge[]; - nodes: AppPermission[]; +export interface AppCapabilityConnection { + edges: AppCapabilityEdge[]; + nodes: AppCapability[]; pageInfo: PageInfo; totalCount: number; } -export type AppPermissionConnectionSelect = { +export type AppCapabilityConnectionSelect = { edges?: { - select: AppPermissionEdgeSelect; + select: AppCapabilityEdgeSelect; }; nodes?: { - select: AppPermissionSelect; + select: AppCapabilitySelect; }; pageInfo?: { select: PageInfoSelect; }; totalCount?: boolean; }; -/** A connection to a list of `OrgPermission` values. */ -export interface OrgPermissionConnection { - edges: OrgPermissionEdge[]; - nodes: OrgPermission[]; +/** A connection to a list of `OrgCapability` values. */ +export interface OrgCapabilityConnection { + edges: OrgCapabilityEdge[]; + nodes: OrgCapability[]; pageInfo: PageInfo; totalCount: number; } -export type OrgPermissionConnectionSelect = { +export type OrgCapabilityConnectionSelect = { edges?: { - select: OrgPermissionEdgeSelect; + select: OrgCapabilityEdgeSelect; }; nodes?: { - select: OrgPermissionSelect; + select: OrgCapabilitySelect; }; pageInfo?: { select: PageInfoSelect; @@ -4209,64 +6653,244 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface SubmitAppInviteCodePayload { +export interface SubmitAppInviteCodePayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SubmitAppInviteCodePayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface SubmitOrgInviteCodePayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SubmitOrgInviteCodePayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreateAppAdminGrantPayload { + /** The `AppAdminGrant` that was created by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type CreateAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppAdminGrantPayload { + /** The `AppAdminGrant` that was updated by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppAdminGrantPayload { + /** The `AppAdminGrant` that was deleted by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityPayload { + /** The `AppCapability` that was created by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityPayload { + /** The `AppCapability` that was updated by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppCapabilityPayload { + /** The `AppCapability` that was deleted by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was created by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was updated by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was deleted by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was created by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was updated by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; clientMutationId?: string | null; - result?: boolean | null; } -export type SubmitAppInviteCodePayloadSelect = { +export type UpdateAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; }; -export interface SubmitOrgInviteCodePayload { +export interface DeleteAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was deleted by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; clientMutationId?: string | null; - result?: boolean | null; } -export type SubmitOrgInviteCodePayloadSelect = { +export type DeleteAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; }; -export interface CreateAppAdminGrantPayload { - /** The `AppAdminGrant` that was created by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface CreateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was created by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type CreateAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppAdminGrantPayload { - /** The `AppAdminGrant` that was updated by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface UpdateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was updated by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type UpdateAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppAdminGrantPayload { - /** The `AppAdminGrant` that was deleted by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface DeleteAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was deleted by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type DeleteAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; @@ -4495,6 +7119,51 @@ export type DeleteAppMembershipDefaultPayloadSelect = { }; clientMutationId?: boolean; }; +export interface CreateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was created by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type CreateAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was updated by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was deleted by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateAppOwnerGrantPayload { /** The `AppOwnerGrant` that was created by this mutation. */ appOwnerGrant?: AppOwnerGrant | null; @@ -4540,183 +7209,228 @@ export type DeleteAppOwnerGrantPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateAppPermissionPayload { - /** The `AppPermission` that was created by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface CreateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was created by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; + }; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was updated by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type UpdateAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionPayload { - /** The `AppPermission` that was updated by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface DeleteAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was deleted by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type DeleteAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionPayload { - /** The `AppPermission` that was deleted by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface CreateAppProfilePayload { + /** The `AppProfile` that was created by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type CreateAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was created by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface UpdateAppProfilePayload { + /** The `AppProfile` that was updated by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type UpdateAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was updated by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface DeleteAppProfilePayload { + /** The `AppProfile` that was deleted by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type DeleteAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was deleted by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface CreateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was created by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type CreateAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was created by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface UpdateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was updated by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type UpdateAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was updated by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface DeleteAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was deleted by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type DeleteAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was deleted by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface CreateAppProfileGrantPayload { + /** The `AppProfileGrant` that was created by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type CreateAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was created by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface UpdateAppProfileGrantPayload { + /** The `AppProfileGrant` that was updated by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type UpdateAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was updated by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface DeleteAppProfileGrantPayload { + /** The `AppProfileGrant` that was deleted by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type DeleteAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was deleted by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface CreateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was created by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type CreateAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was updated by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; + }; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was deleted by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; + }; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; }; clientMutationId?: boolean; }; @@ -4810,6 +7524,186 @@ export type DeleteOrgAdminGrantPayloadSelect = { select: OrgAdminGrantEdgeSelect; }; }; +export interface CreateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was created by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type CreateOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was updated by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type UpdateOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was deleted by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type DeleteOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was created by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type CreateOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was updated by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type UpdateOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was deleted by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type DeleteOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was created by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type CreateOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was updated by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type UpdateOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was deleted by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type DeleteOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was created by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type CreateOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was updated by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type UpdateOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was deleted by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type DeleteOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; export interface CreateOrgChartEdgePayload { clientMutationId?: string | null; /** The `OrgChartEdge` that was created by this mutation. */ @@ -5215,6 +8109,51 @@ export type DeleteOrgMembershipDefaultPayloadSelect = { select: OrgMembershipDefaultEdgeSelect; }; }; +export interface CreateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was created by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type CreateOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; +export interface UpdateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was updated by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type UpdateOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; +export interface DeleteOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was deleted by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type DeleteOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; export interface CreateOrgMembershipSettingPayload { clientMutationId?: string | null; /** The `OrgMembershipSetting` that was created by this mutation. */ @@ -5305,196 +8244,241 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; -export interface CreateOrgPermissionPayload { +export interface CreateOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was created by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type CreateOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was updated by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type UpdateOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was deleted by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type DeleteOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface CreateOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was created by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was created by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type CreateOrgPermissionPayloadSelect = { +export type CreateOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface UpdateOrgPermissionPayload { +export interface UpdateOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was updated by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was updated by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type UpdateOrgPermissionPayloadSelect = { +export type UpdateOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface DeleteOrgPermissionPayload { +export interface DeleteOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was deleted by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was deleted by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type DeleteOrgPermissionPayloadSelect = { +export type DeleteOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultPayload { +export interface CreateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was created by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was created by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type CreateOrgPermissionDefaultPayloadSelect = { +export type CreateOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultPayload { +export interface UpdateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was updated by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was updated by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type UpdateOrgPermissionDefaultPayloadSelect = { +export type UpdateOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultPayload { +export interface DeleteOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was deleted by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was deleted by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type DeleteOrgPermissionDefaultPayloadSelect = { +export type DeleteOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultGrantPayload { +export interface CreateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was created by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was created by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type CreateOrgPermissionDefaultGrantPayloadSelect = { +export type CreateOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultGrantPayload { +export interface UpdateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was updated by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was updated by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type UpdateOrgPermissionDefaultGrantPayloadSelect = { +export type UpdateOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultGrantPayload { +export interface DeleteOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was deleted by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was deleted by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type DeleteOrgPermissionDefaultGrantPayloadSelect = { +export type DeleteOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultPermissionPayload { +export interface CreateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was created by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was created by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type CreateOrgPermissionDefaultPermissionPayloadSelect = { +export type CreateOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultPermissionPayload { +export interface UpdateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was updated by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was updated by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type UpdateOrgPermissionDefaultPermissionPayloadSelect = { +export type UpdateOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultPermissionPayload { +export interface DeleteOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was deleted by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was deleted by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type DeleteOrgPermissionDefaultPermissionPayloadSelect = { +export type DeleteOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -/** A `AppPermission` edge in the connection. */ -export interface AppPermissionEdge { +/** A `AppCapability` edge in the connection. */ +export interface AppCapabilityEdge { cursor?: string | null; - /** The `AppPermission` at the end of the edge. */ - node?: AppPermission | null; + /** The `AppCapability` at the end of the edge. */ + node?: AppCapability | null; } -export type AppPermissionEdgeSelect = { +export type AppCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionSelect; + select: AppCapabilitySelect; }; }; /** Information about pagination in a connection. */ @@ -5514,16 +8498,16 @@ export type PageInfoSelect = { hasPreviousPage?: boolean; startCursor?: boolean; }; -/** A `OrgPermission` edge in the connection. */ -export interface OrgPermissionEdge { +/** A `OrgCapability` edge in the connection. */ +export interface OrgCapabilityEdge { cursor?: string | null; - /** The `OrgPermission` at the end of the edge. */ - node?: OrgPermission | null; + /** The `OrgCapability` at the end of the edge. */ + node?: OrgCapability | null; } -export type OrgPermissionEdgeSelect = { +export type OrgCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionSelect; + select: OrgCapabilitySelect; }; }; /** A `AppAdminGrant` edge in the connection. */ @@ -5538,6 +8522,42 @@ export type AppAdminGrantEdgeSelect = { select: AppAdminGrantSelect; }; }; +/** A `AppCapabilityDefaultCapability` edge in the connection. */ +export interface AppCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultCapability` at the end of the edge. */ + node?: AppCapabilityDefaultCapability | null; +} +export type AppCapabilityDefaultCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultCapabilitySelect; + }; +}; +/** A `AppCapabilityDefault` edge in the connection. */ +export interface AppCapabilityDefaultEdge { + cursor?: string | null; + /** The `AppCapabilityDefault` at the end of the edge. */ + node?: AppCapabilityDefault | null; +} +export type AppCapabilityDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultSelect; + }; +}; +/** A `AppCapabilityDefaultGrant` edge in the connection. */ +export interface AppCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultGrant` at the end of the edge. */ + node?: AppCapabilityDefaultGrant | null; +} +export type AppCapabilityDefaultGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultGrantSelect; + }; +}; /** A `AppClaimedInvite` edge in the connection. */ export interface AppClaimedInviteEdge { cursor?: string | null; @@ -5598,6 +8618,18 @@ export type AppMembershipDefaultEdgeSelect = { select: AppMembershipDefaultSelect; }; }; +/** A `AppMembershipProfile` edge in the connection. */ +export interface AppMembershipProfileEdge { + cursor?: string | null; + /** The `AppMembershipProfile` at the end of the edge. */ + node?: AppMembershipProfile | null; +} +export type AppMembershipProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: AppMembershipProfileSelect; + }; +}; /** A `AppOwnerGrant` edge in the connection. */ export interface AppOwnerGrantEdge { cursor?: string | null; @@ -5610,40 +8642,64 @@ export type AppOwnerGrantEdgeSelect = { select: AppOwnerGrantSelect; }; }; -/** A `AppPermissionDefault` edge in the connection. */ -export interface AppPermissionDefaultEdge { +/** A `AppProfileCapability` edge in the connection. */ +export interface AppProfileCapabilityEdge { cursor?: string | null; - /** The `AppPermissionDefault` at the end of the edge. */ - node?: AppPermissionDefault | null; + /** The `AppProfileCapability` at the end of the edge. */ + node?: AppProfileCapability | null; } -export type AppPermissionDefaultEdgeSelect = { +export type AppProfileCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultSelect; + select: AppProfileCapabilitySelect; }; }; -/** A `AppPermissionDefaultGrant` edge in the connection. */ -export interface AppPermissionDefaultGrantEdge { +/** A `AppProfile` edge in the connection. */ +export interface AppProfileEdge { cursor?: string | null; - /** The `AppPermissionDefaultGrant` at the end of the edge. */ - node?: AppPermissionDefaultGrant | null; + /** The `AppProfile` at the end of the edge. */ + node?: AppProfile | null; } -export type AppPermissionDefaultGrantEdgeSelect = { +export type AppProfileEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultGrantSelect; + select: AppProfileSelect; }; }; -/** A `AppPermissionDefaultPermission` edge in the connection. */ -export interface AppPermissionDefaultPermissionEdge { +/** A `AppProfileDefinitionGrant` edge in the connection. */ +export interface AppProfileDefinitionGrantEdge { cursor?: string | null; - /** The `AppPermissionDefaultPermission` at the end of the edge. */ - node?: AppPermissionDefaultPermission | null; + /** The `AppProfileDefinitionGrant` at the end of the edge. */ + node?: AppProfileDefinitionGrant | null; } -export type AppPermissionDefaultPermissionEdgeSelect = { +export type AppProfileDefinitionGrantEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultPermissionSelect; + select: AppProfileDefinitionGrantSelect; + }; +}; +/** A `AppProfileGrant` edge in the connection. */ +export interface AppProfileGrantEdge { + cursor?: string | null; + /** The `AppProfileGrant` at the end of the edge. */ + node?: AppProfileGrant | null; +} +export type AppProfileGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppProfileGrantSelect; + }; +}; +/** A `AppProfileTemplate` edge in the connection. */ +export interface AppProfileTemplateEdge { + cursor?: string | null; + /** The `AppProfileTemplate` at the end of the edge. */ + node?: AppProfileTemplate | null; +} +export type AppProfileTemplateEdgeSelect = { + cursor?: boolean; + node?: { + select: AppProfileTemplateSelect; }; }; /** A `MembershipType` edge in the connection. */ @@ -5670,6 +8726,42 @@ export type OrgAdminGrantEdgeSelect = { select: OrgAdminGrantSelect; }; }; +/** A `OrgCapabilityDefaultCapability` edge in the connection. */ +export interface OrgCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultCapability` at the end of the edge. */ + node?: OrgCapabilityDefaultCapability | null; +} +export type OrgCapabilityDefaultCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; +}; +/** A `OrgCapabilityDefault` edge in the connection. */ +export interface OrgCapabilityDefaultEdge { + cursor?: string | null; + /** The `OrgCapabilityDefault` at the end of the edge. */ + node?: OrgCapabilityDefault | null; +} +export type OrgCapabilityDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultSelect; + }; +}; +/** A `OrgCapabilityDefaultGrant` edge in the connection. */ +export interface OrgCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultGrant` at the end of the edge. */ + node?: OrgCapabilityDefaultGrant | null; +} +export type OrgCapabilityDefaultGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultGrantSelect; + }; +}; /** A `OrgChartEdge` edge in the connection. */ export interface OrgChartEdgeEdge { cursor?: string | null; @@ -5778,6 +8870,18 @@ export type OrgMembershipDefaultEdgeSelect = { select: OrgMembershipDefaultSelect; }; }; +/** A `OrgMembershipProfile` edge in the connection. */ +export interface OrgMembershipProfileEdge { + cursor?: string | null; + /** The `OrgMembershipProfile` at the end of the edge. */ + node?: OrgMembershipProfile | null; +} +export type OrgMembershipProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMembershipProfileSelect; + }; +}; /** A `OrgMembershipSetting` edge in the connection. */ export interface OrgMembershipSettingEdge { cursor?: string | null; @@ -5802,39 +8906,63 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; -/** A `OrgPermissionDefault` edge in the connection. */ -export interface OrgPermissionDefaultEdge { +/** A `OrgProfileCapability` edge in the connection. */ +export interface OrgProfileCapabilityEdge { + cursor?: string | null; + /** The `OrgProfileCapability` at the end of the edge. */ + node?: OrgProfileCapability | null; +} +export type OrgProfileCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgProfileCapabilitySelect; + }; +}; +/** A `OrgProfile` edge in the connection. */ +export interface OrgProfileEdge { + cursor?: string | null; + /** The `OrgProfile` at the end of the edge. */ + node?: OrgProfile | null; +} +export type OrgProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgProfileSelect; + }; +}; +/** A `OrgProfileDefinitionGrant` edge in the connection. */ +export interface OrgProfileDefinitionGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefault` at the end of the edge. */ - node?: OrgPermissionDefault | null; + /** The `OrgProfileDefinitionGrant` at the end of the edge. */ + node?: OrgProfileDefinitionGrant | null; } -export type OrgPermissionDefaultEdgeSelect = { +export type OrgProfileDefinitionGrantEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultSelect; + select: OrgProfileDefinitionGrantSelect; }; }; -/** A `OrgPermissionDefaultGrant` edge in the connection. */ -export interface OrgPermissionDefaultGrantEdge { +/** A `OrgProfileGrant` edge in the connection. */ +export interface OrgProfileGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefaultGrant` at the end of the edge. */ - node?: OrgPermissionDefaultGrant | null; + /** The `OrgProfileGrant` at the end of the edge. */ + node?: OrgProfileGrant | null; } -export type OrgPermissionDefaultGrantEdgeSelect = { +export type OrgProfileGrantEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultGrantSelect; + select: OrgProfileGrantSelect; }; }; -/** A `OrgPermissionDefaultPermission` edge in the connection. */ -export interface OrgPermissionDefaultPermissionEdge { +/** A `OrgProfileTemplate` edge in the connection. */ +export interface OrgProfileTemplateEdge { cursor?: string | null; - /** The `OrgPermissionDefaultPermission` at the end of the edge. */ - node?: OrgPermissionDefaultPermission | null; + /** The `OrgProfileTemplate` at the end of the edge. */ + node?: OrgProfileTemplate | null; } -export type OrgPermissionDefaultPermissionEdgeSelect = { +export type OrgProfileTemplateEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultPermissionSelect; + select: OrgProfileTemplateSelect; }; }; diff --git a/sdk/constructive-react/src/admin/orm/models/appCapability.ts b/sdk/constructive-react/src/admin/orm/models/appCapability.ts new file mode 100644 index 0000000000..fc1636fe62 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appCapability.ts @@ -0,0 +1,245 @@ +/** + * AppCapability 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 { + AppCapability, + AppCapabilityWithRelations, + AppCapabilitySelect, + AppCapabilityFilter, + AppCapabilityOrderBy, + CreateAppCapabilityInput, + UpdateAppCapabilityInput, + AppCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapability', + 'appCapabilities', + 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, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapability', + 'appCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapability', + document, + variables, + transform: (data: { + appCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapability: data.appCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapability', + 'appCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapability', + document, + variables, + transform: (data: { + appCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapability: data.appCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapability', + 'createAppCapability', + 'appCapability', + args.select, + args.data, + 'CreateAppCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'createAppCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapability', + 'updateAppCapability', + 'appCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityInput', + 'id', + 'appCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'updateAppCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapability', + 'deleteAppCapability', + 'appCapability', + { + id: args.where.id, + }, + 'DeleteAppCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'deleteAppCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appCapabilityDefault.ts b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefault.ts new file mode 100644 index 0000000000..815d62d3fc --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefault.ts @@ -0,0 +1,247 @@ +/** + * AppCapabilityDefault 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 { + AppCapabilityDefault, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy, + CreateAppCapabilityDefaultInput, + UpdateAppCapabilityDefaultInput, + AppCapabilityDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + 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, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefault', + document, + variables, + transform: (data: { + appCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefault: data.appCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefault', + document, + variables, + transform: (data: { + appCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefault: data.appCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefault', + 'createAppCapabilityDefault', + 'appCapabilityDefault', + args.select, + args.data, + 'CreateAppCapabilityDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'createAppCapabilityDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefault', + 'updateAppCapabilityDefault', + 'appCapabilityDefault', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultInput', + 'id', + 'appCapabilityDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'updateAppCapabilityDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefault', + 'deleteAppCapabilityDefault', + 'appCapabilityDefault', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'deleteAppCapabilityDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultCapability.ts b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultCapability.ts new file mode 100644 index 0000000000..2f90833f58 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultCapability.ts @@ -0,0 +1,273 @@ +/** + * AppCapabilityDefaultCapability 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 { + AppCapabilityDefaultCapability, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy, + CreateAppCapabilityDefaultCapabilityInput, + UpdateAppCapabilityDefaultCapabilityInput, + AppCapabilityDefaultCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + 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, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapability', + document, + variables, + transform: (data: { + appCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultCapability: data.appCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapability', + document, + variables, + transform: (data: { + appCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultCapability: data.appCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs< + S, + CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefaultCapability', + 'createAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + args.select, + args.data, + 'CreateAppCapabilityDefaultCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'createAppCapabilityDefaultCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefaultCapability', + 'updateAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultCapabilityInput', + 'id', + 'appCapabilityDefaultCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'updateAppCapabilityDefaultCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefaultCapability', + 'deleteAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'deleteAppCapabilityDefaultCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultGrant.ts b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultGrant.ts new file mode 100644 index 0000000000..174d579999 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appCapabilityDefaultGrant.ts @@ -0,0 +1,247 @@ +/** + * AppCapabilityDefaultGrant 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 { + AppCapabilityDefaultGrant, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy, + CreateAppCapabilityDefaultGrantInput, + UpdateAppCapabilityDefaultGrantInput, + AppCapabilityDefaultGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + 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, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrant', + document, + variables, + transform: (data: { + appCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultGrant: data.appCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrant', + document, + variables, + transform: (data: { + appCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultGrant: data.appCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefaultGrant', + 'createAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + args.select, + args.data, + 'CreateAppCapabilityDefaultGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'createAppCapabilityDefaultGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefaultGrant', + 'updateAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultGrantInput', + 'id', + 'appCapabilityDefaultGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'updateAppCapabilityDefaultGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefaultGrant', + 'deleteAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'deleteAppCapabilityDefaultGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appMembershipProfile.ts b/sdk/constructive-react/src/admin/orm/models/appMembershipProfile.ts new file mode 100644 index 0000000000..b3c39ef078 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appMembershipProfile.ts @@ -0,0 +1,247 @@ +/** + * AppMembershipProfile 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 { + AppMembershipProfile, + AppMembershipProfileWithRelations, + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy, + CreateAppMembershipProfileInput, + UpdateAppMembershipProfileInput, + AppMembershipProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppMembershipProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + 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, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfile', + document, + variables, + transform: (data: { + appMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipProfile: data.appMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfile', + document, + variables, + transform: (data: { + appMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipProfile: data.appMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppMembershipProfile', + 'createAppMembershipProfile', + 'appMembershipProfile', + args.select, + args.data, + 'CreateAppMembershipProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'createAppMembershipProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppMembershipProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppMembershipProfile', + 'updateAppMembershipProfile', + 'appMembershipProfile', + args.select, + args.where.id, + args.data, + 'UpdateAppMembershipProfileInput', + 'id', + 'appMembershipProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'updateAppMembershipProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppMembershipProfile', + 'deleteAppMembershipProfile', + 'appMembershipProfile', + { + id: args.where.id, + }, + 'DeleteAppMembershipProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'deleteAppMembershipProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts b/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts deleted file mode 100644 index c967364f31..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * AppPermissionDefault 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 { - AppPermissionDefault, - AppPermissionDefaultWithRelations, - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy, - CreateAppPermissionDefaultInput, - UpdateAppPermissionDefaultInput, - AppPermissionDefaultPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - 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, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefault', - document, - variables, - transform: (data: { - appPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefault', - document, - variables, - transform: (data: { - appPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefault', - 'createAppPermissionDefault', - 'appPermissionDefault', - args.select, - args.data, - 'CreateAppPermissionDefaultInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'createAppPermissionDefault', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefault', - 'updateAppPermissionDefault', - 'appPermissionDefault', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultInput', - 'id', - 'appPermissionDefaultPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'updateAppPermissionDefault', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefault', - 'deleteAppPermissionDefault', - 'appPermissionDefault', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'deleteAppPermissionDefault', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultGrant.ts b/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultGrant.ts deleted file mode 100644 index b6a3b10748..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultGrant.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * AppPermissionDefaultGrant 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 { - AppPermissionDefaultGrant, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy, - CreateAppPermissionDefaultGrantInput, - UpdateAppPermissionDefaultGrantInput, - AppPermissionDefaultGrantPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultGrantModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - 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, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrants', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrant', - document, - variables, - transform: (data: { - appPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultGrant: data.appPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrant', - document, - variables, - transform: (data: { - appPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultGrant: data.appPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefaultGrant', - 'createAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - args.select, - args.data, - 'CreateAppPermissionDefaultGrantInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'createAppPermissionDefaultGrant', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultGrantPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefaultGrant', - 'updateAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultGrantInput', - 'id', - 'appPermissionDefaultGrantPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'updateAppPermissionDefaultGrant', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefaultGrant', - 'deleteAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultGrantInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'deleteAppPermissionDefaultGrant', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultPermission.ts b/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultPermission.ts deleted file mode 100644 index 6e47d9eeec..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/appPermissionDefaultPermission.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * AppPermissionDefaultPermission 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 { - AppPermissionDefaultPermission, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy, - CreateAppPermissionDefaultPermissionInput, - UpdateAppPermissionDefaultPermissionInput, - AppPermissionDefaultPermissionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultPermissionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - 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, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermissions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermission', - document, - variables, - transform: (data: { - appPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultPermission: data.appPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermission', - document, - variables, - transform: (data: { - appPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultPermission: data.appPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs< - S, - CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefaultPermission', - 'createAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - args.select, - args.data, - 'CreateAppPermissionDefaultPermissionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'createAppPermissionDefaultPermission', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultPermissionPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefaultPermission', - 'updateAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultPermissionInput', - 'id', - 'appPermissionDefaultPermissionPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'updateAppPermissionDefaultPermission', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefaultPermission', - 'deleteAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultPermissionInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'deleteAppPermissionDefaultPermission', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/appProfile.ts b/sdk/constructive-react/src/admin/orm/models/appProfile.ts new file mode 100644 index 0000000000..b8a4c48d92 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appProfile.ts @@ -0,0 +1,245 @@ +/** + * AppProfile 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 { + AppProfile, + AppProfileWithRelations, + AppProfileSelect, + AppProfileFilter, + AppProfileOrderBy, + CreateAppProfileInput, + UpdateAppProfileInput, + AppProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfile', + 'appProfiles', + 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, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfile', + 'appProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfile', + document, + variables, + transform: (data: { + appProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfile: data.appProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfile', + 'appProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfile', + document, + variables, + transform: (data: { + appProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfile: data.appProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfile', + 'createAppProfile', + 'appProfile', + args.select, + args.data, + 'CreateAppProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'createAppProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfile', + 'updateAppProfile', + 'appProfile', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileInput', + 'id', + 'appProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'updateAppProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfile', + 'deleteAppProfile', + 'appProfile', + { + id: args.where.id, + }, + 'DeleteAppProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'deleteAppProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appProfileCapability.ts b/sdk/constructive-react/src/admin/orm/models/appProfileCapability.ts new file mode 100644 index 0000000000..86c05be461 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appProfileCapability.ts @@ -0,0 +1,247 @@ +/** + * AppProfileCapability 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 { + AppProfileCapability, + AppProfileCapabilityWithRelations, + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy, + CreateAppProfileCapabilityInput, + UpdateAppProfileCapabilityInput, + AppProfileCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + 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, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapability', + document, + variables, + transform: (data: { + appProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileCapability: data.appProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapability', + document, + variables, + transform: (data: { + appProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileCapability: data.appProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileCapability', + 'createAppProfileCapability', + 'appProfileCapability', + args.select, + args.data, + 'CreateAppProfileCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'createAppProfileCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileCapability', + 'updateAppProfileCapability', + 'appProfileCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileCapabilityInput', + 'id', + 'appProfileCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'updateAppProfileCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileCapability', + 'deleteAppProfileCapability', + 'appProfileCapability', + { + id: args.where.id, + }, + 'DeleteAppProfileCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'deleteAppProfileCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appProfileDefinitionGrant.ts b/sdk/constructive-react/src/admin/orm/models/appProfileDefinitionGrant.ts new file mode 100644 index 0000000000..8ff9167a12 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appProfileDefinitionGrant.ts @@ -0,0 +1,247 @@ +/** + * AppProfileDefinitionGrant 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 { + AppProfileDefinitionGrant, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy, + CreateAppProfileDefinitionGrantInput, + UpdateAppProfileDefinitionGrantInput, + AppProfileDefinitionGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileDefinitionGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + 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, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrant', + document, + variables, + transform: (data: { + appProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileDefinitionGrant: data.appProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrant', + document, + variables, + transform: (data: { + appProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileDefinitionGrant: data.appProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileDefinitionGrant', + 'createAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + args.select, + args.data, + 'CreateAppProfileDefinitionGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'createAppProfileDefinitionGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileDefinitionGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileDefinitionGrant', + 'updateAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileDefinitionGrantInput', + 'id', + 'appProfileDefinitionGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'updateAppProfileDefinitionGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileDefinitionGrant', + 'deleteAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + { + id: args.where.id, + }, + 'DeleteAppProfileDefinitionGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'deleteAppProfileDefinitionGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appProfileGrant.ts b/sdk/constructive-react/src/admin/orm/models/appProfileGrant.ts new file mode 100644 index 0000000000..b22276182b --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appProfileGrant.ts @@ -0,0 +1,245 @@ +/** + * AppProfileGrant 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 { + AppProfileGrant, + AppProfileGrantWithRelations, + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy, + CreateAppProfileGrantInput, + UpdateAppProfileGrantInput, + AppProfileGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrants: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileGrant', + 'appProfileGrants', + 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, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileGrant', + 'appProfileGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrant', + document, + variables, + transform: (data: { + appProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileGrant: data.appProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileGrant', + 'appProfileGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrant', + document, + variables, + transform: (data: { + appProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileGrant: data.appProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileGrant', + 'createAppProfileGrant', + 'appProfileGrant', + args.select, + args.data, + 'CreateAppProfileGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'createAppProfileGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileGrant', + 'updateAppProfileGrant', + 'appProfileGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileGrantInput', + 'id', + 'appProfileGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'updateAppProfileGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileGrant', + 'deleteAppProfileGrant', + 'appProfileGrant', + { + id: args.where.id, + }, + 'DeleteAppProfileGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'deleteAppProfileGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appProfileTemplate.ts b/sdk/constructive-react/src/admin/orm/models/appProfileTemplate.ts new file mode 100644 index 0000000000..273bb28e3f --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/appProfileTemplate.ts @@ -0,0 +1,245 @@ +/** + * AppProfileTemplate 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 { + AppProfileTemplate, + AppProfileTemplateWithRelations, + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy, + CreateAppProfileTemplateInput, + UpdateAppProfileTemplateInput, + AppProfileTemplatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileTemplateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + 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, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplate', + document, + variables, + transform: (data: { + appProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileTemplate: data.appProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplate', + document, + variables, + transform: (data: { + appProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileTemplate: data.appProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileTemplate', + 'createAppProfileTemplate', + 'appProfileTemplate', + args.select, + args.data, + 'CreateAppProfileTemplateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'createAppProfileTemplate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileTemplatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileTemplate', + 'updateAppProfileTemplate', + 'appProfileTemplate', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileTemplateInput', + 'id', + 'appProfileTemplatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'updateAppProfileTemplate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileTemplate', + 'deleteAppProfileTemplate', + 'appProfileTemplate', + { + id: args.where.id, + }, + 'DeleteAppProfileTemplateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'deleteAppProfileTemplate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/index.ts b/sdk/constructive-react/src/admin/orm/models/index.ts index b952c1e1d9..016cb0e8b4 100644 --- a/sdk/constructive-react/src/admin/orm/models/index.ts +++ b/sdk/constructive-react/src/admin/orm/models/index.ts @@ -4,18 +4,28 @@ * DO NOT EDIT - changes will be overwritten */ export { AppAdminGrantModel } from './appAdminGrant'; +export { AppCapabilityModel } from './appCapability'; +export { AppCapabilityDefaultCapabilityModel } from './appCapabilityDefaultCapability'; +export { AppCapabilityDefaultModel } from './appCapabilityDefault'; +export { AppCapabilityDefaultGrantModel } from './appCapabilityDefaultGrant'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { AppGrantModel } from './appGrant'; export { AppInviteModel } from './appInvite'; export { AppMembershipModel } from './appMembership'; export { AppMembershipDefaultModel } from './appMembershipDefault'; +export { AppMembershipProfileModel } from './appMembershipProfile'; export { AppOwnerGrantModel } from './appOwnerGrant'; -export { AppPermissionModel } from './appPermission'; -export { AppPermissionDefaultModel } from './appPermissionDefault'; -export { AppPermissionDefaultGrantModel } from './appPermissionDefaultGrant'; -export { AppPermissionDefaultPermissionModel } from './appPermissionDefaultPermission'; +export { AppProfileCapabilityModel } from './appProfileCapability'; +export { AppProfileModel } from './appProfile'; +export { AppProfileDefinitionGrantModel } from './appProfileDefinitionGrant'; +export { AppProfileGrantModel } from './appProfileGrant'; +export { AppProfileTemplateModel } from './appProfileTemplate'; export { MembershipTypeModel } from './membershipType'; export { OrgAdminGrantModel } from './orgAdminGrant'; +export { OrgCapabilityModel } from './orgCapability'; +export { OrgCapabilityDefaultCapabilityModel } from './orgCapabilityDefaultCapability'; +export { OrgCapabilityDefaultModel } from './orgCapabilityDefault'; +export { OrgCapabilityDefaultGrantModel } from './orgCapabilityDefaultGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; export { OrgClaimedInviteModel } from './orgClaimedInvite'; @@ -27,9 +37,11 @@ export { OrgMemberModel } from './orgMember'; export { OrgMemberProfileModel } from './orgMemberProfile'; export { OrgMembershipModel } from './orgMembership'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; +export { OrgMembershipProfileModel } from './orgMembershipProfile'; export { OrgMembershipSettingModel } from './orgMembershipSetting'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; -export { OrgPermissionModel } from './orgPermission'; -export { OrgPermissionDefaultModel } from './orgPermissionDefault'; -export { OrgPermissionDefaultGrantModel } from './orgPermissionDefaultGrant'; -export { OrgPermissionDefaultPermissionModel } from './orgPermissionDefaultPermission'; +export { OrgProfileCapabilityModel } from './orgProfileCapability'; +export { OrgProfileModel } from './orgProfile'; +export { OrgProfileDefinitionGrantModel } from './orgProfileDefinitionGrant'; +export { OrgProfileGrantModel } from './orgProfileGrant'; +export { OrgProfileTemplateModel } from './orgProfileTemplate'; diff --git a/sdk/constructive-react/src/admin/orm/models/orgCapability.ts b/sdk/constructive-react/src/admin/orm/models/orgCapability.ts new file mode 100644 index 0000000000..e97c3538d1 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgCapability.ts @@ -0,0 +1,245 @@ +/** + * OrgCapability 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 { + OrgCapability, + OrgCapabilityWithRelations, + OrgCapabilitySelect, + OrgCapabilityFilter, + OrgCapabilityOrderBy, + CreateOrgCapabilityInput, + UpdateOrgCapabilityInput, + OrgCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapability', + 'orgCapabilities', + 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, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapability', + 'orgCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapability', + document, + variables, + transform: (data: { + orgCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapability: data.orgCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapability', + 'orgCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapability', + document, + variables, + transform: (data: { + orgCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapability: data.orgCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapability', + 'createOrgCapability', + 'orgCapability', + args.select, + args.data, + 'CreateOrgCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'createOrgCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapability', + 'updateOrgCapability', + 'orgCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityInput', + 'id', + 'orgCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'updateOrgCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapability', + 'deleteOrgCapability', + 'orgCapability', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'deleteOrgCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefault.ts b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefault.ts new file mode 100644 index 0000000000..90328fd612 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefault.ts @@ -0,0 +1,247 @@ +/** + * OrgCapabilityDefault 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 { + OrgCapabilityDefault, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy, + CreateOrgCapabilityDefaultInput, + UpdateOrgCapabilityDefaultInput, + OrgCapabilityDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + 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, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefault', + document, + variables, + transform: (data: { + orgCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefault: data.orgCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefault', + document, + variables, + transform: (data: { + orgCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefault: data.orgCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefault', + 'createOrgCapabilityDefault', + 'orgCapabilityDefault', + args.select, + args.data, + 'CreateOrgCapabilityDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'createOrgCapabilityDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefault', + 'updateOrgCapabilityDefault', + 'orgCapabilityDefault', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultInput', + 'id', + 'orgCapabilityDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'updateOrgCapabilityDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefault', + 'deleteOrgCapabilityDefault', + 'orgCapabilityDefault', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'deleteOrgCapabilityDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultCapability.ts b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultCapability.ts new file mode 100644 index 0000000000..5f902d96ac --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultCapability.ts @@ -0,0 +1,273 @@ +/** + * OrgCapabilityDefaultCapability 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 { + OrgCapabilityDefaultCapability, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy, + CreateOrgCapabilityDefaultCapabilityInput, + UpdateOrgCapabilityDefaultCapabilityInput, + OrgCapabilityDefaultCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + 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, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapability', + document, + variables, + transform: (data: { + orgCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultCapability: data.orgCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapability', + document, + variables, + transform: (data: { + orgCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultCapability: data.orgCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs< + S, + CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefaultCapability', + 'createOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + args.select, + args.data, + 'CreateOrgCapabilityDefaultCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'createOrgCapabilityDefaultCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefaultCapability', + 'updateOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultCapabilityInput', + 'id', + 'orgCapabilityDefaultCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'updateOrgCapabilityDefaultCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefaultCapability', + 'deleteOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'deleteOrgCapabilityDefaultCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultGrant.ts new file mode 100644 index 0000000000..9cce27ce2b --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgCapabilityDefaultGrant.ts @@ -0,0 +1,247 @@ +/** + * OrgCapabilityDefaultGrant 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 { + OrgCapabilityDefaultGrant, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy, + CreateOrgCapabilityDefaultGrantInput, + UpdateOrgCapabilityDefaultGrantInput, + OrgCapabilityDefaultGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + 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, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrant', + document, + variables, + transform: (data: { + orgCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultGrant: data.orgCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrant', + document, + variables, + transform: (data: { + orgCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultGrant: data.orgCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefaultGrant', + 'createOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + args.select, + args.data, + 'CreateOrgCapabilityDefaultGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'createOrgCapabilityDefaultGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefaultGrant', + 'updateOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultGrantInput', + 'id', + 'orgCapabilityDefaultGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'updateOrgCapabilityDefaultGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefaultGrant', + 'deleteOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'deleteOrgCapabilityDefaultGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgMembershipProfile.ts b/sdk/constructive-react/src/admin/orm/models/orgMembershipProfile.ts new file mode 100644 index 0000000000..74a6532a57 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgMembershipProfile.ts @@ -0,0 +1,247 @@ +/** + * OrgMembershipProfile 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 { + OrgMembershipProfile, + OrgMembershipProfileWithRelations, + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy, + CreateOrgMembershipProfileInput, + UpdateOrgMembershipProfileInput, + OrgMembershipProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgMembershipProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + 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, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfile', + document, + variables, + transform: (data: { + orgMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipProfile: data.orgMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfile', + document, + variables, + transform: (data: { + orgMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipProfile: data.orgMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgMembershipProfile', + 'createOrgMembershipProfile', + 'orgMembershipProfile', + args.select, + args.data, + 'CreateOrgMembershipProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'createOrgMembershipProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgMembershipProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgMembershipProfile', + 'updateOrgMembershipProfile', + 'orgMembershipProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgMembershipProfileInput', + 'id', + 'orgMembershipProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'updateOrgMembershipProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgMembershipProfile', + 'deleteOrgMembershipProfile', + 'orgMembershipProfile', + { + id: args.where.id, + }, + 'DeleteOrgMembershipProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'deleteOrgMembershipProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts b/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts deleted file mode 100644 index 20ed957d15..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * OrgPermissionDefault 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 { - OrgPermissionDefault, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy, - CreateOrgPermissionDefaultInput, - UpdateOrgPermissionDefaultInput, - OrgPermissionDefaultPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - 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, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefault', - document, - variables, - transform: (data: { - orgPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefault', - document, - variables, - transform: (data: { - orgPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefault', - 'createOrgPermissionDefault', - 'orgPermissionDefault', - args.select, - args.data, - 'CreateOrgPermissionDefaultInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'createOrgPermissionDefault', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefault', - 'updateOrgPermissionDefault', - 'orgPermissionDefault', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultInput', - 'id', - 'orgPermissionDefaultPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'updateOrgPermissionDefault', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefault', - 'deleteOrgPermissionDefault', - 'orgPermissionDefault', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'deleteOrgPermissionDefault', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultGrant.ts deleted file mode 100644 index 07d5976acb..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultGrant.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * OrgPermissionDefaultGrant 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 { - OrgPermissionDefaultGrant, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy, - CreateOrgPermissionDefaultGrantInput, - UpdateOrgPermissionDefaultGrantInput, - OrgPermissionDefaultGrantPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultGrantModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - 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, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrants', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrant', - document, - variables, - transform: (data: { - orgPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultGrant: data.orgPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrant', - document, - variables, - transform: (data: { - orgPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultGrant: data.orgPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefaultGrant', - 'createOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - args.select, - args.data, - 'CreateOrgPermissionDefaultGrantInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'createOrgPermissionDefaultGrant', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultGrantPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefaultGrant', - 'updateOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultGrantInput', - 'id', - 'orgPermissionDefaultGrantPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'updateOrgPermissionDefaultGrant', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefaultGrant', - 'deleteOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultGrantInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'deleteOrgPermissionDefaultGrant', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultPermission.ts b/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultPermission.ts deleted file mode 100644 index 3339ceaeca..0000000000 --- a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefaultPermission.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * OrgPermissionDefaultPermission 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 { - OrgPermissionDefaultPermission, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy, - CreateOrgPermissionDefaultPermissionInput, - UpdateOrgPermissionDefaultPermissionInput, - OrgPermissionDefaultPermissionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultPermissionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - 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, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermissions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermission', - document, - variables, - transform: (data: { - orgPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermission', - document, - variables, - transform: (data: { - orgPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs< - S, - CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefaultPermission', - 'createOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - args.select, - args.data, - 'CreateOrgPermissionDefaultPermissionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'createOrgPermissionDefaultPermission', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultPermissionPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefaultPermission', - 'updateOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultPermissionInput', - 'id', - 'orgPermissionDefaultPermissionPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'updateOrgPermissionDefaultPermission', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefaultPermission', - 'deleteOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultPermissionInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'deleteOrgPermissionDefaultPermission', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/admin/orm/models/orgProfile.ts b/sdk/constructive-react/src/admin/orm/models/orgProfile.ts new file mode 100644 index 0000000000..415b856a47 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgProfile.ts @@ -0,0 +1,245 @@ +/** + * OrgProfile 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 { + OrgProfile, + OrgProfileWithRelations, + OrgProfileSelect, + OrgProfileFilter, + OrgProfileOrderBy, + CreateOrgProfileInput, + UpdateOrgProfileInput, + OrgProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfile', + 'orgProfiles', + 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, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfile', + 'orgProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfile', + document, + variables, + transform: (data: { + orgProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfile: data.orgProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfile', + 'orgProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfile', + document, + variables, + transform: (data: { + orgProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfile: data.orgProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfile', + 'createOrgProfile', + 'orgProfile', + args.select, + args.data, + 'CreateOrgProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'createOrgProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfile', + 'updateOrgProfile', + 'orgProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileInput', + 'id', + 'orgProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'updateOrgProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfile', + 'deleteOrgProfile', + 'orgProfile', + { + id: args.where.id, + }, + 'DeleteOrgProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'deleteOrgProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgProfileCapability.ts b/sdk/constructive-react/src/admin/orm/models/orgProfileCapability.ts new file mode 100644 index 0000000000..4b020b426c --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgProfileCapability.ts @@ -0,0 +1,247 @@ +/** + * OrgProfileCapability 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 { + OrgProfileCapability, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy, + CreateOrgProfileCapabilityInput, + UpdateOrgProfileCapabilityInput, + OrgProfileCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + 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, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapability', + document, + variables, + transform: (data: { + orgProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileCapability: data.orgProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapability', + document, + variables, + transform: (data: { + orgProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileCapability: data.orgProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileCapability', + 'createOrgProfileCapability', + 'orgProfileCapability', + args.select, + args.data, + 'CreateOrgProfileCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'createOrgProfileCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileCapability', + 'updateOrgProfileCapability', + 'orgProfileCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileCapabilityInput', + 'id', + 'orgProfileCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'updateOrgProfileCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileCapability', + 'deleteOrgProfileCapability', + 'orgProfileCapability', + { + id: args.where.id, + }, + 'DeleteOrgProfileCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'deleteOrgProfileCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgProfileDefinitionGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgProfileDefinitionGrant.ts new file mode 100644 index 0000000000..1438737920 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgProfileDefinitionGrant.ts @@ -0,0 +1,247 @@ +/** + * OrgProfileDefinitionGrant 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 { + OrgProfileDefinitionGrant, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy, + CreateOrgProfileDefinitionGrantInput, + UpdateOrgProfileDefinitionGrantInput, + OrgProfileDefinitionGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileDefinitionGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + 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, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrant', + document, + variables, + transform: (data: { + orgProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileDefinitionGrant: data.orgProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrant', + document, + variables, + transform: (data: { + orgProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileDefinitionGrant: data.orgProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileDefinitionGrant', + 'createOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + args.select, + args.data, + 'CreateOrgProfileDefinitionGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'createOrgProfileDefinitionGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileDefinitionGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileDefinitionGrant', + 'updateOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileDefinitionGrantInput', + 'id', + 'orgProfileDefinitionGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'updateOrgProfileDefinitionGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileDefinitionGrant', + 'deleteOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + { + id: args.where.id, + }, + 'DeleteOrgProfileDefinitionGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'deleteOrgProfileDefinitionGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgProfileGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgProfileGrant.ts new file mode 100644 index 0000000000..141311e738 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgProfileGrant.ts @@ -0,0 +1,245 @@ +/** + * OrgProfileGrant 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 { + OrgProfileGrant, + OrgProfileGrantWithRelations, + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy, + CreateOrgProfileGrantInput, + UpdateOrgProfileGrantInput, + OrgProfileGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrants: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + 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, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrant', + document, + variables, + transform: (data: { + orgProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileGrant: data.orgProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrant', + document, + variables, + transform: (data: { + orgProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileGrant: data.orgProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileGrant', + 'createOrgProfileGrant', + 'orgProfileGrant', + args.select, + args.data, + 'CreateOrgProfileGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'createOrgProfileGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileGrant', + 'updateOrgProfileGrant', + 'orgProfileGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileGrantInput', + 'id', + 'orgProfileGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'updateOrgProfileGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileGrant', + 'deleteOrgProfileGrant', + 'orgProfileGrant', + { + id: args.where.id, + }, + 'DeleteOrgProfileGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'deleteOrgProfileGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgProfileTemplate.ts b/sdk/constructive-react/src/admin/orm/models/orgProfileTemplate.ts new file mode 100644 index 0000000000..45499bc627 --- /dev/null +++ b/sdk/constructive-react/src/admin/orm/models/orgProfileTemplate.ts @@ -0,0 +1,245 @@ +/** + * OrgProfileTemplate 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 { + OrgProfileTemplate, + OrgProfileTemplateWithRelations, + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy, + CreateOrgProfileTemplateInput, + UpdateOrgProfileTemplateInput, + OrgProfileTemplatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileTemplateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + 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, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplate', + document, + variables, + transform: (data: { + orgProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileTemplate: data.orgProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplate', + document, + variables, + transform: (data: { + orgProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileTemplate: data.orgProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileTemplate', + 'createOrgProfileTemplate', + 'orgProfileTemplate', + args.select, + args.data, + 'CreateOrgProfileTemplateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'createOrgProfileTemplate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileTemplatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileTemplate', + 'updateOrgProfileTemplate', + 'orgProfileTemplate', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileTemplateInput', + 'id', + 'orgProfileTemplatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'updateOrgProfileTemplate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileTemplate', + 'deleteOrgProfileTemplate', + 'orgProfileTemplate', + { + id: args.where.id, + }, + 'DeleteOrgProfileTemplateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'deleteOrgProfileTemplate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/query/index.ts b/sdk/constructive-react/src/admin/orm/query/index.ts index 6d5f48130e..cb4b15d057 100644 --- a/sdk/constructive-react/src/admin/orm/query/index.ts +++ b/sdk/constructive-react/src/admin/orm/query/index.ts @@ -6,9 +6,9 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; -import type { AppPermissionConnection, OrgPermissionConnection } from '../input-types'; +import type { AppCapabilityConnection, OrgCapabilityConnection } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface AppPermissionsGetByMaskVariables { +export interface AppCapabilitiesGetByMaskVariables { /** Read all values in the set after (below) this cursor. */ after?: string; /** Only read the first `n` values of the set. */ @@ -20,22 +20,16 @@ export interface AppPermissionsGetByMaskVariables { */ offset?: number; } -export interface AppPermissionsGetMaskVariables { +export interface AppCapabilitiesGetMaskVariables { ids?: string[]; } -export interface AppPermissionsGetMaskByNamesVariables { +export interface AppCapabilitiesGetMaskByNamesVariables { names?: string[]; } -export interface AppPermissionsGetPaddedMaskVariables { +export interface AppCapabilitiesGetPaddedMaskVariables { mask?: string; } -export interface OrgIsManagerOfVariables { - managerId?: string; - maxDepth?: number; - targetEntityId?: string; - userId?: string; -} -export interface OrgPermissionsGetByMaskVariables { +export interface OrgCapabilitiesGetByMaskVariables { /** Read all values in the set after (below) this cursor. */ after?: string; /** Only read the first `n` values of the set. */ @@ -47,34 +41,40 @@ export interface OrgPermissionsGetByMaskVariables { */ offset?: number; } -export interface OrgPermissionsGetMaskVariables { +export interface OrgCapabilitiesGetMaskVariables { ids?: string[]; } -export interface OrgPermissionsGetMaskByNamesVariables { +export interface OrgCapabilitiesGetMaskByNamesVariables { names?: string[]; } -export interface OrgPermissionsGetPaddedMaskVariables { +export interface OrgCapabilitiesGetPaddedMaskVariables { mask?: string; } +export interface OrgIsManagerOfVariables { + managerId?: string; + maxDepth?: number; + targetEntityId?: string; + userId?: string; +} export function createQueryOperations(client: OrmClient) { return { - appPermissionsGetByMask: ( - args: AppPermissionsGetByMaskVariables, + appCapabilitiesGetByMask: ( + args: AppCapabilitiesGetByMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetByMask: AppPermissionConnection | null; + appCapabilitiesGetByMask: AppCapabilityConnection | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetByMask', - fieldName: 'appPermissionsGetByMask', + operationName: 'AppCapabilitiesGetByMask', + fieldName: 'appCapabilitiesGetByMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetByMask', - 'appPermissionsGetByMask', + 'AppCapabilitiesGetByMask', + 'appCapabilitiesGetByMask', options?.select, args, [ @@ -99,23 +99,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetMask: ( - args: AppPermissionsGetMaskVariables, + appCapabilitiesGetMask: ( + args: AppCapabilitiesGetMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetMask: string | null; + appCapabilitiesGetMask: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetMask', - fieldName: 'appPermissionsGetMask', + operationName: 'AppCapabilitiesGetMask', + fieldName: 'appCapabilitiesGetMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetMask', - 'appPermissionsGetMask', + 'AppCapabilitiesGetMask', + 'appCapabilitiesGetMask', options?.select, args, [ @@ -128,23 +128,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetMaskByNames: ( - args: AppPermissionsGetMaskByNamesVariables, + appCapabilitiesGetMaskByNames: ( + args: AppCapabilitiesGetMaskByNamesVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetMaskByNames: string | null; + appCapabilitiesGetMaskByNames: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetMaskByNames', - fieldName: 'appPermissionsGetMaskByNames', + operationName: 'AppCapabilitiesGetMaskByNames', + fieldName: 'appCapabilitiesGetMaskByNames', ...buildCustomDocument( 'query', - 'AppPermissionsGetMaskByNames', - 'appPermissionsGetMaskByNames', + 'AppCapabilitiesGetMaskByNames', + 'appCapabilitiesGetMaskByNames', options?.select, args, [ @@ -157,23 +157,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetPaddedMask: ( - args: AppPermissionsGetPaddedMaskVariables, + appCapabilitiesGetPaddedMask: ( + args: AppCapabilitiesGetPaddedMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetPaddedMask: string | null; + appCapabilitiesGetPaddedMask: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetPaddedMask', - fieldName: 'appPermissionsGetPaddedMask', + operationName: 'AppCapabilitiesGetPaddedMask', + fieldName: 'appCapabilitiesGetPaddedMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetPaddedMask', - 'appPermissionsGetPaddedMask', + 'AppCapabilitiesGetPaddedMask', + 'appCapabilitiesGetPaddedMask', options?.select, args, [ @@ -186,169 +186,169 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - orgIsManagerOf: ( - args: OrgIsManagerOfVariables, + orgCapabilitiesGetByMask: ( + args: OrgCapabilitiesGetByMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgIsManagerOf: boolean | null; + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; }>({ client, operation: 'query', - operationName: 'OrgIsManagerOf', - fieldName: 'orgIsManagerOf', + operationName: 'OrgCapabilitiesGetByMask', + fieldName: 'orgCapabilitiesGetByMask', ...buildCustomDocument( 'query', - 'OrgIsManagerOf', - 'orgIsManagerOf', + 'OrgCapabilitiesGetByMask', + 'orgCapabilitiesGetByMask', options?.select, args, [ { - name: 'managerId', - type: 'UUID', + name: 'after', + type: 'Cursor', }, { - name: 'maxDepth', + name: 'first', type: 'Int', }, { - name: 'targetEntityId', - type: 'UUID', + name: 'mask', + type: 'BitString', }, { - name: 'userId', - type: 'UUID', + name: 'offset', + type: 'Int', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetByMask: ( - args: OrgPermissionsGetByMaskVariables, + orgCapabilitiesGetMask: ( + args: OrgCapabilitiesGetMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetByMask: OrgPermissionConnection | null; + orgCapabilitiesGetMask: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetByMask', - fieldName: 'orgPermissionsGetByMask', + operationName: 'OrgCapabilitiesGetMask', + fieldName: 'orgCapabilitiesGetMask', ...buildCustomDocument( 'query', - 'OrgPermissionsGetByMask', - 'orgPermissionsGetByMask', + 'OrgCapabilitiesGetMask', + 'orgCapabilitiesGetMask', options?.select, args, [ { - name: 'after', - type: 'Cursor', - }, - { - name: 'first', - type: 'Int', - }, - { - name: 'mask', - type: 'BitString', - }, - { - name: 'offset', - type: 'Int', + name: 'ids', + type: '[UUID]', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetMask: ( - args: OrgPermissionsGetMaskVariables, + orgCapabilitiesGetMaskByNames: ( + args: OrgCapabilitiesGetMaskByNamesVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetMask: string | null; + orgCapabilitiesGetMaskByNames: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetMask', - fieldName: 'orgPermissionsGetMask', + operationName: 'OrgCapabilitiesGetMaskByNames', + fieldName: 'orgCapabilitiesGetMaskByNames', ...buildCustomDocument( 'query', - 'OrgPermissionsGetMask', - 'orgPermissionsGetMask', + 'OrgCapabilitiesGetMaskByNames', + 'orgCapabilitiesGetMaskByNames', options?.select, args, [ { - name: 'ids', - type: '[UUID]', + name: 'names', + type: '[String]', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetMaskByNames: ( - args: OrgPermissionsGetMaskByNamesVariables, + orgCapabilitiesGetPaddedMask: ( + args: OrgCapabilitiesGetPaddedMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetMaskByNames: string | null; + orgCapabilitiesGetPaddedMask: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetMaskByNames', - fieldName: 'orgPermissionsGetMaskByNames', + operationName: 'OrgCapabilitiesGetPaddedMask', + fieldName: 'orgCapabilitiesGetPaddedMask', ...buildCustomDocument( 'query', - 'OrgPermissionsGetMaskByNames', - 'orgPermissionsGetMaskByNames', + 'OrgCapabilitiesGetPaddedMask', + 'orgCapabilitiesGetPaddedMask', options?.select, args, [ { - name: 'names', - type: '[String]', + name: 'mask', + type: 'BitString', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetPaddedMask: ( - args: OrgPermissionsGetPaddedMaskVariables, + orgIsManagerOf: ( + args: OrgIsManagerOfVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetPaddedMask: string | null; + orgIsManagerOf: boolean | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetPaddedMask', - fieldName: 'orgPermissionsGetPaddedMask', + operationName: 'OrgIsManagerOf', + fieldName: 'orgIsManagerOf', ...buildCustomDocument( 'query', - 'OrgPermissionsGetPaddedMask', - 'orgPermissionsGetPaddedMask', + 'OrgIsManagerOf', + 'orgIsManagerOf', options?.select, args, [ { - name: 'mask', - type: 'BitString', + name: 'managerId', + type: 'UUID', + }, + { + name: 'maxDepth', + type: 'Int', + }, + { + name: 'targetEntityId', + type: 'UUID', + }, + { + name: 'userId', + type: 'UUID', }, ], connectionFieldsMap, diff --git a/sdk/constructive-react/src/admin/schema-types.ts b/sdk/constructive-react/src/admin/schema-types.ts index c4c56f5ded..d92e3aacc8 100644 --- a/sdk/constructive-react/src/admin/schema-types.ts +++ b/sdk/constructive-react/src/admin/schema-types.ts @@ -6,18 +6,28 @@ import type { AppAdminGrant, + AppCapability, + AppCapabilityDefault, + AppCapabilityDefaultCapability, + AppCapabilityDefaultGrant, AppClaimedInvite, AppGrant, AppInvite, AppMembership, AppMembershipDefault, + AppMembershipProfile, AppOwnerGrant, - AppPermission, - AppPermissionDefault, - AppPermissionDefaultGrant, - AppPermissionDefaultPermission, + AppProfile, + AppProfileCapability, + AppProfileDefinitionGrant, + AppProfileGrant, + AppProfileTemplate, MembershipType, OrgAdminGrant, + OrgCapability, + OrgCapabilityDefault, + OrgCapabilityDefaultCapability, + OrgCapabilityDefaultGrant, OrgChartEdge, OrgChartEdgeGrant, OrgClaimedInvite, @@ -29,12 +39,14 @@ import type { OrgMemberProfile, OrgMembership, OrgMembershipDefault, + OrgMembershipProfile, OrgMembershipSetting, OrgOwnerGrant, - OrgPermission, - OrgPermissionDefault, - OrgPermissionDefaultGrant, - OrgPermissionDefaultPermission, + OrgProfile, + OrgProfileCapability, + OrgProfileDefinitionGrant, + OrgProfileGrant, + OrgProfileTemplate, BigFloatFilter, BigIntFilter, BitStringFilter, @@ -72,6 +84,62 @@ export type AppAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppCapabilityDefaultCapability`. */ +export type AppCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppCapabilityDefaultGrant`. */ +export type AppCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppCapabilityDefault`. */ +export type AppCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `AppCapability`. */ +export type AppCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; /** Methods to use when ordering `AppClaimedInvite`. */ export type AppClaimedInviteOrderBy = | 'CREATED_AT_ASC' @@ -93,6 +161,8 @@ export type AppClaimedInviteOrderBy = export type AppGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -102,8 +172,6 @@ export type AppGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -166,6 +234,8 @@ export type AppMembershipDefaultOrderBy = export type AppMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -189,8 +259,6 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -199,6 +267,23 @@ export type AppMembershipOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +/** Methods to use when ordering `AppMembershipProfile`. */ +export type AppMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `AppOwnerGrant`. */ export type AppOwnerGrantOrderBy = | 'ACTOR_ID_ASC' @@ -216,8 +301,25 @@ export type AppOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `AppPermissionDefaultGrant`. */ -export type AppPermissionDefaultGrantOrderBy = +/** Methods to use when ordering `AppProfileCapability`. */ +export type AppProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppProfileDefinitionGrant`. */ +export type AppProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -227,49 +329,75 @@ export type AppPermissionDefaultGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `AppPermissionDefault`. */ -export type AppPermissionDefaultOrderBy = +/** Methods to use when ordering `AppProfileGrant`. */ +export type AppProfileGrantOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -/** Methods to use when ordering `AppPermissionDefaultPermission`. */ -export type AppPermissionDefaultPermissionOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppProfile`. */ +export type AppProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `AppPermission`. */ -export type AppPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +/** Methods to use when ordering `AppProfileTemplate`. */ +export type AppProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `MembershipType`. */ export type MembershipTypeOrderBy = | 'DESCRIPTION_ASC' @@ -306,6 +434,68 @@ export type OrgAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgCapabilityDefaultCapability`. */ +export type OrgCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgCapabilityDefaultGrant`. */ +export type OrgCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgCapabilityDefault`. */ +export type OrgCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `OrgCapability`. */ +export type OrgCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; /** Methods to use when ordering `OrgChartEdgeGrant`. */ export type OrgChartEdgeGrantOrderBy = | 'CHILD_ID_ASC' @@ -373,6 +563,8 @@ export type OrgClaimedInviteOrderBy = export type OrgGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' @@ -384,8 +576,6 @@ export type OrgGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -494,6 +684,8 @@ export type OrgMembershipDefaultOrderBy = export type OrgMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -521,8 +713,6 @@ export type OrgMembershipOrderBy = | 'IS_READ_ONLY_ASC' | 'IS_READ_ONLY_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -531,6 +721,23 @@ export type OrgMembershipOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +/** Methods to use when ordering `OrgMembershipProfile`. */ +export type OrgMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `OrgMembershipSetting`. */ export type OrgMembershipSettingOrderBy = | 'ALLOW_EXTERNAL_MEMBERS_ASC' @@ -583,12 +790,27 @@ export type OrgOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `OrgPermissionDefaultGrant`. */ -export type OrgPermissionDefaultGrantOrderBy = +/** Methods to use when ordering `OrgProfileCapability`. */ +export type OrgProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgProfileDefinitionGrant`. */ +export type OrgProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' | 'GRANTOR_ID_ASC' | 'GRANTOR_ID_DESC' | 'ID_ASC' @@ -596,53 +818,79 @@ export type OrgPermissionDefaultGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `OrgPermissionDefault`. */ -export type OrgPermissionDefaultOrderBy = +/** Methods to use when ordering `OrgProfileGrant`. */ +export type OrgProfileGrantOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -/** Methods to use when ordering `OrgPermissionDefaultPermission`. */ -export type OrgPermissionDefaultPermissionOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgProfile`. */ +export type OrgProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `OrgPermission`. */ -export type OrgPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +/** Methods to use when ordering `OrgProfileTemplate`. */ +export type OrgProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** A filter to be used against `AppAdminGrant` object types. All fields are combined with a logical ‘and.’ */ export interface AppAdminGrantFilter { /** Filter by the object’s `actorId` field. */ @@ -686,6 +934,203 @@ export interface AppAdminGrantPatch { isGrant?: boolean; updatedAt?: string; } +/** A filter to be used against `AppCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppCapabilityDefaultCapability` */ +export interface AppCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + id?: string; + updatedAt?: string; +} +/** Represents an update to a `AppCapabilityDefaultCapability`. Fields that are set will be updated. */ +export interface AppCapabilityDefaultCapabilityPatch { + /** References the capability included in the defaults bundle */ + capabilityId?: string; + createdAt?: string; + id?: string; + updatedAt?: string; +} +/** A filter to be used against `AppCapabilityDefault` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultFilter[]; +} +/** A filter to be used against `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppCapabilityDefaultGrant` */ +export interface AppCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} +/** Represents an update to a `AppCapabilityDefaultGrant`. Fields that are set will be updated. */ +export interface AppCapabilityDefaultGrantPatch { + /** References the capability being added to or removed from defaults */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} +/** An input for mutations affecting `AppCapabilityDefault` */ +export interface AppCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + id?: string; +} +/** Represents an update to a `AppCapabilityDefault`. Fields that are set will be updated. */ +export interface AppCapabilityDefaultPatch { + /** Default capability bitmask applied to new members */ + capabilities?: string; + id?: string; +} +/** A filter to be used against `AppCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityFilter[]; + /** Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. */ + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapabilityFilter; + /** A related `appCapabilityDefaultCapabilityByCapabilityId` exists. */ + appCapabilityDefaultCapabilityByCapabilityIdExists?: boolean; + /** Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. */ + appCapabilityDefaultGrantsByCapabilityId?: AppCapabilityToManyAppCapabilityDefaultGrantFilter; + /** `appCapabilityDefaultGrantsByCapabilityId` exist. */ + appCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. */ + appProfileCapabilitiesByCapabilityId?: AppCapabilityToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByCapabilityId` exist. */ + appProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. */ + appProfileDefinitionGrantsByCapabilityId?: AppCapabilityToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByCapabilityId` exist. */ + appProfileDefinitionGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityFilter[]; +} +/** An input for mutations affecting `AppCapability` */ +export interface AppCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** Represents an update to a `AppCapability`. Fields that are set will be updated. */ +export interface AppCapabilityPatch { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** A filter to be used against many `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} /** A filter to be used against `AppClaimedInvite` object types. All fields are combined with a logical ‘and.’ */ export interface AppClaimedInviteFilter { /** Checks for all expressions in this list. */ @@ -735,6 +1180,8 @@ export interface AppGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -747,35 +1194,33 @@ export interface AppGrantFilter { not?: AppGrantFilter; /** Checks for any expressions in this list. */ or?: AppGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } /** An input for mutations affecting `AppGrant` */ export interface AppGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** Represents an update to a `AppGrant`. Fields that are set will be updated. */ export interface AppGrantPatch { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ @@ -808,6 +1253,10 @@ export interface AppInviteFilter { or?: AppInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `senderId` field. */ @@ -928,6 +1377,16 @@ export interface AppMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppMembershipFilter[]; + /** Filter by the object’s `appMembershipProfilesByMembershipId` relation. */ + appMembershipProfilesByMembershipId?: AppMembershipToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByMembershipId` exist. */ + appMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByMembershipId` relation. */ + appProfileGrantsByMembershipId?: AppMembershipToManyAppProfileGrantFilter; + /** `appProfileGrantsByMembershipId` exist. */ + appProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -954,8 +1413,10 @@ export interface AppMembershipFilter { not?: AppMembershipFilter; /** Checks for any expressions in this list. */ or?: AppMembershipFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -967,9 +1428,11 @@ export interface AppMembershipFilter { export interface AppMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -986,8 +1449,6 @@ export interface AppMembershipInput { isOwner?: boolean; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -996,9 +1457,11 @@ export interface AppMembershipInput { export interface AppMembershipPatch { /** References the user who holds this membership */ actorId?: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -1015,12 +1478,77 @@ export interface AppMembershipPatch { isOwner?: boolean; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; } +/** A filter to be used against `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: AppMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppMembershipProfile` */ +export interface AppMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} +/** Represents an update to a `AppMembershipProfile`. Fields that are set will be updated. */ +export interface AppMembershipProfilePatch { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId?: string; + /** References the held profile */ + profileId?: string; + updatedAt?: string; +} +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipProfileFilter; +} +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; +} /** A filter to be used against `AppOwnerGrant` object types. All fields are combined with a logical ‘and.’ */ export interface AppOwnerGrantFilter { /** Filter by the object’s `actorId` field. */ @@ -1064,23 +1592,59 @@ export interface AppOwnerGrantPatch { isGrant?: boolean; updatedAt?: string; } -/** A filter to be used against `AppPermissionDefault` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultFilter { +/** A filter to be used against `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultFilter[]; + and?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ - not?: AppPermissionDefaultFilter; + not?: AppProfileCapabilityFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppProfileCapability` */ +export interface AppProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** Represents an update to a `AppProfileCapability`. Fields that are set will be updated. */ +export interface AppProfileCapabilityPatch { + /** References the capability included in this profile */ + capabilityId?: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId?: string; + updatedAt?: string; } -/** A filter to be used against `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultGrantFilter { +/** A filter to be used against `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileDefinitionGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultGrantFilter[]; + and?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -1090,144 +1654,298 @@ export interface AppPermissionDefaultGrantFilter { /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultGrantFilter; + not?: AppProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** An input for mutations affecting `AppPermissionDefaultGrant` */ -export interface AppPermissionDefaultGrantInput { +/** An input for mutations affecting `AppProfileDefinitionGrant` */ +export interface AppProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to add the capability to the profile, false to remove it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; updatedAt?: string; } -/** Represents an update to a `AppPermissionDefaultGrant`. Fields that are set will be updated. */ -export interface AppPermissionDefaultGrantPatch { +/** Represents an update to a `AppProfileDefinitionGrant`. Fields that are set will be updated. */ +export interface AppProfileDefinitionGrantPatch { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to add the capability to the profile, false to remove it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId?: string; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefault` */ -export interface AppPermissionDefaultInput { - id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; -} -/** Represents an update to a `AppPermissionDefault`. Fields that are set will be updated. */ -export interface AppPermissionDefaultPatch { - id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; +/** A filter to be used against `AppProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileFilter[]; + /** Filter by the object’s `appInvitesByProfileId` relation. */ + appInvitesByProfileId?: AppProfileToManyAppInviteFilter; + /** `appInvitesByProfileId` exist. */ + appInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipProfilesByProfileId` relation. */ + appMembershipProfilesByProfileId?: AppProfileToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByProfileId` exist. */ + appMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipsByProfileId` relation. */ + appMembershipsByProfileId?: AppProfileToManyAppMembershipFilter; + /** `appMembershipsByProfileId` exist. */ + appMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByProfileId` relation. */ + appProfileCapabilitiesByProfileId?: AppProfileToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByProfileId` exist. */ + appProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. */ + appProfileDefinitionGrantsByProfileId?: AppProfileToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByProfileId` exist. */ + appProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByProfileId` relation. */ + appProfileGrantsByProfileId?: AppProfileToManyAppProfileGrantFilter; + /** `appProfileGrantsByProfileId` exist. */ + appProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `AppPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultPermissionFilter { +/** A filter to be used against `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultPermissionFilter[]; + and?: AppProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: AppPermissionDefaultPermissionFilter; + not?: AppProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** An input for mutations affecting `AppPermissionDefaultPermission` */ -export interface AppPermissionDefaultPermissionInput { +/** An input for mutations affecting `AppProfileGrant` */ +export interface AppProfileGrantInput { + createdAt?: string; + grantorId?: string; + id?: string; + /** True to assign the profile, false to revoke it */ + isGrant?: boolean; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; + updatedAt?: string; +} +/** Represents an update to a `AppProfileGrant`. Fields that are set will be updated. */ +export interface AppProfileGrantPatch { + createdAt?: string; + grantorId?: string; + id?: string; + /** True to assign the profile, false to revoke it */ + isGrant?: boolean; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppProfile` */ +export interface AppProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; createdAt?: string; + /** Human-readable description of this profile and its intended use */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; updatedAt?: string; } -/** Represents an update to a `AppPermissionDefaultPermission`. Fields that are set will be updated. */ -export interface AppPermissionDefaultPermissionPatch { +/** Represents an update to a `AppProfile`. Fields that are set will be updated. */ +export interface AppProfilePatch { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; createdAt?: string; + /** Human-readable description of this profile and its intended use */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name?: string; + /** URL-safe identifier for this profile, used in API references */ + slug?: string; updatedAt?: string; } -/** A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionFilter { +/** A filter to be used against `AppProfileTemplate` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionFilter[]; - /** Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. */ - appPermissionDefaultGrantsByPermissionId?: AppPermissionToManyAppPermissionDefaultGrantFilter; - /** `appPermissionDefaultGrantsByPermissionId` exist. */ - appPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. */ - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermissionFilter; - /** A related `appPermissionDefaultPermissionByPermissionId` exists. */ - appPermissionDefaultPermissionByPermissionIdExists?: boolean; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: AppProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppPermissionFilter; + not?: AppProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionFilter[]; + or?: AppProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** An input for mutations affecting `AppPermission` */ -export interface AppPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** An input for mutations affecting `AppProfileTemplate` */ +export interface AppProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this template profile */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; + updatedAt?: string; } -/** Represents an update to a `AppPermission`. Fields that are set will be updated. */ -export interface AppPermissionPatch { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** Represents an update to a `AppProfileTemplate`. Fields that are set will be updated. */ +export interface AppProfileTemplatePatch { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this template profile */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ name?: string; + /** URL-safe identifier for the template profile */ + slug?: string; + updatedAt?: string; } -/** A filter to be used against many `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionToManyAppPermissionDefaultGrantFilter { +/** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppInviteFilter { /** Filters to entities where every related entity matches. */ - every?: AppPermissionDefaultGrantFilter; + every?: AppInviteFilter; /** Filters to entities where no related entity matches. */ - none?: AppPermissionDefaultGrantFilter; + none?: AppInviteFilter; /** Filters to entities where at least one related entity matches. */ - some?: AppPermissionDefaultGrantFilter; + some?: AppInviteFilter; +} +/** A filter to be used against many `AppMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipFilter; +} +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipProfileFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; } /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { @@ -1341,9 +2059,29 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -export interface CreateAppAdminGrantInput { - /** The `AppAdminGrant` to be created by this mutation. */ - appAdminGrant: AppAdminGrantInput; +export interface CreateAppAdminGrantInput { + /** The `AppAdminGrant` to be created by this mutation. */ + appAdminGrant: AppAdminGrantInput; + clientMutationId?: string; +} +export interface CreateAppCapabilityDefaultCapabilityInput { + /** The `AppCapabilityDefaultCapability` to be created by this mutation. */ + appCapabilityDefaultCapability: AppCapabilityDefaultCapabilityInput; + clientMutationId?: string; +} +export interface CreateAppCapabilityDefaultGrantInput { + /** The `AppCapabilityDefaultGrant` to be created by this mutation. */ + appCapabilityDefaultGrant: AppCapabilityDefaultGrantInput; + clientMutationId?: string; +} +export interface CreateAppCapabilityDefaultInput { + /** The `AppCapabilityDefault` to be created by this mutation. */ + appCapabilityDefault: AppCapabilityDefaultInput; + clientMutationId?: string; +} +export interface CreateAppCapabilityInput { + /** The `AppCapability` to be created by this mutation. */ + appCapability: AppCapabilityInput; clientMutationId?: string; } export interface CreateAppClaimedInviteInput { @@ -1371,29 +2109,39 @@ export interface CreateAppMembershipInput { appMembership: AppMembershipInput; clientMutationId?: string; } +export interface CreateAppMembershipProfileInput { + /** The `AppMembershipProfile` to be created by this mutation. */ + appMembershipProfile: AppMembershipProfileInput; + clientMutationId?: string; +} export interface CreateAppOwnerGrantInput { /** The `AppOwnerGrant` to be created by this mutation. */ appOwnerGrant: AppOwnerGrantInput; clientMutationId?: string; } -export interface CreateAppPermissionDefaultGrantInput { - /** The `AppPermissionDefaultGrant` to be created by this mutation. */ - appPermissionDefaultGrant: AppPermissionDefaultGrantInput; +export interface CreateAppProfileCapabilityInput { + /** The `AppProfileCapability` to be created by this mutation. */ + appProfileCapability: AppProfileCapabilityInput; clientMutationId?: string; } -export interface CreateAppPermissionDefaultInput { - /** The `AppPermissionDefault` to be created by this mutation. */ - appPermissionDefault: AppPermissionDefaultInput; +export interface CreateAppProfileDefinitionGrantInput { + /** The `AppProfileDefinitionGrant` to be created by this mutation. */ + appProfileDefinitionGrant: AppProfileDefinitionGrantInput; clientMutationId?: string; } -export interface CreateAppPermissionDefaultPermissionInput { - /** The `AppPermissionDefaultPermission` to be created by this mutation. */ - appPermissionDefaultPermission: AppPermissionDefaultPermissionInput; +export interface CreateAppProfileGrantInput { + /** The `AppProfileGrant` to be created by this mutation. */ + appProfileGrant: AppProfileGrantInput; clientMutationId?: string; } -export interface CreateAppPermissionInput { - /** The `AppPermission` to be created by this mutation. */ - appPermission: AppPermissionInput; +export interface CreateAppProfileInput { + /** The `AppProfile` to be created by this mutation. */ + appProfile: AppProfileInput; + clientMutationId?: string; +} +export interface CreateAppProfileTemplateInput { + /** The `AppProfileTemplate` to be created by this mutation. */ + appProfileTemplate: AppProfileTemplateInput; clientMutationId?: string; } export interface CreateMembershipTypeInput { @@ -1406,6 +2154,26 @@ export interface CreateOrgAdminGrantInput { /** The `OrgAdminGrant` to be created by this mutation. */ orgAdminGrant: OrgAdminGrantInput; } +export interface CreateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + /** The `OrgCapabilityDefaultCapability` to be created by this mutation. */ + orgCapabilityDefaultCapability: OrgCapabilityDefaultCapabilityInput; +} +export interface CreateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + /** The `OrgCapabilityDefaultGrant` to be created by this mutation. */ + orgCapabilityDefaultGrant: OrgCapabilityDefaultGrantInput; +} +export interface CreateOrgCapabilityDefaultInput { + clientMutationId?: string; + /** The `OrgCapabilityDefault` to be created by this mutation. */ + orgCapabilityDefault: OrgCapabilityDefaultInput; +} +export interface CreateOrgCapabilityInput { + clientMutationId?: string; + /** The `OrgCapability` to be created by this mutation. */ + orgCapability: OrgCapabilityInput; +} export interface CreateOrgChartEdgeGrantInput { clientMutationId?: string; /** The `OrgChartEdgeGrant` to be created by this mutation. */ @@ -1451,6 +2219,11 @@ export interface CreateOrgMembershipInput { /** The `OrgMembership` to be created by this mutation. */ orgMembership: OrgMembershipInput; } +export interface CreateOrgMembershipProfileInput { + clientMutationId?: string; + /** The `OrgMembershipProfile` to be created by this mutation. */ + orgMembershipProfile: OrgMembershipProfileInput; +} export interface CreateOrgMembershipSettingInput { clientMutationId?: string; /** The `OrgMembershipSetting` to be created by this mutation. */ @@ -1461,30 +2234,51 @@ export interface CreateOrgOwnerGrantInput { /** The `OrgOwnerGrant` to be created by this mutation. */ orgOwnerGrant: OrgOwnerGrantInput; } -export interface CreateOrgPermissionDefaultGrantInput { +export interface CreateOrgProfileCapabilityInput { clientMutationId?: string; - /** The `OrgPermissionDefaultGrant` to be created by this mutation. */ - orgPermissionDefaultGrant: OrgPermissionDefaultGrantInput; + /** The `OrgProfileCapability` to be created by this mutation. */ + orgProfileCapability: OrgProfileCapabilityInput; } -export interface CreateOrgPermissionDefaultInput { +export interface CreateOrgProfileDefinitionGrantInput { clientMutationId?: string; - /** The `OrgPermissionDefault` to be created by this mutation. */ - orgPermissionDefault: OrgPermissionDefaultInput; + /** The `OrgProfileDefinitionGrant` to be created by this mutation. */ + orgProfileDefinitionGrant: OrgProfileDefinitionGrantInput; } -export interface CreateOrgPermissionDefaultPermissionInput { +export interface CreateOrgProfileGrantInput { clientMutationId?: string; - /** The `OrgPermissionDefaultPermission` to be created by this mutation. */ - orgPermissionDefaultPermission: OrgPermissionDefaultPermissionInput; + /** The `OrgProfileGrant` to be created by this mutation. */ + orgProfileGrant: OrgProfileGrantInput; } -export interface CreateOrgPermissionInput { +export interface CreateOrgProfileInput { clientMutationId?: string; - /** The `OrgPermission` to be created by this mutation. */ - orgPermission: OrgPermissionInput; + /** The `OrgProfile` to be created by this mutation. */ + orgProfile: OrgProfileInput; +} +export interface CreateOrgProfileTemplateInput { + clientMutationId?: string; + /** The `OrgProfileTemplate` to be created by this mutation. */ + orgProfileTemplate: OrgProfileTemplateInput; } export interface DeleteAppAdminGrantInput { clientMutationId?: string; id: string; } +export interface DeleteAppCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppCapabilityInput { + clientMutationId?: string; + id: string; +} export interface DeleteAppClaimedInviteInput { clientMutationId?: string; id: string; @@ -1505,23 +2299,31 @@ export interface DeleteAppMembershipInput { clientMutationId?: string; id: string; } +export interface DeleteAppMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface DeleteAppOwnerGrantInput { clientMutationId?: string; id: string; } -export interface DeleteAppPermissionDefaultGrantInput { +export interface DeleteAppProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface DeleteAppPermissionDefaultInput { +export interface DeleteAppProfileGrantInput { clientMutationId?: string; id: string; } -export interface DeleteAppPermissionDefaultPermissionInput { +export interface DeleteAppProfileInput { clientMutationId?: string; id: string; } -export interface DeleteAppPermissionInput { +export interface DeleteAppProfileTemplateInput { clientMutationId?: string; id: string; } @@ -1534,6 +2336,22 @@ export interface DeleteOrgAdminGrantInput { clientMutationId?: string; id: string; } +export interface DeleteOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface DeleteOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} +export interface DeleteOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface DeleteOrgCapabilityInput { + clientMutationId?: string; + id: string; +} export interface DeleteOrgChartEdgeGrantInput { clientMutationId?: string; id: string; @@ -1570,6 +2388,10 @@ export interface DeleteOrgMembershipInput { clientMutationId?: string; id: string; } +export interface DeleteOrgMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface DeleteOrgMembershipSettingInput { clientMutationId?: string; id: string; @@ -1578,19 +2400,23 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface DeleteOrgPermissionDefaultGrantInput { +export interface DeleteOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface DeleteOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface DeleteOrgPermissionDefaultInput { +export interface DeleteOrgProfileGrantInput { clientMutationId?: string; id: string; } -export interface DeleteOrgPermissionDefaultPermissionInput { +export interface DeleteOrgProfileInput { clientMutationId?: string; id: string; } -export interface DeleteOrgPermissionInput { +export interface DeleteOrgProfileTemplateInput { clientMutationId?: string; id: string; } @@ -1694,6 +2520,230 @@ export interface OrgAdminGrantPatch { isGrant?: boolean; updatedAt?: string; } +/** A filter to be used against `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgCapabilityDefaultCapability` */ +export interface OrgCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + /** Scopes this default capability to a specific entity */ + entityId: string; + id?: string; + updatedAt?: string; +} +/** Represents an update to a `OrgCapabilityDefaultCapability`. Fields that are set will be updated. */ +export interface OrgCapabilityDefaultCapabilityPatch { + /** References the capability included in the defaults bundle */ + capabilityId?: string; + createdAt?: string; + /** Scopes this default capability to a specific entity */ + entityId?: string; + id?: string; + updatedAt?: string; +} +/** A filter to be used against `OrgCapabilityDefault` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultFilter[]; +} +/** A filter to be used against `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgCapabilityDefaultGrant` */ +export interface OrgCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + /** Scopes this audit entry to a specific entity */ + entityId: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} +/** Represents an update to a `OrgCapabilityDefaultGrant`. Fields that are set will be updated. */ +export interface OrgCapabilityDefaultGrantPatch { + /** References the capability being added to or removed from defaults */ + capabilityId?: string; + createdAt?: string; + /** Scopes this audit entry to a specific entity */ + entityId?: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} +/** An input for mutations affecting `OrgCapabilityDefault` */ +export interface OrgCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + /** References the entity these default capabilities apply to */ + entityId: string; + id?: string; +} +/** Represents an update to a `OrgCapabilityDefault`. Fields that are set will be updated. */ +export interface OrgCapabilityDefaultPatch { + /** Default capability bitmask applied to new members */ + capabilities?: string; + /** References the entity these default capabilities apply to */ + entityId?: string; + id?: string; +} +/** A filter to be used against `OrgCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityFilter[]; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityFilter[]; + /** Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. */ + orgCapabilityDefaultCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter; + /** `orgCapabilityDefaultCapabilitiesByCapabilityId` exist. */ + orgCapabilityDefaultCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. */ + orgCapabilityDefaultGrantsByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter; + /** `orgCapabilityDefaultGrantsByCapabilityId` exist. */ + orgCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. */ + orgProfileCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByCapabilityId` exist. */ + orgProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. */ + orgProfileDefinitionGrantsByCapabilityId?: OrgCapabilityToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByCapabilityId` exist. */ + orgProfileDefinitionGrantsByCapabilityIdExist?: boolean; +} +/** An input for mutations affecting `OrgCapability` */ +export interface OrgCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** Represents an update to a `OrgCapability`. Fields that are set will be updated. */ +export interface OrgCapabilityPatch { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** A filter to be used against many `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultCapabilityFilter; +} +/** A filter to be used against many `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} /** A filter to be used against `OrgChartEdge` object types. All fields are combined with a logical ‘and.’ */ export interface OrgChartEdgeFilter { /** Checks for all expressions in this list. */ @@ -1871,6 +2921,8 @@ export interface OrgGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -1885,39 +2937,37 @@ export interface OrgGrantFilter { not?: OrgGrantFilter; /** Checks for any expressions in this list. */ or?: OrgGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } /** An input for mutations affecting `OrgGrant` */ export interface OrgGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** Represents an update to a `OrgGrant`. Fields that are set will be updated. */ export interface OrgGrantPatch { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId?: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ @@ -1954,6 +3004,10 @@ export interface OrgInviteFilter { or?: OrgInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `receiverId` field. */ @@ -2202,6 +3256,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgMembershipFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -2236,8 +3292,18 @@ export interface OrgMembershipFilter { orgMemberProfileByMembershipId?: OrgMemberProfileFilter; /** A related `orgMemberProfileByMembershipId` exists. */ orgMemberProfileByMembershipIdExists?: boolean; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `orgMembershipProfilesByMembershipId` relation. */ + orgMembershipProfilesByMembershipId?: OrgMembershipToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByMembershipId` exist. */ + orgMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByMembershipId` relation. */ + orgProfileGrantsByMembershipId?: OrgMembershipToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByMembershipId` exist. */ + orgProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -2249,11 +3315,13 @@ export interface OrgMembershipFilter { export interface OrgMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; /** References the entity (org or group) this membership belongs to */ entityId: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -2266,14 +3334,12 @@ export interface OrgMembershipInput { isBanned?: boolean; /** Whether this membership is temporarily disabled */ isDisabled?: boolean; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -2282,11 +3348,13 @@ export interface OrgMembershipInput { export interface OrgMembershipPatch { /** References the user who holds this membership */ actorId?: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; /** References the entity (org or group) this membership belongs to */ entityId?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -2299,18 +3367,65 @@ export interface OrgMembershipPatch { isBanned?: boolean; /** Whether this membership is temporarily disabled */ isDisabled?: boolean; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; } +/** A filter to be used against `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgMembershipProfile` */ +export interface OrgMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} +/** Represents an update to a `OrgMembershipProfile`. Fields that are set will be updated. */ +export interface OrgMembershipProfilePatch { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId?: string; + /** References the held profile */ + profileId?: string; + updatedAt?: string; +} /** A filter to be used against `OrgMembershipSetting` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMembershipSettingFilter { /** Filter by the object’s `allowExternalMembers` field. */ @@ -2365,7 +3480,7 @@ export interface OrgMembershipSettingInput { /** References the entity these settings apply to */ entityId: string; id?: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string; @@ -2391,7 +3506,7 @@ export interface OrgMembershipSettingPatch { /** References the entity these settings apply to */ entityId?: string; id?: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string; @@ -2400,6 +3515,24 @@ export interface OrgMembershipSettingPatch { updatedAt?: string; updatedBy?: string; } +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipProfileFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; +} /** A filter to be used against `OrgOwnerGrant` object types. All fields are combined with a logical ‘and.’ */ export interface OrgOwnerGrantFilter { /** Filter by the object’s `actorId` field. */ @@ -2441,33 +3574,171 @@ export interface OrgOwnerGrantPatch { /** The member receiving or losing the ownership grant; NULL if user was deleted */ actorId?: string; createdAt?: string; - /** The entity (org or group) this ownership grant applies to */ - entityId?: string; + /** The entity (org or group) this ownership grant applies to */ + entityId?: string; + grantorId?: string; + id?: string; + /** True to grant ownership, false to revoke ownership */ + isGrant?: boolean; + updatedAt?: string; +} +/** A filter to be used against `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgProfileCapability` */ +export interface OrgProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** Represents an update to a `OrgProfileCapability`. Fields that are set will be updated. */ +export interface OrgProfileCapabilityPatch { + /** References the capability included in this profile */ + capabilityId?: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId?: string; + updatedAt?: string; +} +/** A filter to be used against `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileDefinitionGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgProfileDefinitionGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgProfileDefinitionGrant` */ +export interface OrgProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; + id?: string; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; + updatedAt?: string; +} +/** Represents an update to a `OrgProfileDefinitionGrant`. Fields that are set will be updated. */ +export interface OrgProfileDefinitionGrantPatch { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; grantorId?: string; id?: string; - /** True to grant ownership, false to revoke ownership */ + /** True to add the capability to the profile, false to remove it */ isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; updatedAt?: string; } -/** A filter to be used against `OrgPermissionDefault` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultFilter { +/** A filter to be used against `OrgProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultFilter[]; + and?: OrgProfileFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultFilter; + not?: OrgProfileFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: OrgProfileFilter[]; + /** Filter by the object’s `orgInvitesByProfileId` relation. */ + orgInvitesByProfileId?: OrgProfileToManyOrgInviteFilter; + /** `orgInvitesByProfileId` exist. */ + orgInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipProfilesByProfileId` relation. */ + orgMembershipProfilesByProfileId?: OrgProfileToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByProfileId` exist. */ + orgMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipsByProfileId` relation. */ + orgMembershipsByProfileId?: OrgProfileToManyOrgMembershipFilter; + /** `orgMembershipsByProfileId` exist. */ + orgMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByProfileId` relation. */ + orgProfileCapabilitiesByProfileId?: OrgProfileToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByProfileId` exist. */ + orgProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. */ + orgProfileDefinitionGrantsByProfileId?: OrgProfileToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByProfileId` exist. */ + orgProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByProfileId` relation. */ + orgProfileGrantsByProfileId?: OrgProfileToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByProfileId` exist. */ + orgProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultGrantFilter { +/** A filter to be used against `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultGrantFilter[]; + and?: OrgProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -2478,168 +3749,205 @@ export interface OrgPermissionDefaultGrantFilter { id?: UUIDFilter; /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultGrantFilter; + not?: OrgProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** An input for mutations affecting `OrgPermissionDefaultGrant` */ -export interface OrgPermissionDefaultGrantInput { +/** An input for mutations affecting `OrgProfileGrant` */ +export interface OrgProfileGrantInput { createdAt?: string; - /** Scopes this audit entry to a specific entity */ - entityId: string; + /** The entity (org or group) scope for this profile grant */ + entityId?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** Represents an update to a `OrgPermissionDefaultGrant`. Fields that are set will be updated. */ -export interface OrgPermissionDefaultGrantPatch { +/** Represents an update to a `OrgProfileGrant`. Fields that are set will be updated. */ +export interface OrgProfileGrantPatch { createdAt?: string; - /** Scopes this audit entry to a specific entity */ + /** The entity (org or group) scope for this profile grant */ entityId?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId?: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefault` */ -export interface OrgPermissionDefaultInput { - /** References the entity these default permissions apply to */ - entityId: string; - id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; -} -/** Represents an update to a `OrgPermissionDefault`. Fields that are set will be updated. */ -export interface OrgPermissionDefaultPatch { - /** References the entity these default permissions apply to */ - entityId?: string; - id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; -} -/** A filter to be used against `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultPermissionFilter { - /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Negates the expression. */ - not?: OrgPermissionDefaultPermissionFilter; - /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** An input for mutations affecting `OrgPermissionDefaultPermission` */ -export interface OrgPermissionDefaultPermissionInput { +/** An input for mutations affecting `OrgProfile` */ +export interface OrgProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; createdAt?: string; - /** Scopes this default permission to a specific entity */ - entityId: string; + /** Human-readable description of this profile and its intended use */ + description?: string; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ + entityId?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; updatedAt?: string; } -/** Represents an update to a `OrgPermissionDefaultPermission`. Fields that are set will be updated. */ -export interface OrgPermissionDefaultPermissionPatch { +/** Represents an update to a `OrgProfile`. Fields that are set will be updated. */ +export interface OrgProfilePatch { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; createdAt?: string; - /** Scopes this default permission to a specific entity */ + /** Human-readable description of this profile and its intended use */ + description?: string; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ entityId?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name?: string; + /** URL-safe identifier for this profile, used in API references */ + slug?: string; updatedAt?: string; } -/** A filter to be used against `OrgPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionFilter { +/** A filter to be used against `OrgProfileTemplate` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionFilter[]; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionFilter; + not?: OrgProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionFilter[]; - /** Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. */ - orgPermissionDefaultGrantsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultGrantFilter; - /** `orgPermissionDefaultGrantsByPermissionId` exist. */ - orgPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. */ - orgPermissionDefaultPermissionsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultPermissionFilter; - /** `orgPermissionDefaultPermissionsByPermissionId` exist. */ - orgPermissionDefaultPermissionsByPermissionIdExist?: boolean; -} -/** An input for mutations affecting `OrgPermission` */ -export interface OrgPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ + or?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `OrgProfileTemplate` */ +export interface OrgProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this template profile */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; + updatedAt?: string; } -/** Represents an update to a `OrgPermission`. Fields that are set will be updated. */ -export interface OrgPermissionPatch { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** Represents an update to a `OrgProfileTemplate`. Fields that are set will be updated. */ +export interface OrgProfileTemplatePatch { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this template profile */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ name?: string; + /** URL-safe identifier for the template profile */ + slug?: string; + updatedAt?: string; +} +/** A filter to be used against many `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgInviteFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgInviteFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgInviteFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgInviteFilter; +} +/** A filter to be used against many `OrgMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipFilter; } -/** A filter to be used against many `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultGrantFilter { +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipProfileFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultGrantFilter; + every?: OrgMembershipProfileFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultGrantFilter; + none?: OrgMembershipProfileFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultGrantFilter; + some?: OrgMembershipProfileFilter; } -/** A filter to be used against many `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultPermissionFilter { +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileCapabilityFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultPermissionFilter; + every?: OrgProfileCapabilityFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultPermissionFilter; + none?: OrgProfileCapabilityFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultPermissionFilter; + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; } export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ @@ -2664,6 +3972,30 @@ export interface UpdateAppAdminGrantInput { clientMutationId?: string; id: string; } +export interface UpdateAppCapabilityDefaultCapabilityInput { + /** An object where the defined keys will be set on the `AppCapabilityDefaultCapability` being updated. */ + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppCapabilityDefaultGrantInput { + /** An object where the defined keys will be set on the `AppCapabilityDefaultGrant` being updated. */ + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppCapabilityDefaultInput { + /** An object where the defined keys will be set on the `AppCapabilityDefault` being updated. */ + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppCapabilityInput { + /** An object where the defined keys will be set on the `AppCapability` being updated. */ + appCapabilityPatch: AppCapabilityPatch; + clientMutationId?: string; + id: string; +} export interface UpdateAppClaimedInviteInput { /** An object where the defined keys will be set on the `AppClaimedInvite` being updated. */ appClaimedInvitePatch: AppClaimedInvitePatch; @@ -2694,33 +4026,45 @@ export interface UpdateAppMembershipInput { clientMutationId?: string; id: string; } +export interface UpdateAppMembershipProfileInput { + /** An object where the defined keys will be set on the `AppMembershipProfile` being updated. */ + appMembershipProfilePatch: AppMembershipProfilePatch; + clientMutationId?: string; + id: string; +} export interface UpdateAppOwnerGrantInput { /** An object where the defined keys will be set on the `AppOwnerGrant` being updated. */ appOwnerGrantPatch: AppOwnerGrantPatch; clientMutationId?: string; id: string; } -export interface UpdateAppPermissionDefaultGrantInput { - /** An object where the defined keys will be set on the `AppPermissionDefaultGrant` being updated. */ - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; +export interface UpdateAppProfileCapabilityInput { + /** An object where the defined keys will be set on the `AppProfileCapability` being updated. */ + appProfileCapabilityPatch: AppProfileCapabilityPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppProfileDefinitionGrantInput { + /** An object where the defined keys will be set on the `AppProfileDefinitionGrant` being updated. */ + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; clientMutationId?: string; id: string; } -export interface UpdateAppPermissionDefaultInput { - /** An object where the defined keys will be set on the `AppPermissionDefault` being updated. */ - appPermissionDefaultPatch: AppPermissionDefaultPatch; +export interface UpdateAppProfileGrantInput { + /** An object where the defined keys will be set on the `AppProfileGrant` being updated. */ + appProfileGrantPatch: AppProfileGrantPatch; clientMutationId?: string; id: string; } -export interface UpdateAppPermissionDefaultPermissionInput { - /** An object where the defined keys will be set on the `AppPermissionDefaultPermission` being updated. */ - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; +export interface UpdateAppProfileInput { + /** An object where the defined keys will be set on the `AppProfile` being updated. */ + appProfilePatch: AppProfilePatch; clientMutationId?: string; id: string; } -export interface UpdateAppPermissionInput { - /** An object where the defined keys will be set on the `AppPermission` being updated. */ - appPermissionPatch: AppPermissionPatch; +export interface UpdateAppProfileTemplateInput { + /** An object where the defined keys will be set on the `AppProfileTemplate` being updated. */ + appProfileTemplatePatch: AppProfileTemplatePatch; clientMutationId?: string; id: string; } @@ -2737,6 +4081,30 @@ export interface UpdateOrgAdminGrantInput { /** An object where the defined keys will be set on the `OrgAdminGrant` being updated. */ orgAdminGrantPatch: OrgAdminGrantPatch; } +export interface UpdateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgCapabilityDefaultCapability` being updated. */ + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; +} +export interface UpdateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgCapabilityDefaultGrant` being updated. */ + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; +} +export interface UpdateOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgCapabilityDefault` being updated. */ + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; +} +export interface UpdateOrgCapabilityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgCapability` being updated. */ + orgCapabilityPatch: OrgCapabilityPatch; +} export interface UpdateOrgChartEdgeGrantInput { clientMutationId?: string; id: string; @@ -2791,6 +4159,12 @@ export interface UpdateOrgMembershipInput { /** An object where the defined keys will be set on the `OrgMembership` being updated. */ orgMembershipPatch: OrgMembershipPatch; } +export interface UpdateOrgMembershipProfileInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgMembershipProfile` being updated. */ + orgMembershipProfilePatch: OrgMembershipProfilePatch; +} export interface UpdateOrgMembershipSettingInput { clientMutationId?: string; id: string; @@ -2803,29 +4177,35 @@ export interface UpdateOrgOwnerGrantInput { /** An object where the defined keys will be set on the `OrgOwnerGrant` being updated. */ orgOwnerGrantPatch: OrgOwnerGrantPatch; } -export interface UpdateOrgPermissionDefaultGrantInput { +export interface UpdateOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgProfileCapability` being updated. */ + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; +} +export interface UpdateOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgPermissionDefaultGrant` being updated. */ - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; + /** An object where the defined keys will be set on the `OrgProfileDefinitionGrant` being updated. */ + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; } -export interface UpdateOrgPermissionDefaultInput { +export interface UpdateOrgProfileGrantInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgPermissionDefault` being updated. */ - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + /** An object where the defined keys will be set on the `OrgProfileGrant` being updated. */ + orgProfileGrantPatch: OrgProfileGrantPatch; } -export interface UpdateOrgPermissionDefaultPermissionInput { +export interface UpdateOrgProfileInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgPermissionDefaultPermission` being updated. */ - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; + /** An object where the defined keys will be set on the `OrgProfile` being updated. */ + orgProfilePatch: OrgProfilePatch; } -export interface UpdateOrgPermissionInput { +export interface UpdateOrgProfileTemplateInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgPermission` being updated. */ - orgPermissionPatch: OrgPermissionPatch; + /** An object where the defined keys will be set on the `OrgProfileTemplate` being updated. */ + orgProfileTemplatePatch: OrgProfileTemplatePatch; } /** Root meta schema type */ export interface MetaSchema { @@ -2838,6 +4218,34 @@ export interface AppAdminGrantConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `AppCapability` values. */ +export interface AppCapabilityConnection { + edges: AppCapabilityEdge[]; + nodes: AppCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppCapabilityDefaultCapability` values. */ +export interface AppCapabilityDefaultCapabilityConnection { + edges: AppCapabilityDefaultCapabilityEdge[]; + nodes: AppCapabilityDefaultCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppCapabilityDefaultGrant` values. */ +export interface AppCapabilityDefaultGrantConnection { + edges: AppCapabilityDefaultGrantEdge[]; + nodes: AppCapabilityDefaultGrant[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppCapabilityDefault` values. */ +export interface AppCapabilityDefaultConnection { + edges: AppCapabilityDefaultEdge[]; + nodes: AppCapabilityDefault[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppClaimedInvite` values. */ export interface AppClaimedInviteConnection { edges: AppClaimedInviteEdge[]; @@ -2866,6 +4274,13 @@ export interface AppMembershipDefaultConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `AppMembershipProfile` values. */ +export interface AppMembershipProfileConnection { + edges: AppMembershipProfileEdge[]; + nodes: AppMembershipProfile[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppMembership` values. */ export interface AppMembershipConnection { edges: AppMembershipEdge[]; @@ -2880,31 +4295,38 @@ export interface AppOwnerGrantConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AppPermissionDefaultGrant` values. */ -export interface AppPermissionDefaultGrantConnection { - edges: AppPermissionDefaultGrantEdge[]; - nodes: AppPermissionDefaultGrant[]; +/** A connection to a list of `AppProfileCapability` values. */ +export interface AppProfileCapabilityConnection { + edges: AppProfileCapabilityEdge[]; + nodes: AppProfileCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppProfileDefinitionGrant` values. */ +export interface AppProfileDefinitionGrantConnection { + edges: AppProfileDefinitionGrantEdge[]; + nodes: AppProfileDefinitionGrant[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AppPermissionDefaultPermission` values. */ -export interface AppPermissionDefaultPermissionConnection { - edges: AppPermissionDefaultPermissionEdge[]; - nodes: AppPermissionDefaultPermission[]; +/** A connection to a list of `AppProfileGrant` values. */ +export interface AppProfileGrantConnection { + edges: AppProfileGrantEdge[]; + nodes: AppProfileGrant[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AppPermissionDefault` values. */ -export interface AppPermissionDefaultConnection { - edges: AppPermissionDefaultEdge[]; - nodes: AppPermissionDefault[]; +/** A connection to a list of `AppProfileTemplate` values. */ +export interface AppProfileTemplateConnection { + edges: AppProfileTemplateEdge[]; + nodes: AppProfileTemplate[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AppPermission` values. */ -export interface AppPermissionConnection { - edges: AppPermissionEdge[]; - nodes: AppPermission[]; +/** A connection to a list of `AppProfile` values. */ +export interface AppProfileConnection { + edges: AppProfileEdge[]; + nodes: AppProfile[]; pageInfo: PageInfo; totalCount: number; } @@ -2922,6 +4344,34 @@ export interface OrgAdminGrantConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgCapability` values. */ +export interface OrgCapabilityConnection { + edges: OrgCapabilityEdge[]; + nodes: OrgCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `OrgCapabilityDefaultCapability` values. */ +export interface OrgCapabilityDefaultCapabilityConnection { + edges: OrgCapabilityDefaultCapabilityEdge[]; + nodes: OrgCapabilityDefaultCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `OrgCapabilityDefaultGrant` values. */ +export interface OrgCapabilityDefaultGrantConnection { + edges: OrgCapabilityDefaultGrantEdge[]; + nodes: OrgCapabilityDefaultGrant[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `OrgCapabilityDefault` values. */ +export interface OrgCapabilityDefaultConnection { + edges: OrgCapabilityDefaultEdge[]; + nodes: OrgCapabilityDefault[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `OrgChartEdgeGrant` values. */ export interface OrgChartEdgeGrantConnection { edges: OrgChartEdgeGrantEdge[]; @@ -2992,6 +4442,13 @@ export interface OrgMembershipDefaultConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgMembershipProfile` values. */ +export interface OrgMembershipProfileConnection { + edges: OrgMembershipProfileEdge[]; + nodes: OrgMembershipProfile[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `OrgMembershipSetting` values. */ export interface OrgMembershipSettingConnection { edges: OrgMembershipSettingEdge[]; @@ -3013,31 +4470,38 @@ export interface OrgOwnerGrantConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `OrgPermissionDefaultGrant` values. */ -export interface OrgPermissionDefaultGrantConnection { - edges: OrgPermissionDefaultGrantEdge[]; - nodes: OrgPermissionDefaultGrant[]; +/** A connection to a list of `OrgProfileCapability` values. */ +export interface OrgProfileCapabilityConnection { + edges: OrgProfileCapabilityEdge[]; + nodes: OrgProfileCapability[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `OrgProfileDefinitionGrant` values. */ +export interface OrgProfileDefinitionGrantConnection { + edges: OrgProfileDefinitionGrantEdge[]; + nodes: OrgProfileDefinitionGrant[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `OrgPermissionDefaultPermission` values. */ -export interface OrgPermissionDefaultPermissionConnection { - edges: OrgPermissionDefaultPermissionEdge[]; - nodes: OrgPermissionDefaultPermission[]; +/** A connection to a list of `OrgProfileGrant` values. */ +export interface OrgProfileGrantConnection { + edges: OrgProfileGrantEdge[]; + nodes: OrgProfileGrant[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `OrgPermissionDefault` values. */ -export interface OrgPermissionDefaultConnection { - edges: OrgPermissionDefaultEdge[]; - nodes: OrgPermissionDefault[]; +/** A connection to a list of `OrgProfileTemplate` values. */ +export interface OrgProfileTemplateConnection { + edges: OrgProfileTemplateEdge[]; + nodes: OrgProfileTemplate[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `OrgPermission` values. */ -export interface OrgPermissionConnection { - edges: OrgPermissionEdge[]; - nodes: OrgPermission[]; +/** A connection to a list of `OrgProfile` values. */ +export interface OrgProfileConnection { + edges: OrgProfileEdge[]; + nodes: OrgProfile[]; pageInfo: PageInfo; totalCount: number; } @@ -3047,6 +4511,30 @@ export interface CreateAppAdminGrantPayload { appAdminGrantEdge?: AppAdminGrantEdge | null; clientMutationId?: string | null; } +export interface CreateAppCapabilityPayload { + /** The `AppCapability` that was created by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was created by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was created by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was created by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; + clientMutationId?: string | null; +} export interface CreateAppClaimedInvitePayload { /** The `AppClaimedInvite` that was created by this mutation. */ appClaimedInvite?: AppClaimedInvite | null; @@ -3077,34 +4565,46 @@ export interface CreateAppMembershipDefaultPayload { appMembershipDefaultEdge?: AppMembershipDefaultEdge | null; clientMutationId?: string | null; } +export interface CreateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was created by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} export interface CreateAppOwnerGrantPayload { /** The `AppOwnerGrant` that was created by this mutation. */ appOwnerGrant?: AppOwnerGrant | null; appOwnerGrantEdge?: AppOwnerGrantEdge | null; clientMutationId?: string | null; } -export interface CreateAppPermissionPayload { - /** The `AppPermission` that was created by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface CreateAppProfilePayload { + /** The `AppProfile` that was created by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was created by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export interface CreateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was created by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface CreateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was created by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export interface CreateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was created by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface CreateAppProfileGrantPayload { + /** The `AppProfileGrant` that was created by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export interface CreateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was created by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface CreateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was created by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; clientMutationId?: string | null; } export interface CreateMembershipTypePayload { @@ -3119,6 +4619,30 @@ export interface CreateOrgAdminGrantPayload { orgAdminGrant?: OrgAdminGrant | null; orgAdminGrantEdge?: OrgAdminGrantEdge | null; } +export interface CreateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was created by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export interface CreateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was created by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export interface CreateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was created by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export interface CreateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was created by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} export interface CreateOrgChartEdgePayload { clientMutationId?: string | null; /** The `OrgChartEdge` that was created by this mutation. */ @@ -3173,6 +4697,12 @@ export interface CreateOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface CreateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was created by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} export interface CreateOrgMembershipSettingPayload { clientMutationId?: string | null; /** The `OrgMembershipSetting` that was created by this mutation. */ @@ -3185,29 +4715,35 @@ export interface CreateOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface CreateOrgPermissionPayload { +export interface CreateOrgProfilePayload { + clientMutationId?: string | null; + /** The `OrgProfile` that was created by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; +} +export interface CreateOrgProfileCapabilityPayload { clientMutationId?: string | null; - /** The `OrgPermission` that was created by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfileCapability` that was created by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; } -export interface CreateOrgPermissionDefaultPayload { +export interface CreateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was created by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was created by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export interface CreateOrgPermissionDefaultGrantPayload { +export interface CreateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was created by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was created by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export interface CreateOrgPermissionDefaultPermissionPayload { +export interface CreateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was created by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was created by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } export interface DeleteAppAdminGrantPayload { /** The `AppAdminGrant` that was deleted by this mutation. */ @@ -3215,6 +4751,30 @@ export interface DeleteAppAdminGrantPayload { appAdminGrantEdge?: AppAdminGrantEdge | null; clientMutationId?: string | null; } +export interface DeleteAppCapabilityPayload { + /** The `AppCapability` that was deleted by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was deleted by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was deleted by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was deleted by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; + clientMutationId?: string | null; +} export interface DeleteAppClaimedInvitePayload { /** The `AppClaimedInvite` that was deleted by this mutation. */ appClaimedInvite?: AppClaimedInvite | null; @@ -3245,34 +4805,46 @@ export interface DeleteAppMembershipDefaultPayload { appMembershipDefaultEdge?: AppMembershipDefaultEdge | null; clientMutationId?: string | null; } +export interface DeleteAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was deleted by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} export interface DeleteAppOwnerGrantPayload { /** The `AppOwnerGrant` that was deleted by this mutation. */ appOwnerGrant?: AppOwnerGrant | null; appOwnerGrantEdge?: AppOwnerGrantEdge | null; clientMutationId?: string | null; } -export interface DeleteAppPermissionPayload { - /** The `AppPermission` that was deleted by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface DeleteAppProfilePayload { + /** The `AppProfile` that was deleted by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was deleted by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export interface DeleteAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was deleted by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface DeleteAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was deleted by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export interface DeleteAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was deleted by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface DeleteAppProfileGrantPayload { + /** The `AppProfileGrant` that was deleted by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export interface DeleteAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was deleted by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface DeleteAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was deleted by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; clientMutationId?: string | null; } export interface DeleteMembershipTypePayload { @@ -3287,6 +4859,30 @@ export interface DeleteOrgAdminGrantPayload { orgAdminGrant?: OrgAdminGrant | null; orgAdminGrantEdge?: OrgAdminGrantEdge | null; } +export interface DeleteOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was deleted by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export interface DeleteOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was deleted by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export interface DeleteOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was deleted by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export interface DeleteOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was deleted by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} export interface DeleteOrgChartEdgePayload { clientMutationId?: string | null; /** The `OrgChartEdge` that was deleted by this mutation. */ @@ -3341,6 +4937,12 @@ export interface DeleteOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface DeleteOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was deleted by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} export interface DeleteOrgMembershipSettingPayload { clientMutationId?: string | null; /** The `OrgMembershipSetting` that was deleted by this mutation. */ @@ -3353,29 +4955,35 @@ export interface DeleteOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface DeleteOrgPermissionPayload { +export interface DeleteOrgProfilePayload { + clientMutationId?: string | null; + /** The `OrgProfile` that was deleted by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; +} +export interface DeleteOrgProfileCapabilityPayload { clientMutationId?: string | null; - /** The `OrgPermission` that was deleted by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfileCapability` that was deleted by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; } -export interface DeleteOrgPermissionDefaultPayload { +export interface DeleteOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was deleted by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was deleted by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export interface DeleteOrgPermissionDefaultGrantPayload { +export interface DeleteOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was deleted by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was deleted by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export interface DeleteOrgPermissionDefaultPermissionPayload { +export interface DeleteOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was deleted by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was deleted by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } export interface ProvisionBucketPayload { /** The access type applied */ @@ -3405,6 +5013,30 @@ export interface UpdateAppAdminGrantPayload { appAdminGrantEdge?: AppAdminGrantEdge | null; clientMutationId?: string | null; } +export interface UpdateAppCapabilityPayload { + /** The `AppCapability` that was updated by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was updated by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was updated by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was updated by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; + clientMutationId?: string | null; +} export interface UpdateAppClaimedInvitePayload { /** The `AppClaimedInvite` that was updated by this mutation. */ appClaimedInvite?: AppClaimedInvite | null; @@ -3435,34 +5067,46 @@ export interface UpdateAppMembershipDefaultPayload { appMembershipDefaultEdge?: AppMembershipDefaultEdge | null; clientMutationId?: string | null; } +export interface UpdateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was updated by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} export interface UpdateAppOwnerGrantPayload { /** The `AppOwnerGrant` that was updated by this mutation. */ appOwnerGrant?: AppOwnerGrant | null; appOwnerGrantEdge?: AppOwnerGrantEdge | null; clientMutationId?: string | null; } -export interface UpdateAppPermissionPayload { - /** The `AppPermission` that was updated by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface UpdateAppProfilePayload { + /** The `AppProfile` that was updated by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was updated by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export interface UpdateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was updated by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface UpdateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was updated by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export interface UpdateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was updated by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface UpdateAppProfileGrantPayload { + /** The `AppProfileGrant` that was updated by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export interface UpdateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was updated by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface UpdateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was updated by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; clientMutationId?: string | null; } export interface UpdateMembershipTypePayload { @@ -3477,6 +5121,30 @@ export interface UpdateOrgAdminGrantPayload { orgAdminGrant?: OrgAdminGrant | null; orgAdminGrantEdge?: OrgAdminGrantEdge | null; } +export interface UpdateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was updated by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export interface UpdateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was updated by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export interface UpdateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was updated by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export interface UpdateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was updated by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} export interface UpdateOrgChartEdgePayload { clientMutationId?: string | null; /** The `OrgChartEdge` that was updated by this mutation. */ @@ -3531,6 +5199,12 @@ export interface UpdateOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface UpdateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was updated by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} export interface UpdateOrgMembershipSettingPayload { clientMutationId?: string | null; /** The `OrgMembershipSetting` that was updated by this mutation. */ @@ -3543,29 +5217,35 @@ export interface UpdateOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface UpdateOrgPermissionPayload { +export interface UpdateOrgProfilePayload { + clientMutationId?: string | null; + /** The `OrgProfile` that was updated by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; +} +export interface UpdateOrgProfileCapabilityPayload { clientMutationId?: string | null; - /** The `OrgPermission` that was updated by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfileCapability` that was updated by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; } -export interface UpdateOrgPermissionDefaultPayload { +export interface UpdateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was updated by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was updated by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export interface UpdateOrgPermissionDefaultGrantPayload { +export interface UpdateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was updated by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was updated by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export interface UpdateOrgPermissionDefaultPermissionPayload { +export interface UpdateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was updated by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was updated by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } /** Information about a database table */ export interface MetaTable { @@ -3611,6 +5291,30 @@ export interface PageInfo { /** When paginating backwards, the cursor to continue. */ startCursor?: string | null; } +/** A `AppCapability` edge in the connection. */ +export interface AppCapabilityEdge { + cursor?: string | null; + /** The `AppCapability` at the end of the edge. */ + node?: AppCapability | null; +} +/** A `AppCapabilityDefaultCapability` edge in the connection. */ +export interface AppCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultCapability` at the end of the edge. */ + node?: AppCapabilityDefaultCapability | null; +} +/** A `AppCapabilityDefaultGrant` edge in the connection. */ +export interface AppCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultGrant` at the end of the edge. */ + node?: AppCapabilityDefaultGrant | null; +} +/** A `AppCapabilityDefault` edge in the connection. */ +export interface AppCapabilityDefaultEdge { + cursor?: string | null; + /** The `AppCapabilityDefault` at the end of the edge. */ + node?: AppCapabilityDefault | null; +} /** A `AppClaimedInvite` edge in the connection. */ export interface AppClaimedInviteEdge { cursor?: string | null; @@ -3635,6 +5339,12 @@ export interface AppMembershipDefaultEdge { /** The `AppMembershipDefault` at the end of the edge. */ node?: AppMembershipDefault | null; } +/** A `AppMembershipProfile` edge in the connection. */ +export interface AppMembershipProfileEdge { + cursor?: string | null; + /** The `AppMembershipProfile` at the end of the edge. */ + node?: AppMembershipProfile | null; +} /** A `AppMembership` edge in the connection. */ export interface AppMembershipEdge { cursor?: string | null; @@ -3647,29 +5357,35 @@ export interface AppOwnerGrantEdge { /** The `AppOwnerGrant` at the end of the edge. */ node?: AppOwnerGrant | null; } -/** A `AppPermissionDefaultGrant` edge in the connection. */ -export interface AppPermissionDefaultGrantEdge { +/** A `AppProfileCapability` edge in the connection. */ +export interface AppProfileCapabilityEdge { + cursor?: string | null; + /** The `AppProfileCapability` at the end of the edge. */ + node?: AppProfileCapability | null; +} +/** A `AppProfileDefinitionGrant` edge in the connection. */ +export interface AppProfileDefinitionGrantEdge { cursor?: string | null; - /** The `AppPermissionDefaultGrant` at the end of the edge. */ - node?: AppPermissionDefaultGrant | null; + /** The `AppProfileDefinitionGrant` at the end of the edge. */ + node?: AppProfileDefinitionGrant | null; } -/** A `AppPermissionDefaultPermission` edge in the connection. */ -export interface AppPermissionDefaultPermissionEdge { +/** A `AppProfileGrant` edge in the connection. */ +export interface AppProfileGrantEdge { cursor?: string | null; - /** The `AppPermissionDefaultPermission` at the end of the edge. */ - node?: AppPermissionDefaultPermission | null; + /** The `AppProfileGrant` at the end of the edge. */ + node?: AppProfileGrant | null; } -/** A `AppPermissionDefault` edge in the connection. */ -export interface AppPermissionDefaultEdge { +/** A `AppProfileTemplate` edge in the connection. */ +export interface AppProfileTemplateEdge { cursor?: string | null; - /** The `AppPermissionDefault` at the end of the edge. */ - node?: AppPermissionDefault | null; + /** The `AppProfileTemplate` at the end of the edge. */ + node?: AppProfileTemplate | null; } -/** A `AppPermission` edge in the connection. */ -export interface AppPermissionEdge { +/** A `AppProfile` edge in the connection. */ +export interface AppProfileEdge { cursor?: string | null; - /** The `AppPermission` at the end of the edge. */ - node?: AppPermission | null; + /** The `AppProfile` at the end of the edge. */ + node?: AppProfile | null; } /** A `MembershipType` edge in the connection. */ export interface MembershipTypeEdge { @@ -3683,6 +5399,30 @@ export interface OrgAdminGrantEdge { /** The `OrgAdminGrant` at the end of the edge. */ node?: OrgAdminGrant | null; } +/** A `OrgCapability` edge in the connection. */ +export interface OrgCapabilityEdge { + cursor?: string | null; + /** The `OrgCapability` at the end of the edge. */ + node?: OrgCapability | null; +} +/** A `OrgCapabilityDefaultCapability` edge in the connection. */ +export interface OrgCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultCapability` at the end of the edge. */ + node?: OrgCapabilityDefaultCapability | null; +} +/** A `OrgCapabilityDefaultGrant` edge in the connection. */ +export interface OrgCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultGrant` at the end of the edge. */ + node?: OrgCapabilityDefaultGrant | null; +} +/** A `OrgCapabilityDefault` edge in the connection. */ +export interface OrgCapabilityDefaultEdge { + cursor?: string | null; + /** The `OrgCapabilityDefault` at the end of the edge. */ + node?: OrgCapabilityDefault | null; +} /** A `OrgChartEdgeGrant` edge in the connection. */ export interface OrgChartEdgeGrantEdge { cursor?: string | null; @@ -3743,6 +5483,12 @@ export interface OrgMembershipDefaultEdge { /** The `OrgMembershipDefault` at the end of the edge. */ node?: OrgMembershipDefault | null; } +/** A `OrgMembershipProfile` edge in the connection. */ +export interface OrgMembershipProfileEdge { + cursor?: string | null; + /** The `OrgMembershipProfile` at the end of the edge. */ + node?: OrgMembershipProfile | null; +} /** A `OrgMembershipSetting` edge in the connection. */ export interface OrgMembershipSettingEdge { cursor?: string | null; @@ -3761,29 +5507,35 @@ export interface OrgOwnerGrantEdge { /** The `OrgOwnerGrant` at the end of the edge. */ node?: OrgOwnerGrant | null; } -/** A `OrgPermissionDefaultGrant` edge in the connection. */ -export interface OrgPermissionDefaultGrantEdge { +/** A `OrgProfileCapability` edge in the connection. */ +export interface OrgProfileCapabilityEdge { + cursor?: string | null; + /** The `OrgProfileCapability` at the end of the edge. */ + node?: OrgProfileCapability | null; +} +/** A `OrgProfileDefinitionGrant` edge in the connection. */ +export interface OrgProfileDefinitionGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefaultGrant` at the end of the edge. */ - node?: OrgPermissionDefaultGrant | null; + /** The `OrgProfileDefinitionGrant` at the end of the edge. */ + node?: OrgProfileDefinitionGrant | null; } -/** A `OrgPermissionDefaultPermission` edge in the connection. */ -export interface OrgPermissionDefaultPermissionEdge { +/** A `OrgProfileGrant` edge in the connection. */ +export interface OrgProfileGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefaultPermission` at the end of the edge. */ - node?: OrgPermissionDefaultPermission | null; + /** The `OrgProfileGrant` at the end of the edge. */ + node?: OrgProfileGrant | null; } -/** A `OrgPermissionDefault` edge in the connection. */ -export interface OrgPermissionDefaultEdge { +/** A `OrgProfileTemplate` edge in the connection. */ +export interface OrgProfileTemplateEdge { cursor?: string | null; - /** The `OrgPermissionDefault` at the end of the edge. */ - node?: OrgPermissionDefault | null; + /** The `OrgProfileTemplate` at the end of the edge. */ + node?: OrgProfileTemplate | null; } -/** A `OrgPermission` edge in the connection. */ -export interface OrgPermissionEdge { +/** A `OrgProfile` edge in the connection. */ +export interface OrgProfileEdge { cursor?: string | null; - /** The `OrgPermission` at the end of the edge. */ - node?: OrgPermission | null; + /** The `OrgProfile` at the end of the edge. */ + node?: OrgProfile | null; } /** Table constraints */ export interface MetaConstraints { diff --git a/sdk/constructive-react/src/admin/types.ts b/sdk/constructive-react/src/admin/types.ts index 74c91661c5..5c993570ed 100644 --- a/sdk/constructive-react/src/admin/types.ts +++ b/sdk/constructive-react/src/admin/types.ts @@ -13,6 +13,32 @@ export interface AppAdminGrant { isGrant: boolean | null; updatedAt: string | null; } +export interface AppCapability { + bitnum: number | null; + bitstr: string | null; + description: string | null; + id: string | null; + kind: string | null; + name: string | null; +} +export interface AppCapabilityDefaultCapability { + capabilityId: string | null; + createdAt: string | null; + id: string | null; + updatedAt: string | null; +} +export interface AppCapabilityDefault { + capabilities: string | null; + id: string | null; +} +export interface AppCapabilityDefaultGrant { + capabilityId: string | null; + createdAt: string | null; + grantorId: string | null; + id: string | null; + isGrant: boolean | null; + updatedAt: string | null; +} export interface AppClaimedInvite { createdAt: string | null; data: unknown | null; @@ -23,11 +49,11 @@ export interface AppClaimedInvite { } export interface AppGrant { actorId: string | null; + capabilities: string | null; createdAt: string | null; grantorId: string | null; id: string | null; isGrant: boolean | null; - permissions: string | null; updatedAt: string | null; } export interface AppInvite { @@ -49,6 +75,7 @@ export interface AppInvite { } export interface AppMembership { actorId: string | null; + capabilities: string | null; createdAt: string | null; createdBy: string | null; granted: string | null; @@ -60,7 +87,6 @@ export interface AppMembership { isDisabled: boolean | null; isOwner: boolean | null; isVerified: boolean | null; - permissions: string | null; profileId: string | null; updatedAt: string | null; updatedBy: string | null; @@ -74,6 +100,14 @@ export interface AppMembershipDefault { updatedAt: string | null; updatedBy: string | null; } +export interface AppMembershipProfile { + actorId: string | null; + createdAt: string | null; + id: string | null; + membershipId: string | null; + profileId: string | null; + updatedAt: string | null; +} export interface AppOwnerGrant { actorId: string | null; createdAt: string | null; @@ -82,29 +116,50 @@ export interface AppOwnerGrant { isGrant: boolean | null; updatedAt: string | null; } -export interface AppPermission { - bitnum: number | null; - bitstr: string | null; +export interface AppProfileCapability { + capabilityId: string | null; + createdAt: string | null; + id: string | null; + profileId: string | null; + updatedAt: string | null; +} +export interface AppProfile { + capabilities: string | null; + createdAt: string | null; description: string | null; id: string | null; + isDefault: boolean | null; + isSystem: boolean | null; name: string | null; + slug: string | null; + updatedAt: string | null; } -export interface AppPermissionDefault { +export interface AppProfileDefinitionGrant { + capabilityId: string | null; + createdAt: string | null; + grantorId: string | null; id: string | null; - permissions: string | null; + isGrant: boolean | null; + profileId: string | null; + updatedAt: string | null; } -export interface AppPermissionDefaultGrant { +export interface AppProfileGrant { createdAt: string | null; grantorId: string | null; id: string | null; isGrant: boolean | null; - permissionId: string | null; + membershipId: string | null; + profileId: string | null; updatedAt: string | null; } -export interface AppPermissionDefaultPermission { +export interface AppProfileTemplate { + capabilities: string | null; createdAt: string | null; + description: string | null; id: string | null; - permissionId: string | null; + isDefault: boolean | null; + name: string | null; + slug: string | null; updatedAt: string | null; } export interface MembershipType { @@ -124,6 +179,35 @@ export interface OrgAdminGrant { isGrant: boolean | null; updatedAt: string | null; } +export interface OrgCapability { + bitnum: number | null; + bitstr: string | null; + description: string | null; + id: string | null; + kind: string | null; + name: string | null; +} +export interface OrgCapabilityDefaultCapability { + capabilityId: string | null; + createdAt: string | null; + entityId: string | null; + id: string | null; + updatedAt: string | null; +} +export interface OrgCapabilityDefault { + capabilities: string | null; + entityId: string | null; + id: string | null; +} +export interface OrgCapabilityDefaultGrant { + capabilityId: string | null; + createdAt: string | null; + entityId: string | null; + grantorId: string | null; + id: string | null; + isGrant: boolean | null; + updatedAt: string | null; +} export interface OrgChartEdge { childId: string | null; createdAt: string | null; @@ -164,12 +248,12 @@ export interface OrgGetSubordinatesRecord { } export interface OrgGrant { actorId: string | null; + capabilities: string | null; createdAt: string | null; entityId: string | null; grantorId: string | null; id: string | null; isGrant: boolean | null; - permissions: string | null; updatedAt: string | null; } export interface OrgInvite { @@ -213,6 +297,7 @@ export interface OrgMemberProfile { } export interface OrgMembership { actorId: string | null; + capabilities: string | null; createdAt: string | null; createdBy: string | null; entityId: string | null; @@ -226,7 +311,6 @@ export interface OrgMembership { isExternal: boolean | null; isOwner: boolean | null; isReadOnly: boolean | null; - permissions: string | null; profileId: string | null; updatedAt: string | null; updatedBy: string | null; @@ -240,6 +324,14 @@ export interface OrgMembershipDefault { updatedAt: string | null; updatedBy: string | null; } +export interface OrgMembershipProfile { + actorId: string | null; + createdAt: string | null; + id: string | null; + membershipId: string | null; + profileId: string | null; + updatedAt: string | null; +} export interface OrgMembershipSetting { allowExternalMembers: boolean | null; createChildCascadeAdmins: boolean | null; @@ -265,32 +357,52 @@ export interface OrgOwnerGrant { isGrant: boolean | null; updatedAt: string | null; } -export interface OrgPermission { - bitnum: number | null; - bitstr: string | null; +export interface OrgProfileCapability { + capabilityId: string | null; + createdAt: string | null; + id: string | null; + profileId: string | null; + updatedAt: string | null; +} +export interface OrgProfile { + capabilities: string | null; + createdAt: string | null; description: string | null; + entityId: string | null; id: string | null; + isDefault: boolean | null; + isSystem: boolean | null; name: string | null; + slug: string | null; + updatedAt: string | null; } -export interface OrgPermissionDefault { - entityId: string | null; +export interface OrgProfileDefinitionGrant { + capabilityId: string | null; + createdAt: string | null; + grantorId: string | null; id: string | null; - permissions: string | null; + isGrant: boolean | null; + profileId: string | null; + updatedAt: string | null; } -export interface OrgPermissionDefaultGrant { +export interface OrgProfileGrant { createdAt: string | null; entityId: string | null; grantorId: string | null; id: string | null; isGrant: boolean | null; - permissionId: string | null; + membershipId: string | null; + profileId: string | null; updatedAt: string | null; } -export interface OrgPermissionDefaultPermission { +export interface OrgProfileTemplate { + capabilities: string | null; createdAt: string | null; - entityId: string | null; + description: string | null; id: string | null; - permissionId: string | null; + isDefault: boolean | null; + name: string | null; + slug: string | null; updatedAt: string | null; } export interface StringFilter { diff --git a/sdk/constructive-react/src/api/README.md b/sdk/constructive-react/src/api/README.md index 967d2f751b..495429af13 100644 --- a/sdk/constructive-react/src/api/README.md +++ b/sdk/constructive-react/src/api/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 80 +- **Tables:** 86 - **Custom queries:** 6 - **Custom mutations:** 11 diff --git a/sdk/constructive-react/src/api/hooks/README.md b/sdk/constructive-react/src/api/hooks/README.md index 4302e4764b..2057dbb427 100644 --- a/sdk/constructive-react/src/api/hooks/README.md +++ b/sdk/constructive-react/src/api/hooks/README.md @@ -32,6 +32,11 @@ function App() { | Hook | Type | Description | |------|------|-------------| +| `useApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useApiQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useCreateApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useUpdateApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useDeleteApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `useApiSchemasQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useApiSchemaQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useCreateApiSchemaMutation` | Mutation | Join table linking API surfaces to the metaschema schemas they expose | @@ -42,16 +47,16 @@ function App() { | `useCreateApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useUpdateApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useDeleteApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | -| `useApisesQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useCreateApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useUpdateApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useDeleteApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useAstMigrationsQuery` | Query | List all astMigrations | -| `useAstMigrationQuery` | Query | Get one astMigration | -| `useCreateAstMigrationMutation` | Mutation | Create a astMigration | -| `useUpdateAstMigrationMutation` | Mutation | Update a astMigration | -| `useDeleteAstMigrationMutation` | Mutation | Delete a astMigration | +| `useAppComponentsQuery` | Query | App component rows binding an app to typed catalog rows (exactly one typed component reference per row) | +| `useAppComponentQuery` | Query | App component rows binding an app to typed catalog rows (exactly one typed component reference per row) | +| `useCreateAppComponentMutation` | Mutation | App component rows binding an app to typed catalog rows (exactly one typed component reference per row) | +| `useUpdateAppComponentMutation` | Mutation | App component rows binding an app to typed catalog rows (exactly one typed component reference per row) | +| `useDeleteAppComponentMutation` | Mutation | App component rows binding an app to typed catalog rows (exactly one typed component reference per row) | +| `useAppsQuery` | Query | App aggregates: thin identity rows whose components are global catalog references | +| `useAppQuery` | Query | App aggregates: thin identity rows whose components are global catalog references | +| `useCreateAppMutation` | Mutation | App aggregates: thin identity rows whose components are global catalog references | +| `useUpdateAppMutation` | Mutation | App aggregates: thin identity rows whose components are global catalog references | +| `useDeleteAppMutation` | Mutation | App aggregates: thin identity rows whose components are global catalog references | | `useCheckConstraintsQuery` | Query | List all checkConstraints | | `useCheckConstraintQuery` | Query | Get one checkConstraint | | `useCreateCheckConstraintMutation` | Mutation | Create a checkConstraint | @@ -112,6 +117,21 @@ function App() { | `useCreateDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | | `useUpdateDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | | `useDeleteDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | +| `useEmailIdentitiesQuery` | Query | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useEmailIdentityQuery` | Query | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useCreateEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useUpdateEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useDeleteEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useEmailProviderAccountsQuery` | Query | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useEmailProviderAccountQuery` | Query | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useCreateEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useUpdateEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useDeleteEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useEmailSiteIdentitiesQuery` | Query | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useEmailSiteIdentityQuery` | Query | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useCreateEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useUpdateEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useDeleteEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | | `useEmbeddingChunksQuery` | Query | List all embeddingChunks | | `useEmbeddingChunkQuery` | Query | Get one embeddingChunk | | `useCreateEmbeddingChunkMutation` | Mutation | Create a embeddingChunk | @@ -192,6 +212,11 @@ function App() { | `useCreatePartitionMutation` | Mutation | Create a partition | | `useUpdatePartitionMutation` | Mutation | Update a partition | | `useDeletePartitionMutation` | Mutation | Delete a partition | +| `usePlatformApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `usePlatformApiQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useCreatePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useUpdatePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useDeletePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `usePlatformApiSchemasQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `usePlatformApiSchemaQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useCreatePlatformApiSchemaMutation` | Mutation | Join table linking API surfaces to the metaschema schemas they expose | @@ -202,11 +227,6 @@ function App() { | `useCreatePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useUpdatePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useDeletePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | -| `usePlatformApisesQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `usePlatformApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useCreatePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useUpdatePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useDeletePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `usePlatformCorsSettingsQuery` | Query | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | | `usePlatformCorsSettingQuery` | Query | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | | `useCreatePlatformCorsSettingMutation` | Mutation | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | @@ -227,6 +247,21 @@ function App() { | `useCreatePlatformDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | | `useUpdatePlatformDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | | `useDeletePlatformDomainVerificationMutation` | Mutation | Ownership verification challenges issued for a domain | +| `usePlatformEmailIdentitiesQuery` | Query | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `usePlatformEmailIdentityQuery` | Query | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useCreatePlatformEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useUpdatePlatformEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `useDeletePlatformEmailIdentityMutation` | Mutation | Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through | +| `usePlatformEmailProviderAccountsQuery` | Query | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `usePlatformEmailProviderAccountQuery` | Query | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useCreatePlatformEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useUpdatePlatformEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `useDeletePlatformEmailProviderAccountMutation` | Mutation | A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) | +| `usePlatformEmailSiteIdentitiesQuery` | Query | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `usePlatformEmailSiteIdentityQuery` | Query | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useCreatePlatformEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useUpdatePlatformEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | +| `useDeletePlatformEmailSiteIdentityMutation` | Mutation | Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. | | `usePlatformManagedDomainsQuery` | Query | Platform-operated hostnames whose DNS and certificate lifecycle the platform drives | | `usePlatformManagedDomainQuery` | Query | Platform-operated hostnames whose DNS and certificate lifecycle the platform drives | | `useCreatePlatformManagedDomainMutation` | Mutation | Platform-operated hostnames whose DNS and certificate lifecycle the platform drives | @@ -362,11 +397,6 @@ function App() { | `useCreateSpatialRelationMutation` | Mutation | Create a spatialRelation | | `useUpdateSpatialRelationMutation` | Mutation | Update a spatialRelation | | `useDeleteSpatialRelationMutation` | Mutation | Delete a spatialRelation | -| `useSqlActionsQuery` | Query | List all sqlActions | -| `useSqlActionQuery` | Query | Get one sqlAction | -| `useCreateSqlActionMutation` | Mutation | Create a sqlAction | -| `useUpdateSqlActionMutation` | Mutation | Update a sqlAction | -| `useDeleteSqlActionMutation` | Mutation | Delete a sqlAction | | `useTableBehaviorsQuery` | Query | List all tableBehaviors | | `useTableBehaviorQuery` | Query | Get one tableBehavior | | `useCreateTableBehaviorMutation` | Mutation | Create a tableBehavior | @@ -438,9 +468,10 @@ function App() { | `useResolveHttpRouteQuery` | Query | resolveHttpRoute | | `useResolveRouteQuery` | Query | resolveRoute | | `useResolveSiteAppLinksQuery` | Query | resolveSiteAppLinks | -| `useAcceptDatabaseTransferMutation` | Mutation | acceptDatabaseTransfer | | `useApplyRlsMutation` | Mutation | applyRls | -| `useCancelDatabaseTransferMutation` | Mutation | cancelDatabaseTransfer | +| `useAppsInstallAppMutation` | Mutation | appsInstallApp | +| `useAppsUninstallAppMutation` | Mutation | appsUninstallApp | +| `useAppsUpgradeAppMutation` | Mutation | appsUpgradeApp | | `useDomainsAssignSubdomainMutation` | Mutation | domainsAssignSubdomain | | `usePlatformDomainsAssignSubdomainMutation` | Mutation | platformDomainsAssignSubdomain | | `usePlatformSitesProvisionStaticSiteMutation` | Mutation | platformSitesProvisionStaticSite | @@ -448,7 +479,6 @@ function App() { Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | -| `useRejectDatabaseTransferMutation` | Mutation | rejectDatabaseTransfer | | `useRequestDatabaseMutation` | Mutation | Requests a database and returns a ticket (database_provision_module row) to poll. Pass exactly one of preset_slug or modules. The pool, presets, and owner bootstrap are private implementation details: a warm pool hit fulfills the ticket immediately (fulfilled_at set, deferred owner bootstrap), otherwise the database is cold-provisioned asynchronously with exactly the requested modules. Poll the ticket until status = 'completed'; it then carries database_id and fulfilled_at. @@ -461,6 +491,27 @@ Example usage: ## Table Hooks +### Api + +```typescript +// List all apis +const { data, isLoading } = useApisQuery({ + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Get one api +const { data: item } = useApiQuery({ + id: '', + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Create a api +const { mutate: create } = useCreateApiMutation({ + selection: { fields: { id: true } }, +}); +create({ anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }); +``` + ### ApiSchema ```typescript @@ -503,46 +554,46 @@ const { mutate: create } = useCreateApiSettingMutation({ create({ apiId: '', databaseId: '', enableAggregates: '', enableBulk: '', enableConnectionFilter: '', enableDirectUploads: '', enableI18N: '', enableLlm: '', enableLtree: '', enableManyToMany: '', enablePostgis: '', enablePresignedUploads: '', enableRealtime: '', enableSearch: '', options: '', statementTimeoutMs: '' }); ``` -### Apis +### AppComponent ```typescript -// List all apises -const { data, isLoading } = useApisesQuery({ - selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +// List all appComponents +const { data, isLoading } = useAppComponentsQuery({ + selection: { fields: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }, }); -// Get one apis -const { data: item } = useApisQuery({ +// Get one appComponent +const { data: item } = useAppComponentQuery({ id: '', - selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, + selection: { fields: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }, }); -// Create a apis -const { mutate: create } = useCreateApisMutation({ +// Create a appComponent +const { mutate: create } = useCreateAppComponentMutation({ selection: { fields: { id: true } }, }); -create({ anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }); +create({ appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }); ``` -### AstMigration +### App ```typescript -// List all astMigrations -const { data, isLoading } = useAstMigrationsQuery({ - selection: { fields: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }, +// List all apps +const { data, isLoading } = useAppsQuery({ + selection: { fields: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }, }); -// Get one astMigration -const { data: item } = useAstMigrationQuery({ - id: '', - selection: { fields: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }, +// Get one app +const { data: item } = useAppQuery({ + id: '', + selection: { fields: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }, }); -// Create a astMigration -const { mutate: create } = useCreateAstMigrationMutation({ +// Create a app +const { mutate: create } = useCreateAppMutation({ selection: { fields: { id: true } }, }); -create({ actionId: '', actionName: '', actorId: '', databaseId: '', deploy: '', deploys: '', name: '', payload: '', requires: '', revert: '', verify: '' }); +create({ config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }); ``` ### CheckConstraint @@ -797,6 +848,69 @@ const { mutate: create } = useCreateDomainVerificationMutation({ create({ attempts: '', databaseId: '', domainId: '', error: '', expiresAt: '', lastCheckedAt: '', managedDomainId: '', method: '', recordName: '', recordType: '', recordValue: '', status: '', verifiedAt: '' }); ``` +### EmailIdentity + +```typescript +// List all emailIdentities +const { data, isLoading } = useEmailIdentitiesQuery({ + selection: { fields: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); + +// Get one emailIdentity +const { data: item } = useEmailIdentityQuery({ + id: '', + selection: { fields: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); + +// Create a emailIdentity +const { mutate: create } = useCreateEmailIdentityMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }); +``` + +### EmailProviderAccount + +```typescript +// List all emailProviderAccounts +const { data, isLoading } = useEmailProviderAccountsQuery({ + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); + +// Get one emailProviderAccount +const { data: item } = useEmailProviderAccountQuery({ + id: '', + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); + +// Create a emailProviderAccount +const { mutate: create } = useCreateEmailProviderAccountMutation({ + selection: { fields: { id: true } }, +}); +create({ apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }); +``` + +### EmailSiteIdentity + +```typescript +// List all emailSiteIdentities +const { data, isLoading } = useEmailSiteIdentitiesQuery({ + selection: { fields: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); + +// Get one emailSiteIdentity +const { data: item } = useEmailSiteIdentityQuery({ + id: '', + selection: { fields: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); + +// Create a emailSiteIdentity +const { mutate: create } = useCreateEmailSiteIdentityMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', emailIdentityId: '', siteId: '' }); +``` + ### EmbeddingChunk ```typescript @@ -1133,6 +1247,27 @@ const { mutate: create } = useCreatePartitionMutation({ create({ databaseId: '', interval: '', isParented: '', namingPattern: '', partitionKeyId: '', premake: '', retention: '', retentionKeepTable: '', strategy: '', tableId: '' }); ``` +### PlatformApi + +```typescript +// List all platformApis +const { data, isLoading } = usePlatformApisQuery({ + selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Get one platformApi +const { data: item } = usePlatformApiQuery({ + id: '', + selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Create a platformApi +const { mutate: create } = useCreatePlatformApiMutation({ + selection: { fields: { id: true } }, +}); +create({ anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }); +``` + ### PlatformApiSchema ```typescript @@ -1175,27 +1310,6 @@ const { mutate: create } = useCreatePlatformApiSettingMutation({ create({ apiId: '', enableAggregates: '', enableBulk: '', enableConnectionFilter: '', enableDirectUploads: '', enableI18N: '', enableLlm: '', enableLtree: '', enableManyToMany: '', enablePostgis: '', enablePresignedUploads: '', enableRealtime: '', enableSearch: '', options: '', statementTimeoutMs: '' }); ``` -### PlatformApis - -```typescript -// List all platformApises -const { data, isLoading } = usePlatformApisesQuery({ - selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Get one platformApis -const { data: item } = usePlatformApisQuery({ - id: '', - selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Create a platformApis -const { mutate: create } = useCreatePlatformApisMutation({ - selection: { fields: { id: true } }, -}); -create({ anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }); -``` - ### PlatformCorsSetting ```typescript @@ -1280,6 +1394,69 @@ const { mutate: create } = useCreatePlatformDomainVerificationMutation({ create({ attempts: '', domainId: '', error: '', expiresAt: '', lastCheckedAt: '', managedDomainId: '', method: '', recordName: '', recordType: '', recordValue: '', status: '', verifiedAt: '' }); ``` +### PlatformEmailIdentity + +```typescript +// List all platformEmailIdentities +const { data, isLoading } = usePlatformEmailIdentitiesQuery({ + selection: { fields: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); + +// Get one platformEmailIdentity +const { data: item } = usePlatformEmailIdentityQuery({ + id: '', + selection: { fields: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }, +}); + +// Create a platformEmailIdentity +const { mutate: create } = useCreatePlatformEmailIdentityMutation({ + selection: { fields: { id: true } }, +}); +create({ fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }); +``` + +### PlatformEmailProviderAccount + +```typescript +// List all platformEmailProviderAccounts +const { data, isLoading } = usePlatformEmailProviderAccountsQuery({ + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); + +// Get one platformEmailProviderAccount +const { data: item } = usePlatformEmailProviderAccountQuery({ + id: '', + selection: { fields: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }, +}); + +// Create a platformEmailProviderAccount +const { mutate: create } = useCreatePlatformEmailProviderAccountMutation({ + selection: { fields: { id: true } }, +}); +create({ apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }); +``` + +### PlatformEmailSiteIdentity + +```typescript +// List all platformEmailSiteIdentities +const { data, isLoading } = usePlatformEmailSiteIdentitiesQuery({ + selection: { fields: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); + +// Get one platformEmailSiteIdentity +const { data: item } = usePlatformEmailSiteIdentityQuery({ + id: '', + selection: { fields: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }, +}); + +// Create a platformEmailSiteIdentity +const { mutate: create } = useCreatePlatformEmailSiteIdentityMutation({ + selection: { fields: { id: true } }, +}); +create({ emailIdentityId: '', siteId: '' }); +``` + ### PlatformManagedDomain ```typescript @@ -1847,27 +2024,6 @@ const { mutate: create } = useCreateSpatialRelationMutation({ create({ category: '', databaseId: '', fieldId: '', name: '', operator: '', paramName: '', refFieldId: '', refTableId: '', tableId: '', tags: '' }); ``` -### SqlAction - -```typescript -// List all sqlActions -const { data, isLoading } = useSqlActionsQuery({ - selection: { fields: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }, -}); - -// Get one sqlAction -const { data: item } = useSqlActionQuery({ - id: '', - selection: { fields: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }, -}); - -// Create a sqlAction -const { mutate: create } = useCreateSqlActionMutation({ - selection: { fields: { id: true } }, -}); -create({ actionId: '', actionName: '', actorId: '', content: '', databaseId: '', deploy: '', deps: '', name: '', payload: '', revert: '', verify: '' }); -``` - ### TableBehavior ```typescript @@ -2215,38 +2371,49 @@ resolveSiteAppLinks |----------|------| | `targetSiteId` | UUID | -### `useAcceptDatabaseTransferMutation` +### `useApplyRlsMutation` -acceptDatabaseTransfer +applyRls - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AcceptDatabaseTransferInput (required) | + | `input` | ApplyRlsInput (required) | -### `useApplyRlsMutation` +### `useAppsInstallAppMutation` -applyRls +appsInstallApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ApplyRlsInput (required) | + | `input` | AppsInstallAppInput (required) | + +### `useAppsUninstallAppMutation` + +appsUninstallApp + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | AppsUninstallAppInput (required) | -### `useCancelDatabaseTransferMutation` +### `useAppsUpgradeAppMutation` -cancelDatabaseTransfer +appsUpgradeApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | CancelDatabaseTransferInput (required) | + | `input` | AppsUpgradeAppInput (required) | ### `useDomainsAssignSubdomainMutation` @@ -2295,17 +2462,6 @@ and lifecycle settings. |----------|------| | `input` | ProvisionBucketInput (required) | -### `useRejectDatabaseTransferMutation` - -rejectDatabaseTransfer - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | RejectDatabaseTransferInput (required) | - ### `useRequestDatabaseMutation` Requests a database and returns a ticket (database_provision_module row) to poll. diff --git a/sdk/constructive-react/src/api/hooks/index.ts b/sdk/constructive-react/src/api/hooks/index.ts index 256a08f646..c76aeb1015 100644 --- a/sdk/constructive-react/src/api/hooks/index.ts +++ b/sdk/constructive-react/src/api/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: ApiSchema, ApiSetting, Apis, AstMigration, CheckConstraint, CompositeType, CorsSetting, Database, DatabaseSetting, DatabaseTransfer, DefaultPrivilege, Derive, Domain, DomainEvent, DomainType, DomainVerification, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, HostnameBinding, HttpRoute, Index, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApiSchema, PlatformApiSetting, PlatformApis, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformManagedDomain, PlatformPage, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, RlsSetting, RouteBinding, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteTheme, SiteWebConfig, SpatialRelation, SqlAction, TableBehavior, Table, TableGrant, Trigger, TriggerFunction, UniqueConstraintBehavior, UniqueConstraint, ViewBehavior, View, ViewGrant, ViewRule, ViewTable, WebauthnSetting + * Tables: Api, ApiSchema, ApiSetting, AppComponent, App, CheckConstraint, CompositeType, CorsSetting, Database, DatabaseSetting, DatabaseTransfer, DefaultPrivilege, Derive, Domain, DomainEvent, DomainType, DomainVerification, EmailIdentity, EmailProviderAccount, EmailSiteIdentity, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, HostnameBinding, HttpRoute, Index, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApi, PlatformApiSchema, PlatformApiSetting, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformEmailIdentity, PlatformEmailProviderAccount, PlatformEmailSiteIdentity, PlatformManagedDomain, PlatformPage, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, RlsSetting, RouteBinding, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteTheme, SiteWebConfig, SpatialRelation, TableBehavior, Table, TableGrant, Trigger, TriggerFunction, UniqueConstraintBehavior, UniqueConstraint, ViewBehavior, View, ViewGrant, ViewRule, ViewTable, WebauthnSetting * * Usage: * diff --git a/sdk/constructive-react/src/api/hooks/invalidation.ts b/sdk/constructive-react/src/api/hooks/invalidation.ts index affc385899..059fe0663f 100644 --- a/sdk/constructive-react/src/api/hooks/invalidation.ts +++ b/sdk/constructive-react/src/api/hooks/invalidation.ts @@ -15,10 +15,11 @@ import type { QueryClient } from '@tanstack/react-query'; import { + apiKeys, apiSchemaKeys, apiSettingKeys, - apisKeys, - astMigrationKeys, + appComponentKeys, + appKeys, checkConstraintKeys, compositeTypeKeys, corsSettingKeys, @@ -31,6 +32,9 @@ import { domainEventKeys, domainTypeKeys, domainVerificationKeys, + emailIdentityKeys, + emailProviderAccountKeys, + emailSiteIdentityKeys, embeddingChunkKeys, enumKeys, exclusionConstraintKeys, @@ -47,13 +51,16 @@ import { nodeTypeRegistryKeys, pageKeys, partitionKeys, + platformApiKeys, platformApiSchemaKeys, platformApiSettingKeys, - platformApisKeys, platformCorsSettingKeys, platformDomainKeys, platformDomainEventKeys, platformDomainVerificationKeys, + platformEmailIdentityKeys, + platformEmailProviderAccountKeys, + platformEmailSiteIdentityKeys, platformManagedDomainKeys, platformPageKeys, platformSiteAppLinkKeys, @@ -81,7 +88,6 @@ import { siteThemeKeys, siteWebConfigKeys, spatialRelationKeys, - sqlActionKeys, tableBehaviorKeys, tableKeys, tableGrantKeys, @@ -116,6 +122,20 @@ import { * ``` */ export const invalidate = { + /** Invalidate api queries */ api: { + /** Invalidate all api queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: apiKeys.all, + }), + /** Invalidate api list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: apiKeys.lists(), + }), + /** Invalidate a specific api */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: apiKeys.detail(id), + }), + }, /** Invalidate apiSchema queries */ apiSchema: { /** Invalidate all apiSchema queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -150,35 +170,35 @@ export const invalidate = { queryKey: apiSettingKeys.detail(id), }), }, - /** Invalidate apis queries */ apis: { - /** Invalidate all apis queries */ all: (queryClient: QueryClient) => + /** Invalidate appComponent queries */ appComponent: { + /** Invalidate all appComponent queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: apisKeys.all, + queryKey: appComponentKeys.all, }), - /** Invalidate apis list queries */ lists: (queryClient: QueryClient) => + /** Invalidate appComponent list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: appComponentKeys.lists(), }), - /** Invalidate a specific apis */ detail: (queryClient: QueryClient, id: string | number) => + /** Invalidate a specific appComponent */ detail: ( + queryClient: QueryClient, + id: string | number + ) => queryClient.invalidateQueries({ - queryKey: apisKeys.detail(id), + queryKey: appComponentKeys.detail(id), }), }, - /** Invalidate astMigration queries */ astMigration: { - /** Invalidate all astMigration queries */ all: (queryClient: QueryClient) => + /** Invalidate app queries */ app: { + /** Invalidate all app queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: astMigrationKeys.all, + queryKey: appKeys.all, }), - /** Invalidate astMigration list queries */ lists: (queryClient: QueryClient) => + /** Invalidate app list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: astMigrationKeys.lists(), + queryKey: appKeys.lists(), }), - /** Invalidate a specific astMigration */ detail: ( - queryClient: QueryClient, - id: string | number - ) => + /** Invalidate a specific app */ detail: (queryClient: QueryClient, id: string | number) => queryClient.invalidateQueries({ - queryKey: astMigrationKeys.detail(id), + queryKey: appKeys.detail(id), }), }, /** Invalidate checkConstraint queries */ checkConstraint: { @@ -376,6 +396,57 @@ export const invalidate = { queryKey: domainVerificationKeys.detail(id), }), }, + /** Invalidate emailIdentity queries */ emailIdentity: { + /** Invalidate all emailIdentity queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.all, + }), + /** Invalidate emailIdentity list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.lists(), + }), + /** Invalidate a specific emailIdentity */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.detail(id), + }), + }, + /** Invalidate emailProviderAccount queries */ emailProviderAccount: { + /** Invalidate all emailProviderAccount queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.all, + }), + /** Invalidate emailProviderAccount list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.lists(), + }), + /** Invalidate a specific emailProviderAccount */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.detail(id), + }), + }, + /** Invalidate emailSiteIdentity queries */ emailSiteIdentity: { + /** Invalidate all emailSiteIdentity queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.all, + }), + /** Invalidate emailSiteIdentity list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.lists(), + }), + /** Invalidate a specific emailSiteIdentity */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.detail(id), + }), + }, /** Invalidate embeddingChunk queries */ embeddingChunk: { /** Invalidate all embeddingChunk queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -633,6 +704,23 @@ export const invalidate = { queryKey: partitionKeys.detail(id), }), }, + /** Invalidate platformApi queries */ platformApi: { + /** Invalidate all platformApi queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.all, + }), + /** Invalidate platformApi list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.lists(), + }), + /** Invalidate a specific platformApi */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.detail(id), + }), + }, /** Invalidate platformApiSchema queries */ platformApiSchema: { /** Invalidate all platformApiSchema queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -667,23 +755,6 @@ export const invalidate = { queryKey: platformApiSettingKeys.detail(id), }), }, - /** Invalidate platformApis queries */ platformApis: { - /** Invalidate all platformApis queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.all, - }), - /** Invalidate platformApis list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), - }), - /** Invalidate a specific platformApis */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.detail(id), - }), - }, /** Invalidate platformCorsSetting queries */ platformCorsSetting: { /** Invalidate all platformCorsSetting queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -752,6 +823,57 @@ export const invalidate = { queryKey: platformDomainVerificationKeys.detail(id), }), }, + /** Invalidate platformEmailIdentity queries */ platformEmailIdentity: { + /** Invalidate all platformEmailIdentity queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.all, + }), + /** Invalidate platformEmailIdentity list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.lists(), + }), + /** Invalidate a specific platformEmailIdentity */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.detail(id), + }), + }, + /** Invalidate platformEmailProviderAccount queries */ platformEmailProviderAccount: { + /** Invalidate all platformEmailProviderAccount queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.all, + }), + /** Invalidate platformEmailProviderAccount list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.lists(), + }), + /** Invalidate a specific platformEmailProviderAccount */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.detail(id), + }), + }, + /** Invalidate platformEmailSiteIdentity queries */ platformEmailSiteIdentity: { + /** Invalidate all platformEmailSiteIdentity queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.all, + }), + /** Invalidate platformEmailSiteIdentity list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.lists(), + }), + /** Invalidate a specific platformEmailSiteIdentity */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.detail(id), + }), + }, /** Invalidate platformManagedDomain queries */ platformManagedDomain: { /** Invalidate all platformManagedDomain queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1199,23 +1321,6 @@ export const invalidate = { queryKey: spatialRelationKeys.detail(id), }), }, - /** Invalidate sqlAction queries */ sqlAction: { - /** Invalidate all sqlAction queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: sqlActionKeys.all, - }), - /** Invalidate sqlAction list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: sqlActionKeys.lists(), - }), - /** Invalidate a specific sqlAction */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: sqlActionKeys.detail(id), - }), - }, /** Invalidate tableBehavior queries */ tableBehavior: { /** Invalidate all tableBehavior queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1438,6 +1543,11 @@ export const invalidate = { * instead of just invalidating (which would trigger a refetch). */ export const remove = { + /** Remove api from cache */ api: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: apiKeys.detail(id), + }); + }, /** Remove apiSchema from cache */ apiSchema: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: apiSchemaKeys.detail(id), @@ -1451,17 +1561,17 @@ export const remove = { queryKey: apiSettingKeys.detail(id), }); }, - /** Remove apis from cache */ apis: (queryClient: QueryClient, id: string | number) => { - queryClient.removeQueries({ - queryKey: apisKeys.detail(id), - }); - }, - /** Remove astMigration from cache */ astMigration: ( + /** Remove appComponent from cache */ appComponent: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: astMigrationKeys.detail(id), + queryKey: appComponentKeys.detail(id), + }); + }, + /** Remove app from cache */ app: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: appKeys.detail(id), }); }, /** Remove checkConstraint from cache */ checkConstraint: ( @@ -1551,6 +1661,30 @@ export const remove = { queryKey: domainVerificationKeys.detail(id), }); }, + /** Remove emailIdentity from cache */ emailIdentity: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: emailIdentityKeys.detail(id), + }); + }, + /** Remove emailProviderAccount from cache */ emailProviderAccount: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: emailProviderAccountKeys.detail(id), + }); + }, + /** Remove emailSiteIdentity from cache */ emailSiteIdentity: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: emailSiteIdentityKeys.detail(id), + }); + }, /** Remove embeddingChunk from cache */ embeddingChunk: ( queryClient: QueryClient, id: string | number @@ -1658,28 +1792,28 @@ export const remove = { queryKey: partitionKeys.detail(id), }); }, - /** Remove platformApiSchema from cache */ platformApiSchema: ( + /** Remove platformApi from cache */ platformApi: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApiSchemaKeys.detail(id), + queryKey: platformApiKeys.detail(id), }); }, - /** Remove platformApiSetting from cache */ platformApiSetting: ( + /** Remove platformApiSchema from cache */ platformApiSchema: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApiSettingKeys.detail(id), + queryKey: platformApiSchemaKeys.detail(id), }); }, - /** Remove platformApis from cache */ platformApis: ( + /** Remove platformApiSetting from cache */ platformApiSetting: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApisKeys.detail(id), + queryKey: platformApiSettingKeys.detail(id), }); }, /** Remove platformCorsSetting from cache */ platformCorsSetting: ( @@ -1714,6 +1848,30 @@ export const remove = { queryKey: platformDomainVerificationKeys.detail(id), }); }, + /** Remove platformEmailIdentity from cache */ platformEmailIdentity: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformEmailIdentityKeys.detail(id), + }); + }, + /** Remove platformEmailProviderAccount from cache */ platformEmailProviderAccount: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformEmailProviderAccountKeys.detail(id), + }); + }, + /** Remove platformEmailSiteIdentity from cache */ platformEmailSiteIdentity: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: platformEmailSiteIdentityKeys.detail(id), + }); + }, /** Remove platformManagedDomain from cache */ platformManagedDomain: ( queryClient: QueryClient, id: string | number @@ -1915,11 +2073,6 @@ export const remove = { queryKey: spatialRelationKeys.detail(id), }); }, - /** Remove sqlAction from cache */ sqlAction: (queryClient: QueryClient, id: string | number) => { - queryClient.removeQueries({ - queryKey: sqlActionKeys.detail(id), - }); - }, /** Remove tableBehavior from cache */ tableBehavior: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/api/hooks/mutation-keys.ts b/sdk/constructive-react/src/api/hooks/mutation-keys.ts index fe0df59a18..1a5c7cfc71 100644 --- a/sdk/constructive-react/src/api/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/api/hooks/mutation-keys.ts @@ -18,6 +18,14 @@ // Entity Mutation Keys // ============================================================================ +export const apiMutationKeys = { + /** All api mutation keys */ all: ['mutation', 'api'] as const, + /** Create api mutation key */ create: () => ['mutation', 'api', 'create'] as const, + /** Update api mutation key */ update: (id: string | number) => + ['mutation', 'api', 'update', id] as const, + /** Delete api mutation key */ delete: (id: string | number) => + ['mutation', 'api', 'delete', id] as const, +} as const; export const apiSchemaMutationKeys = { /** All apiSchema mutation keys */ all: ['mutation', 'apischema'] as const, /** Create apiSchema mutation key */ create: () => ['mutation', 'apischema', 'create'] as const, @@ -34,22 +42,22 @@ export const apiSettingMutationKeys = { /** Delete apiSetting mutation key */ delete: (id: string | number) => ['mutation', 'apisetting', 'delete', id] as const, } as const; -export const apisMutationKeys = { - /** All apis mutation keys */ all: ['mutation', 'apis'] as const, - /** Create apis mutation key */ create: () => ['mutation', 'apis', 'create'] as const, - /** Update apis mutation key */ update: (id: string | number) => - ['mutation', 'apis', 'update', id] as const, - /** Delete apis mutation key */ delete: (id: string | number) => - ['mutation', 'apis', 'delete', id] as const, -} as const; -export const astMigrationMutationKeys = { - /** All astMigration mutation keys */ all: ['mutation', 'astmigration'] as const, - /** Create astMigration mutation key */ create: () => - ['mutation', 'astmigration', 'create'] as const, - /** Update astMigration mutation key */ update: (id: string | number) => - ['mutation', 'astmigration', 'update', id] as const, - /** Delete astMigration mutation key */ delete: (id: string | number) => - ['mutation', 'astmigration', 'delete', id] as const, +export const appComponentMutationKeys = { + /** All appComponent mutation keys */ all: ['mutation', 'appcomponent'] as const, + /** Create appComponent mutation key */ create: () => + ['mutation', 'appcomponent', 'create'] as const, + /** Update appComponent mutation key */ update: (id: string | number) => + ['mutation', 'appcomponent', 'update', id] as const, + /** Delete appComponent mutation key */ delete: (id: string | number) => + ['mutation', 'appcomponent', 'delete', id] as const, +} as const; +export const appMutationKeys = { + /** All app mutation keys */ all: ['mutation', 'app'] as const, + /** Create app mutation key */ create: () => ['mutation', 'app', 'create'] as const, + /** Update app mutation key */ update: (id: string | number) => + ['mutation', 'app', 'update', id] as const, + /** Delete app mutation key */ delete: (id: string | number) => + ['mutation', 'app', 'delete', id] as const, } as const; export const checkConstraintMutationKeys = { /** All checkConstraint mutation keys */ all: ['mutation', 'checkconstraint'] as const, @@ -155,6 +163,33 @@ export const domainVerificationMutationKeys = { /** Delete domainVerification mutation key */ delete: (id: string | number) => ['mutation', 'domainverification', 'delete', id] as const, } as const; +export const emailIdentityMutationKeys = { + /** All emailIdentity mutation keys */ all: ['mutation', 'emailidentity'] as const, + /** Create emailIdentity mutation key */ create: () => + ['mutation', 'emailidentity', 'create'] as const, + /** Update emailIdentity mutation key */ update: (id: string | number) => + ['mutation', 'emailidentity', 'update', id] as const, + /** Delete emailIdentity mutation key */ delete: (id: string | number) => + ['mutation', 'emailidentity', 'delete', id] as const, +} as const; +export const emailProviderAccountMutationKeys = { + /** All emailProviderAccount mutation keys */ all: ['mutation', 'emailprovideraccount'] as const, + /** Create emailProviderAccount mutation key */ create: () => + ['mutation', 'emailprovideraccount', 'create'] as const, + /** Update emailProviderAccount mutation key */ update: (id: string | number) => + ['mutation', 'emailprovideraccount', 'update', id] as const, + /** Delete emailProviderAccount mutation key */ delete: (id: string | number) => + ['mutation', 'emailprovideraccount', 'delete', id] as const, +} as const; +export const emailSiteIdentityMutationKeys = { + /** All emailSiteIdentity mutation keys */ all: ['mutation', 'emailsiteidentity'] as const, + /** Create emailSiteIdentity mutation key */ create: () => + ['mutation', 'emailsiteidentity', 'create'] as const, + /** Update emailSiteIdentity mutation key */ update: (id: string | number) => + ['mutation', 'emailsiteidentity', 'update', id] as const, + /** Delete emailSiteIdentity mutation key */ delete: (id: string | number) => + ['mutation', 'emailsiteidentity', 'delete', id] as const, +} as const; export const embeddingChunkMutationKeys = { /** All embeddingChunk mutation keys */ all: ['mutation', 'embeddingchunk'] as const, /** Create embeddingChunk mutation key */ create: () => @@ -295,6 +330,15 @@ export const partitionMutationKeys = { /** Delete partition mutation key */ delete: (id: string | number) => ['mutation', 'partition', 'delete', id] as const, } as const; +export const platformApiMutationKeys = { + /** All platformApi mutation keys */ all: ['mutation', 'platformapi'] as const, + /** Create platformApi mutation key */ create: () => + ['mutation', 'platformapi', 'create'] as const, + /** Update platformApi mutation key */ update: (id: string | number) => + ['mutation', 'platformapi', 'update', id] as const, + /** Delete platformApi mutation key */ delete: (id: string | number) => + ['mutation', 'platformapi', 'delete', id] as const, +} as const; export const platformApiSchemaMutationKeys = { /** All platformApiSchema mutation keys */ all: ['mutation', 'platformapischema'] as const, /** Create platformApiSchema mutation key */ create: () => @@ -313,15 +357,6 @@ export const platformApiSettingMutationKeys = { /** Delete platformApiSetting mutation key */ delete: (id: string | number) => ['mutation', 'platformapisetting', 'delete', id] as const, } as const; -export const platformApisMutationKeys = { - /** All platformApis mutation keys */ all: ['mutation', 'platformapis'] as const, - /** Create platformApis mutation key */ create: () => - ['mutation', 'platformapis', 'create'] as const, - /** Update platformApis mutation key */ update: (id: string | number) => - ['mutation', 'platformapis', 'update', id] as const, - /** Delete platformApis mutation key */ delete: (id: string | number) => - ['mutation', 'platformapis', 'delete', id] as const, -} as const; export const platformCorsSettingMutationKeys = { /** All platformCorsSetting mutation keys */ all: ['mutation', 'platformcorssetting'] as const, /** Create platformCorsSetting mutation key */ create: () => @@ -361,6 +396,42 @@ export const platformDomainVerificationMutationKeys = { /** Delete platformDomainVerification mutation key */ delete: (id: string | number) => ['mutation', 'platformdomainverification', 'delete', id] as const, } as const; +export const platformEmailIdentityMutationKeys = { + /** All platformEmailIdentity mutation keys */ all: [ + 'mutation', + 'platformemailidentity', + ] as const, + /** Create platformEmailIdentity mutation key */ create: () => + ['mutation', 'platformemailidentity', 'create'] as const, + /** Update platformEmailIdentity mutation key */ update: (id: string | number) => + ['mutation', 'platformemailidentity', 'update', id] as const, + /** Delete platformEmailIdentity mutation key */ delete: (id: string | number) => + ['mutation', 'platformemailidentity', 'delete', id] as const, +} as const; +export const platformEmailProviderAccountMutationKeys = { + /** All platformEmailProviderAccount mutation keys */ all: [ + 'mutation', + 'platformemailprovideraccount', + ] as const, + /** Create platformEmailProviderAccount mutation key */ create: () => + ['mutation', 'platformemailprovideraccount', 'create'] as const, + /** Update platformEmailProviderAccount mutation key */ update: (id: string | number) => + ['mutation', 'platformemailprovideraccount', 'update', id] as const, + /** Delete platformEmailProviderAccount mutation key */ delete: (id: string | number) => + ['mutation', 'platformemailprovideraccount', 'delete', id] as const, +} as const; +export const platformEmailSiteIdentityMutationKeys = { + /** All platformEmailSiteIdentity mutation keys */ all: [ + 'mutation', + 'platformemailsiteidentity', + ] as const, + /** Create platformEmailSiteIdentity mutation key */ create: () => + ['mutation', 'platformemailsiteidentity', 'create'] as const, + /** Update platformEmailSiteIdentity mutation key */ update: (id: string | number) => + ['mutation', 'platformemailsiteidentity', 'update', id] as const, + /** Delete platformEmailSiteIdentity mutation key */ delete: (id: string | number) => + ['mutation', 'platformemailsiteidentity', 'delete', id] as const, +} as const; export const platformManagedDomainMutationKeys = { /** All platformManagedDomain mutation keys */ all: [ 'mutation', @@ -609,14 +680,6 @@ export const spatialRelationMutationKeys = { /** Delete spatialRelation mutation key */ delete: (id: string | number) => ['mutation', 'spatialrelation', 'delete', id] as const, } as const; -export const sqlActionMutationKeys = { - /** All sqlAction mutation keys */ all: ['mutation', 'sqlaction'] as const, - /** Create sqlAction mutation key */ create: () => ['mutation', 'sqlaction', 'create'] as const, - /** Update sqlAction mutation key */ update: (id: string | number) => - ['mutation', 'sqlaction', 'update', id] as const, - /** Delete sqlAction mutation key */ delete: (id: string | number) => - ['mutation', 'sqlaction', 'delete', id] as const, -} as const; export const tableBehaviorMutationKeys = { /** All tableBehavior mutation keys */ all: ['mutation', 'tablebehavior'] as const, /** Create tableBehavior mutation key */ create: () => @@ -736,18 +799,22 @@ export const webauthnSettingMutationKeys = { // ============================================================================ export const customMutationKeys = { - /** Mutation key for acceptDatabaseTransfer */ acceptDatabaseTransfer: (identifier?: string) => - identifier - ? (['mutation', 'acceptDatabaseTransfer', identifier] as const) - : (['mutation', 'acceptDatabaseTransfer'] as const), /** Mutation key for applyRls */ applyRls: (identifier?: string) => identifier ? (['mutation', 'applyRls', identifier] as const) : (['mutation', 'applyRls'] as const), - /** Mutation key for cancelDatabaseTransfer */ cancelDatabaseTransfer: (identifier?: string) => + /** Mutation key for appsInstallApp */ appsInstallApp: (identifier?: string) => + identifier + ? (['mutation', 'appsInstallApp', identifier] as const) + : (['mutation', 'appsInstallApp'] as const), + /** Mutation key for appsUninstallApp */ appsUninstallApp: (identifier?: string) => identifier - ? (['mutation', 'cancelDatabaseTransfer', identifier] as const) - : (['mutation', 'cancelDatabaseTransfer'] as const), + ? (['mutation', 'appsUninstallApp', identifier] as const) + : (['mutation', 'appsUninstallApp'] as const), + /** Mutation key for appsUpgradeApp */ appsUpgradeApp: (identifier?: string) => + identifier + ? (['mutation', 'appsUpgradeApp', identifier] as const) + : (['mutation', 'appsUpgradeApp'] as const), /** Mutation key for domainsAssignSubdomain */ domainsAssignSubdomain: (identifier?: string) => identifier ? (['mutation', 'domainsAssignSubdomain', identifier] as const) @@ -768,10 +835,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), - /** Mutation key for rejectDatabaseTransfer */ rejectDatabaseTransfer: (identifier?: string) => - identifier - ? (['mutation', 'rejectDatabaseTransfer', identifier] as const) - : (['mutation', 'rejectDatabaseTransfer'] as const), /** Mutation key for requestDatabase */ requestDatabase: (identifier?: string) => identifier ? (['mutation', 'requestDatabase', identifier] as const) @@ -810,10 +873,11 @@ export const customMutationKeys = { * ``` */ export const mutationKeys = { + api: apiMutationKeys, apiSchema: apiSchemaMutationKeys, apiSetting: apiSettingMutationKeys, - apis: apisMutationKeys, - astMigration: astMigrationMutationKeys, + appComponent: appComponentMutationKeys, + app: appMutationKeys, checkConstraint: checkConstraintMutationKeys, compositeType: compositeTypeMutationKeys, corsSetting: corsSettingMutationKeys, @@ -826,6 +890,9 @@ export const mutationKeys = { domainEvent: domainEventMutationKeys, domainType: domainTypeMutationKeys, domainVerification: domainVerificationMutationKeys, + emailIdentity: emailIdentityMutationKeys, + emailProviderAccount: emailProviderAccountMutationKeys, + emailSiteIdentity: emailSiteIdentityMutationKeys, embeddingChunk: embeddingChunkMutationKeys, enum: enumMutationKeys, exclusionConstraint: exclusionConstraintMutationKeys, @@ -842,13 +909,16 @@ export const mutationKeys = { nodeTypeRegistry: nodeTypeRegistryMutationKeys, page: pageMutationKeys, partition: partitionMutationKeys, + platformApi: platformApiMutationKeys, platformApiSchema: platformApiSchemaMutationKeys, platformApiSetting: platformApiSettingMutationKeys, - platformApis: platformApisMutationKeys, platformCorsSetting: platformCorsSettingMutationKeys, platformDomain: platformDomainMutationKeys, platformDomainEvent: platformDomainEventMutationKeys, platformDomainVerification: platformDomainVerificationMutationKeys, + platformEmailIdentity: platformEmailIdentityMutationKeys, + platformEmailProviderAccount: platformEmailProviderAccountMutationKeys, + platformEmailSiteIdentity: platformEmailSiteIdentityMutationKeys, platformManagedDomain: platformManagedDomainMutationKeys, platformPage: platformPageMutationKeys, platformSiteAppLink: platformSiteAppLinkMutationKeys, @@ -876,7 +946,6 @@ export const mutationKeys = { siteTheme: siteThemeMutationKeys, siteWebConfig: siteWebConfigMutationKeys, spatialRelation: spatialRelationMutationKeys, - sqlAction: sqlActionMutationKeys, tableBehavior: tableBehaviorMutationKeys, table: tableMutationKeys, tableGrant: tableGrantMutationKeys, diff --git a/sdk/constructive-react/src/api/hooks/mutations/index.ts b/sdk/constructive-react/src/api/hooks/mutations/index.ts index e0db6a299c..b22347264f 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/index.ts @@ -3,16 +3,21 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useCreateApiMutation'; +export * from './useUpdateApiMutation'; +export * from './useDeleteApiMutation'; export * from './useCreateApiSchemaMutation'; export * from './useUpdateApiSchemaMutation'; export * from './useDeleteApiSchemaMutation'; export * from './useCreateApiSettingMutation'; export * from './useUpdateApiSettingMutation'; export * from './useDeleteApiSettingMutation'; -export * from './useCreateApisMutation'; -export * from './useUpdateApisMutation'; -export * from './useDeleteApisMutation'; -export * from './useCreateAstMigrationMutation'; +export * from './useCreateAppComponentMutation'; +export * from './useUpdateAppComponentMutation'; +export * from './useDeleteAppComponentMutation'; +export * from './useCreateAppMutation'; +export * from './useUpdateAppMutation'; +export * from './useDeleteAppMutation'; export * from './useCreateCheckConstraintMutation'; export * from './useUpdateCheckConstraintMutation'; export * from './useDeleteCheckConstraintMutation'; @@ -49,6 +54,15 @@ export * from './useDeleteDomainTypeMutation'; export * from './useCreateDomainVerificationMutation'; export * from './useUpdateDomainVerificationMutation'; export * from './useDeleteDomainVerificationMutation'; +export * from './useCreateEmailIdentityMutation'; +export * from './useUpdateEmailIdentityMutation'; +export * from './useDeleteEmailIdentityMutation'; +export * from './useCreateEmailProviderAccountMutation'; +export * from './useUpdateEmailProviderAccountMutation'; +export * from './useDeleteEmailProviderAccountMutation'; +export * from './useCreateEmailSiteIdentityMutation'; +export * from './useUpdateEmailSiteIdentityMutation'; +export * from './useDeleteEmailSiteIdentityMutation'; export * from './useCreateEmbeddingChunkMutation'; export * from './useUpdateEmbeddingChunkMutation'; export * from './useDeleteEmbeddingChunkMutation'; @@ -97,15 +111,15 @@ export * from './useDeletePageMutation'; export * from './useCreatePartitionMutation'; export * from './useUpdatePartitionMutation'; export * from './useDeletePartitionMutation'; +export * from './useCreatePlatformApiMutation'; +export * from './useUpdatePlatformApiMutation'; +export * from './useDeletePlatformApiMutation'; export * from './useCreatePlatformApiSchemaMutation'; export * from './useUpdatePlatformApiSchemaMutation'; export * from './useDeletePlatformApiSchemaMutation'; export * from './useCreatePlatformApiSettingMutation'; export * from './useUpdatePlatformApiSettingMutation'; export * from './useDeletePlatformApiSettingMutation'; -export * from './useCreatePlatformApisMutation'; -export * from './useUpdatePlatformApisMutation'; -export * from './useDeletePlatformApisMutation'; export * from './useCreatePlatformCorsSettingMutation'; export * from './useUpdatePlatformCorsSettingMutation'; export * from './useDeletePlatformCorsSettingMutation'; @@ -118,6 +132,15 @@ export * from './useDeletePlatformDomainEventMutation'; export * from './useCreatePlatformDomainVerificationMutation'; export * from './useUpdatePlatformDomainVerificationMutation'; export * from './useDeletePlatformDomainVerificationMutation'; +export * from './useCreatePlatformEmailIdentityMutation'; +export * from './useUpdatePlatformEmailIdentityMutation'; +export * from './useDeletePlatformEmailIdentityMutation'; +export * from './useCreatePlatformEmailProviderAccountMutation'; +export * from './useUpdatePlatformEmailProviderAccountMutation'; +export * from './useDeletePlatformEmailProviderAccountMutation'; +export * from './useCreatePlatformEmailSiteIdentityMutation'; +export * from './useUpdatePlatformEmailSiteIdentityMutation'; +export * from './useDeletePlatformEmailSiteIdentityMutation'; export * from './useCreatePlatformManagedDomainMutation'; export * from './useUpdatePlatformManagedDomainMutation'; export * from './useDeletePlatformManagedDomainMutation'; @@ -199,7 +222,6 @@ export * from './useDeleteSiteWebConfigMutation'; export * from './useCreateSpatialRelationMutation'; export * from './useUpdateSpatialRelationMutation'; export * from './useDeleteSpatialRelationMutation'; -export * from './useCreateSqlActionMutation'; export * from './useCreateTableBehaviorMutation'; export * from './useUpdateTableBehaviorMutation'; export * from './useDeleteTableBehaviorMutation'; @@ -239,14 +261,14 @@ export * from './useDeleteViewTableMutation'; export * from './useCreateWebauthnSettingMutation'; export * from './useUpdateWebauthnSettingMutation'; export * from './useDeleteWebauthnSettingMutation'; -export * from './useAcceptDatabaseTransferMutation'; export * from './useApplyRlsMutation'; -export * from './useCancelDatabaseTransferMutation'; +export * from './useAppsInstallAppMutation'; +export * from './useAppsUninstallAppMutation'; +export * from './useAppsUpgradeAppMutation'; export * from './useDomainsAssignSubdomainMutation'; export * from './usePlatformDomainsAssignSubdomainMutation'; export * from './usePlatformSitesProvisionStaticSiteMutation'; export * from './useProvisionBucketMutation'; -export * from './useRejectDatabaseTransferMutation'; export * from './useRequestDatabaseMutation'; export * from './useSetFieldOrderMutation'; export * from './useSitesProvisionStaticSiteMutation'; diff --git a/sdk/constructive-react/src/api/hooks/mutations/useAcceptDatabaseTransferMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useAcceptDatabaseTransferMutation.ts deleted file mode 100644 index c31146bfe5..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useAcceptDatabaseTransferMutation.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Custom mutation hook for acceptDatabaseTransfer - * @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 { AcceptDatabaseTransferVariables } from '../../orm/mutation'; -import type { - AcceptDatabaseTransferPayloadSelect, - AcceptDatabaseTransferPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { AcceptDatabaseTransferVariables } from '../../orm/mutation'; -export type { AcceptDatabaseTransferPayloadSelect } from '../../orm/input-types'; -export function useAcceptDatabaseTransferMutation( - params: { - selection: { - fields: S & AcceptDatabaseTransferPayloadSelect; - } & HookStrictSelect, AcceptDatabaseTransferPayloadSelect>; - } & Omit< - UseMutationOptions< - { - acceptDatabaseTransfer: InferSelectResult | null; - }, - Error, - AcceptDatabaseTransferVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - acceptDatabaseTransfer: InferSelectResult | null; - }, - Error, - AcceptDatabaseTransferVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.acceptDatabaseTransfer(), - mutationFn: (variables: AcceptDatabaseTransferVariables) => - getClient() - .mutation.acceptDatabaseTransfer(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useAppsInstallAppMutation.ts similarity index 54% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useAppsInstallAppMutation.ts index 91f39cd892..5f49f5f8e4 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useAppsInstallAppMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionTable + * Custom mutation hook for appsInstallApp * @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 { ProvisionTableVariables } from '../../orm/mutation'; -import type { ProvisionTablePayloadSelect, ProvisionTablePayload } from '../../orm/input-types'; +import type { AppsInstallAppVariables } from '../../orm/mutation'; +import type { AppsInstallAppPayloadSelect, AppsInstallAppPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionTableVariables } from '../../orm/mutation'; -export type { ProvisionTablePayloadSelect } from '../../orm/input-types'; -export function useProvisionTableMutation( +export type { AppsInstallAppVariables } from '../../orm/mutation'; +export type { AppsInstallAppPayloadSelect } from '../../orm/input-types'; +export function useAppsInstallAppMutation( params: { selection: { - fields: S & ProvisionTablePayloadSelect; - } & HookStrictSelect, ProvisionTablePayloadSelect>; + fields: S & AppsInstallAppPayloadSelect; + } & HookStrictSelect, AppsInstallAppPayloadSelect>; } & Omit< UseMutationOptions< { - provisionTable: InferSelectResult | null; + appsInstallApp: InferSelectResult | null; }, Error, - ProvisionTableVariables + AppsInstallAppVariables >, 'mutationFn' > ): UseMutationResult< { - provisionTable: InferSelectResult | null; + appsInstallApp: InferSelectResult | null; }, Error, - ProvisionTableVariables + AppsInstallAppVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionTable(), - mutationFn: (variables: ProvisionTableVariables) => + mutationKey: customMutationKeys.appsInstallApp(), + mutationFn: (variables: AppsInstallAppVariables) => getClient() - .mutation.provisionTable(variables, { + .mutation.appsInstallApp(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/api/hooks/mutations/useAppsUninstallAppMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useAppsUninstallAppMutation.ts new file mode 100644 index 0000000000..91492e5fbd --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useAppsUninstallAppMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for appsUninstallApp + * @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 { AppsUninstallAppVariables } from '../../orm/mutation'; +import type { AppsUninstallAppPayloadSelect, AppsUninstallAppPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { AppsUninstallAppVariables } from '../../orm/mutation'; +export type { AppsUninstallAppPayloadSelect } from '../../orm/input-types'; +export function useAppsUninstallAppMutation( + params: { + selection: { + fields: S & AppsUninstallAppPayloadSelect; + } & HookStrictSelect, AppsUninstallAppPayloadSelect>; + } & Omit< + UseMutationOptions< + { + appsUninstallApp: InferSelectResult | null; + }, + Error, + AppsUninstallAppVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + appsUninstallApp: InferSelectResult | null; + }, + Error, + AppsUninstallAppVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.appsUninstallApp(), + mutationFn: (variables: AppsUninstallAppVariables) => + getClient() + .mutation.appsUninstallApp(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useAppsUpgradeAppMutation.ts similarity index 54% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useAppsUpgradeAppMutation.ts index c195e16439..c25006dab4 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useAppsUpgradeAppMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionIndex + * Custom mutation hook for appsUpgradeApp * @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 { ProvisionIndexVariables } from '../../orm/mutation'; -import type { ProvisionIndexPayloadSelect, ProvisionIndexPayload } from '../../orm/input-types'; +import type { AppsUpgradeAppVariables } from '../../orm/mutation'; +import type { AppsUpgradeAppPayloadSelect, AppsUpgradeAppPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionIndexVariables } from '../../orm/mutation'; -export type { ProvisionIndexPayloadSelect } from '../../orm/input-types'; -export function useProvisionIndexMutation( +export type { AppsUpgradeAppVariables } from '../../orm/mutation'; +export type { AppsUpgradeAppPayloadSelect } from '../../orm/input-types'; +export function useAppsUpgradeAppMutation( params: { selection: { - fields: S & ProvisionIndexPayloadSelect; - } & HookStrictSelect, ProvisionIndexPayloadSelect>; + fields: S & AppsUpgradeAppPayloadSelect; + } & HookStrictSelect, AppsUpgradeAppPayloadSelect>; } & Omit< UseMutationOptions< { - provisionIndex: InferSelectResult | null; + appsUpgradeApp: InferSelectResult | null; }, Error, - ProvisionIndexVariables + AppsUpgradeAppVariables >, 'mutationFn' > ): UseMutationResult< { - provisionIndex: InferSelectResult | null; + appsUpgradeApp: InferSelectResult | null; }, Error, - ProvisionIndexVariables + AppsUpgradeAppVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionIndex(), - mutationFn: (variables: ProvisionIndexVariables) => + mutationKey: customMutationKeys.appsUpgradeApp(), + mutationFn: (variables: AppsUpgradeAppVariables) => getClient() - .mutation.provisionIndex(variables, { + .mutation.appsUpgradeApp(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCancelDatabaseTransferMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCancelDatabaseTransferMutation.ts deleted file mode 100644 index 99fa89988a..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCancelDatabaseTransferMutation.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Custom mutation hook for cancelDatabaseTransfer - * @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 { CancelDatabaseTransferVariables } from '../../orm/mutation'; -import type { - CancelDatabaseTransferPayloadSelect, - CancelDatabaseTransferPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { CancelDatabaseTransferVariables } from '../../orm/mutation'; -export type { CancelDatabaseTransferPayloadSelect } from '../../orm/input-types'; -export function useCancelDatabaseTransferMutation( - params: { - selection: { - fields: S & CancelDatabaseTransferPayloadSelect; - } & HookStrictSelect, CancelDatabaseTransferPayloadSelect>; - } & Omit< - UseMutationOptions< - { - cancelDatabaseTransfer: InferSelectResult | null; - }, - Error, - CancelDatabaseTransferVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - cancelDatabaseTransfer: InferSelectResult | null; - }, - Error, - CancelDatabaseTransferVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.cancelDatabaseTransfer(), - mutationFn: (variables: CancelDatabaseTransferVariables) => - getClient() - .mutation.cancelDatabaseTransfer(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts similarity index 56% rename from sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts index eed3e05eb7..1ffaaef3f9 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts @@ -9,70 +9,70 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations, CreateApisInput } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations, CreateApiInput } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, CreateApisInput } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations, CreateApiInput } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useCreateApisMutation({ + * const { mutate, isPending } = useCreateApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * * mutate({ name: 'New item' }); * ``` */ -export function useCreateApisMutation( +export function useCreateApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }, Error, - CreateApisInput['apis'] + CreateApiInput['api'] >, 'mutationFn' > ): UseMutationResult< { - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }, Error, - CreateApisInput['apis'] + CreateApiInput['api'] >; -export function useCreateApisMutation( +export function useCreateApiMutation( params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> + selection: SelectionConfig; + } & Omit, 'mutationFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.create(), - mutationFn: (data: CreateApisInput['apis']) => + mutationKey: apiMutationKeys.create(), + mutationFn: (data: CreateApiInput['api']) => getClient() - .apis.create({ + .api.create({ data, select: args.select, }) .unwrap(), onSuccess: () => { queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateAppComponentMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateAppComponentMutation.ts new file mode 100644 index 0000000000..0eea64763e --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateAppComponentMutation.ts @@ -0,0 +1,88 @@ +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * @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 { appComponentKeys } from '../query-keys'; +import { appComponentMutationKeys } from '../mutation-keys'; +import type { + AppComponentSelect, + AppComponentWithRelations, + CreateAppComponentInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppComponentSelect, + AppComponentWithRelations, + CreateAppComponentInput, +} from '../../orm/input-types'; +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppComponentMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppComponentMutation( + params: { + selection: { + fields: S & AppComponentSelect; + } & HookStrictSelect, AppComponentSelect>; + } & Omit< + UseMutationOptions< + { + createAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + CreateAppComponentInput['appComponent'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + CreateAppComponentInput['appComponent'] +>; +export function useCreateAppComponentMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appComponentMutationKeys.create(), + mutationFn: (data: CreateAppComponentInput['appComponent']) => + getClient() + .appComponent.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appComponentKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateAppMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateAppMutation.ts new file mode 100644 index 0000000000..cf6664b6b8 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateAppMutation.ts @@ -0,0 +1,80 @@ +/** + * App aggregates: thin identity rows whose components are global catalog references + * @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 { appKeys } from '../query-keys'; +import { appMutationKeys } from '../mutation-keys'; +import type { AppSelect, AppWithRelations, CreateAppInput } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppSelect, AppWithRelations, CreateAppInput } from '../../orm/input-types'; +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppMutation( + params: { + selection: { + fields: S & AppSelect; + } & HookStrictSelect, AppSelect>; + } & Omit< + UseMutationOptions< + { + createApp: { + app: InferSelectResult; + }; + }, + Error, + CreateAppInput['app'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createApp: { + app: InferSelectResult; + }; + }, + Error, + CreateAppInput['app'] +>; +export function useCreateAppMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appMutationKeys.create(), + mutationFn: (data: CreateAppInput['app']) => + getClient() + .app.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateAstMigrationMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateAstMigrationMutation.ts deleted file mode 100644 index 7f9caacb12..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateAstMigrationMutation.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Create mutation hook for AstMigration - * @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 { astMigrationKeys } from '../query-keys'; -import { astMigrationMutationKeys } from '../mutation-keys'; -import type { - AstMigrationSelect, - AstMigrationWithRelations, - CreateAstMigrationInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - AstMigrationSelect, - AstMigrationWithRelations, - CreateAstMigrationInput, -} from '../../orm/input-types'; -/** - * Mutation hook for creating a AstMigration - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateAstMigrationMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateAstMigrationMutation( - params: { - selection: { - fields: S & AstMigrationSelect; - } & HookStrictSelect, AstMigrationSelect>; - } & Omit< - UseMutationOptions< - { - createAstMigration: { - astMigration: InferSelectResult; - }; - }, - Error, - CreateAstMigrationInput['astMigration'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createAstMigration: { - astMigration: InferSelectResult; - }; - }, - Error, - CreateAstMigrationInput['astMigration'] ->; -export function useCreateAstMigrationMutation( - params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: astMigrationMutationKeys.create(), - mutationFn: (data: CreateAstMigrationInput['astMigration']) => - getClient() - .astMigration.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: astMigrationKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailIdentityMutation.ts new file mode 100644 index 0000000000..1372a2e2d6 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailIdentityMutation.ts @@ -0,0 +1,88 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { emailIdentityKeys } from '../query-keys'; +import { emailIdentityMutationKeys } from '../mutation-keys'; +import type { + EmailIdentitySelect, + EmailIdentityWithRelations, + CreateEmailIdentityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailIdentitySelect, + EmailIdentityWithRelations, + CreateEmailIdentityInput, +} from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateEmailIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateEmailIdentityMutation( + params: { + selection: { + fields: S & EmailIdentitySelect; + } & HookStrictSelect, EmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + createEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + CreateEmailIdentityInput['emailIdentity'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + CreateEmailIdentityInput['emailIdentity'] +>; +export function useCreateEmailIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailIdentityMutationKeys.create(), + mutationFn: (data: CreateEmailIdentityInput['emailIdentity']) => + getClient() + .emailIdentity.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..e330b6ce18 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailProviderAccountMutation.ts @@ -0,0 +1,91 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { emailProviderAccountKeys } from '../query-keys'; +import { emailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + CreateEmailProviderAccountInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + CreateEmailProviderAccountInput, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateEmailProviderAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateEmailProviderAccountMutation( + params: { + selection: { + fields: S & EmailProviderAccountSelect; + } & HookStrictSelect, EmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + createEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + CreateEmailProviderAccountInput['emailProviderAccount'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + CreateEmailProviderAccountInput['emailProviderAccount'] +>; +export function useCreateEmailProviderAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailProviderAccountMutationKeys.create(), + mutationFn: (data: CreateEmailProviderAccountInput['emailProviderAccount']) => + getClient() + .emailProviderAccount.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..df0eef06fc --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateEmailSiteIdentityMutation.ts @@ -0,0 +1,91 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { emailSiteIdentityKeys } from '../query-keys'; +import { emailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + CreateEmailSiteIdentityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + CreateEmailSiteIdentityInput, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateEmailSiteIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateEmailSiteIdentityMutation( + params: { + selection: { + fields: S & EmailSiteIdentitySelect; + } & HookStrictSelect, EmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + createEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + CreateEmailSiteIdentityInput['emailSiteIdentity'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + CreateEmailSiteIdentityInput['emailSiteIdentity'] +>; +export function useCreateEmailSiteIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailSiteIdentityMutationKeys.create(), + mutationFn: (data: CreateEmailSiteIdentityInput['emailSiteIdentity']) => + getClient() + .emailSiteIdentity.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts similarity index 53% rename from sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts index 3d4f64d5ac..91c2ab0235 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts @@ -9,78 +9,78 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; import type { - PlatformApisSelect, - PlatformApisWithRelations, - CreatePlatformApisInput, + PlatformApiSelect, + PlatformApiWithRelations, + CreatePlatformApiInput, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PlatformApisSelect, - PlatformApisWithRelations, - CreatePlatformApisInput, + PlatformApiSelect, + PlatformApiWithRelations, + CreatePlatformApiInput, } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useCreatePlatformApisMutation({ + * const { mutate, isPending } = useCreatePlatformApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * * mutate({ name: 'New item' }); * ``` */ -export function useCreatePlatformApisMutation( +export function useCreatePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }, Error, - CreatePlatformApisInput['platformApis'] + CreatePlatformApiInput['platformApi'] >, 'mutationFn' > ): UseMutationResult< { - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }, Error, - CreatePlatformApisInput['platformApis'] + CreatePlatformApiInput['platformApi'] >; -export function useCreatePlatformApisMutation( +export function useCreatePlatformApiMutation( params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> + selection: SelectionConfig; + } & Omit, 'mutationFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.create(), - mutationFn: (data: CreatePlatformApisInput['platformApis']) => + mutationKey: platformApiMutationKeys.create(), + mutationFn: (data: CreatePlatformApiInput['platformApi']) => getClient() - .platformApis.create({ + .platformApi.create({ data, select: args.select, }) .unwrap(), onSuccess: () => { queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailIdentityMutation.ts new file mode 100644 index 0000000000..69c96b6ce2 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailIdentityMutation.ts @@ -0,0 +1,91 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { platformEmailIdentityKeys } from '../query-keys'; +import { platformEmailIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + CreatePlatformEmailIdentityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + CreatePlatformEmailIdentityInput, +} from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformEmailIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformEmailIdentityMutation( + params: { + selection: { + fields: S & PlatformEmailIdentitySelect; + } & HookStrictSelect, PlatformEmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + createPlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + CreatePlatformEmailIdentityInput['platformEmailIdentity'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + CreatePlatformEmailIdentityInput['platformEmailIdentity'] +>; +export function useCreatePlatformEmailIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailIdentityMutationKeys.create(), + mutationFn: (data: CreatePlatformEmailIdentityInput['platformEmailIdentity']) => + getClient() + .platformEmailIdentity.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..1e0d57ba0c --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailProviderAccountMutation.ts @@ -0,0 +1,100 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { platformEmailProviderAccountKeys } from '../query-keys'; +import { platformEmailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + CreatePlatformEmailProviderAccountInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + CreatePlatformEmailProviderAccountInput, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformEmailProviderAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformEmailProviderAccountMutation< + S extends PlatformEmailProviderAccountSelect, +>( + params: { + selection: { + fields: S & PlatformEmailProviderAccountSelect; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + createPlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + >; + }; + }, + Error, + CreatePlatformEmailProviderAccountInput['platformEmailProviderAccount'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }, + Error, + CreatePlatformEmailProviderAccountInput['platformEmailProviderAccount'] +>; +export function useCreatePlatformEmailProviderAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreatePlatformEmailProviderAccountInput['platformEmailProviderAccount'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailProviderAccountMutationKeys.create(), + mutationFn: (data: CreatePlatformEmailProviderAccountInput['platformEmailProviderAccount']) => + getClient() + .platformEmailProviderAccount.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..dfd0164533 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformEmailSiteIdentityMutation.ts @@ -0,0 +1,97 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { platformEmailSiteIdentityKeys } from '../query-keys'; +import { platformEmailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + CreatePlatformEmailSiteIdentityInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + CreatePlatformEmailSiteIdentityInput, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlatformEmailSiteIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlatformEmailSiteIdentityMutation< + S extends PlatformEmailSiteIdentitySelect, +>( + params: { + selection: { + fields: S & PlatformEmailSiteIdentitySelect; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + createPlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + CreatePlatformEmailSiteIdentityInput['platformEmailSiteIdentity'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + CreatePlatformEmailSiteIdentityInput['platformEmailSiteIdentity'] +>; +export function useCreatePlatformEmailSiteIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreatePlatformEmailSiteIdentityInput['platformEmailSiteIdentity'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailSiteIdentityMutationKeys.create(), + mutationFn: (data: CreatePlatformEmailSiteIdentityInput['platformEmailSiteIdentity']) => + getClient() + .platformEmailSiteIdentity.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateSqlActionMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateSqlActionMutation.ts deleted file mode 100644 index d8eaa7564f..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateSqlActionMutation.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Create mutation hook for SqlAction - * @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 { sqlActionKeys } from '../query-keys'; -import { sqlActionMutationKeys } from '../mutation-keys'; -import type { - SqlActionSelect, - SqlActionWithRelations, - CreateSqlActionInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - SqlActionSelect, - SqlActionWithRelations, - CreateSqlActionInput, -} from '../../orm/input-types'; -/** - * Mutation hook for creating a SqlAction - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateSqlActionMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateSqlActionMutation( - params: { - selection: { - fields: S & SqlActionSelect; - } & HookStrictSelect, SqlActionSelect>; - } & Omit< - UseMutationOptions< - { - createSqlAction: { - sqlAction: InferSelectResult; - }; - }, - Error, - CreateSqlActionInput['sqlAction'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createSqlAction: { - sqlAction: InferSelectResult; - }; - }, - Error, - CreateSqlActionInput['sqlAction'] ->; -export function useCreateSqlActionMutation( - params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: sqlActionMutationKeys.create(), - mutationFn: (data: CreateSqlActionInput['sqlAction']) => - getClient() - .sqlAction.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: sqlActionKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts similarity index 65% rename from sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts index 29b6be869c..54c518339d 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts @@ -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 { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useDeleteApisMutation({ + * const { mutate, isPending } = useDeleteApiMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteApisMutation( +export function useDeleteApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteApisMutation( > ): UseMutationResult< { - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteApisMutation( id: string; } >; -export function useDeleteApisMutation( +export function useDeleteApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteApisMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.all, + mutationKey: apiMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .apis.delete({ + .api.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteApisMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: apisKeys.detail(variables.id), + queryKey: apiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppComponentMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppComponentMutation.ts new file mode 100644 index 0000000000..1a94370747 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppComponentMutation.ts @@ -0,0 +1,98 @@ +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * @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 { appComponentKeys } from '../query-keys'; +import { appComponentMutationKeys } from '../mutation-keys'; +import type { AppComponentSelect, AppComponentWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppComponentSelect, AppComponentWithRelations } from '../../orm/input-types'; +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppComponentMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppComponentMutation( + params: { + selection: { + fields: S & AppComponentSelect; + } & HookStrictSelect, AppComponentSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppComponentMutation( + 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: appComponentMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appComponent.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appComponentKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appComponentKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppMutation.ts new file mode 100644 index 0000000000..36d4d068ee --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteAppMutation.ts @@ -0,0 +1,98 @@ +/** + * App aggregates: thin identity rows whose components are global catalog references + * @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 { appKeys } from '../query-keys'; +import { appMutationKeys } from '../mutation-keys'; +import type { AppSelect, AppWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppSelect, AppWithRelations } from '../../orm/input-types'; +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppMutation( + params: { + selection: { + fields: S & AppSelect; + } & HookStrictSelect, AppSelect>; + } & Omit< + UseMutationOptions< + { + deleteApp: { + app: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteApp: { + app: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppMutation( + 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: appMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .app.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailIdentityMutation.ts new file mode 100644 index 0000000000..6bf948ec90 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailIdentityMutation.ts @@ -0,0 +1,98 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { emailIdentityKeys } from '../query-keys'; +import { emailIdentityMutationKeys } from '../mutation-keys'; +import type { EmailIdentitySelect, EmailIdentityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { EmailIdentitySelect, EmailIdentityWithRelations } from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteEmailIdentityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteEmailIdentityMutation( + params: { + selection: { + fields: S & EmailIdentitySelect; + } & HookStrictSelect, EmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + deleteEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteEmailIdentityMutation( + 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: emailIdentityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .emailIdentity.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: emailIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..b648970d86 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailProviderAccountMutation.ts @@ -0,0 +1,104 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { emailProviderAccountKeys } from '../query-keys'; +import { emailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteEmailProviderAccountMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteEmailProviderAccountMutation( + params: { + selection: { + fields: S & EmailProviderAccountSelect; + } & HookStrictSelect, EmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + deleteEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteEmailProviderAccountMutation( + 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: emailProviderAccountMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .emailProviderAccount.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: emailProviderAccountKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..73e385e7ae --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteEmailSiteIdentityMutation.ts @@ -0,0 +1,104 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { emailSiteIdentityKeys } from '../query-keys'; +import { emailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteEmailSiteIdentityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteEmailSiteIdentityMutation( + params: { + selection: { + fields: S & EmailSiteIdentitySelect; + } & HookStrictSelect, EmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + deleteEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteEmailSiteIdentityMutation( + 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: emailSiteIdentityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .emailSiteIdentity.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: emailSiteIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts similarity index 60% rename from sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts index 15ec0ad8d3..fe62269435 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts @@ -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 { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; -import type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; +import type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +export type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useDeletePlatformApisMutation({ + * const { mutate, isPending } = useDeletePlatformApiMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeletePlatformApisMutation( +export function useDeletePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeletePlatformApisMutation( > ): UseMutationResult< { - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeletePlatformApisMutation( id: string; } >; -export function useDeletePlatformApisMutation( +export function useDeletePlatformApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeletePlatformApisMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.all, + mutationKey: platformApiMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .platformApis.delete({ + .platformApi.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeletePlatformApisMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: platformApisKeys.detail(variables.id), + queryKey: platformApiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailIdentityMutation.ts new file mode 100644 index 0000000000..bd1ceacedf --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailIdentityMutation.ts @@ -0,0 +1,104 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { platformEmailIdentityKeys } from '../query-keys'; +import { platformEmailIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, +} from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformEmailIdentityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformEmailIdentityMutation( + params: { + selection: { + fields: S & PlatformEmailIdentitySelect; + } & HookStrictSelect, PlatformEmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlatformEmailIdentityMutation( + 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: platformEmailIdentityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .platformEmailIdentity.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformEmailIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..c20023c14e --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailProviderAccountMutation.ts @@ -0,0 +1,109 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { platformEmailProviderAccountKeys } from '../query-keys'; +import { platformEmailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformEmailProviderAccountMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformEmailProviderAccountMutation< + S extends PlatformEmailProviderAccountSelect, +>( + params: { + selection: { + fields: S & PlatformEmailProviderAccountSelect; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + >; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlatformEmailProviderAccountMutation( + 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: platformEmailProviderAccountMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .platformEmailProviderAccount.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformEmailProviderAccountKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..655cf867d7 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformEmailSiteIdentityMutation.ts @@ -0,0 +1,106 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { platformEmailSiteIdentityKeys } from '../query-keys'; +import { platformEmailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlatformEmailSiteIdentityMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlatformEmailSiteIdentityMutation< + S extends PlatformEmailSiteIdentitySelect, +>( + params: { + selection: { + fields: S & PlatformEmailSiteIdentitySelect; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + deletePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlatformEmailSiteIdentityMutation( + 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: platformEmailSiteIdentityMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .platformEmailSiteIdentity.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: platformEmailSiteIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useRejectDatabaseTransferMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useRejectDatabaseTransferMutation.ts deleted file mode 100644 index 10cdc7f840..0000000000 --- a/sdk/constructive-react/src/api/hooks/mutations/useRejectDatabaseTransferMutation.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Custom mutation hook for rejectDatabaseTransfer - * @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 { RejectDatabaseTransferVariables } from '../../orm/mutation'; -import type { - RejectDatabaseTransferPayloadSelect, - RejectDatabaseTransferPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { RejectDatabaseTransferVariables } from '../../orm/mutation'; -export type { RejectDatabaseTransferPayloadSelect } from '../../orm/input-types'; -export function useRejectDatabaseTransferMutation( - params: { - selection: { - fields: S & RejectDatabaseTransferPayloadSelect; - } & HookStrictSelect, RejectDatabaseTransferPayloadSelect>; - } & Omit< - UseMutationOptions< - { - rejectDatabaseTransfer: InferSelectResult | null; - }, - Error, - RejectDatabaseTransferVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - rejectDatabaseTransfer: InferSelectResult | null; - }, - Error, - RejectDatabaseTransferVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.rejectDatabaseTransfer(), - mutationFn: (variables: RejectDatabaseTransferVariables) => - getClient() - .mutation.rejectDatabaseTransfer(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts similarity index 57% rename from sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts index 45ed1398bd..8b7a7de7eb 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts @@ -9,92 +9,92 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations, ApisPatch } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations, ApiPatch } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, ApisPatch } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations, ApiPatch } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useUpdateApisMutation({ + * const { mutate, isPending } = useUpdateApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', apisPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', apiPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateApisMutation( +export function useUpdateApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >; -export function useUpdateApisMutation( +export function useUpdateApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.all, - mutationFn: ({ id, apisPatch }: { id: string; apisPatch: ApisPatch }) => + mutationKey: apiMutationKeys.all, + mutationFn: ({ id, apiPatch }: { id: string; apiPatch: ApiPatch }) => getClient() - .apis.update({ + .api.update({ where: { id, }, - data: apisPatch, + data: apiPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: apisKeys.detail(variables.id), + queryKey: apiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppComponentMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppComponentMutation.ts new file mode 100644 index 0000000000..d9a8c79bff --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppComponentMutation.ts @@ -0,0 +1,110 @@ +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * @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 { appComponentKeys } from '../query-keys'; +import { appComponentMutationKeys } from '../mutation-keys'; +import type { + AppComponentSelect, + AppComponentWithRelations, + AppComponentPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppComponentSelect, + AppComponentWithRelations, + AppComponentPatch, +} from '../../orm/input-types'; +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppComponentMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appComponentPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppComponentMutation( + params: { + selection: { + fields: S & AppComponentSelect; + } & HookStrictSelect, AppComponentSelect>; + } & Omit< + UseMutationOptions< + { + updateAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + { + id: string; + appComponentPatch: AppComponentPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppComponent: { + appComponent: InferSelectResult; + }; + }, + Error, + { + id: string; + appComponentPatch: AppComponentPatch; + } +>; +export function useUpdateAppComponentMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appComponentPatch: AppComponentPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appComponentMutationKeys.all, + mutationFn: ({ id, appComponentPatch }: { id: string; appComponentPatch: AppComponentPatch }) => + getClient() + .appComponent.update({ + where: { + id, + }, + data: appComponentPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appComponentKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appComponentKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppMutation.ts new file mode 100644 index 0000000000..6816b72c5a --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateAppMutation.ts @@ -0,0 +1,102 @@ +/** + * App aggregates: thin identity rows whose components are global catalog references + * @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 { appKeys } from '../query-keys'; +import { appMutationKeys } from '../mutation-keys'; +import type { AppSelect, AppWithRelations, AppPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppSelect, AppWithRelations, AppPatch } from '../../orm/input-types'; +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppMutation( + params: { + selection: { + fields: S & AppSelect; + } & HookStrictSelect, AppSelect>; + } & Omit< + UseMutationOptions< + { + updateApp: { + app: InferSelectResult; + }; + }, + Error, + { + id: string; + appPatch: AppPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateApp: { + app: InferSelectResult; + }; + }, + Error, + { + id: string; + appPatch: AppPatch; + } +>; +export function useUpdateAppMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appPatch: AppPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appMutationKeys.all, + mutationFn: ({ id, appPatch }: { id: string; appPatch: AppPatch }) => + getClient() + .app.update({ + where: { + id, + }, + data: appPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailIdentityMutation.ts new file mode 100644 index 0000000000..54a01f9aeb --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailIdentityMutation.ts @@ -0,0 +1,116 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { emailIdentityKeys } from '../query-keys'; +import { emailIdentityMutationKeys } from '../mutation-keys'; +import type { + EmailIdentitySelect, + EmailIdentityWithRelations, + EmailIdentityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailIdentitySelect, + EmailIdentityWithRelations, + EmailIdentityPatch, +} from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateEmailIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', emailIdentityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateEmailIdentityMutation( + params: { + selection: { + fields: S & EmailIdentitySelect; + } & HookStrictSelect, EmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + updateEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + emailIdentityPatch: EmailIdentityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + emailIdentityPatch: EmailIdentityPatch; + } +>; +export function useUpdateEmailIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + emailIdentityPatch: EmailIdentityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailIdentityMutationKeys.all, + mutationFn: ({ + id, + emailIdentityPatch, + }: { + id: string; + emailIdentityPatch: EmailIdentityPatch; + }) => + getClient() + .emailIdentity.update({ + where: { + id, + }, + data: emailIdentityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..56c5ac8e9a --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailProviderAccountMutation.ts @@ -0,0 +1,116 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { emailProviderAccountKeys } from '../query-keys'; +import { emailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + EmailProviderAccountPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + EmailProviderAccountPatch, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateEmailProviderAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', emailProviderAccountPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateEmailProviderAccountMutation( + params: { + selection: { + fields: S & EmailProviderAccountSelect; + } & HookStrictSelect, EmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + updateEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; + } +>; +export function useUpdateEmailProviderAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailProviderAccountMutationKeys.all, + mutationFn: ({ + id, + emailProviderAccountPatch, + }: { + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; + }) => + getClient() + .emailProviderAccount.update({ + where: { + id, + }, + data: emailProviderAccountPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..48a663c172 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateEmailSiteIdentityMutation.ts @@ -0,0 +1,116 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { emailSiteIdentityKeys } from '../query-keys'; +import { emailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + EmailSiteIdentityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + EmailSiteIdentityPatch, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateEmailSiteIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', emailSiteIdentityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateEmailSiteIdentityMutation( + params: { + selection: { + fields: S & EmailSiteIdentitySelect; + } & HookStrictSelect, EmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + updateEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; + } +>; +export function useUpdateEmailSiteIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailSiteIdentityMutationKeys.all, + mutationFn: ({ + id, + emailSiteIdentityPatch, + }: { + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; + }) => + getClient() + .emailSiteIdentity.update({ + where: { + id, + }, + data: emailSiteIdentityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: emailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts similarity index 55% rename from sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts index fb26308115..7cf22a2193 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts @@ -9,100 +9,100 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; import type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisPatch, + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisPatch, + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiPatch, } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useUpdatePlatformApisMutation({ + * const { mutate, isPending } = useUpdatePlatformApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', platformApisPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', platformApiPatch: { name: 'Updated' } }); * ``` */ -export function useUpdatePlatformApisMutation( +export function useUpdatePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >, 'mutationFn' > ): UseMutationResult< { - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >; -export function useUpdatePlatformApisMutation( +export function useUpdatePlatformApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.all, - mutationFn: ({ id, platformApisPatch }: { id: string; platformApisPatch: PlatformApisPatch }) => + mutationKey: platformApiMutationKeys.all, + mutationFn: ({ id, platformApiPatch }: { id: string; platformApiPatch: PlatformApiPatch }) => getClient() - .platformApis.update({ + .platformApi.update({ where: { id, }, - data: platformApisPatch, + data: platformApiPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: platformApisKeys.detail(variables.id), + queryKey: platformApiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailIdentityMutation.ts new file mode 100644 index 0000000000..685c710f8d --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailIdentityMutation.ts @@ -0,0 +1,116 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { platformEmailIdentityKeys } from '../query-keys'; +import { platformEmailIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentityPatch, +} from '../../orm/input-types'; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformEmailIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformEmailIdentityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformEmailIdentityMutation( + params: { + selection: { + fields: S & PlatformEmailIdentitySelect; + } & HookStrictSelect, PlatformEmailIdentitySelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; + } +>; +export function useUpdatePlatformEmailIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailIdentityMutationKeys.all, + mutationFn: ({ + id, + platformEmailIdentityPatch, + }: { + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; + }) => + getClient() + .platformEmailIdentity.update({ + where: { + id, + }, + data: platformEmailIdentityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailProviderAccountMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailProviderAccountMutation.ts new file mode 100644 index 0000000000..341c4e3d0b --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailProviderAccountMutation.ts @@ -0,0 +1,121 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { platformEmailProviderAccountKeys } from '../query-keys'; +import { platformEmailProviderAccountMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountPatch, +} from '../../orm/input-types'; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformEmailProviderAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformEmailProviderAccountPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformEmailProviderAccountMutation< + S extends PlatformEmailProviderAccountSelect, +>( + params: { + selection: { + fields: S & PlatformEmailProviderAccountSelect; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + >; + }; + }, + Error, + { + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }, + Error, + { + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; + } +>; +export function useUpdatePlatformEmailProviderAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailProviderAccountMutationKeys.all, + mutationFn: ({ + id, + platformEmailProviderAccountPatch, + }: { + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; + }) => + getClient() + .platformEmailProviderAccount.update({ + where: { + id, + }, + data: platformEmailProviderAccountPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailProviderAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailSiteIdentityMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailSiteIdentityMutation.ts new file mode 100644 index 0000000000..099114e020 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformEmailSiteIdentityMutation.ts @@ -0,0 +1,118 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { platformEmailSiteIdentityKeys } from '../query-keys'; +import { platformEmailSiteIdentityMutationKeys } from '../mutation-keys'; +import type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentityPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentityPatch, +} from '../../orm/input-types'; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlatformEmailSiteIdentityMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', platformEmailSiteIdentityPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlatformEmailSiteIdentityMutation< + S extends PlatformEmailSiteIdentitySelect, +>( + params: { + selection: { + fields: S & PlatformEmailSiteIdentitySelect; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } & Omit< + UseMutationOptions< + { + updatePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }, + Error, + { + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; + } +>; +export function useUpdatePlatformEmailSiteIdentityMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: platformEmailSiteIdentityMutationKeys.all, + mutationFn: ({ + id, + platformEmailSiteIdentityPatch, + }: { + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; + }) => + getClient() + .platformEmailSiteIdentity.update({ + where: { + id, + }, + data: platformEmailSiteIdentityPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: platformEmailSiteIdentityKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/index.ts b/sdk/constructive-react/src/api/hooks/queries/index.ts index de1eb956b2..50c728a5f9 100644 --- a/sdk/constructive-react/src/api/hooks/queries/index.ts +++ b/sdk/constructive-react/src/api/hooks/queries/index.ts @@ -3,14 +3,16 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useApisQuery'; +export * from './useApiQuery'; export * from './useApiSchemasQuery'; export * from './useApiSchemaQuery'; export * from './useApiSettingsQuery'; export * from './useApiSettingQuery'; -export * from './useApisesQuery'; -export * from './useApisQuery'; -export * from './useAstMigrationsQuery'; -export * from './useAstMigrationQuery'; +export * from './useAppComponentsQuery'; +export * from './useAppComponentQuery'; +export * from './useAppsQuery'; +export * from './useAppQuery'; export * from './useCheckConstraintsQuery'; export * from './useCheckConstraintQuery'; export * from './useCompositeTypesQuery'; @@ -35,6 +37,12 @@ export * from './useDomainTypesQuery'; export * from './useDomainTypeQuery'; export * from './useDomainVerificationsQuery'; export * from './useDomainVerificationQuery'; +export * from './useEmailIdentitiesQuery'; +export * from './useEmailIdentityQuery'; +export * from './useEmailProviderAccountsQuery'; +export * from './useEmailProviderAccountQuery'; +export * from './useEmailSiteIdentitiesQuery'; +export * from './useEmailSiteIdentityQuery'; export * from './useEmbeddingChunksQuery'; export * from './useEmbeddingChunkQuery'; export * from './useEnumsQuery'; @@ -67,12 +75,12 @@ export * from './usePagesQuery'; export * from './usePageQuery'; export * from './usePartitionsQuery'; export * from './usePartitionQuery'; +export * from './usePlatformApisQuery'; +export * from './usePlatformApiQuery'; export * from './usePlatformApiSchemasQuery'; export * from './usePlatformApiSchemaQuery'; export * from './usePlatformApiSettingsQuery'; export * from './usePlatformApiSettingQuery'; -export * from './usePlatformApisesQuery'; -export * from './usePlatformApisQuery'; export * from './usePlatformCorsSettingsQuery'; export * from './usePlatformCorsSettingQuery'; export * from './usePlatformDomainsQuery'; @@ -81,6 +89,12 @@ export * from './usePlatformDomainEventsQuery'; export * from './usePlatformDomainEventQuery'; export * from './usePlatformDomainVerificationsQuery'; export * from './usePlatformDomainVerificationQuery'; +export * from './usePlatformEmailIdentitiesQuery'; +export * from './usePlatformEmailIdentityQuery'; +export * from './usePlatformEmailProviderAccountsQuery'; +export * from './usePlatformEmailProviderAccountQuery'; +export * from './usePlatformEmailSiteIdentitiesQuery'; +export * from './usePlatformEmailSiteIdentityQuery'; export * from './usePlatformManagedDomainsQuery'; export * from './usePlatformManagedDomainQuery'; export * from './usePlatformPagesQuery'; @@ -135,8 +149,6 @@ export * from './useSiteWebConfigsQuery'; export * from './useSiteWebConfigQuery'; export * from './useSpatialRelationsQuery'; export * from './useSpatialRelationQuery'; -export * from './useSqlActionsQuery'; -export * from './useSqlActionQuery'; export * from './useTableBehaviorsQuery'; export * from './useTableBehaviorQuery'; export * from './useTablesQuery'; diff --git a/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts new file mode 100644 index 0000000000..f7c45a4c09 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts @@ -0,0 +1,138 @@ +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * @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 { apiKeys } from '../query-keys'; +import type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const apiQueryKey = apiKeys.detail; +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```tsx + * const { data, isLoading } = useApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useApiQuery< + S extends ApiSelect, + TData = { + api: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; + } & Omit< + UseQueryOptions< + { + api: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useApiQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: apiKeys.detail(params.id), + queryFn: () => + getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * const data = await fetchApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchApiQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; +}): Promise<{ + api: InferSelectResult | null; +}>; +export async function fetchApiQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * await prefetchApiQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; + } +): Promise; +export async function prefetchApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: apiKeys.detail(params.id), + queryFn: () => + getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts index a7544af975..1109f42993 100644 --- a/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts +++ b/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts @@ -7,40 +7,49 @@ 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 { apisKeys } from '../query-keys'; -import type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { apiKeys } from '../query-keys'; +import type { ApiSelect, ApiWithRelations, ApiFilter, ApiOrderBy } from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { ApiSelect, ApiWithRelations, ApiFilter, ApiOrderBy } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const apisQueryKey = apisKeys.detail; +export const apisQueryKey = apiKeys.list; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx * const { data, isLoading } = useApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, * }); * ``` */ export function useApisQuery< - S extends ApisSelect, + S extends ApiSelect, TData = { - apis: InferSelectResult | null; + apis: ConnectionResult>; }, >( params: { - id: string; selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; } & Omit< UseQueryOptions< { - apis: InferSelectResult | null; + apis: ConnectionResult>; }, Error, TData @@ -50,22 +59,15 @@ export function useApisQuery< ): UseQueryResult; export function useApisQuery( params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: apisKeys.detail(params.id), - queryFn: () => - getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: apiKeys.list(args), + queryFn: () => getClient().api.findMany(args).unwrap(), ...queryOptions, }); } @@ -75,64 +77,53 @@ export function useApisQuery( * @example * ```ts * const data = await fetchApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, + * selection: { + * fields: { id: true }, + * first: 10, + * }, * }); * ``` */ -export async function fetchApisQuery(params: { - id: string; +export async function fetchApisQuery(params: { selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; }): Promise<{ - apis: InferSelectResult | null; + apis: ConnectionResult>; }>; export async function fetchApisQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().api.findMany(args).unwrap(); } /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```ts - * await prefetchApisQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchApisQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); * ``` */ -export async function prefetchApisQuery( +export async function prefetchApisQuery( queryClient: QueryClient, params: { - id: string; selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; } ): Promise; export async function prefetchApisQuery( queryClient: QueryClient, params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: apisKeys.detail(params.id), - queryFn: () => - getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: apiKeys.list(args), + queryFn: () => getClient().api.findMany(args).unwrap(), }); } diff --git a/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts deleted file mode 100644 index eaddf7d664..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * @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 { apisKeys } from '../query-keys'; -import type { ApisSelect, ApisWithRelations, ApisFilter, ApisOrderBy } from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, ApisFilter, ApisOrderBy } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const apisesQueryKey = apisKeys.list; -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```tsx - * const { data, isLoading } = useApisesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useApisesQuery< - S extends ApisSelect, - TData = { - apises: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; - } & Omit< - UseQueryOptions< - { - apises: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useApisesQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: apisKeys.list(args), - queryFn: () => getClient().apis.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * const data = await fetchApisesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchApisesQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; -}): Promise<{ - apises: ConnectionResult>; -}>; -export async function fetchApisesQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs(params.selection); - return getClient().apis.findMany(args).unwrap(); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * await prefetchApisesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchApisesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; - } -): Promise; -export async function prefetchApisesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: apisKeys.list(args), - queryFn: () => getClient().apis.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useAppComponentQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useAppComponentQuery.ts new file mode 100644 index 0000000000..f45aff9af9 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useAppComponentQuery.ts @@ -0,0 +1,138 @@ +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * @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 { appComponentKeys } from '../query-keys'; +import type { AppComponentSelect, AppComponentWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppComponentSelect, AppComponentWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appComponentQueryKey = appComponentKeys.detail; +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```tsx + * const { data, isLoading } = useAppComponentQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppComponentQuery< + S extends AppComponentSelect, + TData = { + appComponent: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppComponentSelect>; + } & Omit< + UseQueryOptions< + { + appComponent: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppComponentQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appComponentKeys.detail(params.id), + queryFn: () => + getClient() + .appComponent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```ts + * const data = await fetchAppComponentQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppComponentQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppComponentSelect>; +}): Promise<{ + appComponent: InferSelectResult | null; +}>; +export async function fetchAppComponentQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appComponent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```ts + * await prefetchAppComponentQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppComponentQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppComponentSelect>; + } +): Promise; +export async function prefetchAppComponentQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appComponentKeys.detail(params.id), + queryFn: () => + getClient() + .appComponent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useAppComponentsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useAppComponentsQuery.ts new file mode 100644 index 0000000000..b6dfbdb698 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useAppComponentsQuery.ts @@ -0,0 +1,145 @@ +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * @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 { appComponentKeys } from '../query-keys'; +import type { + AppComponentSelect, + AppComponentWithRelations, + AppComponentFilter, + AppComponentOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppComponentSelect, + AppComponentWithRelations, + AppComponentFilter, + AppComponentOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appComponentsQueryKey = appComponentKeys.list; +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```tsx + * const { data, isLoading } = useAppComponentsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppComponentsQuery< + S extends AppComponentSelect, + TData = { + appComponents: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppComponentSelect>; + } & Omit< + UseQueryOptions< + { + appComponents: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppComponentsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appComponentKeys.list(args), + queryFn: () => getClient().appComponent.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```ts + * const data = await fetchAppComponentsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppComponentsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppComponentSelect>; +}): Promise<{ + appComponents: ConnectionResult>; +}>; +export async function fetchAppComponentsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().appComponent.findMany(args).unwrap(); +} +/** + * App component rows binding an app to typed catalog rows (exactly one typed component reference per row) + * + * @example + * ```ts + * await prefetchAppComponentsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppComponentsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppComponentSelect>; + } +): Promise; +export async function prefetchAppComponentsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: appComponentKeys.list(args), + queryFn: () => getClient().appComponent.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useAppQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useAppQuery.ts new file mode 100644 index 0000000000..e8d6c671be --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useAppQuery.ts @@ -0,0 +1,138 @@ +/** + * App aggregates: thin identity rows whose components are global catalog references + * @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 { appKeys } from '../query-keys'; +import type { AppSelect, AppWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppSelect, AppWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appQueryKey = appKeys.detail; +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```tsx + * const { data, isLoading } = useAppQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppQuery< + S extends AppSelect, + TData = { + app: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppSelect>; + } & Omit< + UseQueryOptions< + { + app: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appKeys.detail(params.id), + queryFn: () => + getClient() + .app.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```ts + * const data = await fetchAppQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppSelect>; +}): Promise<{ + app: InferSelectResult | null; +}>; +export async function fetchAppQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .app.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```ts + * await prefetchAppQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppSelect>; + } +): Promise; +export async function prefetchAppQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appKeys.detail(params.id), + queryFn: () => + getClient() + .app.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useAppsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useAppsQuery.ts new file mode 100644 index 0000000000..cf1c5d4c45 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useAppsQuery.ts @@ -0,0 +1,129 @@ +/** + * App aggregates: thin identity rows whose components are global catalog references + * @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 { appKeys } from '../query-keys'; +import type { AppSelect, AppWithRelations, AppFilter, AppOrderBy } from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { AppSelect, AppWithRelations, AppFilter, AppOrderBy } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appsQueryKey = appKeys.list; +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```tsx + * const { data, isLoading } = useAppsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppsQuery< + S extends AppSelect, + TData = { + apps: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppSelect>; + } & Omit< + UseQueryOptions< + { + apps: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appKeys.list(args), + queryFn: () => getClient().app.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```ts + * const data = await fetchAppsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppSelect>; +}): Promise<{ + apps: ConnectionResult>; +}>; +export async function fetchAppsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().app.findMany(args).unwrap(); +} +/** + * App aggregates: thin identity rows whose components are global catalog references + * + * @example + * ```ts + * await prefetchAppsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppSelect>; + } +): Promise; +export async function prefetchAppsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appKeys.list(args), + queryFn: () => getClient().app.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useAstMigrationsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useAstMigrationsQuery.ts deleted file mode 100644 index d2f3812967..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useAstMigrationsQuery.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * List query hook for AstMigration - * @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 { astMigrationKeys } from '../query-keys'; -import type { - AstMigrationSelect, - AstMigrationWithRelations, - AstMigrationFilter, - AstMigrationOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - AstMigrationSelect, - AstMigrationWithRelations, - AstMigrationFilter, - AstMigrationOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const astMigrationsQueryKey = astMigrationKeys.list; -/** - * Query hook for fetching AstMigration list - * - * @example - * ```tsx - * const { data, isLoading } = useAstMigrationsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useAstMigrationsQuery< - S extends AstMigrationSelect, - TData = { - astMigrations: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AstMigrationSelect>; - } & Omit< - UseQueryOptions< - { - astMigrations: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useAstMigrationsQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs( - params.selection - ); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: astMigrationKeys.list(args), - queryFn: () => getClient().astMigration.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch AstMigration list without React hooks - * - * @example - * ```ts - * const data = await fetchAstMigrationsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchAstMigrationsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AstMigrationSelect>; -}): Promise<{ - astMigrations: ConnectionResult>; -}>; -export async function fetchAstMigrationsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs( - params.selection - ); - return getClient().astMigration.findMany(args).unwrap(); -} -/** - * Prefetch AstMigration list for SSR or cache warming - * - * @example - * ```ts - * await prefetchAstMigrationsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchAstMigrationsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, AstMigrationSelect>; - } -): Promise; -export async function prefetchAstMigrationsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs( - params.selection - ); - await queryClient.prefetchQuery({ - queryKey: astMigrationKeys.list(args), - queryFn: () => getClient().astMigration.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailIdentitiesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailIdentitiesQuery.ts new file mode 100644 index 0000000000..6c83177391 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailIdentitiesQuery.ts @@ -0,0 +1,151 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { emailIdentityKeys } from '../query-keys'; +import type { + EmailIdentitySelect, + EmailIdentityWithRelations, + EmailIdentityFilter, + EmailIdentityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + EmailIdentitySelect, + EmailIdentityWithRelations, + EmailIdentityFilter, + EmailIdentityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailIdentitiesQueryKey = emailIdentityKeys.list; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { data, isLoading } = useEmailIdentitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useEmailIdentitiesQuery< + S extends EmailIdentitySelect, + TData = { + emailIdentities: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailIdentitySelect>; + } & Omit< + UseQueryOptions< + { + emailIdentities: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailIdentitiesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + EmailIdentitySelect, + EmailIdentityFilter, + EmailIdentityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailIdentityKeys.list(args), + queryFn: () => getClient().emailIdentity.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * const data = await fetchEmailIdentitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchEmailIdentitiesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailIdentitySelect>; +}): Promise<{ + emailIdentities: ConnectionResult>; +}>; +export async function fetchEmailIdentitiesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + EmailIdentitySelect, + EmailIdentityFilter, + EmailIdentityOrderBy + >(params.selection); + return getClient().emailIdentity.findMany(args).unwrap(); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * await prefetchEmailIdentitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchEmailIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailIdentitySelect>; + } +): Promise; +export async function prefetchEmailIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + EmailIdentitySelect, + EmailIdentityFilter, + EmailIdentityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailIdentityKeys.list(args), + queryFn: () => getClient().emailIdentity.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailIdentityQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailIdentityQuery.ts new file mode 100644 index 0000000000..ddccc37646 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailIdentityQuery.ts @@ -0,0 +1,138 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { emailIdentityKeys } from '../query-keys'; +import type { EmailIdentitySelect, EmailIdentityWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { EmailIdentitySelect, EmailIdentityWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailIdentityQueryKey = emailIdentityKeys.detail; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { data, isLoading } = useEmailIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useEmailIdentityQuery< + S extends EmailIdentitySelect, + TData = { + emailIdentity: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailIdentitySelect>; + } & Omit< + UseQueryOptions< + { + emailIdentity: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailIdentityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .emailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * const data = await fetchEmailIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchEmailIdentityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailIdentitySelect>; +}): Promise<{ + emailIdentity: InferSelectResult | null; +}>; +export async function fetchEmailIdentityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .emailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * await prefetchEmailIdentityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchEmailIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailIdentitySelect>; + } +): Promise; +export async function prefetchEmailIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .emailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountQuery.ts new file mode 100644 index 0000000000..ae76bf5002 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountQuery.ts @@ -0,0 +1,144 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { emailProviderAccountKeys } from '../query-keys'; +import type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailProviderAccountQueryKey = emailProviderAccountKeys.detail; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { data, isLoading } = useEmailProviderAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useEmailProviderAccountQuery< + S extends EmailProviderAccountSelect, + TData = { + emailProviderAccount: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailProviderAccountSelect>; + } & Omit< + UseQueryOptions< + { + emailProviderAccount: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailProviderAccountQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailProviderAccountKeys.detail(params.id), + queryFn: () => + getClient() + .emailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * const data = await fetchEmailProviderAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchEmailProviderAccountQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailProviderAccountSelect>; +}): Promise<{ + emailProviderAccount: InferSelectResult | null; +}>; +export async function fetchEmailProviderAccountQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .emailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * await prefetchEmailProviderAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchEmailProviderAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailProviderAccountSelect>; + } +): Promise; +export async function prefetchEmailProviderAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailProviderAccountKeys.detail(params.id), + queryFn: () => + getClient() + .emailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountsQuery.ts new file mode 100644 index 0000000000..4438add565 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailProviderAccountsQuery.ts @@ -0,0 +1,178 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { emailProviderAccountKeys } from '../query-keys'; +import type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + EmailProviderAccountSelect, + EmailProviderAccountWithRelations, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailProviderAccountsQueryKey = emailProviderAccountKeys.list; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { data, isLoading } = useEmailProviderAccountsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useEmailProviderAccountsQuery< + S extends EmailProviderAccountSelect, + TData = { + emailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EmailProviderAccountSelect>; + } & Omit< + UseQueryOptions< + { + emailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailProviderAccountsQuery( + params: { + selection: ListSelectionConfig< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailProviderAccountKeys.list(args), + queryFn: () => getClient().emailProviderAccount.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * const data = await fetchEmailProviderAccountsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchEmailProviderAccountsQuery< + S extends EmailProviderAccountSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EmailProviderAccountSelect>; +}): Promise<{ + emailProviderAccounts: ConnectionResult>; +}>; +export async function fetchEmailProviderAccountsQuery(params: { + selection: ListSelectionConfig< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >; +}) { + const args = buildListSelectionArgs< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >(params.selection); + return getClient().emailProviderAccount.findMany(args).unwrap(); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * await prefetchEmailProviderAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchEmailProviderAccountsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EmailProviderAccountSelect>; + } +): Promise; +export async function prefetchEmailProviderAccountsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailProviderAccountKeys.list(args), + queryFn: () => getClient().emailProviderAccount.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentitiesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentitiesQuery.ts new file mode 100644 index 0000000000..cd5600a834 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentitiesQuery.ts @@ -0,0 +1,163 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { emailSiteIdentityKeys } from '../query-keys'; +import type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailSiteIdentitiesQueryKey = emailSiteIdentityKeys.list; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { data, isLoading } = useEmailSiteIdentitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useEmailSiteIdentitiesQuery< + S extends EmailSiteIdentitySelect, + TData = { + emailSiteIdentities: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSiteIdentitySelect>; + } & Omit< + UseQueryOptions< + { + emailSiteIdentities: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailSiteIdentitiesQuery( + params: { + selection: ListSelectionConfig< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailSiteIdentityKeys.list(args), + queryFn: () => getClient().emailSiteIdentity.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * const data = await fetchEmailSiteIdentitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchEmailSiteIdentitiesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSiteIdentitySelect>; +}): Promise<{ + emailSiteIdentities: ConnectionResult>; +}>; +export async function fetchEmailSiteIdentitiesQuery(params: { + selection: ListSelectionConfig< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >; +}) { + const args = buildListSelectionArgs< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >(params.selection); + return getClient().emailSiteIdentity.findMany(args).unwrap(); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * await prefetchEmailSiteIdentitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchEmailSiteIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSiteIdentitySelect>; + } +): Promise; +export async function prefetchEmailSiteIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailSiteIdentityKeys.list(args), + queryFn: () => getClient().emailSiteIdentity.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentityQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentityQuery.ts new file mode 100644 index 0000000000..2e63e89069 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useEmailSiteIdentityQuery.ts @@ -0,0 +1,144 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { emailSiteIdentityKeys } from '../query-keys'; +import type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailSiteIdentitySelect, + EmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailSiteIdentityQueryKey = emailSiteIdentityKeys.detail; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { data, isLoading } = useEmailSiteIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useEmailSiteIdentityQuery< + S extends EmailSiteIdentitySelect, + TData = { + emailSiteIdentity: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailSiteIdentitySelect>; + } & Omit< + UseQueryOptions< + { + emailSiteIdentity: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailSiteIdentityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailSiteIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .emailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * const data = await fetchEmailSiteIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchEmailSiteIdentityQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailSiteIdentitySelect>; +}): Promise<{ + emailSiteIdentity: InferSelectResult | null; +}>; +export async function fetchEmailSiteIdentityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .emailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * await prefetchEmailSiteIdentityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchEmailSiteIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EmailSiteIdentitySelect>; + } +): Promise; +export async function prefetchEmailSiteIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailSiteIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .emailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts new file mode 100644 index 0000000000..d3e15ed945 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts @@ -0,0 +1,138 @@ +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * @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 { platformApiKeys } from '../query-keys'; +import type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformApiQueryKey = platformApiKeys.detail; +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformApiQuery< + S extends PlatformApiSelect, + TData = { + platformApi: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; + } & Omit< + UseQueryOptions< + { + platformApi: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformApiQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformApiKeys.detail(params.id), + queryFn: () => + getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * const data = await fetchPlatformApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformApiQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; +}): Promise<{ + platformApi: InferSelectResult | null; +}>; +export async function fetchPlatformApiQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * await prefetchPlatformApiQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; + } +): Promise; +export async function prefetchPlatformApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformApiKeys.detail(params.id), + queryFn: () => + getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts index a7da730853..37b47ae91c 100644 --- a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts @@ -7,40 +7,59 @@ 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 { platformApisKeys } from '../query-keys'; -import type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { platformApiKeys } from '../query-keys'; +import type { + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiFilter, + PlatformApiOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiFilter, + PlatformApiOrderBy, +} from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const platformApisQueryKey = platformApisKeys.detail; +export const platformApisQueryKey = platformApiKeys.list; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx * const { data, isLoading } = usePlatformApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, * }); * ``` */ export function usePlatformApisQuery< - S extends PlatformApisSelect, + S extends PlatformApiSelect, TData = { - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }, >( params: { - id: string; selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; } & Omit< UseQueryOptions< { - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }, Error, TData @@ -50,22 +69,17 @@ export function usePlatformApisQuery< ): UseQueryResult; export function usePlatformApisQuery( params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs( + params.selection + ); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: platformApisKeys.detail(params.id), - queryFn: () => - getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: platformApiKeys.list(args), + queryFn: () => getClient().platformApi.findMany(args).unwrap(), ...queryOptions, }); } @@ -75,64 +89,57 @@ export function usePlatformApisQuery( * @example * ```ts * const data = await fetchPlatformApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, + * selection: { + * fields: { id: true }, + * first: 10, + * }, * }); * ``` */ -export async function fetchPlatformApisQuery(params: { - id: string; +export async function fetchPlatformApisQuery(params: { selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; }): Promise<{ - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }>; export async function fetchPlatformApisQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().platformApi.findMany(args).unwrap(); } /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```ts - * await prefetchPlatformApisQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchPlatformApisQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); * ``` */ -export async function prefetchPlatformApisQuery( +export async function prefetchPlatformApisQuery( queryClient: QueryClient, params: { - id: string; selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; } ): Promise; export async function prefetchPlatformApisQuery( queryClient: QueryClient, params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs( + params.selection + ); await queryClient.prefetchQuery({ - queryKey: platformApisKeys.detail(params.id), - queryFn: () => - getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: platformApiKeys.list(args), + queryFn: () => getClient().platformApi.findMany(args).unwrap(), }); } diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts deleted file mode 100644 index 1151252632..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * @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 { platformApisKeys } from '../query-keys'; -import type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisFilter, - PlatformApisOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisFilter, - PlatformApisOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const platformApisesQueryKey = platformApisKeys.list; -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```tsx - * const { data, isLoading } = usePlatformApisesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function usePlatformApisesQuery< - S extends PlatformApisSelect, - TData = { - platformApises: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; - } & Omit< - UseQueryOptions< - { - platformApises: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function usePlatformApisesQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs( - params.selection - ); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: platformApisKeys.list(args), - queryFn: () => getClient().platformApis.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * const data = await fetchPlatformApisesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchPlatformApisesQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; -}): Promise<{ - platformApises: ConnectionResult>; -}>; -export async function fetchPlatformApisesQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs( - params.selection - ); - return getClient().platformApis.findMany(args).unwrap(); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * await prefetchPlatformApisesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchPlatformApisesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; - } -): Promise; -export async function prefetchPlatformApisesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs( - params.selection - ); - await queryClient.prefetchQuery({ - queryKey: platformApisKeys.list(args), - queryFn: () => getClient().platformApis.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentitiesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentitiesQuery.ts new file mode 100644 index 0000000000..abf6281ed4 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentitiesQuery.ts @@ -0,0 +1,180 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { platformEmailIdentityKeys } from '../query-keys'; +import type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailIdentitiesQueryKey = platformEmailIdentityKeys.list; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailIdentitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformEmailIdentitiesQuery< + S extends PlatformEmailIdentitySelect, + TData = { + platformEmailIdentities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailIdentitySelect>; + } & Omit< + UseQueryOptions< + { + platformEmailIdentities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailIdentitiesQuery( + params: { + selection: ListSelectionConfig< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailIdentityKeys.list(args), + queryFn: () => getClient().platformEmailIdentity.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * const data = await fetchPlatformEmailIdentitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformEmailIdentitiesQuery< + S extends PlatformEmailIdentitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailIdentitySelect>; +}): Promise<{ + platformEmailIdentities: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformEmailIdentitiesQuery(params: { + selection: ListSelectionConfig< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >(params.selection); + return getClient().platformEmailIdentity.findMany(args).unwrap(); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * await prefetchPlatformEmailIdentitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformEmailIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailIdentitySelect>; + } +): Promise; +export async function prefetchPlatformEmailIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailIdentityKeys.list(args), + queryFn: () => getClient().platformEmailIdentity.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentityQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentityQuery.ts new file mode 100644 index 0000000000..b4b535f755 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailIdentityQuery.ts @@ -0,0 +1,146 @@ +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * @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 { platformEmailIdentityKeys } from '../query-keys'; +import type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailIdentitySelect, + PlatformEmailIdentityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailIdentityQueryKey = platformEmailIdentityKeys.detail; +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformEmailIdentityQuery< + S extends PlatformEmailIdentitySelect, + TData = { + platformEmailIdentity: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailIdentitySelect>; + } & Omit< + UseQueryOptions< + { + platformEmailIdentity: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailIdentityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * const data = await fetchPlatformEmailIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformEmailIdentityQuery< + S extends PlatformEmailIdentitySelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailIdentitySelect>; +}): Promise<{ + platformEmailIdentity: InferSelectResult | null; +}>; +export async function fetchPlatformEmailIdentityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformEmailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through + * + * @example + * ```ts + * await prefetchPlatformEmailIdentityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformEmailIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailIdentitySelect>; + } +): Promise; +export async function prefetchPlatformEmailIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountQuery.ts new file mode 100644 index 0000000000..9a631443fa --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountQuery.ts @@ -0,0 +1,157 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { platformEmailProviderAccountKeys } from '../query-keys'; +import type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailProviderAccountQueryKey = platformEmailProviderAccountKeys.detail; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailProviderAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformEmailProviderAccountQuery< + S extends PlatformEmailProviderAccountSelect, + TData = { + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; + } & Omit< + UseQueryOptions< + { + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailProviderAccountQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailProviderAccountKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * const data = await fetchPlatformEmailProviderAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformEmailProviderAccountQuery< + S extends PlatformEmailProviderAccountSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; +}): Promise<{ + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; +}>; +export async function fetchPlatformEmailProviderAccountQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformEmailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * await prefetchPlatformEmailProviderAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformEmailProviderAccountQuery< + S extends PlatformEmailProviderAccountSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailProviderAccountSelect>; + } +): Promise; +export async function prefetchPlatformEmailProviderAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailProviderAccountKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailProviderAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountsQuery.ts new file mode 100644 index 0000000000..f1798beddc --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailProviderAccountsQuery.ts @@ -0,0 +1,190 @@ +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * @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 { platformEmailProviderAccountKeys } from '../query-keys'; +import type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailProviderAccountsQueryKey = platformEmailProviderAccountKeys.list; +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailProviderAccountsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformEmailProviderAccountsQuery< + S extends PlatformEmailProviderAccountSelect, + TData = { + platformEmailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >, + 'fields' + > & + HookStrictSelect, PlatformEmailProviderAccountSelect>; + } & Omit< + UseQueryOptions< + { + platformEmailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailProviderAccountsQuery( + params: { + selection: ListSelectionConfig< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailProviderAccountKeys.list(args), + queryFn: () => getClient().platformEmailProviderAccount.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * const data = await fetchPlatformEmailProviderAccountsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformEmailProviderAccountsQuery< + S extends PlatformEmailProviderAccountSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailProviderAccountSelect>; +}): Promise<{ + platformEmailProviderAccounts: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformEmailProviderAccountsQuery(params: { + selection: ListSelectionConfig< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >(params.selection); + return getClient().platformEmailProviderAccount.findMany(args).unwrap(); +} +/** + * A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) + * + * @example + * ```ts + * await prefetchPlatformEmailProviderAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformEmailProviderAccountsQuery< + S extends PlatformEmailProviderAccountSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >, + 'fields' + > & + HookStrictSelect, PlatformEmailProviderAccountSelect>; + } +): Promise; +export async function prefetchPlatformEmailProviderAccountsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailProviderAccountKeys.list(args), + queryFn: () => getClient().platformEmailProviderAccount.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentitiesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentitiesQuery.ts new file mode 100644 index 0000000000..a399dd7910 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentitiesQuery.ts @@ -0,0 +1,182 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { platformEmailSiteIdentityKeys } from '../query-keys'; +import type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailSiteIdentitiesQueryKey = platformEmailSiteIdentityKeys.list; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailSiteIdentitiesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlatformEmailSiteIdentitiesQuery< + S extends PlatformEmailSiteIdentitySelect, + TData = { + platformEmailSiteIdentities: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } & Omit< + UseQueryOptions< + { + platformEmailSiteIdentities: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailSiteIdentitiesQuery( + params: { + selection: ListSelectionConfig< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailSiteIdentityKeys.list(args), + queryFn: () => getClient().platformEmailSiteIdentity.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * const data = await fetchPlatformEmailSiteIdentitiesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlatformEmailSiteIdentitiesQuery< + S extends PlatformEmailSiteIdentitySelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailSiteIdentitySelect>; +}): Promise<{ + platformEmailSiteIdentities: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchPlatformEmailSiteIdentitiesQuery(params: { + selection: ListSelectionConfig< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >(params.selection); + return getClient().platformEmailSiteIdentity.findMany(args).unwrap(); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * await prefetchPlatformEmailSiteIdentitiesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlatformEmailSiteIdentitiesQuery< + S extends PlatformEmailSiteIdentitySelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } +): Promise; +export async function prefetchPlatformEmailSiteIdentitiesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailSiteIdentityKeys.list(args), + queryFn: () => getClient().platformEmailSiteIdentity.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentityQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentityQuery.ts new file mode 100644 index 0000000000..6f55363512 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformEmailSiteIdentityQuery.ts @@ -0,0 +1,151 @@ +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * @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 { platformEmailSiteIdentityKeys } from '../query-keys'; +import type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformEmailSiteIdentityQueryKey = platformEmailSiteIdentityKeys.detail; +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformEmailSiteIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformEmailSiteIdentityQuery< + S extends PlatformEmailSiteIdentitySelect, + TData = { + platformEmailSiteIdentity: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } & Omit< + UseQueryOptions< + { + platformEmailSiteIdentity: InferSelectResult< + PlatformEmailSiteIdentityWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformEmailSiteIdentityQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformEmailSiteIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * const data = await fetchPlatformEmailSiteIdentityQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformEmailSiteIdentityQuery< + S extends PlatformEmailSiteIdentitySelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; +}): Promise<{ + platformEmailSiteIdentity: InferSelectResult | null; +}>; +export async function fetchPlatformEmailSiteIdentityQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformEmailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. + * + * @example + * ```ts + * await prefetchPlatformEmailSiteIdentityQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformEmailSiteIdentityQuery< + S extends PlatformEmailSiteIdentitySelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformEmailSiteIdentitySelect>; + } +): Promise; +export async function prefetchPlatformEmailSiteIdentityQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformEmailSiteIdentityKeys.detail(params.id), + queryFn: () => + getClient() + .platformEmailSiteIdentity.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useSqlActionQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useSqlActionQuery.ts deleted file mode 100644 index 8ca9fab570..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useSqlActionQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Single item query hook for SqlAction - * @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 { sqlActionKeys } from '../query-keys'; -import type { SqlActionSelect, SqlActionWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { SqlActionSelect, SqlActionWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const sqlActionQueryKey = sqlActionKeys.detail; -/** - * Query hook for fetching a single SqlAction - * - * @example - * ```tsx - * const { data, isLoading } = useSqlActionQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useSqlActionQuery< - S extends SqlActionSelect, - TData = { - sqlAction: InferSelectResult | null; - }, ->( - params: { - id: number; - selection: { - fields: S; - } & HookStrictSelect, SqlActionSelect>; - } & Omit< - UseQueryOptions< - { - sqlAction: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useSqlActionQuery( - params: { - id: number; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: sqlActionKeys.detail(params.id), - queryFn: () => - getClient() - .sqlAction.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Fetch a single SqlAction without React hooks - * - * @example - * ```ts - * const data = await fetchSqlActionQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchSqlActionQuery(params: { - id: number; - selection: { - fields: S; - } & HookStrictSelect, SqlActionSelect>; -}): Promise<{ - sqlAction: InferSelectResult | null; -}>; -export async function fetchSqlActionQuery(params: { - id: number; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .sqlAction.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Prefetch a single SqlAction for SSR or cache warming - * - * @example - * ```ts - * await prefetchSqlActionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchSqlActionQuery( - queryClient: QueryClient, - params: { - id: number; - selection: { - fields: S; - } & HookStrictSelect, SqlActionSelect>; - } -): Promise; -export async function prefetchSqlActionQuery( - queryClient: QueryClient, - params: { - id: number; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: sqlActionKeys.detail(params.id), - queryFn: () => - getClient() - .sqlAction.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/useSqlActionsQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useSqlActionsQuery.ts deleted file mode 100644 index 3ea449b0a2..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useSqlActionsQuery.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * List query hook for SqlAction - * @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 { sqlActionKeys } from '../query-keys'; -import type { - SqlActionSelect, - SqlActionWithRelations, - SqlActionFilter, - SqlActionOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - SqlActionSelect, - SqlActionWithRelations, - SqlActionFilter, - SqlActionOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const sqlActionsQueryKey = sqlActionKeys.list; -/** - * Query hook for fetching SqlAction list - * - * @example - * ```tsx - * const { data, isLoading } = useSqlActionsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useSqlActionsQuery< - S extends SqlActionSelect, - TData = { - sqlActions: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, SqlActionSelect>; - } & Omit< - UseQueryOptions< - { - sqlActions: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useSqlActionsQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs( - params.selection - ); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: sqlActionKeys.list(args), - queryFn: () => getClient().sqlAction.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch SqlAction list without React hooks - * - * @example - * ```ts - * const data = await fetchSqlActionsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchSqlActionsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, SqlActionSelect>; -}): Promise<{ - sqlActions: ConnectionResult>; -}>; -export async function fetchSqlActionsQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs( - params.selection - ); - return getClient().sqlAction.findMany(args).unwrap(); -} -/** - * Prefetch SqlAction list for SSR or cache warming - * - * @example - * ```ts - * await prefetchSqlActionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchSqlActionsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, SqlActionSelect>; - } -): Promise; -export async function prefetchSqlActionsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs( - params.selection - ); - await queryClient.prefetchQuery({ - queryKey: sqlActionKeys.list(args), - queryFn: () => getClient().sqlAction.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/query-keys.ts b/sdk/constructive-react/src/api/hooks/query-keys.ts index 96f421966f..c89c6352fb 100644 --- a/sdk/constructive-react/src/api/hooks/query-keys.ts +++ b/sdk/constructive-react/src/api/hooks/query-keys.ts @@ -19,6 +19,15 @@ // Entity Query Keys // ============================================================================ +export const apiKeys = { + /** All api queries */ all: ['api'] as const, + /** List query keys */ lists: () => [...apiKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...apiKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...apiKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...apiKeys.details(), id] as const, +} as const; export const apiSchemaKeys = { /** All apiSchema queries */ all: ['apischema'] as const, /** List query keys */ lists: () => [...apiSchemaKeys.all, 'list'] as const, @@ -37,23 +46,23 @@ export const apiSettingKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...apiSettingKeys.details(), id] as const, } as const; -export const apisKeys = { - /** All apis queries */ all: ['apis'] as const, - /** List query keys */ lists: () => [...apisKeys.all, 'list'] as const, +export const appComponentKeys = { + /** All appComponent queries */ all: ['appcomponent'] as const, + /** List query keys */ lists: () => [...appComponentKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...apisKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...apisKeys.all, 'detail'] as const, + [...appComponentKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appComponentKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...apisKeys.details(), id] as const, + [...appComponentKeys.details(), id] as const, } as const; -export const astMigrationKeys = { - /** All astMigration queries */ all: ['astmigration'] as const, - /** List query keys */ lists: () => [...astMigrationKeys.all, 'list'] as const, +export const appKeys = { + /** All app queries */ all: ['app'] as const, + /** List query keys */ lists: () => [...appKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...astMigrationKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...astMigrationKeys.all, 'detail'] as const, + [...appKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...astMigrationKeys.details(), id] as const, + [...appKeys.details(), id] as const, } as const; export const checkConstraintKeys = { /** All checkConstraint queries */ all: ['checkconstraint'] as const, @@ -163,6 +172,33 @@ export const domainVerificationKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...domainVerificationKeys.details(), id] as const, } as const; +export const emailIdentityKeys = { + /** All emailIdentity queries */ all: ['emailidentity'] as const, + /** List query keys */ lists: () => [...emailIdentityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...emailIdentityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...emailIdentityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...emailIdentityKeys.details(), id] as const, +} as const; +export const emailProviderAccountKeys = { + /** All emailProviderAccount queries */ all: ['emailprovideraccount'] as const, + /** List query keys */ lists: () => [...emailProviderAccountKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...emailProviderAccountKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...emailProviderAccountKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...emailProviderAccountKeys.details(), id] as const, +} as const; +export const emailSiteIdentityKeys = { + /** All emailSiteIdentity queries */ all: ['emailsiteidentity'] as const, + /** List query keys */ lists: () => [...emailSiteIdentityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...emailSiteIdentityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...emailSiteIdentityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...emailSiteIdentityKeys.details(), id] as const, +} as const; export const embeddingChunkKeys = { /** All embeddingChunk queries */ all: ['embeddingchunk'] as const, /** List query keys */ lists: () => [...embeddingChunkKeys.all, 'list'] as const, @@ -308,6 +344,15 @@ export const partitionKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...partitionKeys.details(), id] as const, } as const; +export const platformApiKeys = { + /** All platformApi queries */ all: ['platformapi'] as const, + /** List query keys */ lists: () => [...platformApiKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformApiKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformApiKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformApiKeys.details(), id] as const, +} as const; export const platformApiSchemaKeys = { /** All platformApiSchema queries */ all: ['platformapischema'] as const, /** List query keys */ lists: () => [...platformApiSchemaKeys.all, 'list'] as const, @@ -326,15 +371,6 @@ export const platformApiSettingKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformApiSettingKeys.details(), id] as const, } as const; -export const platformApisKeys = { - /** All platformApis queries */ all: ['platformapis'] as const, - /** List query keys */ lists: () => [...platformApisKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...platformApisKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...platformApisKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...platformApisKeys.details(), id] as const, -} as const; export const platformCorsSettingKeys = { /** All platformCorsSetting queries */ all: ['platformcorssetting'] as const, /** List query keys */ lists: () => [...platformCorsSettingKeys.all, 'list'] as const, @@ -372,6 +408,34 @@ export const platformDomainVerificationKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformDomainVerificationKeys.details(), id] as const, } as const; +export const platformEmailIdentityKeys = { + /** All platformEmailIdentity queries */ all: ['platformemailidentity'] as const, + /** List query keys */ lists: () => [...platformEmailIdentityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformEmailIdentityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformEmailIdentityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformEmailIdentityKeys.details(), id] as const, +} as const; +export const platformEmailProviderAccountKeys = { + /** All platformEmailProviderAccount queries */ all: ['platformemailprovideraccount'] as const, + /** List query keys */ lists: () => [...platformEmailProviderAccountKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformEmailProviderAccountKeys.lists(), variables] as const, + /** Detail query keys */ details: () => + [...platformEmailProviderAccountKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformEmailProviderAccountKeys.details(), id] as const, +} as const; +export const platformEmailSiteIdentityKeys = { + /** All platformEmailSiteIdentity queries */ all: ['platformemailsiteidentity'] as const, + /** List query keys */ lists: () => [...platformEmailSiteIdentityKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformEmailSiteIdentityKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformEmailSiteIdentityKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformEmailSiteIdentityKeys.details(), id] as const, +} as const; export const platformManagedDomainKeys = { /** All platformManagedDomain queries */ all: ['platformmanageddomain'] as const, /** List query keys */ lists: () => [...platformManagedDomainKeys.all, 'list'] as const, @@ -615,15 +679,6 @@ export const spatialRelationKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...spatialRelationKeys.details(), id] as const, } as const; -export const sqlActionKeys = { - /** All sqlAction queries */ all: ['sqlaction'] as const, - /** List query keys */ lists: () => [...sqlActionKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...sqlActionKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...sqlActionKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...sqlActionKeys.details(), id] as const, -} as const; export const tableBehaviorKeys = { /** All tableBehavior queries */ all: ['tablebehavior'] as const, /** List query keys */ lists: () => [...tableBehaviorKeys.all, 'list'] as const, @@ -783,10 +838,11 @@ export const customQueryKeys = { * ``` */ export const queryKeys = { + api: apiKeys, apiSchema: apiSchemaKeys, apiSetting: apiSettingKeys, - apis: apisKeys, - astMigration: astMigrationKeys, + appComponent: appComponentKeys, + app: appKeys, checkConstraint: checkConstraintKeys, compositeType: compositeTypeKeys, corsSetting: corsSettingKeys, @@ -799,6 +855,9 @@ export const queryKeys = { domainEvent: domainEventKeys, domainType: domainTypeKeys, domainVerification: domainVerificationKeys, + emailIdentity: emailIdentityKeys, + emailProviderAccount: emailProviderAccountKeys, + emailSiteIdentity: emailSiteIdentityKeys, embeddingChunk: embeddingChunkKeys, enum: enumKeys, exclusionConstraint: exclusionConstraintKeys, @@ -815,13 +874,16 @@ export const queryKeys = { nodeTypeRegistry: nodeTypeRegistryKeys, page: pageKeys, partition: partitionKeys, + platformApi: platformApiKeys, platformApiSchema: platformApiSchemaKeys, platformApiSetting: platformApiSettingKeys, - platformApis: platformApisKeys, platformCorsSetting: platformCorsSettingKeys, platformDomain: platformDomainKeys, platformDomainEvent: platformDomainEventKeys, platformDomainVerification: platformDomainVerificationKeys, + platformEmailIdentity: platformEmailIdentityKeys, + platformEmailProviderAccount: platformEmailProviderAccountKeys, + platformEmailSiteIdentity: platformEmailSiteIdentityKeys, platformManagedDomain: platformManagedDomainKeys, platformPage: platformPageKeys, platformSiteAppLink: platformSiteAppLinkKeys, @@ -849,7 +911,6 @@ export const queryKeys = { siteTheme: siteThemeKeys, siteWebConfig: siteWebConfigKeys, spatialRelation: spatialRelationKeys, - sqlAction: sqlActionKeys, tableBehavior: tableBehaviorKeys, table: tableKeys, tableGrant: tableGrantKeys, diff --git a/sdk/constructive-react/src/api/orm/README.md b/sdk/constructive-react/src/api/orm/README.md index 485932a4b7..c3d6e0dbad 100644 --- a/sdk/constructive-react/src/api/orm/README.md +++ b/sdk/constructive-react/src/api/orm/README.md @@ -21,10 +21,11 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `api` | findMany, findOne, create, update, delete | | `apiSchema` | findMany, findOne, create, update, delete | | `apiSetting` | findMany, findOne, create, update, delete | -| `apis` | findMany, findOne, create, update, delete | -| `astMigration` | findMany, findOne, create, update, delete | +| `appComponent` | findMany, findOne, create, update, delete | +| `app` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `compositeType` | findMany, findOne, create, update, delete | | `corsSetting` | findMany, findOne, create, update, delete | @@ -37,6 +38,9 @@ const db = createClient({ | `domainEvent` | findMany, findOne, create, update, delete | | `domainType` | findMany, findOne, create, update, delete | | `domainVerification` | findMany, findOne, create, update, delete | +| `emailIdentity` | findMany, findOne, create, update, delete | +| `emailProviderAccount` | findMany, findOne, create, update, delete | +| `emailSiteIdentity` | findMany, findOne, create, update, delete | | `embeddingChunk` | findMany, findOne, create, update, delete | | `enum` | findMany, findOne, create, update, delete | | `exclusionConstraint` | findMany, findOne, create, update, delete | @@ -53,13 +57,16 @@ const db = createClient({ | `nodeTypeRegistry` | findMany, findOne, create, update, delete | | `page` | findMany, findOne, create, update, delete | | `partition` | findMany, findOne, create, update, delete | +| `platformApi` | findMany, findOne, create, update, delete | | `platformApiSchema` | findMany, findOne, create, update, delete | | `platformApiSetting` | findMany, findOne, create, update, delete | -| `platformApis` | findMany, findOne, create, update, delete | | `platformCorsSetting` | findMany, findOne, create, update, delete | | `platformDomain` | findMany, findOne, create, update, delete | | `platformDomainEvent` | findMany, findOne, create, update, delete | | `platformDomainVerification` | findMany, findOne, create, update, delete | +| `platformEmailIdentity` | findMany, findOne, create, update, delete | +| `platformEmailProviderAccount` | findMany, findOne, create, update, delete | +| `platformEmailSiteIdentity` | findMany, findOne, create, update, delete | | `platformManagedDomain` | findMany, findOne, create, update, delete | | `platformPage` | findMany, findOne, create, update, delete | | `platformSiteAppLink` | findMany, findOne, create, update, delete | @@ -87,7 +94,6 @@ const db = createClient({ | `siteTheme` | findMany, findOne, create, update, delete | | `siteWebConfig` | findMany, findOne, create, update, delete | | `spatialRelation` | findMany, findOne, create, update, delete | -| `sqlAction` | findMany, findOne, create, update, delete | | `tableBehavior` | findMany, findOne, create, update, delete | | `table` | findMany, findOne, create, update, delete | | `tableGrant` | findMany, findOne, create, update, delete | @@ -104,6 +110,44 @@ const db = createClient({ ## Table Operations +### `db.api` + +CRUD operations for Api records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all api records +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.api.delete({ where: { id: '' } }).execute(); +``` + ### `db.apiSchema` CRUD operations for ApiSchema records. @@ -185,83 +229,81 @@ const updated = await db.apiSetting.update({ where: { id: '' }, data: { ap const deleted = await db.apiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.apis` +### `db.appComponent` -CRUD operations for Apis records. +CRUD operations for AppComponent records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `anonRole` | String | Yes | +| `appId` | UUID | Yes | +| `componentApiId` | UUID | Yes | +| `componentDomainId` | UUID | Yes | +| `componentInstallationId` | UUID | Yes | +| `componentSiteId` | UUID | Yes | +| `componentType` | String | Yes | | `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `dbname` | String | Yes | | `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all apis records -const items = await db.apis.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); +// List all appComponent records +const items = await db.appComponent.findMany({ select: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.apis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); +const item = await db.appComponent.findOne({ id: '', select: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }).execute(); // Create -const created = await db.apis.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); +const created = await db.appComponent.create({ data: { appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.apis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); +const updated = await db.appComponent.update({ where: { id: '' }, data: { appId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.apis.delete({ where: { id: '' } }).execute(); +const deleted = await db.appComponent.delete({ where: { id: '' } }).execute(); ``` -### `db.astMigration` +### `db.app` -CRUD operations for AstMigration records. +CRUD operations for App records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actionId` | UUID | Yes | -| `actionName` | String | Yes | -| `actorId` | UUID | Yes | +| `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `deploy` | JSON | Yes | -| `deploys` | String | Yes | -| `id` | Int | No | +| `description` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | | `name` | String | Yes | -| `payload` | JSON | Yes | -| `requires` | String | Yes | -| `revert` | JSON | Yes | -| `verify` | JSON | Yes | +| `status` | String | Yes | +| `title` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all astMigration records -const items = await db.astMigration.findMany({ select: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }).execute(); +// List all app records +const items = await db.app.findMany({ select: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.astMigration.findOne({ id: '', select: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }).execute(); +const item = await db.app.findOne({ id: '', select: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }).execute(); // Create -const created = await db.astMigration.create({ data: { actionId: '', actionName: '', actorId: '', databaseId: '', deploy: '', deploys: '', name: '', payload: '', requires: '', revert: '', verify: '' }, select: { id: true } }).execute(); +const created = await db.app.create({ data: { config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }, select: { id: true } }).execute(); // Update -const updated = await db.astMigration.update({ where: { id: '' }, data: { actionId: '' }, select: { id: true } }).execute(); +const updated = await db.app.update({ where: { id: '' }, data: { config: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.astMigration.delete({ where: { id: '' } }).execute(); +const deleted = await db.app.delete({ where: { id: '' } }).execute(); ``` ### `db.checkConstraint` @@ -743,6 +785,125 @@ const updated = await db.domainVerification.update({ where: { id: '' }, da const deleted = await db.domainVerification.delete({ where: { id: '' } }).execute(); ``` +### `db.emailIdentity` + +CRUD operations for EmailIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `fromAddress` | String | Yes | +| `fromName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `providerAccountId` | UUID | Yes | +| `replyToAddress` | String | Yes | +| `supportAddress` | String | Yes | +| `transportMode` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all emailIdentity records +const items = await db.emailIdentity.findMany({ select: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.emailIdentity.findOne({ id: '', select: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Create +const created = await db.emailIdentity.create({ data: { databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailIdentity.delete({ where: { id: '' } }).execute(); +``` + +### `db.emailProviderAccount` + +CRUD operations for EmailProviderAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiBaseUrl` | String | Yes | +| `createdAt` | Datetime | No | +| `credentialsSecretName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `provider` | String | Yes | +| `providerAccountName` | String | Yes | +| `region` | String | Yes | +| `smtpHost` | String | Yes | +| `smtpPort` | Int | Yes | +| `smtpSecure` | Boolean | Yes | +| `smtpUser` | String | Yes | +| `updatedAt` | Datetime | No | +| `webhookSigningSecretName` | String | Yes | + +**Operations:** + +```typescript +// List all emailProviderAccount records +const items = await db.emailProviderAccount.findMany({ select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Get one by id +const item = await db.emailProviderAccount.findOne({ id: '', select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Create +const created = await db.emailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailProviderAccount.delete({ where: { id: '' } }).execute(); +``` + +### `db.emailSiteIdentity` + +CRUD operations for EmailSiteIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `emailIdentityId` | UUID | Yes | +| `id` | UUID | No | +| `siteId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all emailSiteIdentity records +const items = await db.emailSiteIdentity.findMany({ select: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.emailSiteIdentity.findOne({ id: '', select: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.emailSiteIdentity.create({ data: { databaseId: '', emailIdentityId: '', siteId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailSiteIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailSiteIdentity.delete({ where: { id: '' } }).execute(); +``` + ### `db.embeddingChunk` CRUD operations for EmbeddingChunk records. @@ -1394,6 +1555,43 @@ const updated = await db.partition.update({ where: { id: '' }, data: { dat const deleted = await db.partition.delete({ where: { id: '' } }).execute(); ``` +### `db.platformApi` + +CRUD operations for PlatformApi records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformApi records +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformApi.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformApiSchema` CRUD operations for PlatformApiSchema records. @@ -1473,43 +1671,6 @@ const updated = await db.platformApiSetting.update({ where: { id: '' }, da const deleted = await db.platformApiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.platformApis` - -CRUD operations for PlatformApis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all platformApis records -const items = await db.platformApis.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.platformApis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.platformApis.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformApis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformApis.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformCorsSetting` CRUD operations for PlatformCorsSetting records. @@ -1666,6 +1827,122 @@ const updated = await db.platformDomainVerification.update({ where: { id: '' } }).execute(); ``` +### `db.platformEmailIdentity` + +CRUD operations for PlatformEmailIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `fromAddress` | String | Yes | +| `fromName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `providerAccountId` | UUID | Yes | +| `replyToAddress` | String | Yes | +| `supportAddress` | String | Yes | +| `transportMode` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformEmailIdentity records +const items = await db.platformEmailIdentity.findMany({ select: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformEmailIdentity.findOne({ id: '', select: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformEmailIdentity.create({ data: { fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailIdentity.update({ where: { id: '' }, data: { fromAddress: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailIdentity.delete({ where: { id: '' } }).execute(); +``` + +### `db.platformEmailProviderAccount` + +CRUD operations for PlatformEmailProviderAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiBaseUrl` | String | Yes | +| `createdAt` | Datetime | No | +| `credentialsSecretName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `provider` | String | Yes | +| `providerAccountName` | String | Yes | +| `region` | String | Yes | +| `smtpHost` | String | Yes | +| `smtpPort` | Int | Yes | +| `smtpSecure` | Boolean | Yes | +| `smtpUser` | String | Yes | +| `updatedAt` | Datetime | No | +| `webhookSigningSecretName` | String | Yes | + +**Operations:** + +```typescript +// List all platformEmailProviderAccount records +const items = await db.platformEmailProviderAccount.findMany({ select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Get one by id +const item = await db.platformEmailProviderAccount.findOne({ id: '', select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Create +const created = await db.platformEmailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailProviderAccount.delete({ where: { id: '' } }).execute(); +``` + +### `db.platformEmailSiteIdentity` + +CRUD operations for PlatformEmailSiteIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `emailIdentityId` | UUID | Yes | +| `id` | UUID | No | +| `siteId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformEmailSiteIdentity records +const items = await db.platformEmailSiteIdentity.findMany({ select: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformEmailSiteIdentity.findOne({ id: '', select: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformEmailSiteIdentity.create({ data: { emailIdentityId: '', siteId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailSiteIdentity.update({ where: { id: '' }, data: { emailIdentityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailSiteIdentity.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformManagedDomain` CRUD operations for PlatformManagedDomain records. @@ -2718,47 +2995,6 @@ const updated = await db.spatialRelation.update({ where: { id: '' }, data: const deleted = await db.spatialRelation.delete({ where: { id: '' } }).execute(); ``` -### `db.sqlAction` - -CRUD operations for SqlAction records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `actionId` | UUID | Yes | -| `actionName` | String | Yes | -| `actorId` | UUID | Yes | -| `content` | String | Yes | -| `createdAt` | Datetime | No | -| `databaseId` | UUID | Yes | -| `deploy` | String | Yes | -| `deps` | String | Yes | -| `id` | Int | No | -| `name` | String | Yes | -| `payload` | JSON | Yes | -| `revert` | String | Yes | -| `verify` | String | Yes | - -**Operations:** - -```typescript -// List all sqlAction records -const items = await db.sqlAction.findMany({ select: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }).execute(); - -// Get one by id -const item = await db.sqlAction.findOne({ id: '', select: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }).execute(); - -// Create -const created = await db.sqlAction.create({ data: { actionId: '', actionName: '', actorId: '', content: '', databaseId: '', deploy: '', deps: '', name: '', payload: '', revert: '', verify: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.sqlAction.update({ where: { id: '' }, data: { actionId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.sqlAction.delete({ where: { id: '' } }).execute(); -``` - ### `db.tableBehavior` CRUD operations for TableBehavior records. @@ -3363,49 +3599,64 @@ resolveSiteAppLinks const result = await db.query.resolveSiteAppLinks({ targetSiteId: '' }).execute(); ``` -### `db.mutation.acceptDatabaseTransfer` +### `db.mutation.applyRls` -acceptDatabaseTransfer +applyRls - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AcceptDatabaseTransferInput (required) | + | `input` | ApplyRlsInput (required) | ```typescript -const result = await db.mutation.acceptDatabaseTransfer({ input: { transferId: '' } }).execute(); +const result = await db.mutation.applyRls({ input: '' }).execute(); ``` -### `db.mutation.applyRls` +### `db.mutation.appsInstallApp` -applyRls +appsInstallApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ApplyRlsInput (required) | + | `input` | AppsInstallAppInput (required) | ```typescript -const result = await db.mutation.applyRls({ input: '' }).execute(); +const result = await db.mutation.appsInstallApp({ input: '' }).execute(); +``` + +### `db.mutation.appsUninstallApp` + +appsUninstallApp + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | AppsUninstallAppInput (required) | + +```typescript +const result = await db.mutation.appsUninstallApp({ input: { targetAppId: '' } }).execute(); ``` -### `db.mutation.cancelDatabaseTransfer` +### `db.mutation.appsUpgradeApp` -cancelDatabaseTransfer +appsUpgradeApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | CancelDatabaseTransferInput (required) | + | `input` | AppsUpgradeAppInput (required) | ```typescript -const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '' } }).execute(); +const result = await db.mutation.appsUpgradeApp({ input: { newParams: '', targetAppId: '' } }).execute(); ``` ### `db.mutation.domainsAssignSubdomain` @@ -3471,21 +3722,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.rejectDatabaseTransfer` - -rejectDatabaseTransfer - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | RejectDatabaseTransferInput (required) | - -```typescript -const result = await db.mutation.rejectDatabaseTransfer({ input: { transferId: '' } }).execute(); -``` - ### `db.mutation.requestDatabase` Requests a database and returns a ticket (database_provision_module row) to poll. diff --git a/sdk/constructive-react/src/api/orm/index.ts b/sdk/constructive-react/src/api/orm/index.ts index 98c5108b79..1e0236a966 100644 --- a/sdk/constructive-react/src/api/orm/index.ts +++ b/sdk/constructive-react/src/api/orm/index.ts @@ -5,10 +5,11 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ApiModel } from './models/api'; import { ApiSchemaModel } from './models/apiSchema'; import { ApiSettingModel } from './models/apiSetting'; -import { ApisModel } from './models/apis'; -import { AstMigrationModel } from './models/astMigration'; +import { AppComponentModel } from './models/appComponent'; +import { AppModel } from './models/app'; import { CheckConstraintModel } from './models/checkConstraint'; import { CompositeTypeModel } from './models/compositeType'; import { CorsSettingModel } from './models/corsSetting'; @@ -21,6 +22,9 @@ import { DomainModel } from './models/domain'; import { DomainEventModel } from './models/domainEvent'; import { DomainTypeModel } from './models/domainType'; import { DomainVerificationModel } from './models/domainVerification'; +import { EmailIdentityModel } from './models/emailIdentity'; +import { EmailProviderAccountModel } from './models/emailProviderAccount'; +import { EmailSiteIdentityModel } from './models/emailSiteIdentity'; import { EmbeddingChunkModel } from './models/embeddingChunk'; import { EnumModel } from './models/enum'; import { ExclusionConstraintModel } from './models/exclusionConstraint'; @@ -37,13 +41,16 @@ import { ManagedDomainModel } from './models/managedDomain'; import { NodeTypeRegistryModel } from './models/nodeTypeRegistry'; import { PageModel } from './models/page'; import { PartitionModel } from './models/partition'; +import { PlatformApiModel } from './models/platformApi'; import { PlatformApiSchemaModel } from './models/platformApiSchema'; import { PlatformApiSettingModel } from './models/platformApiSetting'; -import { PlatformApisModel } from './models/platformApis'; import { PlatformCorsSettingModel } from './models/platformCorsSetting'; import { PlatformDomainModel } from './models/platformDomain'; import { PlatformDomainEventModel } from './models/platformDomainEvent'; import { PlatformDomainVerificationModel } from './models/platformDomainVerification'; +import { PlatformEmailIdentityModel } from './models/platformEmailIdentity'; +import { PlatformEmailProviderAccountModel } from './models/platformEmailProviderAccount'; +import { PlatformEmailSiteIdentityModel } from './models/platformEmailSiteIdentity'; import { PlatformManagedDomainModel } from './models/platformManagedDomain'; import { PlatformPageModel } from './models/platformPage'; import { PlatformSiteAppLinkModel } from './models/platformSiteAppLink'; @@ -71,7 +78,6 @@ import { SiteModuleModel } from './models/siteModule'; import { SiteThemeModel } from './models/siteTheme'; import { SiteWebConfigModel } from './models/siteWebConfig'; import { SpatialRelationModel } from './models/spatialRelation'; -import { SqlActionModel } from './models/sqlAction'; import { TableBehaviorModel } from './models/tableBehavior'; import { TableModel } from './models/table'; import { TableGrantModel } from './models/tableGrant'; @@ -120,10 +126,11 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + api: new ApiModel(client), apiSchema: new ApiSchemaModel(client), apiSetting: new ApiSettingModel(client), - apis: new ApisModel(client), - astMigration: new AstMigrationModel(client), + appComponent: new AppComponentModel(client), + app: new AppModel(client), checkConstraint: new CheckConstraintModel(client), compositeType: new CompositeTypeModel(client), corsSetting: new CorsSettingModel(client), @@ -136,6 +143,9 @@ export function createClient(config: OrmClientConfig) { domainEvent: new DomainEventModel(client), domainType: new DomainTypeModel(client), domainVerification: new DomainVerificationModel(client), + emailIdentity: new EmailIdentityModel(client), + emailProviderAccount: new EmailProviderAccountModel(client), + emailSiteIdentity: new EmailSiteIdentityModel(client), embeddingChunk: new EmbeddingChunkModel(client), enum: new EnumModel(client), exclusionConstraint: new ExclusionConstraintModel(client), @@ -152,13 +162,16 @@ export function createClient(config: OrmClientConfig) { nodeTypeRegistry: new NodeTypeRegistryModel(client), page: new PageModel(client), partition: new PartitionModel(client), + platformApi: new PlatformApiModel(client), platformApiSchema: new PlatformApiSchemaModel(client), platformApiSetting: new PlatformApiSettingModel(client), - platformApis: new PlatformApisModel(client), platformCorsSetting: new PlatformCorsSettingModel(client), platformDomain: new PlatformDomainModel(client), platformDomainEvent: new PlatformDomainEventModel(client), platformDomainVerification: new PlatformDomainVerificationModel(client), + platformEmailIdentity: new PlatformEmailIdentityModel(client), + platformEmailProviderAccount: new PlatformEmailProviderAccountModel(client), + platformEmailSiteIdentity: new PlatformEmailSiteIdentityModel(client), platformManagedDomain: new PlatformManagedDomainModel(client), platformPage: new PlatformPageModel(client), platformSiteAppLink: new PlatformSiteAppLinkModel(client), @@ -186,7 +199,6 @@ export function createClient(config: OrmClientConfig) { siteTheme: new SiteThemeModel(client), siteWebConfig: new SiteWebConfigModel(client), spatialRelation: new SpatialRelationModel(client), - sqlAction: new SqlActionModel(client), tableBehavior: new TableBehaviorModel(client), table: new TableModel(client), tableGrant: new TableGrantModel(client), diff --git a/sdk/constructive-react/src/api/orm/input-types.ts b/sdk/constructive-react/src/api/orm/input-types.ts index 2347f17ca6..554d99df9d 100644 --- a/sdk/constructive-react/src/api/orm/input-types.ts +++ b/sdk/constructive-react/src/api/orm/input-types.ts @@ -232,11 +232,31 @@ export interface UUIDListFilter { } // ============ Enum Types ============ export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; -export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; +export type ObjectCategory = 'APP' | 'AUTH' | 'CAPABILITIES' | 'CORE' | 'MEMBERSHIPS' | 'MODULE'; // ============ Custom Scalar Types ============ export type ConstructiveInternalTypeImage = unknown; -/** Join table linking API surfaces to the metaschema schemas they expose */ +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ // ============ Entity Types ============ +export interface Api { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} +/** Join table linking API surfaces to the metaschema schemas they expose */ export interface ApiSchema { /** API surface that exposes this schema */ apiId?: string | null; @@ -286,40 +306,47 @@ export interface ApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface Apis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ +/** App component rows binding an app to typed catalog rows (exactly one typed component reference per row) */ +export interface AppComponent { + /** App this component belongs to */ + appId?: string | null; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string | null; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string | null; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string | null; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string | null; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string | null; + /** Component-specific configuration inside this app */ config?: Record | null; createdAt?: string | null; /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; - /** Database this API surface serves */ - dbname?: string | null; id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; updatedAt?: string | null; } -export interface AstMigration { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; +/** App aggregates: thin identity rows whose components are global catalog references */ +export interface App { + /** Module-specific configuration for this app */ + config?: Record | null; createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; - deploy?: Record | null; - deploys?: string | null; - id: number; + /** Human-readable app description */ + description?: string | null; + id: string; + /** Whether other scopes may see and reference this app */ + isPublished?: boolean | null; + /** Owner-local app name */ name?: string | null; - payload?: Record | null; - requires?: string[] | null; - revert?: Record | null; - verify?: Record | null; + /** App lifecycle status: active, suspended, archived */ + status?: string | null; + /** Human-readable app title */ + title?: string | null; + updatedAt?: string | null; } export interface CheckConstraint { category?: ObjectCategory | null; @@ -546,6 +573,76 @@ export interface DomainVerification { /** When this challenge succeeded */ verifiedAt?: string | null; } +/** Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through */ +export interface EmailIdentity { + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string | null; + /** Display name shown beside the from address */ + fromName?: string | null; + id: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean | null; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean | null; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string | null; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string | null; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string | null; + /** Support address rendered in message bodies and footers */ + supportAddress?: string | null; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string | null; + updatedAt?: string | null; +} +/** A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) */ +export interface EmailProviderAccount { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string | null; + createdAt?: string | null; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + id: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean | null; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string | null; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string | null; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string | null; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string | null; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string | null; + /** SMTP port */ + smtpPort?: number | null; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean | null; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string | null; + updatedAt?: string | null; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string | null; +} +/** Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. */ +export interface EmailSiteIdentity { + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Identity this site sends as */ + emailIdentityId?: string | null; + id: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string | null; + updatedAt?: string | null; +} export interface EmbeddingChunk { chunkOverlap?: number | null; chunkSize?: number | null; @@ -821,6 +918,24 @@ export interface Partition { tableId?: string | null; updatedAt?: string | null; } +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ +export interface PlatformApi { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} /** Join table linking API surfaces to the metaschema schemas they expose */ export interface PlatformApiSchema { /** API surface that exposes this schema */ @@ -867,24 +982,6 @@ export interface PlatformApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface PlatformApis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} /** Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default */ export interface PlatformCorsSetting { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -973,6 +1070,70 @@ export interface PlatformDomainVerification { /** When this challenge succeeded */ verifiedAt?: string | null; } +/** Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through */ +export interface PlatformEmailIdentity { + createdAt?: string | null; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string | null; + /** Display name shown beside the from address */ + fromName?: string | null; + id: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean | null; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean | null; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string | null; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string | null; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string | null; + /** Support address rendered in message bodies and footers */ + supportAddress?: string | null; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string | null; + updatedAt?: string | null; +} +/** A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) */ +export interface PlatformEmailProviderAccount { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string | null; + createdAt?: string | null; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string | null; + id: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean | null; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string | null; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string | null; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string | null; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string | null; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string | null; + /** SMTP port */ + smtpPort?: number | null; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean | null; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string | null; + updatedAt?: string | null; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string | null; +} +/** Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. */ +export interface PlatformEmailSiteIdentity { + createdAt?: string | null; + /** Identity this site sends as */ + emailIdentityId?: string | null; + id: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string | null; + updatedAt?: string | null; +} /** Platform-operated hostnames whose DNS and certificate lifecycle the platform drives */ export interface PlatformManagedDomain { /** Whether tenants may claim subdomains under this managed hostname */ @@ -1517,21 +1678,6 @@ export interface SpatialRelation { tags?: string[] | null; updatedAt?: string | null; } -export interface SqlAction { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; - content?: string | null; - createdAt?: string | null; - databaseId?: string | null; - deploy?: string | null; - deps?: string[] | null; - id: number; - name?: string | null; - payload?: Record | null; - revert?: string | null; - verify?: string | null; -} export interface TableBehavior { createdAt?: string | null; databaseId?: string | null; @@ -1736,19 +1882,24 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ApiRelations { + apiSetting?: ApiSetting | null; + apiSchemas?: ConnectionResult; + corsSettings?: ConnectionResult; +} export interface ApiSchemaRelations { - api?: Apis | null; + api?: Api | null; schema?: Schema | null; } export interface ApiSettingRelations { - api?: Apis | null; + api?: Api | null; } -export interface ApisRelations { - apiSettingByApiId?: ApiSetting | null; - apiSchemasByApiId?: ConnectionResult; - corsSettingsByApiId?: ConnectionResult; +export interface AppComponentRelations { + app?: App | null; +} +export interface AppRelations { + appComponents?: ConnectionResult; } -export interface AstMigrationRelations {} export interface CheckConstraintRelations { database?: Database | null; table?: Table | null; @@ -1758,7 +1909,7 @@ export interface CompositeTypeRelations { schema?: Schema | null; } export interface CorsSettingRelations { - api?: Apis | null; + api?: Api | null; } export interface DatabaseRelations { checkConstraints?: ConnectionResult; @@ -1828,6 +1979,17 @@ export interface DomainVerificationRelations { domain?: Domain | null; managedDomain?: ManagedDomain | null; } +export interface EmailIdentityRelations { + providerAccount?: EmailProviderAccount | null; + emailSiteIdentities?: ConnectionResult; +} +export interface EmailProviderAccountRelations { + emailIdentitiesByProviderAccountId?: ConnectionResult; +} +export interface EmailSiteIdentityRelations { + emailIdentity?: EmailIdentity | null; + site?: Site | null; +} export interface EmbeddingChunkRelations { chunksTable?: Table | null; database?: Database | null; @@ -1896,20 +2058,20 @@ export interface PartitionRelations { partitionKey?: Field | null; table?: Table | null; } +export interface PlatformApiRelations { + platformApiSettingByApiId?: PlatformApiSetting | null; + platformCorsSettingByApiId?: PlatformCorsSetting | null; + platformApiSchemasByApiId?: ConnectionResult; +} export interface PlatformApiSchemaRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; schema?: Schema | null; } export interface PlatformApiSettingRelations { - api?: PlatformApis | null; -} -export interface PlatformApisRelations { - platformApiSettingByApiId?: PlatformApiSetting | null; - platformCorsSettingByApiId?: PlatformCorsSetting | null; - platformApiSchemasByApiId?: ConnectionResult; + api?: PlatformApi | null; } export interface PlatformCorsSettingRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; } export interface PlatformDomainRelations { platformDomainEventsByDomainId?: ConnectionResult; @@ -1924,6 +2086,17 @@ export interface PlatformDomainVerificationRelations { domain?: PlatformDomain | null; managedDomain?: PlatformManagedDomain | null; } +export interface PlatformEmailIdentityRelations { + providerAccount?: PlatformEmailProviderAccount | null; + platformEmailSiteIdentitiesByEmailIdentityId?: ConnectionResult; +} +export interface PlatformEmailProviderAccountRelations { + platformEmailIdentitiesByProviderAccountId?: ConnectionResult; +} +export interface PlatformEmailSiteIdentityRelations { + emailIdentity?: PlatformEmailIdentity | null; + site?: PlatformSite | null; +} export interface PlatformManagedDomainRelations { platformDomainEventsByManagedDomainId?: ConnectionResult; platformDomainVerificationsByManagedDomainId?: ConnectionResult; @@ -1935,6 +2108,7 @@ export interface PlatformSiteAppLinkRelations { site?: PlatformSite | null; } export interface PlatformSiteRelations { + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentity | null; platformSiteMetadatumBySiteId?: PlatformSiteMetadatum | null; platformSiteWebConfigBySiteId?: PlatformSiteWebConfig | null; platformPagesBySiteId?: ConnectionResult; @@ -2014,6 +2188,7 @@ export interface SiteAppLinkRelations { site?: Site | null; } export interface SiteRelations { + emailSiteIdentity?: EmailSiteIdentity | null; siteMetadatum?: SiteMetadatum | null; siteWebConfig?: SiteWebConfig | null; pages?: ConnectionResult; @@ -2048,7 +2223,6 @@ export interface SpatialRelationRelations { refTable?: Table | null; table?: Table | null; } -export interface SqlActionRelations {} export interface TableBehaviorRelations { database?: Database | null; table?: Table | null; @@ -2139,10 +2313,11 @@ export interface WebauthnSettingRelations { userField?: Field | null; } // ============ Entity Types With Relations ============ +export type ApiWithRelations = Api & ApiRelations; export type ApiSchemaWithRelations = ApiSchema & ApiSchemaRelations; export type ApiSettingWithRelations = ApiSetting & ApiSettingRelations; -export type ApisWithRelations = Apis & ApisRelations; -export type AstMigrationWithRelations = AstMigration & AstMigrationRelations; +export type AppComponentWithRelations = AppComponent & AppComponentRelations; +export type AppWithRelations = App & AppRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type CompositeTypeWithRelations = CompositeType & CompositeTypeRelations; export type CorsSettingWithRelations = CorsSetting & CorsSettingRelations; @@ -2155,6 +2330,10 @@ export type DomainWithRelations = Domain & DomainRelations; export type DomainEventWithRelations = DomainEvent & DomainEventRelations; export type DomainTypeWithRelations = DomainType & DomainTypeRelations; export type DomainVerificationWithRelations = DomainVerification & DomainVerificationRelations; +export type EmailIdentityWithRelations = EmailIdentity & EmailIdentityRelations; +export type EmailProviderAccountWithRelations = EmailProviderAccount & + EmailProviderAccountRelations; +export type EmailSiteIdentityWithRelations = EmailSiteIdentity & EmailSiteIdentityRelations; export type EmbeddingChunkWithRelations = EmbeddingChunk & EmbeddingChunkRelations; export type EnumWithRelations = Enum & EnumRelations; export type ExclusionConstraintWithRelations = ExclusionConstraint & ExclusionConstraintRelations; @@ -2173,14 +2352,20 @@ export type ManagedDomainWithRelations = ManagedDomain & ManagedDomainRelations; export type NodeTypeRegistryWithRelations = NodeTypeRegistry & NodeTypeRegistryRelations; export type PageWithRelations = Page & PageRelations; export type PartitionWithRelations = Partition & PartitionRelations; +export type PlatformApiWithRelations = PlatformApi & PlatformApiRelations; export type PlatformApiSchemaWithRelations = PlatformApiSchema & PlatformApiSchemaRelations; export type PlatformApiSettingWithRelations = PlatformApiSetting & PlatformApiSettingRelations; -export type PlatformApisWithRelations = PlatformApis & PlatformApisRelations; export type PlatformCorsSettingWithRelations = PlatformCorsSetting & PlatformCorsSettingRelations; export type PlatformDomainWithRelations = PlatformDomain & PlatformDomainRelations; export type PlatformDomainEventWithRelations = PlatformDomainEvent & PlatformDomainEventRelations; export type PlatformDomainVerificationWithRelations = PlatformDomainVerification & PlatformDomainVerificationRelations; +export type PlatformEmailIdentityWithRelations = PlatformEmailIdentity & + PlatformEmailIdentityRelations; +export type PlatformEmailProviderAccountWithRelations = PlatformEmailProviderAccount & + PlatformEmailProviderAccountRelations; +export type PlatformEmailSiteIdentityWithRelations = PlatformEmailSiteIdentity & + PlatformEmailSiteIdentityRelations; export type PlatformManagedDomainWithRelations = PlatformManagedDomain & PlatformManagedDomainRelations; export type PlatformPageWithRelations = PlatformPage & PlatformPageRelations; @@ -2214,7 +2399,6 @@ export type SiteModuleWithRelations = SiteModule & SiteModuleRelations; export type SiteThemeWithRelations = SiteTheme & SiteThemeRelations; export type SiteWebConfigWithRelations = SiteWebConfig & SiteWebConfigRelations; export type SpatialRelationWithRelations = SpatialRelation & SpatialRelationRelations; -export type SqlActionWithRelations = SqlAction & SqlActionRelations; export type TableBehaviorWithRelations = TableBehavior & TableBehaviorRelations; export type TableWithRelations = Table & TableRelations; export type TableGrantWithRelations = TableGrant & TableGrantRelations; @@ -2230,6 +2414,33 @@ export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type WebauthnSettingWithRelations = WebauthnSetting & WebauthnSettingRelations; // ============ Entity Select Types ============ +export type ApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + databaseId?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + apiSetting?: { + select: ApiSettingSelect; + }; + apiSchemas?: { + select: ApiSchemaSelect; + first?: number; + filter?: ApiSchemaFilter; + orderBy?: ApiSchemaOrderBy[]; + }; + corsSettings?: { + select: CorsSettingSelect; + first?: number; + filter?: CorsSettingFilter; + orderBy?: CorsSettingOrderBy[]; + }; +}; export type ApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -2238,7 +2449,7 @@ export type ApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; schema?: { select: SchemaSelect; @@ -2265,50 +2476,42 @@ export type ApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; -export type ApisSelect = { - anonRole?: boolean; +export type AppComponentSelect = { + appId?: boolean; + componentApiId?: boolean; + componentDomainId?: boolean; + componentInstallationId?: boolean; + componentSiteId?: boolean; + componentType?: boolean; config?: boolean; createdAt?: boolean; databaseId?: boolean; - dbname?: boolean; id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; updatedAt?: boolean; - apiSettingByApiId?: { - select: ApiSettingSelect; - }; - apiSchemasByApiId?: { - select: ApiSchemaSelect; - first?: number; - filter?: ApiSchemaFilter; - orderBy?: ApiSchemaOrderBy[]; - }; - corsSettingsByApiId?: { - select: CorsSettingSelect; - first?: number; - filter?: CorsSettingFilter; - orderBy?: CorsSettingOrderBy[]; + app?: { + select: AppSelect; }; }; -export type AstMigrationSelect = { - actionId?: boolean; - actionName?: boolean; - actorId?: boolean; +export type AppSelect = { + config?: boolean; createdAt?: boolean; databaseId?: boolean; - deploy?: boolean; - deploys?: boolean; + description?: boolean; id?: boolean; + isPublished?: boolean; name?: boolean; - payload?: boolean; - requires?: boolean; - revert?: boolean; - verify?: boolean; + status?: boolean; + title?: boolean; + updatedAt?: boolean; + appComponents?: { + select: AppComponentSelect; + first?: number; + filter?: AppComponentFilter; + orderBy?: AppComponentOrderBy[]; + }; }; export type CheckConstraintSelect = { category?: boolean; @@ -2358,7 +2561,7 @@ export type CorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; export type DatabaseSelect = { @@ -2759,6 +2962,68 @@ export type DomainVerificationSelect = { select: ManagedDomainSelect; }; }; +export type EmailIdentitySelect = { + createdAt?: boolean; + databaseId?: boolean; + fromAddress?: boolean; + fromName?: boolean; + id?: boolean; + isActive?: boolean; + isDefault?: boolean; + name?: boolean; + providerAccountId?: boolean; + replyToAddress?: boolean; + supportAddress?: boolean; + transportMode?: boolean; + updatedAt?: boolean; + providerAccount?: { + select: EmailProviderAccountSelect; + }; + emailSiteIdentities?: { + select: EmailSiteIdentitySelect; + first?: number; + filter?: EmailSiteIdentityFilter; + orderBy?: EmailSiteIdentityOrderBy[]; + }; +}; +export type EmailProviderAccountSelect = { + apiBaseUrl?: boolean; + createdAt?: boolean; + credentialsSecretName?: boolean; + databaseId?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + provider?: boolean; + providerAccountName?: boolean; + region?: boolean; + smtpHost?: boolean; + smtpPort?: boolean; + smtpSecure?: boolean; + smtpUser?: boolean; + updatedAt?: boolean; + webhookSigningSecretName?: boolean; + emailIdentitiesByProviderAccountId?: { + select: EmailIdentitySelect; + first?: number; + filter?: EmailIdentityFilter; + orderBy?: EmailIdentityOrderBy[]; + }; +}; +export type EmailSiteIdentitySelect = { + createdAt?: boolean; + databaseId?: boolean; + emailIdentityId?: boolean; + id?: boolean; + siteId?: boolean; + updatedAt?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + site?: { + select: SiteSelect; + }; +}; export type EmbeddingChunkSelect = { chunkOverlap?: boolean; chunkSize?: boolean; @@ -3135,6 +3400,29 @@ export type PartitionSelect = { select: TableSelect; }; }; +export type PlatformApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + platformApiSettingByApiId?: { + select: PlatformApiSettingSelect; + }; + platformCorsSettingByApiId?: { + select: PlatformCorsSettingSelect; + }; + platformApiSchemasByApiId?: { + select: PlatformApiSchemaSelect; + first?: number; + filter?: PlatformApiSchemaFilter; + orderBy?: PlatformApiSchemaOrderBy[]; + }; +}; export type PlatformApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -3142,7 +3430,7 @@ export type PlatformApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; schema?: { select: SchemaSelect; @@ -3168,40 +3456,17 @@ export type PlatformApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; }; -export type PlatformApisSelect = { - anonRole?: boolean; - config?: boolean; +export type PlatformCorsSettingSelect = { + allowedOrigins?: boolean; + apiId?: boolean; createdAt?: boolean; - dbname?: boolean; id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; updatedAt?: boolean; - platformApiSettingByApiId?: { - select: PlatformApiSettingSelect; - }; - platformCorsSettingByApiId?: { - select: PlatformCorsSettingSelect; - }; - platformApiSchemasByApiId?: { - select: PlatformApiSchemaSelect; - first?: number; - filter?: PlatformApiSchemaFilter; - orderBy?: PlatformApiSchemaOrderBy[]; - }; -}; -export type PlatformCorsSettingSelect = { - allowedOrigins?: boolean; - apiId?: boolean; - createdAt?: boolean; - id?: boolean; - updatedAt?: boolean; - api?: { - select: PlatformApisSelect; + api?: { + select: PlatformApiSelect; }; }; export type PlatformDomainSelect = { @@ -3276,6 +3541,65 @@ export type PlatformDomainVerificationSelect = { select: PlatformManagedDomainSelect; }; }; +export type PlatformEmailIdentitySelect = { + createdAt?: boolean; + fromAddress?: boolean; + fromName?: boolean; + id?: boolean; + isActive?: boolean; + isDefault?: boolean; + name?: boolean; + providerAccountId?: boolean; + replyToAddress?: boolean; + supportAddress?: boolean; + transportMode?: boolean; + updatedAt?: boolean; + providerAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailSiteIdentitiesByEmailIdentityId?: { + select: PlatformEmailSiteIdentitySelect; + first?: number; + filter?: PlatformEmailSiteIdentityFilter; + orderBy?: PlatformEmailSiteIdentityOrderBy[]; + }; +}; +export type PlatformEmailProviderAccountSelect = { + apiBaseUrl?: boolean; + createdAt?: boolean; + credentialsSecretName?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + provider?: boolean; + providerAccountName?: boolean; + region?: boolean; + smtpHost?: boolean; + smtpPort?: boolean; + smtpSecure?: boolean; + smtpUser?: boolean; + updatedAt?: boolean; + webhookSigningSecretName?: boolean; + platformEmailIdentitiesByProviderAccountId?: { + select: PlatformEmailIdentitySelect; + first?: number; + filter?: PlatformEmailIdentityFilter; + orderBy?: PlatformEmailIdentityOrderBy[]; + }; +}; +export type PlatformEmailSiteIdentitySelect = { + createdAt?: boolean; + emailIdentityId?: boolean; + id?: boolean; + siteId?: boolean; + updatedAt?: boolean; + emailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + site?: { + select: PlatformSiteSelect; + }; +}; export type PlatformManagedDomainSelect = { allowPublicUsage?: boolean; annotations?: boolean; @@ -3344,6 +3668,9 @@ export type PlatformSiteSelect = { resourceId?: boolean; title?: boolean; updatedAt?: boolean; + platformEmailSiteIdentityBySiteId?: { + select: PlatformEmailSiteIdentitySelect; + }; platformSiteMetadatumBySiteId?: { select: PlatformSiteMetadatumSelect; }; @@ -3748,6 +4075,9 @@ export type SiteSelect = { resourceId?: boolean; title?: boolean; updatedAt?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; siteMetadatum?: { select: SiteMetadatumSelect; }; @@ -3911,21 +4241,6 @@ export type SpatialRelationSelect = { select: TableSelect; }; }; -export type SqlActionSelect = { - actionId?: boolean; - actionName?: boolean; - actorId?: boolean; - content?: boolean; - createdAt?: boolean; - databaseId?: boolean; - deploy?: boolean; - deps?: boolean; - id?: boolean; - name?: boolean; - payload?: boolean; - revert?: boolean; - verify?: boolean; -}; export type TableBehaviorSelect = { createdAt?: boolean; databaseId?: boolean; @@ -4365,11 +4680,51 @@ export type WebauthnSettingSelect = { }; }; // ============ Table Filter Types ============ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4393,7 +4748,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4437,79 +4792,69 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface ApisFilter { +export interface AppComponentFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + and?: AppComponentFilter[]; + /** Filter by the object’s `app` relation. */ + app?: AppFilter; + /** Filter by the object’s `appId` field. */ + appId?: UUIDFilter; + /** Filter by the object’s `componentApiId` field. */ + componentApiId?: UUIDFilter; + /** Filter by the object’s `componentDomainId` field. */ + componentDomainId?: UUIDFilter; + /** Filter by the object’s `componentInstallationId` field. */ + componentInstallationId?: UUIDFilter; + /** Filter by the object’s `componentSiteId` field. */ + componentSiteId?: UUIDFilter; + /** Filter by the object’s `componentType` field. */ + componentType?: StringFilter; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: AppComponentFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; + or?: AppComponentFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AstMigrationFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; +export interface AppFilter { /** Checks for all expressions in this list. */ - and?: AstMigrationFilter[]; + and?: AppFilter[]; + /** Filter by the object’s `appComponents` relation. */ + appComponents?: AppToManyAppComponentFilter; + /** `appComponents` exist. */ + appComponentsExist?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: JSONFilter; - /** Filter by the object’s `deploys` field. */ - deploys?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ - id?: IntFilter; + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AstMigrationFilter; + not?: AppFilter; /** Checks for any expressions in this list. */ - or?: AstMigrationFilter[]; - /** Filter by the object’s `payload` field. */ - payload?: JSONFilter; - /** Filter by the object’s `requires` field. */ - requires?: StringListFilter; - /** Filter by the object’s `revert` field. */ - revert?: JSONFilter; - /** Filter by the object’s `verify` field. */ - verify?: JSONFilter; + or?: AppFilter[]; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } export interface CheckConstraintFilter { /** Checks for all expressions in this list. */ @@ -4589,7 +4934,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5093,6 +5438,116 @@ export interface DomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } +export interface EmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentities` relation. */ + emailSiteIdentities?: EmailIdentityToManyEmailSiteIdentityFilter; + /** `emailSiteIdentities` exist. */ + emailSiteIdentitiesExist?: boolean; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailIdentityFilter[]; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: EmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface EmailProviderAccountFilter { + /** Checks for all expressions in this list. */ + and?: EmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesByProviderAccountId` relation. */ + emailIdentitiesByProviderAccountId?: EmailProviderAccountToManyEmailIdentityFilter; + /** `emailIdentitiesByProviderAccountId` exist. */ + emailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: EmailProviderAccountFilter[]; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +export interface EmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: EmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ and?: EmbeddingChunkFilter[]; @@ -5727,11 +6182,49 @@ export interface PartitionFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5753,7 +6246,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5795,51 +6288,13 @@ export interface PlatformApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface PlatformCorsSettingFilter { /** Filter by the object’s `allowedOrigins` field. */ allowedOrigins?: StringListFilter; /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5985,50 +6440,154 @@ export interface PlatformDomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } -export interface PlatformManagedDomainFilter { - /** Filter by the object’s `allowPublicUsage` field. */ - allowPublicUsage?: BooleanFilter; +export interface PlatformEmailIdentityFilter { /** Checks for all expressions in this list. */ - and?: PlatformManagedDomainFilter[]; - /** Filter by the object’s `annotations` field. */ - annotations?: JSONFilter; - /** Filter by the object’s `certStatus` field. */ - certStatus?: StringFilter; + and?: PlatformEmailIdentityFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: PlatformManagedDomainFilter; + not?: PlatformEmailIdentityFilter; /** Checks for any expressions in this list. */ - or?: PlatformManagedDomainFilter[]; - /** Filter by the object’s `platformDomainEventsByManagedDomainId` relation. */ - platformDomainEventsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainEventFilter; - /** `platformDomainEventsByManagedDomainId` exist. */ - platformDomainEventsByManagedDomainIdExist?: boolean; - /** Filter by the object’s `platformDomainVerificationsByManagedDomainId` relation. */ - platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; - /** `platformDomainVerificationsByManagedDomainId` exist. */ - platformDomainVerificationsByManagedDomainIdExist?: boolean; - /** Filter by the object’s `tlsReadyAt` field. */ - tlsReadyAt?: DatetimeFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; + or?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. */ + platformEmailSiteIdentitiesByEmailIdentityId?: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter; + /** `platformEmailSiteIdentitiesByEmailIdentityId` exist. */ + platformEmailSiteIdentitiesByEmailIdentityIdExist?: boolean; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: PlatformEmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; } -export interface PlatformPageFilter { +export interface PlatformEmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: PlatformPageFilter[]; - /** Filter by the object’s `commitId` field. */ + and?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. */ + platformEmailIdentitiesByProviderAccountId?: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter; + /** `platformEmailIdentitiesByProviderAccountId` exist. */ + platformEmailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +export interface PlatformEmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: PlatformEmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformEmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: PlatformSiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface PlatformManagedDomainFilter { + /** Filter by the object’s `allowPublicUsage` field. */ + allowPublicUsage?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformManagedDomainFilter[]; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `certStatus` field. */ + certStatus?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isWildcard` field. */ + isWildcard?: BooleanFilter; + /** Negates the expression. */ + not?: PlatformManagedDomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformManagedDomainFilter[]; + /** Filter by the object’s `platformDomainEventsByManagedDomainId` relation. */ + platformDomainEventsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainEventFilter; + /** `platformDomainEventsByManagedDomainId` exist. */ + platformDomainEventsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `platformDomainVerificationsByManagedDomainId` relation. */ + platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; + /** `platformDomainVerificationsByManagedDomainId` exist. */ + platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `tlsReadyAt` field. */ + tlsReadyAt?: DatetimeFilter; + /** Filter by the object’s `tlsStatus` field. */ + tlsStatus?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +export interface PlatformPageFilter { + /** Checks for all expressions in this list. */ + and?: PlatformPageFilter[]; + /** Filter by the object’s `commitId` field. */ commitId?: UUIDFilter; /** Filter by the object’s `content` field. */ content?: JSONFilter; @@ -6108,6 +6667,10 @@ export interface PlatformSiteFilter { not?: PlatformSiteFilter; /** Checks for any expressions in this list. */ or?: PlatformSiteFilter[]; + /** Filter by the object’s `platformEmailSiteIdentityBySiteId` relation. */ + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentityFilter; + /** A related `platformEmailSiteIdentityBySiteId` exists. */ + platformEmailSiteIdentityBySiteIdExists?: boolean; /** Filter by the object’s `platformPagesBySiteId` relation. */ platformPagesBySiteId?: PlatformSiteToManyPlatformPageFilter; /** `platformPagesBySiteId` exist. */ @@ -6742,6 +7305,10 @@ export interface SiteFilter { databaseId?: UUIDFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; + /** Filter by the object’s `emailSiteIdentity` relation. */ + emailSiteIdentity?: EmailSiteIdentityFilter; + /** A related `emailSiteIdentity` exists. */ + emailSiteIdentityExists?: boolean; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `installationId` field. */ @@ -7017,38 +7584,6 @@ export interface SpatialRelationFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface SqlActionFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: SqlActionFilter[]; - /** Filter by the object’s `content` field. */ - content?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: StringFilter; - /** Filter by the object’s `deps` field. */ - deps?: StringListFilter; - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: SqlActionFilter; - /** Checks for any expressions in this list. */ - or?: SqlActionFilter[]; - /** Filter by the object’s `revert` field. */ - revert?: StringFilter; - /** Filter by the object’s `verify` field. */ - verify?: StringFilter; -} export interface TableBehaviorFilter { /** Checks for all expressions in this list. */ and?: TableBehaviorFilter[]; @@ -7642,6 +8177,30 @@ export interface WebauthnSettingFilter { userFieldId?: UUIDFilter; } // ============ OrderBy Types ============ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -7700,58 +8259,56 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' +export type AppComponentOrderBy = + | 'APP_ID_ASC' + | 'APP_ID_DESC' + | 'COMPONENT_API_ID_ASC' + | 'COMPONENT_API_ID_DESC' + | 'COMPONENT_DOMAIN_ID_ASC' + | 'COMPONENT_DOMAIN_ID_DESC' + | 'COMPONENT_INSTALLATION_ID_ASC' + | 'COMPONENT_INSTALLATION_ID_DESC' + | 'COMPONENT_SITE_ID_ASC' + | 'COMPONENT_SITE_ID_DESC' + | 'COMPONENT_TYPE_ASC' + | 'COMPONENT_TYPE_DESC' | 'CONFIG_ASC' | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AstMigrationOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' +export type AppOrderBy = + | 'CONFIG_ASC' + | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEPLOYS_ASC' - | 'DEPLOYS_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REQUIRES_ASC' - | 'REQUIRES_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type CheckConstraintOrderBy = | 'CATEGORY_ASC' | 'CATEGORY_DESC' @@ -8086,6 +8643,88 @@ export type DomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +export type EmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type EmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +export type EmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type EmbeddingChunkOrderBy = | 'CHUNKING_TASK_NAME_ASC' | 'CHUNKING_TASK_NAME_DESC' @@ -8556,6 +9195,28 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -8610,28 +9271,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' @@ -8736,6 +9375,82 @@ export type PlatformDomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +export type PlatformEmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type PlatformEmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +export type PlatformEmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformManagedDomainOrderBy = | 'ALLOW_PUBLIC_USAGE_ASC' | 'ALLOW_PUBLIC_USAGE_DESC' @@ -9436,34 +10151,6 @@ export type SpatialRelationOrderBy = | 'TAGS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type SqlActionOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' - | 'CONTENT_ASC' - | 'CONTENT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' - | 'DEPS_ASC' - | 'DEPS_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; export type TableBehaviorOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -9801,6 +10488,36 @@ export type WebauthnSettingOrderBy = | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; // ============ CRUD Input Types ============ +export interface CreateApiInput { + clientMutationId?: string; + api: { + anonRole?: string; + config?: Record; + databaseId: string; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface ApiPatch { + anonRole?: string | null; + config?: Record | null; + databaseId?: string | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdateApiInput { + clientMutationId?: string; + id: string; + apiPatch: ApiPatch; +} +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface CreateApiSchemaInput { clientMutationId?: string; apiSchema: { @@ -9871,73 +10588,67 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface CreateApisInput { +export interface CreateAppComponentInput { clientMutationId?: string; - apis: { - anonRole?: string; + appComponent: { + appId: string; + componentApiId?: string; + componentDomainId?: string; + componentInstallationId?: string; + componentSiteId?: string; + componentType?: string; config?: Record; databaseId: string; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; }; } -export interface ApisPatch { - anonRole?: string | null; +export interface AppComponentPatch { + appId?: string | null; + componentApiId?: string | null; + componentDomainId?: string | null; + componentInstallationId?: string | null; + componentSiteId?: string | null; + componentType?: string | null; config?: Record | null; databaseId?: string | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; } -export interface UpdateApisInput { +export interface UpdateAppComponentInput { clientMutationId?: string; id: string; - apisPatch: ApisPatch; + appComponentPatch: AppComponentPatch; } -export interface DeleteApisInput { +export interface DeleteAppComponentInput { clientMutationId?: string; id: string; } -export interface CreateAstMigrationInput { +export interface CreateAppInput { clientMutationId?: string; - astMigration: { - actionId: string; - actionName?: string; - actorId: string; + app: { + config?: Record; databaseId: string; - deploy?: Record; - deploys?: string; - name?: string; - payload?: Record; - requires?: string[]; - revert?: Record; - verify?: Record; + description?: string; + isPublished?: boolean; + name: string; + status?: string; + title?: string; }; } -export interface AstMigrationPatch { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; +export interface AppPatch { + config?: Record | null; databaseId?: string | null; - deploy?: Record | null; - deploys?: string | null; + description?: string | null; + isPublished?: boolean | null; name?: string | null; - payload?: Record | null; - requires?: string[] | null; - revert?: Record | null; - verify?: Record | null; + status?: string | null; + title?: string | null; } -export interface UpdateAstMigrationInput { +export interface UpdateAppInput { clientMutationId?: string; - id: number; - astMigrationPatch: AstMigrationPatch; + id: string; + appPatch: AppPatch; } -export interface DeleteAstMigrationInput { +export interface DeleteAppInput { clientMutationId?: string; - id: number; + id: string; } export interface CreateCheckConstraintInput { clientMutationId?: string; @@ -10357,6 +11068,106 @@ export interface DeleteDomainVerificationInput { clientMutationId?: string; id: string; } +export interface CreateEmailIdentityInput { + clientMutationId?: string; + emailIdentity: { + databaseId: string; + fromAddress: string; + fromName?: string; + isActive?: boolean; + isDefault?: boolean; + name: string; + providerAccountId?: string; + replyToAddress?: string; + supportAddress?: string; + transportMode?: string; + }; +} +export interface EmailIdentityPatch { + databaseId?: string | null; + fromAddress?: string | null; + fromName?: string | null; + isActive?: boolean | null; + isDefault?: boolean | null; + name?: string | null; + providerAccountId?: string | null; + replyToAddress?: string | null; + supportAddress?: string | null; + transportMode?: string | null; +} +export interface UpdateEmailIdentityInput { + clientMutationId?: string; + id: string; + emailIdentityPatch: EmailIdentityPatch; +} +export interface DeleteEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface CreateEmailProviderAccountInput { + clientMutationId?: string; + emailProviderAccount: { + apiBaseUrl?: string; + credentialsSecretName: string; + databaseId: string; + isActive?: boolean; + name: string; + provider: string; + providerAccountName?: string; + region?: string; + smtpHost?: string; + smtpPort?: number; + smtpSecure?: boolean; + smtpUser?: string; + webhookSigningSecretName?: string; + }; +} +export interface EmailProviderAccountPatch { + apiBaseUrl?: string | null; + credentialsSecretName?: string | null; + databaseId?: string | null; + isActive?: boolean | null; + name?: string | null; + provider?: string | null; + providerAccountName?: string | null; + region?: string | null; + smtpHost?: string | null; + smtpPort?: number | null; + smtpSecure?: boolean | null; + smtpUser?: string | null; + webhookSigningSecretName?: string | null; +} +export interface UpdateEmailProviderAccountInput { + clientMutationId?: string; + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; +} +export interface DeleteEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface CreateEmailSiteIdentityInput { + clientMutationId?: string; + emailSiteIdentity: { + databaseId: string; + emailIdentityId: string; + siteId: string; + }; +} +export interface EmailSiteIdentityPatch { + databaseId?: string | null; + emailIdentityId?: string | null; + siteId?: string | null; +} +export interface UpdateEmailSiteIdentityInput { + clientMutationId?: string; + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; +} +export interface DeleteEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface CreateEmbeddingChunkInput { clientMutationId?: string; embeddingChunk: { @@ -10939,6 +11750,34 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + platformApi: { + anonRole?: string; + config?: Record; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface PlatformApiPatch { + anonRole?: string | null; + config?: Record | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + platformApiPatch: PlatformApiPatch; +} +export interface DeletePlatformApiInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; platformApiSchema: { @@ -11005,34 +11844,6 @@ export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - platformApis: { - anonRole?: string; - config?: Record; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface PlatformApisPatch { - anonRole?: string | null; - config?: Record | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - platformApisPatch: PlatformApisPatch; -} -export interface DeletePlatformApisInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; platformCorsSetting: { @@ -11161,6 +11972,100 @@ export interface DeletePlatformDomainVerificationInput { clientMutationId?: string; id: string; } +export interface CreatePlatformEmailIdentityInput { + clientMutationId?: string; + platformEmailIdentity: { + fromAddress: string; + fromName?: string; + isActive?: boolean; + isDefault?: boolean; + name: string; + providerAccountId?: string; + replyToAddress?: string; + supportAddress?: string; + transportMode?: string; + }; +} +export interface PlatformEmailIdentityPatch { + fromAddress?: string | null; + fromName?: string | null; + isActive?: boolean | null; + isDefault?: boolean | null; + name?: string | null; + providerAccountId?: string | null; + replyToAddress?: string | null; + supportAddress?: string | null; + transportMode?: string | null; +} +export interface UpdatePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; +} +export interface DeletePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlatformEmailProviderAccountInput { + clientMutationId?: string; + platformEmailProviderAccount: { + apiBaseUrl?: string; + credentialsSecretName: string; + isActive?: boolean; + name: string; + provider: string; + providerAccountName?: string; + region?: string; + smtpHost?: string; + smtpPort?: number; + smtpSecure?: boolean; + smtpUser?: string; + webhookSigningSecretName?: string; + }; +} +export interface PlatformEmailProviderAccountPatch { + apiBaseUrl?: string | null; + credentialsSecretName?: string | null; + isActive?: boolean | null; + name?: string | null; + provider?: string | null; + providerAccountName?: string | null; + region?: string | null; + smtpHost?: string | null; + smtpPort?: number | null; + smtpSecure?: boolean | null; + smtpUser?: string | null; + webhookSigningSecretName?: string | null; +} +export interface UpdatePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; +} +export interface DeletePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + platformEmailSiteIdentity: { + emailIdentityId: string; + siteId: string; + }; +} +export interface PlatformEmailSiteIdentityPatch { + emailIdentityId?: string | null; + siteId?: string | null; +} +export interface UpdatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; +} +export interface DeletePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformManagedDomainInput { clientMutationId?: string; platformManagedDomain: { @@ -12033,44 +12938,6 @@ export interface DeleteSpatialRelationInput { clientMutationId?: string; id: string; } -export interface CreateSqlActionInput { - clientMutationId?: string; - sqlAction: { - actionId: string; - actionName?: string; - actorId: string; - content?: string; - databaseId: string; - deploy?: string; - deps?: string[]; - name?: string; - payload?: Record; - revert?: string; - verify?: string; - }; -} -export interface SqlActionPatch { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; - content?: string | null; - databaseId?: string | null; - deploy?: string | null; - deps?: string[] | null; - name?: string | null; - payload?: Record | null; - revert?: string | null; - verify?: string | null; -} -export interface UpdateSqlActionInput { - clientMutationId?: string; - id: number; - sqlActionPatch: SqlActionPatch; -} -export interface DeleteSqlActionInput { - clientMutationId?: string; - id: number; -} export interface CreateTableBehaviorInput { clientMutationId?: string; tableBehavior: { @@ -12503,9 +13370,12 @@ export interface DeleteWebauthnSettingInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - Apis: { - apiSchemasByApiId: 'ApiSchema', - corsSettingsByApiId: 'CorsSetting', + Api: { + apiSchemas: 'ApiSchema', + corsSettings: 'CorsSetting', + }, + App: { + appComponents: 'AppComponent', }, Database: { checkConstraints: 'CheckConstraint', @@ -12549,6 +13419,12 @@ export const connectionFieldsMap = { httpRoutes: 'HttpRoute', routes: 'Route', }, + EmailIdentity: { + emailSiteIdentities: 'EmailSiteIdentity', + }, + EmailProviderAccount: { + emailIdentitiesByProviderAccountId: 'EmailIdentity', + }, Field: { embeddingChunksByEmbeddingFieldId: 'EmbeddingChunk', embeddingChunksByParentFkFieldId: 'EmbeddingChunk', @@ -12564,13 +13440,19 @@ export const connectionFieldsMap = { domainEvents: 'DomainEvent', domainVerifications: 'DomainVerification', }, - PlatformApis: { + PlatformApi: { platformApiSchemasByApiId: 'PlatformApiSchema', }, PlatformDomain: { platformDomainEventsByDomainId: 'PlatformDomainEvent', platformDomainVerificationsByDomainId: 'PlatformDomainVerification', }, + PlatformEmailIdentity: { + platformEmailSiteIdentitiesByEmailIdentityId: 'PlatformEmailSiteIdentity', + }, + PlatformEmailProviderAccount: { + platformEmailIdentitiesByProviderAccountId: 'PlatformEmailIdentity', + }, PlatformManagedDomain: { platformDomainEventsByManagedDomainId: 'PlatformDomainEvent', platformDomainVerificationsByManagedDomainId: 'PlatformDomainVerification', @@ -12638,10 +13520,6 @@ export const connectionFieldsMap = { }, } as Record>; // ============ Custom Input Types (from schema) ============ -export interface AcceptDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} export interface ApplyRlsInput { clientMutationId?: string; fieldIds?: string[]; @@ -12652,9 +13530,28 @@ export interface ApplyRlsInput { tableId?: string; vars?: Record; } -export interface CancelDatabaseTransferInput { +export interface AppsInstallAppInput { + apex?: string; + clientMutationId?: string; + config?: Record; + definitionIds?: string[]; + hostname?: string; + label?: string; + name?: string; + namespaceId?: string; + params?: Record; + routePath?: string; + slug?: string; + title?: string; +} +export interface AppsUninstallAppInput { clientMutationId?: string; - transferId?: string; + targetAppId?: string; +} +export interface AppsUpgradeAppInput { + clientMutationId?: string; + newParams?: Record; + targetAppId?: string; } export interface DomainsAssignSubdomainInput { apex?: string; @@ -12686,10 +13583,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface RejectDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} export interface RequestDatabaseInput { clientMutationId?: string; databaseName?: string; @@ -12713,7 +13606,7 @@ export interface SitesProvisionStaticSiteInput { siteConfig?: Record; } /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -12722,7 +13615,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -12730,6 +13623,15 @@ export interface ApisToManyCorsSettingFilter { /** Filters to entities where at least one related entity matches. */ some?: CorsSettingFilter; } +/** A filter to be used against many `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppToManyAppComponentFilter { + /** Filters to entities where every related entity matches. */ + every?: AppComponentFilter; + /** Filters to entities where no related entity matches. */ + none?: AppComponentFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppComponentFilter; +} /** A filter to be used against ObjectCategory fields. All fields are combined with a logical ‘and.’ */ export interface ObjectCategoryFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -13097,6 +13999,24 @@ export interface DomainToManyRouteFilter { /** Filters to entities where at least one related entity matches. */ some?: RouteFilter; } +/** A filter to be used against many `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityToManyEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSiteIdentityFilter; +} +/** A filter to be used against many `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountToManyEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailIdentityFilter; +} /** A filter to be used against many `EmbeddingChunk` object types. All fields are combined with a logical ‘and.’ */ export interface FieldToManyEmbeddingChunkFilter { /** Filters to entities where every related entity matches. */ @@ -13161,7 +14081,7 @@ export interface ManagedDomainToManyDomainVerificationFilter { some?: DomainVerificationFilter; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -13187,6 +14107,24 @@ export interface PlatformDomainToManyPlatformDomainVerificationFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformDomainVerificationFilter; } +/** A filter to be used against many `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailSiteIdentityFilter; +} +/** A filter to be used against many `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailIdentityFilter; +} /** A filter to be used against many `PlatformDomainEvent` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformManagedDomainToManyPlatformDomainEventFilter { /** Filters to entities where every related entity matches. */ @@ -13670,20 +14608,40 @@ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ some?: ViewTableFilter; } -/** An input for mutations affecting `ApiSchema` */ -export interface ApiSchemaInput { - /** API surface that exposes this schema */ - apiId: string; +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; + /** Database this API surface serves */ + dbname?: string; id?: string; - /** Metaschema schema exposed through the API surface */ - schemaId: string; - updatedAt?: string; -} -/** An input for mutations affecting `ApiSetting` */ -export interface ApiSettingInput { + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** An input for mutations affecting `ApiSchema` */ +export interface ApiSchemaInput { + /** API surface that exposes this schema */ + apiId: string; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Metaschema schema exposed through the API surface */ + schemaId: string; + updatedAt?: string; +} +/** An input for mutations affecting `ApiSetting` */ +export interface ApiSettingInput { /** API surface these settings override for */ apiId: string; createdAt?: string; @@ -13720,24 +14678,46 @@ export interface ApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ +/** An input for mutations affecting `AppComponent` */ +export interface AppComponentInput { + /** App this component belongs to */ + appId: string; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string; + /** Component-specific configuration inside this app */ config?: Record; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; - /** Database this API surface serves */ - dbname?: string; id?: string; - /** Whether other scopes may see and route to this API surface */ + updatedAt?: string; +} +/** An input for mutations affecting `App` */ +export interface AppInput { + /** Module-specific configuration for this app */ + config?: Record; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Human-readable app description */ + description?: string; + id?: string; + /** Whether other scopes may see and reference this app */ isPublished?: boolean; - /** Owner-local API surface name */ + /** Owner-local app name */ name: string; - /** Authenticated role the API executes as */ - roleName?: string; + /** App lifecycle status: active, suspended, archived */ + status?: string; + /** Human-readable app title */ + title?: string; updatedAt?: string; } /** An input for mutations affecting `CheckConstraint` */ @@ -13972,6 +14952,76 @@ export interface DomainVerificationInput { /** When this challenge succeeded */ verifiedAt?: string; } +/** An input for mutations affecting `EmailIdentity` */ +export interface EmailIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** An input for mutations affecting `EmailProviderAccount` */ +export interface EmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** An input for mutations affecting `EmailSiteIdentity` */ +export interface EmailSiteIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} /** An input for mutations affecting `EmbeddingChunk` */ export interface EmbeddingChunkInput { chunkOverlap?: number; @@ -14259,6 +15309,24 @@ export interface PartitionInput { tableId: string; updatedAt?: string; } +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformApiSchema` */ export interface PlatformApiSchemaInput { /** API surface that exposes this schema */ @@ -14305,24 +15373,6 @@ export interface PlatformApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `PlatformCorsSetting` */ export interface PlatformCorsSettingInput { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -14411,6 +15461,70 @@ export interface PlatformDomainVerificationInput { /** When this challenge succeeded */ verifiedAt?: string; } +/** An input for mutations affecting `PlatformEmailIdentity` */ +export interface PlatformEmailIdentityInput { + createdAt?: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** An input for mutations affecting `PlatformEmailProviderAccount` */ +export interface PlatformEmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** An input for mutations affecting `PlatformEmailSiteIdentity` */ +export interface PlatformEmailSiteIdentityInput { + createdAt?: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformManagedDomain` */ export interface PlatformManagedDomainInput { /** Whether tenants may claim subdomains under this managed hostname */ @@ -15166,7 +16280,7 @@ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -15193,7 +16307,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -15211,6 +16325,39 @@ export interface CorsSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppComponentFilter { + /** Checks for all expressions in this list. */ + and?: AppComponentFilter[]; + /** Filter by the object’s `app` relation. */ + app?: AppFilter; + /** Filter by the object’s `appId` field. */ + appId?: UUIDFilter; + /** Filter by the object’s `componentApiId` field. */ + componentApiId?: UUIDFilter; + /** Filter by the object’s `componentDomainId` field. */ + componentDomainId?: UUIDFilter; + /** Filter by the object’s `componentInstallationId` field. */ + componentInstallationId?: UUIDFilter; + /** Filter by the object’s `componentSiteId` field. */ + componentSiteId?: UUIDFilter; + /** Filter by the object’s `componentType` field. */ + componentType?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppComponentFilter; + /** Checks for any expressions in this list. */ + or?: AppComponentFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { /** Checks for all expressions in this list. */ @@ -16847,12 +17994,80 @@ export interface RouteFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: EmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentities` relation. */ + emailSiteIdentities?: EmailIdentityToManyEmailSiteIdentityFilter; + /** `emailSiteIdentities` exist. */ + emailSiteIdentitiesExist?: boolean; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailIdentityFilter[]; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: EmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -16958,6 +18173,70 @@ export interface PlatformDomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } +/** A filter to be used against `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: PlatformEmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformEmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: PlatformSiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. */ + platformEmailSiteIdentitiesByEmailIdentityId?: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter; + /** `platformEmailSiteIdentitiesByEmailIdentityId` exist. */ + platformEmailSiteIdentitiesByEmailIdentityIdExist?: boolean; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: PlatformEmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformPage` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformPageFilter { /** Checks for all expressions in this list. */ @@ -17302,26 +18581,26 @@ export interface SiteThemeFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; + and?: ApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -17335,9 +18614,9 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: ApiFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; + or?: ApiFilter[]; /** Filter by the object’s `roleName` field. */ roleName?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -17432,71 +18711,216 @@ export interface StringListFilter { /** Overlaps the specified list of values. */ overlaps?: string[]; } -/** A filter to be used against `Database` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseFilter { +/** A filter to be used against `App` object types. All fields are combined with a logical ‘and.’ */ +export interface AppFilter { /** Checks for all expressions in this list. */ - and?: DatabaseFilter[]; - /** Filter by the object’s `checkConstraints` relation. */ - checkConstraints?: DatabaseToManyCheckConstraintFilter; - /** `checkConstraints` exist. */ - checkConstraintsExist?: boolean; - /** Filter by the object’s `compositeTypes` relation. */ - compositeTypes?: DatabaseToManyCompositeTypeFilter; - /** `compositeTypes` exist. */ - compositeTypesExist?: boolean; + and?: AppFilter[]; + /** Filter by the object’s `appComponents` relation. */ + appComponents?: AppToManyAppComponentFilter; + /** `appComponents` exist. */ + appComponentsExist?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseTransfers` relation. */ - databaseTransfers?: DatabaseToManyDatabaseTransferFilter; - /** `databaseTransfers` exist. */ - databaseTransfersExist?: boolean; - /** Filter by the object’s `defaultPrivileges` relation. */ - defaultPrivileges?: DatabaseToManyDefaultPrivilegeFilter; - /** `defaultPrivileges` exist. */ - defaultPrivilegesExist?: boolean; - /** Filter by the object’s `derives` relation. */ - derives?: DatabaseToManyDeriveFilter; - /** `derives` exist. */ - derivesExist?: boolean; - /** Filter by the object’s `domainTypes` relation. */ - domainTypes?: DatabaseToManyDomainTypeFilter; - /** `domainTypes` exist. */ - domainTypesExist?: boolean; - /** Filter by the object’s `embeddingChunks` relation. */ - embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; - /** `embeddingChunks` exist. */ - embeddingChunksExist?: boolean; - /** Filter by the object’s `enums` relation. */ - enums?: DatabaseToManyEnumFilter; - /** `enums` exist. */ - enumsExist?: boolean; - /** Filter by the object’s `exclusionConstraints` relation. */ - exclusionConstraints?: DatabaseToManyExclusionConstraintFilter; - /** `exclusionConstraints` exist. */ - exclusionConstraintsExist?: boolean; - /** Filter by the object’s `fieldBehaviors` relation. */ - fieldBehaviors?: DatabaseToManyFieldBehaviorFilter; - /** `fieldBehaviors` exist. */ - fieldBehaviorsExist?: boolean; - /** Filter by the object’s `fields` relation. */ - fields?: DatabaseToManyFieldFilter; - /** `fields` exist. */ - fieldsExist?: boolean; - /** Filter by the object’s `foreignKeyConstraintBehaviors` relation. */ - foreignKeyConstraintBehaviors?: DatabaseToManyForeignKeyConstraintBehaviorFilter; - /** `foreignKeyConstraintBehaviors` exist. */ - foreignKeyConstraintBehaviorsExist?: boolean; - /** Filter by the object’s `foreignKeyConstraints` relation. */ - foreignKeyConstraints?: DatabaseToManyForeignKeyConstraintFilter; - /** `foreignKeyConstraints` exist. */ - foreignKeyConstraintsExist?: boolean; - /** Filter by the object’s `fullTextSearches` relation. */ - fullTextSearches?: DatabaseToManyFullTextSearchFilter; - /** `fullTextSearches` exist. */ - fullTextSearchesExist?: boolean; - /** Filter by the object’s `functions` relation. */ - functions?: DatabaseToManyFunctionFilter; - /** `functions` exist. */ + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppFilter; + /** Checks for any expressions in this list. */ + or?: AppFilter[]; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ +export interface StringFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ + distinctFromInsensitive?: string; + /** Ends with the specified string (case-sensitive). */ + endsWith?: string; + /** Ends with the specified string (case-insensitive). */ + endsWithInsensitive?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Equal to the specified value (case-insensitive). */ + equalToInsensitive?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than the specified value (case-insensitive). */ + greaterThanInsensitive?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Greater than or equal to the specified value (case-insensitive). */ + greaterThanOrEqualToInsensitive?: string; + /** Included in the specified list. */ + in?: string[]; + /** Included in the specified list (case-insensitive). */ + inInsensitive?: string[]; + /** Contains the specified string (case-sensitive). */ + includes?: string; + /** Contains the specified string (case-insensitive). */ + includesInsensitive?: string; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than the specified value (case-insensitive). */ + lessThanInsensitive?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Less than or equal to the specified value (case-insensitive). */ + lessThanOrEqualToInsensitive?: string; + /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + like?: string; + /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + likeInsensitive?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ + notDistinctFromInsensitive?: string; + /** Does not end with the specified string (case-sensitive). */ + notEndsWith?: string; + /** Does not end with the specified string (case-insensitive). */ + notEndsWithInsensitive?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value (case-insensitive). */ + notEqualToInsensitive?: string; + /** Not included in the specified list. */ + notIn?: string[]; + /** Not included in the specified list (case-insensitive). */ + notInInsensitive?: string[]; + /** Does not contain the specified string (case-sensitive). */ + notIncludes?: string; + /** Does not contain the specified string (case-insensitive). */ + notIncludesInsensitive?: string; + /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLike?: string; + /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLikeInsensitive?: string; + /** Does not start with the specified string (case-sensitive). */ + notStartsWith?: string; + /** Does not start with the specified string (case-insensitive). */ + notStartsWithInsensitive?: string; + /** Starts with the specified string (case-sensitive). */ + startsWith?: string; + /** Starts with the specified string (case-insensitive). */ + startsWithInsensitive?: string; +} +/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ +export interface JSONFilter { + /** Contained by the specified JSON. */ + containedBy?: Record; + /** Contains the specified JSON. */ + contains?: Record; + /** Contains all of the specified keys. */ + containsAllKeys?: string[]; + /** Contains any of the specified keys. */ + containsAnyKeys?: string[]; + /** Contains the specified key. */ + containsKey?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: Record; + /** Equal to the specified value. */ + equalTo?: Record; + /** Greater than the specified value. */ + greaterThan?: Record; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: Record; + /** Included in the specified list. */ + in?: Record[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: Record; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: Record; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: Record; + /** Not equal to the specified value. */ + notEqualTo?: Record; + /** Not included in the specified list. */ + notIn?: Record[]; +} +/** A filter to be used against `Database` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseFilter { + /** Checks for all expressions in this list. */ + and?: DatabaseFilter[]; + /** Filter by the object’s `checkConstraints` relation. */ + checkConstraints?: DatabaseToManyCheckConstraintFilter; + /** `checkConstraints` exist. */ + checkConstraintsExist?: boolean; + /** Filter by the object’s `compositeTypes` relation. */ + compositeTypes?: DatabaseToManyCompositeTypeFilter; + /** `compositeTypes` exist. */ + compositeTypesExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseTransfers` relation. */ + databaseTransfers?: DatabaseToManyDatabaseTransferFilter; + /** `databaseTransfers` exist. */ + databaseTransfersExist?: boolean; + /** Filter by the object’s `defaultPrivileges` relation. */ + defaultPrivileges?: DatabaseToManyDefaultPrivilegeFilter; + /** `defaultPrivileges` exist. */ + defaultPrivilegesExist?: boolean; + /** Filter by the object’s `derives` relation. */ + derives?: DatabaseToManyDeriveFilter; + /** `derives` exist. */ + derivesExist?: boolean; + /** Filter by the object’s `domainTypes` relation. */ + domainTypes?: DatabaseToManyDomainTypeFilter; + /** `domainTypes` exist. */ + domainTypesExist?: boolean; + /** Filter by the object’s `embeddingChunks` relation. */ + embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; + /** `embeddingChunks` exist. */ + embeddingChunksExist?: boolean; + /** Filter by the object’s `enums` relation. */ + enums?: DatabaseToManyEnumFilter; + /** `enums` exist. */ + enumsExist?: boolean; + /** Filter by the object’s `exclusionConstraints` relation. */ + exclusionConstraints?: DatabaseToManyExclusionConstraintFilter; + /** `exclusionConstraints` exist. */ + exclusionConstraintsExist?: boolean; + /** Filter by the object’s `fieldBehaviors` relation. */ + fieldBehaviors?: DatabaseToManyFieldBehaviorFilter; + /** `fieldBehaviors` exist. */ + fieldBehaviorsExist?: boolean; + /** Filter by the object’s `fields` relation. */ + fields?: DatabaseToManyFieldFilter; + /** `fields` exist. */ + fieldsExist?: boolean; + /** Filter by the object’s `foreignKeyConstraintBehaviors` relation. */ + foreignKeyConstraintBehaviors?: DatabaseToManyForeignKeyConstraintBehaviorFilter; + /** `foreignKeyConstraintBehaviors` exist. */ + foreignKeyConstraintBehaviorsExist?: boolean; + /** Filter by the object’s `foreignKeyConstraints` relation. */ + foreignKeyConstraints?: DatabaseToManyForeignKeyConstraintFilter; + /** `foreignKeyConstraints` exist. */ + foreignKeyConstraintsExist?: boolean; + /** Filter by the object’s `fullTextSearches` relation. */ + fullTextSearches?: DatabaseToManyFullTextSearchFilter; + /** `fullTextSearches` exist. */ + fullTextSearchesExist?: boolean; + /** Filter by the object’s `functions` relation. */ + functions?: DatabaseToManyFunctionFilter; + /** `functions` exist. */ functionsExist?: boolean; /** Filter by the object’s `hash` field. */ hash?: UUIDFilter; @@ -17593,41 +19017,6 @@ export interface DatabaseFilter { /** `views` exist. */ viewsExist?: boolean; } -/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ -export interface JSONFilter { - /** Contained by the specified JSON. */ - containedBy?: Record; - /** Contains the specified JSON. */ - contains?: Record; - /** Contains all of the specified keys. */ - containsAllKeys?: string[]; - /** Contains any of the specified keys. */ - containsAnyKeys?: string[]; - /** Contains the specified key. */ - containsKey?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: Record; - /** Equal to the specified value. */ - equalTo?: Record; - /** Greater than the specified value. */ - greaterThan?: Record; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: Record; - /** Included in the specified list. */ - in?: Record[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: Record; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: Record; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: Record; - /** Not equal to the specified value. */ - notEqualTo?: Record; - /** Not included in the specified list. */ - notIn?: Record[]; -} /** A filter to be used against UUID List fields. All fields are combined with a logical ‘and.’ */ export interface UUIDListFilter { /** Any array item is equal to the specified value. */ @@ -17692,83 +19081,6 @@ export interface BooleanFilter { /** Not included in the specified list. */ notIn?: boolean[]; } -/** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ -export interface StringFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ - distinctFromInsensitive?: string; - /** Ends with the specified string (case-sensitive). */ - endsWith?: string; - /** Ends with the specified string (case-insensitive). */ - endsWithInsensitive?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Equal to the specified value (case-insensitive). */ - equalToInsensitive?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than the specified value (case-insensitive). */ - greaterThanInsensitive?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Greater than or equal to the specified value (case-insensitive). */ - greaterThanOrEqualToInsensitive?: string; - /** Included in the specified list. */ - in?: string[]; - /** Included in the specified list (case-insensitive). */ - inInsensitive?: string[]; - /** Contains the specified string (case-sensitive). */ - includes?: string; - /** Contains the specified string (case-insensitive). */ - includesInsensitive?: string; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than the specified value (case-insensitive). */ - lessThanInsensitive?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Less than or equal to the specified value (case-insensitive). */ - lessThanOrEqualToInsensitive?: string; - /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - like?: string; - /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - likeInsensitive?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ - notDistinctFromInsensitive?: string; - /** Does not end with the specified string (case-sensitive). */ - notEndsWith?: string; - /** Does not end with the specified string (case-insensitive). */ - notEndsWithInsensitive?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value (case-insensitive). */ - notEqualToInsensitive?: string; - /** Not included in the specified list. */ - notIn?: string[]; - /** Not included in the specified list (case-insensitive). */ - notInInsensitive?: string[]; - /** Does not contain the specified string (case-sensitive). */ - notIncludes?: string; - /** Does not contain the specified string (case-insensitive). */ - notIncludesInsensitive?: string; - /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLike?: string; - /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLikeInsensitive?: string; - /** Does not start with the specified string (case-sensitive). */ - notStartsWith?: string; - /** Does not start with the specified string (case-insensitive). */ - notStartsWithInsensitive?: string; - /** Starts with the specified string (case-sensitive). */ - startsWith?: string; - /** Starts with the specified string (case-insensitive). */ - startsWithInsensitive?: string; -} /** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ export interface IntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -17869,58 +19181,174 @@ export interface DomainFilter { tlsStatus?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +/** A filter to be used against `ManagedDomain` object types. All fields are combined with a logical ‘and.’ */ +export interface ManagedDomainFilter { + /** Filter by the object’s `allowPublicUsage` field. */ + allowPublicUsage?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ManagedDomainFilter[]; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `certStatus` field. */ + certStatus?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `domainEvents` relation. */ + domainEvents?: ManagedDomainToManyDomainEventFilter; + /** `domainEvents` exist. */ + domainEventsExist?: boolean; + /** Filter by the object’s `domainVerifications` relation. */ + domainVerifications?: ManagedDomainToManyDomainVerificationFilter; + /** `domainVerifications` exist. */ + domainVerificationsExist?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isWildcard` field. */ + isWildcard?: BooleanFilter; + /** Negates the expression. */ + not?: ManagedDomainFilter; + /** Checks for any expressions in this list. */ + or?: ManagedDomainFilter[]; + /** Filter by the object’s `tlsReadyAt` field. */ + tlsReadyAt?: DatetimeFilter; + /** Filter by the object’s `tlsStatus` field. */ + tlsStatus?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +/** A filter to be used against `Site` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteFilter { + /** Filter by the object’s `activeCommitId` field. */ + activeCommitId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SiteFilter[]; + /** Filter by the object’s `bucketId` field. */ + bucketId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `emailSiteIdentity` relation. */ + emailSiteIdentity?: EmailSiteIdentityFilter; + /** A related `emailSiteIdentity` exists. */ + emailSiteIdentityExists?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationMemberSlug` field. */ + installationMemberSlug?: StringFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: SiteFilter; + /** Checks for any expressions in this list. */ + or?: SiteFilter[]; + /** Filter by the object’s `pages` relation. */ + pages?: SiteToManyPageFilter; + /** `pages` exist. */ + pagesExist?: boolean; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `siteAppLinks` relation. */ + siteAppLinks?: SiteToManySiteAppLinkFilter; + /** `siteAppLinks` exist. */ + siteAppLinksExist?: boolean; + /** Filter by the object’s `siteDeepLinks` relation. */ + siteDeepLinks?: SiteToManySiteDeepLinkFilter; + /** `siteDeepLinks` exist. */ + siteDeepLinksExist?: boolean; + /** Filter by the object’s `siteErrorPages` relation. */ + siteErrorPages?: SiteToManySiteErrorPageFilter; + /** `siteErrorPages` exist. */ + siteErrorPagesExist?: boolean; + /** Filter by the object’s `siteMetadatum` relation. */ + siteMetadatum?: SiteMetadatumFilter; + /** A related `siteMetadatum` exists. */ + siteMetadatumExists?: boolean; + /** Filter by the object’s `siteModules` relation. */ + siteModules?: SiteToManySiteModuleFilter; + /** `siteModules` exist. */ + siteModulesExist?: boolean; + /** Filter by the object’s `siteThemes` relation. */ + siteThemes?: SiteToManySiteThemeFilter; + /** `siteThemes` exist. */ + siteThemesExist?: boolean; + /** Filter by the object’s `siteWebConfig` relation. */ + siteWebConfig?: SiteWebConfigFilter; + /** A related `siteWebConfig` exists. */ + siteWebConfigExists?: boolean; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `ManagedDomain` object types. All fields are combined with a logical ‘and.’ */ -export interface ManagedDomainFilter { - /** Filter by the object’s `allowPublicUsage` field. */ - allowPublicUsage?: BooleanFilter; +/** A filter to be used against `EmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: ManagedDomainFilter[]; - /** Filter by the object’s `annotations` field. */ - annotations?: JSONFilter; - /** Filter by the object’s `certStatus` field. */ - certStatus?: StringFilter; + and?: EmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `domainEvents` relation. */ - domainEvents?: ManagedDomainToManyDomainEventFilter; - /** `domainEvents` exist. */ - domainEventsExist?: boolean; - /** Filter by the object’s `domainVerifications` relation. */ - domainVerifications?: ManagedDomainToManyDomainVerificationFilter; - /** `domainVerifications` exist. */ - domainVerificationsExist?: boolean; + /** Filter by the object’s `emailIdentitiesByProviderAccountId` relation. */ + emailIdentitiesByProviderAccountId?: EmailProviderAccountToManyEmailIdentityFilter; + /** `emailIdentitiesByProviderAccountId` exist. */ + emailIdentitiesByProviderAccountIdExist?: boolean; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: ManagedDomainFilter; + not?: EmailProviderAccountFilter; /** Checks for any expressions in this list. */ - or?: ManagedDomainFilter[]; - /** Filter by the object’s `tlsReadyAt` field. */ - tlsReadyAt?: DatetimeFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; + or?: EmailProviderAccountFilter[]; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; + and?: PlatformApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; /** Filter by the object’s `config` field. */ @@ -17936,11 +19364,11 @@ export interface PlatformApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: PlatformApisFilter; + not?: PlatformApiFilter; /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; + or?: PlatformApiFilter[]; /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; /** `platformApiSchemasByApiId` exist. */ platformApiSchemasByApiIdExist?: boolean; /** Filter by the object’s `platformApiSettingByApiId` relation. */ @@ -18068,6 +19496,10 @@ export interface PlatformSiteFilter { not?: PlatformSiteFilter; /** Checks for any expressions in this list. */ or?: PlatformSiteFilter[]; + /** Filter by the object’s `platformEmailSiteIdentityBySiteId` relation. */ + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentityFilter; + /** A related `platformEmailSiteIdentityBySiteId` exists. */ + platformEmailSiteIdentityBySiteIdExists?: boolean; /** Filter by the object’s `platformPagesBySiteId` relation. */ platformPagesBySiteId?: PlatformSiteToManyPlatformPageFilter; /** `platformPagesBySiteId` exist. */ @@ -18107,79 +19539,55 @@ export interface PlatformSiteFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Site` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteFilter { - /** Filter by the object’s `activeCommitId` field. */ - activeCommitId?: UUIDFilter; +/** A filter to be used against `PlatformEmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: SiteFilter[]; - /** Filter by the object’s `bucketId` field. */ - bucketId?: UUIDFilter; + and?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `installationMemberSlug` field. */ - installationMemberSlug?: StringFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: SiteFilter; + not?: PlatformEmailProviderAccountFilter; /** Checks for any expressions in this list. */ - or?: SiteFilter[]; - /** Filter by the object’s `pages` relation. */ - pages?: SiteToManyPageFilter; - /** `pages` exist. */ - pagesExist?: boolean; - /** Filter by the object’s `resourceId` field. */ - resourceId?: UUIDFilter; - /** Filter by the object’s `siteAppLinks` relation. */ - siteAppLinks?: SiteToManySiteAppLinkFilter; - /** `siteAppLinks` exist. */ - siteAppLinksExist?: boolean; - /** Filter by the object’s `siteDeepLinks` relation. */ - siteDeepLinks?: SiteToManySiteDeepLinkFilter; - /** `siteDeepLinks` exist. */ - siteDeepLinksExist?: boolean; - /** Filter by the object’s `siteErrorPages` relation. */ - siteErrorPages?: SiteToManySiteErrorPageFilter; - /** `siteErrorPages` exist. */ - siteErrorPagesExist?: boolean; - /** Filter by the object’s `siteMetadatum` relation. */ - siteMetadatum?: SiteMetadatumFilter; - /** A related `siteMetadatum` exists. */ - siteMetadatumExists?: boolean; - /** Filter by the object’s `siteModules` relation. */ - siteModules?: SiteToManySiteModuleFilter; - /** `siteModules` exist. */ - siteModulesExist?: boolean; - /** Filter by the object’s `siteThemes` relation. */ - siteThemes?: SiteToManySiteThemeFilter; - /** `siteThemes` exist. */ - siteThemesExist?: boolean; - /** Filter by the object’s `siteWebConfig` relation. */ - siteWebConfig?: SiteWebConfigFilter; - /** A related `siteWebConfig` exists. */ - siteWebConfigExists?: boolean; - /** Filter by the object’s `title` field. */ - title?: StringFilter; + or?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. */ + platformEmailIdentitiesByProviderAccountId?: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter; + /** `platformEmailIdentitiesByProviderAccountId` exist. */ + platformEmailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; } /** A filter to be used against `ApiSetting` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18223,12 +19631,82 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `SiteMetadatum` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteMetadatumFilter { + /** Checks for all expressions in this list. */ + and?: SiteMetadatumFilter[]; + /** Filter by the object’s `appleTouchIcon` field. */ + appleTouchIcon?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `canonicalUrl` field. */ + canonicalUrl?: StringFilter; + /** Filter by the object’s `commitId` field. */ + commitId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `favicon` field. */ + favicon?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `logo` field. */ + logo?: ConstructiveInternalTypeImageFilter; + /** Negates the expression. */ + not?: SiteMetadatumFilter; + /** Filter by the object’s `ogImage` field. */ + ogImage?: ConstructiveInternalTypeImageFilter; + /** Checks for any expressions in this list. */ + or?: SiteMetadatumFilter[]; + /** Filter by the object’s `robots` field. */ + robots?: StringFilter; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `SiteWebConfig` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteWebConfigFilter { + /** Checks for all expressions in this list. */ + and?: SiteWebConfigFilter[]; + /** Filter by the object’s `cleanUrls` field. */ + cleanUrls?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `indexDocument` field. */ + indexDocument?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Negates the expression. */ + not?: SiteWebConfigFilter; + /** Checks for any expressions in this list. */ + or?: SiteWebConfigFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `spaFallback` field. */ + spaFallback?: BooleanFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformApiSetting` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18277,7 +19755,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -18359,76 +19837,6 @@ export interface PlatformSiteWebConfigFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `SiteMetadatum` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteMetadatumFilter { - /** Checks for all expressions in this list. */ - and?: SiteMetadatumFilter[]; - /** Filter by the object’s `appleTouchIcon` field. */ - appleTouchIcon?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `canonicalUrl` field. */ - canonicalUrl?: StringFilter; - /** Filter by the object’s `commitId` field. */ - commitId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `favicon` field. */ - favicon?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `logo` field. */ - logo?: ConstructiveInternalTypeImageFilter; - /** Negates the expression. */ - not?: SiteMetadatumFilter; - /** Filter by the object’s `ogImage` field. */ - ogImage?: ConstructiveInternalTypeImageFilter; - /** Checks for any expressions in this list. */ - or?: SiteMetadatumFilter[]; - /** Filter by the object’s `robots` field. */ - robots?: StringFilter; - /** Filter by the object’s `site` relation. */ - site?: SiteFilter; - /** Filter by the object’s `siteId` field. */ - siteId?: UUIDFilter; - /** Filter by the object’s `storeId` field. */ - storeId?: UUIDFilter; - /** Filter by the object’s `title` field. */ - title?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** A filter to be used against `SiteWebConfig` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteWebConfigFilter { - /** Checks for all expressions in this list. */ - and?: SiteWebConfigFilter[]; - /** Filter by the object’s `cleanUrls` field. */ - cleanUrls?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `indexDocument` field. */ - indexDocument?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Negates the expression. */ - not?: SiteWebConfigFilter; - /** Checks for any expressions in this list. */ - or?: SiteWebConfigFilter[]; - /** Filter by the object’s `site` relation. */ - site?: SiteFilter; - /** Filter by the object’s `siteId` field. */ - siteId?: UUIDFilter; - /** Filter by the object’s `spaFallback` field. */ - spaFallback?: BooleanFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -18511,27 +19919,37 @@ export type ResolveRouteRecordSelect = { tlsStatus?: boolean; verificationStatus?: boolean; }; -export interface AcceptDatabaseTransferPayload { +export interface ApplyRlsPayload { + clientMutationId?: string | null; +} +export type ApplyRlsPayloadSelect = { + clientMutationId?: boolean; +}; +export interface AppsInstallAppPayload { + appEdge?: AppEdge | null; clientMutationId?: string | null; - result?: boolean | null; + result?: App | null; } -export type AcceptDatabaseTransferPayloadSelect = { +export type AppsInstallAppPayloadSelect = { + appEdge?: { + select: AppEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; + result?: { + select: AppSelect; + }; }; -export interface ApplyRlsPayload { +export interface AppsUninstallAppPayload { clientMutationId?: string | null; } -export type ApplyRlsPayloadSelect = { +export type AppsUninstallAppPayloadSelect = { clientMutationId?: boolean; }; -export interface CancelDatabaseTransferPayload { +export interface AppsUpgradeAppPayload { clientMutationId?: string | null; - result?: boolean | null; } -export type CancelDatabaseTransferPayloadSelect = { +export type AppsUpgradeAppPayloadSelect = { clientMutationId?: boolean; - result?: boolean; }; export interface DomainsAssignSubdomainPayload { clientMutationId?: string | null; @@ -18593,14 +20011,6 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface RejectDatabaseTransferPayload { - clientMutationId?: string | null; - result?: boolean | null; -} -export type RejectDatabaseTransferPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; export interface RequestDatabasePayload { clientMutationId?: string | null; result?: DatabaseProvisionModule | null; @@ -18627,6 +20037,51 @@ export type SitesProvisionStaticSitePayloadSelect = { select: PlatformRouteSelect; }; }; +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type CreateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type UpdateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type DeleteApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -18717,48 +20172,93 @@ export type DeleteApiSettingPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface CreateAppComponentPayload { + /** The `AppComponent` that was created by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type CreateAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppComponentPayload { + /** The `AppComponent` that was updated by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppComponentPayload { + /** The `AppComponent` that was deleted by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppPayload { + /** The `App` that was created by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type CreateApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type CreateAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface UpdateAppPayload { + /** The `App` that was updated by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type UpdateApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type UpdateAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface DeleteAppPayload { + /** The `App` that was deleted by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type DeleteApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type DeleteAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; @@ -19302,6 +20802,141 @@ export type DeleteDomainVerificationPayloadSelect = { select: DomainVerificationEdgeSelect; }; }; +export interface CreateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was created by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type CreateEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface UpdateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was updated by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type UpdateEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface DeleteEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was deleted by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type DeleteEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface CreateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was created by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type CreateEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface UpdateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was updated by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type UpdateEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface DeleteEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was deleted by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type DeleteEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface CreateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was created by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type CreateEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; +export interface UpdateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was updated by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type UpdateEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; +export interface DeleteEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was deleted by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type DeleteEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; export interface CreateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was created by this mutation. */ @@ -20022,6 +21657,51 @@ export type DeletePartitionPayloadSelect = { select: PartitionEdgeSelect; }; }; +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type CreatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type UpdatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type DeletePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -20112,51 +21792,6 @@ export type DeletePlatformApiSettingPayloadSelect = { select: PlatformApiSettingEdgeSelect; }; }; -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type CreatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type UpdatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type DeletePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -20337,6 +21972,141 @@ export type DeletePlatformDomainVerificationPayloadSelect = { select: PlatformDomainVerificationEdgeSelect; }; }; +export interface CreatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was created by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type CreatePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface UpdatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was updated by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type UpdatePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface DeletePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was deleted by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type DeletePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface CreatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was created by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type CreatePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface UpdatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was updated by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type UpdatePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface DeletePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was deleted by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type DeletePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface CreatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was created by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type CreatePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; +export interface UpdatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was updated by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type UpdatePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; +export interface DeletePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was deleted by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type DeletePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; export interface CreatePlatformManagedDomainPayload { clientMutationId?: string | null; /** The `PlatformManagedDomain` that was created by this mutation. */ @@ -22137,6 +23907,18 @@ export type DeleteWebauthnSettingPayloadSelect = { select: WebauthnSettingEdgeSelect; }; }; +/** A `App` edge in the connection. */ +export interface AppEdge { + cursor?: string | null; + /** The `App` at the end of the edge. */ + node?: App | null; +} +export type AppEdgeSelect = { + cursor?: boolean; + node?: { + select: AppSelect; + }; +}; /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -22227,7 +24009,7 @@ export interface DatabaseProvisionModule { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string | null; id: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules: Record; /** Additional configuration options for provisioning */ options: Record; @@ -22262,6 +24044,18 @@ export type DatabaseProvisionModuleSelect = { subdomain?: boolean; updatedAt?: boolean; }; +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} +export type ApiEdgeSelect = { + cursor?: boolean; + node?: { + select: ApiSelect; + }; +}; /** A `ApiSchema` edge in the connection. */ export interface ApiSchemaEdge { cursor?: string | null; @@ -22286,16 +24080,16 @@ export type ApiSettingEdgeSelect = { select: ApiSettingSelect; }; }; -/** A `Apis` edge in the connection. */ -export interface ApisEdge { +/** A `AppComponent` edge in the connection. */ +export interface AppComponentEdge { cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; + /** The `AppComponent` at the end of the edge. */ + node?: AppComponent | null; } -export type ApisEdgeSelect = { +export type AppComponentEdgeSelect = { cursor?: boolean; node?: { - select: ApisSelect; + select: AppComponentSelect; }; }; /** A `CheckConstraint` edge in the connection. */ @@ -22430,6 +24224,42 @@ export type DomainVerificationEdgeSelect = { select: DomainVerificationSelect; }; }; +/** A `EmailIdentity` edge in the connection. */ +export interface EmailIdentityEdge { + cursor?: string | null; + /** The `EmailIdentity` at the end of the edge. */ + node?: EmailIdentity | null; +} +export type EmailIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailIdentitySelect; + }; +}; +/** A `EmailProviderAccount` edge in the connection. */ +export interface EmailProviderAccountEdge { + cursor?: string | null; + /** The `EmailProviderAccount` at the end of the edge. */ + node?: EmailProviderAccount | null; +} +export type EmailProviderAccountEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailProviderAccountSelect; + }; +}; +/** A `EmailSiteIdentity` edge in the connection. */ +export interface EmailSiteIdentityEdge { + cursor?: string | null; + /** The `EmailSiteIdentity` at the end of the edge. */ + node?: EmailSiteIdentity | null; +} +export type EmailSiteIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailSiteIdentitySelect; + }; +}; /** A `EmbeddingChunk` edge in the connection. */ export interface EmbeddingChunkEdge { cursor?: string | null; @@ -22622,6 +24452,18 @@ export type PartitionEdgeSelect = { select: PartitionSelect; }; }; +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { + cursor?: string | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; +} +export type PlatformApiEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformApiSelect; + }; +}; /** A `PlatformApiSchema` edge in the connection. */ export interface PlatformApiSchemaEdge { cursor?: string | null; @@ -22646,18 +24488,6 @@ export type PlatformApiSettingEdgeSelect = { select: PlatformApiSettingSelect; }; }; -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { - cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; -} -export type PlatformApisEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformApisSelect; - }; -}; /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { cursor?: string | null; @@ -22694,6 +24524,42 @@ export type PlatformDomainVerificationEdgeSelect = { select: PlatformDomainVerificationSelect; }; }; +/** A `PlatformEmailIdentity` edge in the connection. */ +export interface PlatformEmailIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailIdentity` at the end of the edge. */ + node?: PlatformEmailIdentity | null; +} +export type PlatformEmailIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailIdentitySelect; + }; +}; +/** A `PlatformEmailProviderAccount` edge in the connection. */ +export interface PlatformEmailProviderAccountEdge { + cursor?: string | null; + /** The `PlatformEmailProviderAccount` at the end of the edge. */ + node?: PlatformEmailProviderAccount | null; +} +export type PlatformEmailProviderAccountEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailProviderAccountSelect; + }; +}; +/** A `PlatformEmailSiteIdentity` edge in the connection. */ +export interface PlatformEmailSiteIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailSiteIdentity` at the end of the edge. */ + node?: PlatformEmailSiteIdentity | null; +} +export type PlatformEmailSiteIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailSiteIdentitySelect; + }; +}; /** A `PlatformManagedDomain` edge in the connection. */ export interface PlatformManagedDomainEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/api/orm/models/apis.ts b/sdk/constructive-react/src/api/orm/models/api.ts similarity index 60% rename from sdk/constructive-sdk/src/api/orm/models/apis.ts rename to sdk/constructive-react/src/api/orm/models/api.ts index a62444db0f..4d60695731 100644 --- a/sdk/constructive-sdk/src/api/orm/models/apis.ts +++ b/sdk/constructive-react/src/api/orm/models/api.ts @@ -1,5 +1,5 @@ /** - * Apis model for ORM client + * Api 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 { - Apis, - ApisWithRelations, - ApisSelect, - ApisFilter, - ApisOrderBy, - CreateApisInput, - UpdateApisInput, - ApisPatch, + Api, + ApiWithRelations, + ApiSelect, + ApiFilter, + ApiOrderBy, + CreateApiInput, + UpdateApiInput, + ApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ApisModel { +export class ApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apises: ConnectionResult>; + apis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class ApisModel { before: args?.before, offset: args?.offset, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apises', + operationName: 'Api', + fieldName: 'apis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: { @@ -124,91 +124,91 @@ export class ApisModel { }, first: 1, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'Apis', - 'createApis', - 'apis', + 'Api', + 'createApi', + 'api', args.select, args.data, - 'CreateApisInput', + 'CreateApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'createApis', + operationName: 'Api', + fieldName: 'createApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ApisPatch + ApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'Apis', - 'updateApis', - 'apis', + 'Api', + 'updateApi', + 'api', args.select, args.where.id, args.data, - 'UpdateApisInput', + 'UpdateApiInput', 'id', - 'apisPatch', + 'apiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'updateApis', + operationName: 'Api', + fieldName: 'updateApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class ApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'Apis', - 'deleteApis', - 'apis', + 'Api', + 'deleteApi', + 'api', { id: args.where.id, }, - 'DeleteApisInput', + 'DeleteApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'deleteApis', + operationName: 'Api', + fieldName: 'deleteApi', document, variables, }); diff --git a/sdk/constructive-react/src/api/orm/models/app.ts b/sdk/constructive-react/src/api/orm/models/app.ts new file mode 100644 index 0000000000..049d73f6c0 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/app.ts @@ -0,0 +1,245 @@ +/** + * App 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 { + App, + AppWithRelations, + AppSelect, + AppFilter, + AppOrderBy, + CreateAppInput, + UpdateAppInput, + AppPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + apps: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'App', + 'apps', + 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, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'apps', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + app: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'App', + 'apps', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'app', + document, + variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + app: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'App', + 'apps', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'app', + document, + variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'App', + 'createApp', + 'app', + args.select, + args.data, + 'CreateAppInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'createApp', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'App', + 'updateApp', + 'app', + args.select, + args.where.id, + args.data, + 'UpdateAppInput', + 'id', + 'appPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'updateApp', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'App', + 'deleteApp', + 'app', + { + id: args.where.id, + }, + 'DeleteAppInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'deleteApp', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/appComponent.ts b/sdk/constructive-react/src/api/orm/models/appComponent.ts new file mode 100644 index 0000000000..2aa5994098 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/appComponent.ts @@ -0,0 +1,245 @@ +/** + * AppComponent 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 { + AppComponent, + AppComponentWithRelations, + AppComponentSelect, + AppComponentFilter, + AppComponentOrderBy, + CreateAppComponentInput, + UpdateAppComponentInput, + AppComponentPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppComponentModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppComponent', + 'appComponents', + 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, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppComponent', + 'appComponents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponent', + document, + variables, + transform: (data: { + appComponents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appComponent: data.appComponents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppComponent', + 'appComponents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponent', + document, + variables, + transform: (data: { + appComponents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appComponent: data.appComponents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppComponent', + 'createAppComponent', + 'appComponent', + args.select, + args.data, + 'CreateAppComponentInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'createAppComponent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppComponentPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppComponent', + 'updateAppComponent', + 'appComponent', + args.select, + args.where.id, + args.data, + 'UpdateAppComponentInput', + 'id', + 'appComponentPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'updateAppComponent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppComponent', + 'deleteAppComponent', + 'appComponent', + { + id: args.where.id, + }, + 'DeleteAppComponentInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'deleteAppComponent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/astMigration.ts b/sdk/constructive-react/src/api/orm/models/astMigration.ts deleted file mode 100644 index bfcc5f455a..0000000000 --- a/sdk/constructive-react/src/api/orm/models/astMigration.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * AstMigration 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 { - AstMigration, - AstMigrationWithRelations, - AstMigrationSelect, - AstMigrationFilter, - AstMigrationOrderBy, - CreateAstMigrationInput, - UpdateAstMigrationInput, - AstMigrationPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AstMigrationModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigrations: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'AstMigration', - 'astMigrations', - 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, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigrations', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigration: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AstMigration', - 'astMigrations', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigration', - document, - variables, - transform: (data: { - astMigrations?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - astMigration: data.astMigrations?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: number; - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigration: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AstMigration', - 'astMigrations', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigration', - document, - variables, - transform: (data: { - astMigrations?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - astMigration: data.astMigrations?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAstMigration: { - astMigration: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AstMigration', - 'createAstMigration', - 'astMigration', - args.select, - args.data, - 'CreateAstMigrationInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AstMigration', - fieldName: 'createAstMigration', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/api/orm/models/emailIdentity.ts b/sdk/constructive-react/src/api/orm/models/emailIdentity.ts new file mode 100644 index 0000000000..ac0262d9d9 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/emailIdentity.ts @@ -0,0 +1,245 @@ +/** + * EmailIdentity 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 { + EmailIdentity, + EmailIdentityWithRelations, + EmailIdentitySelect, + EmailIdentityFilter, + EmailIdentityOrderBy, + CreateEmailIdentityInput, + UpdateEmailIdentityInput, + EmailIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailIdentity', + 'emailIdentities', + 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, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailIdentity', + 'emailIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentity', + document, + variables, + transform: (data: { + emailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailIdentity: data.emailIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailIdentity', + 'emailIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentity', + document, + variables, + transform: (data: { + emailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailIdentity: data.emailIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailIdentity', + 'createEmailIdentity', + 'emailIdentity', + args.select, + args.data, + 'CreateEmailIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'createEmailIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailIdentity', + 'updateEmailIdentity', + 'emailIdentity', + args.select, + args.where.id, + args.data, + 'UpdateEmailIdentityInput', + 'id', + 'emailIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'updateEmailIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailIdentity', + 'deleteEmailIdentity', + 'emailIdentity', + { + id: args.where.id, + }, + 'DeleteEmailIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'deleteEmailIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/emailProviderAccount.ts b/sdk/constructive-react/src/api/orm/models/emailProviderAccount.ts new file mode 100644 index 0000000000..a720e8d015 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/emailProviderAccount.ts @@ -0,0 +1,247 @@ +/** + * EmailProviderAccount 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 { + EmailProviderAccount, + EmailProviderAccountWithRelations, + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy, + CreateEmailProviderAccountInput, + UpdateEmailProviderAccountInput, + EmailProviderAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailProviderAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + 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, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccount', + document, + variables, + transform: (data: { + emailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailProviderAccount: data.emailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccount', + document, + variables, + transform: (data: { + emailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailProviderAccount: data.emailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailProviderAccount', + 'createEmailProviderAccount', + 'emailProviderAccount', + args.select, + args.data, + 'CreateEmailProviderAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'createEmailProviderAccount', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailProviderAccountPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailProviderAccount', + 'updateEmailProviderAccount', + 'emailProviderAccount', + args.select, + args.where.id, + args.data, + 'UpdateEmailProviderAccountInput', + 'id', + 'emailProviderAccountPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'updateEmailProviderAccount', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailProviderAccount', + 'deleteEmailProviderAccount', + 'emailProviderAccount', + { + id: args.where.id, + }, + 'DeleteEmailProviderAccountInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'deleteEmailProviderAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/emailSiteIdentity.ts b/sdk/constructive-react/src/api/orm/models/emailSiteIdentity.ts new file mode 100644 index 0000000000..408d8ffa81 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/emailSiteIdentity.ts @@ -0,0 +1,245 @@ +/** + * EmailSiteIdentity 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 { + EmailSiteIdentity, + EmailSiteIdentityWithRelations, + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy, + CreateEmailSiteIdentityInput, + UpdateEmailSiteIdentityInput, + EmailSiteIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailSiteIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + 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, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentity', + document, + variables, + transform: (data: { + emailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailSiteIdentity: data.emailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentity', + document, + variables, + transform: (data: { + emailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailSiteIdentity: data.emailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailSiteIdentity', + 'createEmailSiteIdentity', + 'emailSiteIdentity', + args.select, + args.data, + 'CreateEmailSiteIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'createEmailSiteIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailSiteIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailSiteIdentity', + 'updateEmailSiteIdentity', + 'emailSiteIdentity', + args.select, + args.where.id, + args.data, + 'UpdateEmailSiteIdentityInput', + 'id', + 'emailSiteIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'updateEmailSiteIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailSiteIdentity', + 'deleteEmailSiteIdentity', + 'emailSiteIdentity', + { + id: args.where.id, + }, + 'DeleteEmailSiteIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'deleteEmailSiteIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/index.ts b/sdk/constructive-react/src/api/orm/models/index.ts index a947c4f65f..e423940bea 100644 --- a/sdk/constructive-react/src/api/orm/models/index.ts +++ b/sdk/constructive-react/src/api/orm/models/index.ts @@ -3,10 +3,11 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ApiModel } from './api'; export { ApiSchemaModel } from './apiSchema'; export { ApiSettingModel } from './apiSetting'; -export { ApisModel } from './apis'; -export { AstMigrationModel } from './astMigration'; +export { AppComponentModel } from './appComponent'; +export { AppModel } from './app'; export { CheckConstraintModel } from './checkConstraint'; export { CompositeTypeModel } from './compositeType'; export { CorsSettingModel } from './corsSetting'; @@ -19,6 +20,9 @@ export { DomainModel } from './domain'; export { DomainEventModel } from './domainEvent'; export { DomainTypeModel } from './domainType'; export { DomainVerificationModel } from './domainVerification'; +export { EmailIdentityModel } from './emailIdentity'; +export { EmailProviderAccountModel } from './emailProviderAccount'; +export { EmailSiteIdentityModel } from './emailSiteIdentity'; export { EmbeddingChunkModel } from './embeddingChunk'; export { EnumModel } from './enum'; export { ExclusionConstraintModel } from './exclusionConstraint'; @@ -35,13 +39,16 @@ export { ManagedDomainModel } from './managedDomain'; export { NodeTypeRegistryModel } from './nodeTypeRegistry'; export { PageModel } from './page'; export { PartitionModel } from './partition'; +export { PlatformApiModel } from './platformApi'; export { PlatformApiSchemaModel } from './platformApiSchema'; export { PlatformApiSettingModel } from './platformApiSetting'; -export { PlatformApisModel } from './platformApis'; export { PlatformCorsSettingModel } from './platformCorsSetting'; export { PlatformDomainModel } from './platformDomain'; export { PlatformDomainEventModel } from './platformDomainEvent'; export { PlatformDomainVerificationModel } from './platformDomainVerification'; +export { PlatformEmailIdentityModel } from './platformEmailIdentity'; +export { PlatformEmailProviderAccountModel } from './platformEmailProviderAccount'; +export { PlatformEmailSiteIdentityModel } from './platformEmailSiteIdentity'; export { PlatformManagedDomainModel } from './platformManagedDomain'; export { PlatformPageModel } from './platformPage'; export { PlatformSiteAppLinkModel } from './platformSiteAppLink'; @@ -69,7 +76,6 @@ export { SiteModuleModel } from './siteModule'; export { SiteThemeModel } from './siteTheme'; export { SiteWebConfigModel } from './siteWebConfig'; export { SpatialRelationModel } from './spatialRelation'; -export { SqlActionModel } from './sqlAction'; export { TableBehaviorModel } from './tableBehavior'; export { TableModel } from './table'; export { TableGrantModel } from './tableGrant'; diff --git a/sdk/constructive-react/src/api/orm/models/platformApis.ts b/sdk/constructive-react/src/api/orm/models/platformApi.ts similarity index 54% rename from sdk/constructive-react/src/api/orm/models/platformApis.ts rename to sdk/constructive-react/src/api/orm/models/platformApi.ts index 43cd25c9d2..3eee59e6c8 100644 --- a/sdk/constructive-react/src/api/orm/models/platformApis.ts +++ b/sdk/constructive-react/src/api/orm/models/platformApi.ts @@ -1,5 +1,5 @@ /** - * PlatformApis model for ORM client + * PlatformApi 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 { - PlatformApis, - PlatformApisWithRelations, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, - CreatePlatformApisInput, - UpdatePlatformApisInput, - PlatformApisPatch, + PlatformApi, + PlatformApiWithRelations, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, + CreatePlatformApiInput, + UpdatePlatformApiInput, + PlatformApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PlatformApisModel { +export class PlatformApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApises: ConnectionResult>; + platformApis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PlatformApisModel { before: args?.before, offset: args?.offset, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApises', + operationName: 'PlatformApi', + fieldName: 'platformApis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: { @@ -124,91 +124,91 @@ export class PlatformApisModel { }, first: 1, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PlatformApis', - 'createPlatformApis', - 'platformApis', + 'PlatformApi', + 'createPlatformApi', + 'platformApi', args.select, args.data, - 'CreatePlatformApisInput', + 'CreatePlatformApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'createPlatformApis', + operationName: 'PlatformApi', + fieldName: 'createPlatformApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PlatformApisPatch + PlatformApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PlatformApis', - 'updatePlatformApis', - 'platformApis', + 'PlatformApi', + 'updatePlatformApi', + 'platformApi', args.select, args.where.id, args.data, - 'UpdatePlatformApisInput', + 'UpdatePlatformApiInput', 'id', - 'platformApisPatch', + 'platformApiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'updatePlatformApis', + operationName: 'PlatformApi', + fieldName: 'updatePlatformApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PlatformApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PlatformApis', - 'deletePlatformApis', - 'platformApis', + 'PlatformApi', + 'deletePlatformApi', + 'platformApi', { id: args.where.id, }, - 'DeletePlatformApisInput', + 'DeletePlatformApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'deletePlatformApis', + operationName: 'PlatformApi', + fieldName: 'deletePlatformApi', document, variables, }); diff --git a/sdk/constructive-react/src/api/orm/models/platformEmailIdentity.ts b/sdk/constructive-react/src/api/orm/models/platformEmailIdentity.ts new file mode 100644 index 0000000000..8cc262f318 --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/platformEmailIdentity.ts @@ -0,0 +1,247 @@ +/** + * PlatformEmailIdentity 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 { + PlatformEmailIdentity, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy, + CreatePlatformEmailIdentityInput, + UpdatePlatformEmailIdentityInput, + PlatformEmailIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + 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, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentity', + document, + variables, + transform: (data: { + platformEmailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailIdentity: data.platformEmailIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentity', + document, + variables, + transform: (data: { + platformEmailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailIdentity: data.platformEmailIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailIdentity', + 'createPlatformEmailIdentity', + 'platformEmailIdentity', + args.select, + args.data, + 'CreatePlatformEmailIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'createPlatformEmailIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailIdentity', + 'updatePlatformEmailIdentity', + 'platformEmailIdentity', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailIdentityInput', + 'id', + 'platformEmailIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'updatePlatformEmailIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailIdentity', + 'deletePlatformEmailIdentity', + 'platformEmailIdentity', + { + id: args.where.id, + }, + 'DeletePlatformEmailIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'deletePlatformEmailIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/platformEmailProviderAccount.ts b/sdk/constructive-react/src/api/orm/models/platformEmailProviderAccount.ts new file mode 100644 index 0000000000..07c760f30b --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/platformEmailProviderAccount.ts @@ -0,0 +1,261 @@ +/** + * PlatformEmailProviderAccount 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 { + PlatformEmailProviderAccount, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy, + CreatePlatformEmailProviderAccountInput, + UpdatePlatformEmailProviderAccountInput, + PlatformEmailProviderAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailProviderAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + 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, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccount', + document, + variables, + transform: (data: { + platformEmailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailProviderAccount: data.platformEmailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccount', + document, + variables, + transform: (data: { + platformEmailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailProviderAccount: data.platformEmailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailProviderAccount', + 'createPlatformEmailProviderAccount', + 'platformEmailProviderAccount', + args.select, + args.data, + 'CreatePlatformEmailProviderAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'createPlatformEmailProviderAccount', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailProviderAccountPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailProviderAccount', + 'updatePlatformEmailProviderAccount', + 'platformEmailProviderAccount', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailProviderAccountInput', + 'id', + 'platformEmailProviderAccountPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'updatePlatformEmailProviderAccount', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailProviderAccount', + 'deletePlatformEmailProviderAccount', + 'platformEmailProviderAccount', + { + id: args.where.id, + }, + 'DeletePlatformEmailProviderAccountInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'deletePlatformEmailProviderAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/platformEmailSiteIdentity.ts b/sdk/constructive-react/src/api/orm/models/platformEmailSiteIdentity.ts new file mode 100644 index 0000000000..bc3ff67daa --- /dev/null +++ b/sdk/constructive-react/src/api/orm/models/platformEmailSiteIdentity.ts @@ -0,0 +1,247 @@ +/** + * PlatformEmailSiteIdentity 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 { + PlatformEmailSiteIdentity, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy, + CreatePlatformEmailSiteIdentityInput, + UpdatePlatformEmailSiteIdentityInput, + PlatformEmailSiteIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailSiteIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + 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, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentity', + document, + variables, + transform: (data: { + platformEmailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailSiteIdentity: data.platformEmailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentity', + document, + variables, + transform: (data: { + platformEmailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailSiteIdentity: data.platformEmailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailSiteIdentity', + 'createPlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + args.select, + args.data, + 'CreatePlatformEmailSiteIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'createPlatformEmailSiteIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailSiteIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailSiteIdentity', + 'updatePlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailSiteIdentityInput', + 'id', + 'platformEmailSiteIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'updatePlatformEmailSiteIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailSiteIdentity', + 'deletePlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + { + id: args.where.id, + }, + 'DeletePlatformEmailSiteIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'deletePlatformEmailSiteIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/api/orm/models/sqlAction.ts b/sdk/constructive-react/src/api/orm/models/sqlAction.ts deleted file mode 100644 index 74b4418688..0000000000 --- a/sdk/constructive-react/src/api/orm/models/sqlAction.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * SqlAction 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 { - SqlAction, - SqlActionWithRelations, - SqlActionSelect, - SqlActionFilter, - SqlActionOrderBy, - CreateSqlActionInput, - UpdateSqlActionInput, - SqlActionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class SqlActionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlActions: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'SqlAction', - 'sqlActions', - 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, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlActions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlAction: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'SqlAction', - 'sqlActions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlAction', - document, - variables, - transform: (data: { - sqlActions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - sqlAction: data.sqlActions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: number; - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlAction: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'SqlAction', - 'sqlActions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlAction', - document, - variables, - transform: (data: { - sqlActions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - sqlAction: data.sqlActions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createSqlAction: { - sqlAction: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'SqlAction', - 'createSqlAction', - 'sqlAction', - args.select, - args.data, - 'CreateSqlActionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'SqlAction', - fieldName: 'createSqlAction', - document, - variables, - }); - } -} diff --git a/sdk/constructive-react/src/api/orm/mutation/index.ts b/sdk/constructive-react/src/api/orm/mutation/index.ts index 2629f518b2..2dd79f41bf 100644 --- a/sdk/constructive-react/src/api/orm/mutation/index.ts +++ b/sdk/constructive-react/src/api/orm/mutation/index.ts @@ -7,49 +7,52 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { - AcceptDatabaseTransferInput, ApplyRlsInput, - CancelDatabaseTransferInput, + AppsInstallAppInput, + AppsUninstallAppInput, + AppsUpgradeAppInput, DomainsAssignSubdomainInput, PlatformDomainsAssignSubdomainInput, PlatformSitesProvisionStaticSiteInput, ProvisionBucketInput, - RejectDatabaseTransferInput, RequestDatabaseInput, SetFieldOrderInput, SitesProvisionStaticSiteInput, - AcceptDatabaseTransferPayload, ApplyRlsPayload, - CancelDatabaseTransferPayload, + AppsInstallAppPayload, + AppsUninstallAppPayload, + AppsUpgradeAppPayload, DomainsAssignSubdomainPayload, PlatformDomainsAssignSubdomainPayload, PlatformSitesProvisionStaticSitePayload, ProvisionBucketPayload, - RejectDatabaseTransferPayload, RequestDatabasePayload, SetFieldOrderPayload, SitesProvisionStaticSitePayload, - AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, - CancelDatabaseTransferPayloadSelect, + AppsInstallAppPayloadSelect, + AppsUninstallAppPayloadSelect, + AppsUpgradeAppPayloadSelect, DomainsAssignSubdomainPayloadSelect, PlatformDomainsAssignSubdomainPayloadSelect, PlatformSitesProvisionStaticSitePayloadSelect, ProvisionBucketPayloadSelect, - RejectDatabaseTransferPayloadSelect, RequestDatabasePayloadSelect, SetFieldOrderPayloadSelect, SitesProvisionStaticSitePayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface AcceptDatabaseTransferVariables { - input: AcceptDatabaseTransferInput; -} export interface ApplyRlsVariables { input: ApplyRlsInput; } -export interface CancelDatabaseTransferVariables { - input: CancelDatabaseTransferInput; +export interface AppsInstallAppVariables { + input: AppsInstallAppInput; +} +export interface AppsUninstallAppVariables { + input: AppsUninstallAppInput; +} +export interface AppsUpgradeAppVariables { + input: AppsUpgradeAppInput; } export interface DomainsAssignSubdomainVariables { input: DomainsAssignSubdomainInput; @@ -70,9 +73,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -export interface RejectDatabaseTransferVariables { - input: RejectDatabaseTransferInput; -} /** * Variables for requestDatabase * Requests a database and returns a ticket (database_provision_module row) to poll. @@ -94,91 +94,120 @@ export interface SitesProvisionStaticSiteVariables { } export function createMutationOperations(client: OrmClient) { return { - acceptDatabaseTransfer: ( - args: AcceptDatabaseTransferVariables, + applyRls: ( + args: ApplyRlsVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - acceptDatabaseTransfer: InferSelectResult | null; + applyRls: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'AcceptDatabaseTransfer', - fieldName: 'acceptDatabaseTransfer', + operationName: 'ApplyRls', + fieldName: 'applyRls', ...buildCustomDocument( 'mutation', - 'AcceptDatabaseTransfer', - 'acceptDatabaseTransfer', + 'ApplyRls', + 'applyRls', options.select, args, [ { name: 'input', - type: 'AcceptDatabaseTransferInput!', + type: 'ApplyRlsInput!', }, ], connectionFieldsMap, - 'AcceptDatabaseTransferPayload' + 'ApplyRlsPayload' ), }), - applyRls: ( - args: ApplyRlsVariables, + appsInstallApp: ( + args: AppsInstallAppVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - applyRls: InferSelectResult | null; + appsInstallApp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'ApplyRls', - fieldName: 'applyRls', + operationName: 'AppsInstallApp', + fieldName: 'appsInstallApp', ...buildCustomDocument( 'mutation', - 'ApplyRls', - 'applyRls', + 'AppsInstallApp', + 'appsInstallApp', options.select, args, [ { name: 'input', - type: 'ApplyRlsInput!', + type: 'AppsInstallAppInput!', }, ], connectionFieldsMap, - 'ApplyRlsPayload' + 'AppsInstallAppPayload' + ), + }), + appsUninstallApp: ( + args: AppsUninstallAppVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + appsUninstallApp: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'AppsUninstallApp', + fieldName: 'appsUninstallApp', + ...buildCustomDocument( + 'mutation', + 'AppsUninstallApp', + 'appsUninstallApp', + options.select, + args, + [ + { + name: 'input', + type: 'AppsUninstallAppInput!', + }, + ], + connectionFieldsMap, + 'AppsUninstallAppPayload' ), }), - cancelDatabaseTransfer: ( - args: CancelDatabaseTransferVariables, + appsUpgradeApp: ( + args: AppsUpgradeAppVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - cancelDatabaseTransfer: InferSelectResult | null; + appsUpgradeApp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'CancelDatabaseTransfer', - fieldName: 'cancelDatabaseTransfer', + operationName: 'AppsUpgradeApp', + fieldName: 'appsUpgradeApp', ...buildCustomDocument( 'mutation', - 'CancelDatabaseTransfer', - 'cancelDatabaseTransfer', + 'AppsUpgradeApp', + 'appsUpgradeApp', options.select, args, [ { name: 'input', - type: 'CancelDatabaseTransferInput!', + type: 'AppsUpgradeAppInput!', }, ], connectionFieldsMap, - 'CancelDatabaseTransferPayload' + 'AppsUpgradeAppPayload' ), }), domainsAssignSubdomain: ( @@ -303,35 +332,6 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - rejectDatabaseTransfer: ( - args: RejectDatabaseTransferVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - rejectDatabaseTransfer: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'RejectDatabaseTransfer', - fieldName: 'rejectDatabaseTransfer', - ...buildCustomDocument( - 'mutation', - 'RejectDatabaseTransfer', - 'rejectDatabaseTransfer', - options.select, - args, - [ - { - name: 'input', - type: 'RejectDatabaseTransferInput!', - }, - ], - connectionFieldsMap, - 'RejectDatabaseTransferPayload' - ), - }), requestDatabase: ( args: RequestDatabaseVariables, options: { diff --git a/sdk/constructive-react/src/api/schema-types.ts b/sdk/constructive-react/src/api/schema-types.ts index 1bd400ad89..a95202ef55 100644 --- a/sdk/constructive-react/src/api/schema-types.ts +++ b/sdk/constructive-react/src/api/schema-types.ts @@ -5,10 +5,11 @@ */ import type { + Api, ApiSchema, ApiSetting, - Apis, - AstMigration, + App, + AppComponent, CheckConstraint, CompositeType, CorsSetting, @@ -21,6 +22,9 @@ import type { DomainEvent, DomainType, DomainVerification, + EmailIdentity, + EmailProviderAccount, + EmailSiteIdentity, EmbeddingChunk, Enum, ExclusionConstraint, @@ -37,13 +41,16 @@ import type { NodeTypeRegistry, Page, Partition, + PlatformApi, PlatformApiSchema, PlatformApiSetting, - PlatformApis, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, + PlatformEmailIdentity, + PlatformEmailProviderAccount, + PlatformEmailSiteIdentity, PlatformManagedDomain, PlatformPage, PlatformSite, @@ -71,7 +78,6 @@ import type { SiteTheme, SiteWebConfig, SpatialRelation, - SqlAction, Table, TableBehavior, TableGrant, @@ -105,6 +111,31 @@ import type { } from './types'; export type ConstructiveInternalTypeImage = unknown; export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; +/** Methods to use when ordering `Api`. */ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `ApiSchema`. */ export type ApiSchemaOrderBy = | 'API_ID_ASC' @@ -165,60 +196,58 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `Apis`. */ -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' +/** Methods to use when ordering `AppComponent`. */ +export type AppComponentOrderBy = + | 'APP_ID_ASC' + | 'APP_ID_DESC' + | 'COMPONENT_API_ID_ASC' + | 'COMPONENT_API_ID_DESC' + | 'COMPONENT_DOMAIN_ID_ASC' + | 'COMPONENT_DOMAIN_ID_DESC' + | 'COMPONENT_INSTALLATION_ID_ASC' + | 'COMPONENT_INSTALLATION_ID_DESC' + | 'COMPONENT_SITE_ID_ASC' + | 'COMPONENT_SITE_ID_DESC' + | 'COMPONENT_TYPE_ASC' + | 'COMPONENT_TYPE_DESC' | 'CONFIG_ASC' | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `AstMigration`. */ -export type AstMigrationOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' +/** Methods to use when ordering `App`. */ +export type AppOrderBy = + | 'CONFIG_ASC' + | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEPLOYS_ASC' - | 'DEPLOYS_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REQUIRES_ASC' - | 'REQUIRES_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `CheckConstraint`. */ export type CheckConstraintOrderBy = | 'CATEGORY_ASC' @@ -565,6 +594,91 @@ export type DomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +/** Methods to use when ordering `EmailIdentity`. */ +export type EmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `EmailProviderAccount`. */ +export type EmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +/** Methods to use when ordering `EmailSiteIdentity`. */ +export type EmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `EmbeddingChunk`. */ export type EmbeddingChunkOrderBy = | 'CHUNKING_TASK_NAME_ASC' @@ -997,7 +1111,7 @@ export type NodeTypeRegistryOrderBy = | 'SLUG_DESC' | 'TAGS_ASC' | 'TAGS_DESC'; -export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; +export type ObjectCategory = 'APP' | 'AUTH' | 'CAPABILITIES' | 'CORE' | 'MEMBERSHIPS' | 'MODULE'; /** Methods to use when ordering `Page`. */ export type PageOrderBy = | 'COMMIT_ID_ASC' @@ -1052,6 +1166,29 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `PlatformApi`. */ +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `PlatformApiSchema`. */ export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' @@ -1108,29 +1245,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `PlatformApis`. */ -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `PlatformCorsSetting`. */ export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' @@ -1239,6 +1353,85 @@ export type PlatformDomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +/** Methods to use when ordering `PlatformEmailIdentity`. */ +export type PlatformEmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `PlatformEmailProviderAccount`. */ +export type PlatformEmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +/** Methods to use when ordering `PlatformEmailSiteIdentity`. */ +export type PlatformEmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `PlatformManagedDomain`. */ export type PlatformManagedDomainOrderBy = | 'ALLOW_PUBLIC_USAGE_ASC' @@ -1966,35 +2159,6 @@ export type SpatialRelationOrderBy = | 'TAGS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `SqlAction`. */ -export type SqlActionOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' - | 'CONTENT_ASC' - | 'CONTENT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' - | 'DEPS_ASC' - | 'DEPS_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; /** Methods to use when ordering `TableBehavior`. */ export type TableBehaviorOrderBy = | 'CREATED_AT_ASC' @@ -2344,10 +2508,6 @@ export type WebauthnSettingOrderBy = | 'UPDATED_AT_DESC' | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; -export interface AcceptDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} /** A filter to be used against ApiExposureLevel fields. All fields are combined with a logical ‘and.’ */ export interface ApiExposureLevelFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -2373,12 +2533,93 @@ export interface ApiExposureLevelFilter { /** Not included in the specified list. */ notIn?: ApiExposureLevel[]; } +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** Represents an update to a `Api`. Fields that are set will be updated. */ +export interface ApiPatch { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name?: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** A filter to be used against `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -2427,7 +2668,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -2547,32 +2788,117 @@ export interface ApiSettingPatch { statementTimeoutMs?: string; updatedAt?: string; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { - /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; +/** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiToManyApiSchemaFilter { + /** Filters to entities where every related entity matches. */ + every?: ApiSchemaFilter; + /** Filters to entities where no related entity matches. */ + none?: ApiSchemaFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ApiSchemaFilter; +} +/** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiToManyCorsSettingFilter { + /** Filters to entities where every related entity matches. */ + every?: CorsSettingFilter; + /** Filters to entities where no related entity matches. */ + none?: CorsSettingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: CorsSettingFilter; +} +/** A filter to be used against `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppComponentFilter { + /** Checks for all expressions in this list. */ + and?: AppComponentFilter[]; + /** Filter by the object’s `app` relation. */ + app?: AppFilter; + /** Filter by the object’s `appId` field. */ + appId?: UUIDFilter; + /** Filter by the object’s `componentApiId` field. */ + componentApiId?: UUIDFilter; + /** Filter by the object’s `componentDomainId` field. */ + componentDomainId?: UUIDFilter; + /** Filter by the object’s `componentInstallationId` field. */ + componentInstallationId?: UUIDFilter; + /** Filter by the object’s `componentSiteId` field. */ + componentSiteId?: UUIDFilter; + /** Filter by the object’s `componentType` field. */ + componentType?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppComponentFilter; + /** Checks for any expressions in this list. */ + or?: AppComponentFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppComponent` */ +export interface AppComponentInput { + /** App this component belongs to */ + appId: string; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string; + /** Component-specific configuration inside this app */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + updatedAt?: string; +} +/** Represents an update to a `AppComponent`. Fields that are set will be updated. */ +export interface AppComponentPatch { + /** App this component belongs to */ + appId?: string; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string; + /** Component-specific configuration inside this app */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + id?: string; + updatedAt?: string; +} +/** A filter to be used against `App` object types. All fields are combined with a logical ‘and.’ */ +export interface AppFilter { + /** Checks for all expressions in this list. */ + and?: AppFilter[]; + /** Filter by the object’s `appComponents` relation. */ + appComponents?: AppToManyAppComponentFilter; + /** `appComponents` exist. */ + appComponentsExist?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `isPublished` field. */ @@ -2580,71 +2906,64 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: AppFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; + or?: AppFilter[]; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ +/** An input for mutations affecting `App` */ +export interface AppInput { + /** Module-specific configuration for this app */ config?: unknown; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; - /** Database this API surface serves */ - dbname?: string; + /** Human-readable app description */ + description?: string; id?: string; - /** Whether other scopes may see and route to this API surface */ + /** Whether other scopes may see and reference this app */ isPublished?: boolean; - /** Owner-local API surface name */ + /** Owner-local app name */ name: string; - /** Authenticated role the API executes as */ - roleName?: string; + /** App lifecycle status: active, suspended, archived */ + status?: string; + /** Human-readable app title */ + title?: string; updatedAt?: string; } -/** Represents an update to a `Apis`. Fields that are set will be updated. */ -export interface ApisPatch { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ +/** Represents an update to a `App`. Fields that are set will be updated. */ +export interface AppPatch { + /** Module-specific configuration for this app */ config?: unknown; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId?: string; - /** Database this API surface serves */ - dbname?: string; + /** Human-readable app description */ + description?: string; id?: string; - /** Whether other scopes may see and route to this API surface */ + /** Whether other scopes may see and reference this app */ isPublished?: boolean; - /** Owner-local API surface name */ + /** Owner-local app name */ name?: string; - /** Authenticated role the API executes as */ - roleName?: string; + /** App lifecycle status: active, suspended, archived */ + status?: string; + /** Human-readable app title */ + title?: string; updatedAt?: string; } -/** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +/** A filter to be used against many `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppToManyAppComponentFilter { /** Filters to entities where every related entity matches. */ - every?: ApiSchemaFilter; + every?: AppComponentFilter; /** Filters to entities where no related entity matches. */ - none?: ApiSchemaFilter; + none?: AppComponentFilter; /** Filters to entities where at least one related entity matches. */ - some?: ApiSchemaFilter; -} -/** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { - /** Filters to entities where every related entity matches. */ - every?: CorsSettingFilter; - /** Filters to entities where no related entity matches. */ - none?: CorsSettingFilter; - /** Filters to entities where at least one related entity matches. */ - some?: CorsSettingFilter; + some?: AppComponentFilter; } export interface ApplyRlsInput { clientMutationId?: string; @@ -2656,44 +2975,28 @@ export interface ApplyRlsInput { tableId?: string; vars?: unknown; } -/** A filter to be used against `AstMigration` object types. All fields are combined with a logical ‘and.’ */ -export interface AstMigrationFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: AstMigrationFilter[]; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: JSONFilter; - /** Filter by the object’s `deploys` field. */ - deploys?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: AstMigrationFilter; - /** Checks for any expressions in this list. */ - or?: AstMigrationFilter[]; - /** Filter by the object’s `payload` field. */ - payload?: JSONFilter; - /** Filter by the object’s `requires` field. */ - requires?: StringListFilter; - /** Filter by the object’s `revert` field. */ - revert?: JSONFilter; - /** Filter by the object’s `verify` field. */ - verify?: JSONFilter; +export interface AppsInstallAppInput { + apex?: string; + clientMutationId?: string; + config?: unknown; + definitionIds?: string[]; + hostname?: string; + label?: string; + name?: string; + namespaceId?: string; + params?: unknown; + routePath?: string; + slug?: string; + title?: string; +} +export interface AppsUninstallAppInput { + clientMutationId?: string; + targetAppId?: string; } -export interface CancelDatabaseTransferInput { +export interface AppsUpgradeAppInput { clientMutationId?: string; - transferId?: string; + newParams?: unknown; + targetAppId?: string; } /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { @@ -2871,7 +3174,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -2913,6 +3216,11 @@ export interface CorsSettingPatch { id?: string; updatedAt?: string; } +export interface CreateApiInput { + /** The `Api` to be created by this mutation. */ + api: ApiInput; + clientMutationId?: string; +} export interface CreateApiSchemaInput { /** The `ApiSchema` to be created by this mutation. */ apiSchema: ApiSchemaInput; @@ -2923,9 +3231,14 @@ export interface CreateApiSettingInput { apiSetting: ApiSettingInput; clientMutationId?: string; } -export interface CreateApisInput { - /** The `Apis` to be created by this mutation. */ - apis: ApisInput; +export interface CreateAppComponentInput { + /** The `AppComponent` to be created by this mutation. */ + appComponent: AppComponentInput; + clientMutationId?: string; +} +export interface CreateAppInput { + /** The `App` to be created by this mutation. */ + app: AppInput; clientMutationId?: string; } export interface CreateCheckConstraintInput { @@ -2988,6 +3301,21 @@ export interface CreateDomainVerificationInput { /** The `DomainVerification` to be created by this mutation. */ domainVerification: DomainVerificationInput; } +export interface CreateEmailIdentityInput { + clientMutationId?: string; + /** The `EmailIdentity` to be created by this mutation. */ + emailIdentity: EmailIdentityInput; +} +export interface CreateEmailProviderAccountInput { + clientMutationId?: string; + /** The `EmailProviderAccount` to be created by this mutation. */ + emailProviderAccount: EmailProviderAccountInput; +} +export interface CreateEmailSiteIdentityInput { + clientMutationId?: string; + /** The `EmailSiteIdentity` to be created by this mutation. */ + emailSiteIdentity: EmailSiteIdentityInput; +} export interface CreateEmbeddingChunkInput { clientMutationId?: string; /** The `EmbeddingChunk` to be created by this mutation. */ @@ -3068,6 +3396,11 @@ export interface CreatePartitionInput { /** The `Partition` to be created by this mutation. */ partition: PartitionInput; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + /** The `PlatformApi` to be created by this mutation. */ + platformApi: PlatformApiInput; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; /** The `PlatformApiSchema` to be created by this mutation. */ @@ -3078,11 +3411,6 @@ export interface CreatePlatformApiSettingInput { /** The `PlatformApiSetting` to be created by this mutation. */ platformApiSetting: PlatformApiSettingInput; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - /** The `PlatformApis` to be created by this mutation. */ - platformApis: PlatformApisInput; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; /** The `PlatformCorsSetting` to be created by this mutation. */ @@ -3103,6 +3431,21 @@ export interface CreatePlatformDomainVerificationInput { /** The `PlatformDomainVerification` to be created by this mutation. */ platformDomainVerification: PlatformDomainVerificationInput; } +export interface CreatePlatformEmailIdentityInput { + clientMutationId?: string; + /** The `PlatformEmailIdentity` to be created by this mutation. */ + platformEmailIdentity: PlatformEmailIdentityInput; +} +export interface CreatePlatformEmailProviderAccountInput { + clientMutationId?: string; + /** The `PlatformEmailProviderAccount` to be created by this mutation. */ + platformEmailProviderAccount: PlatformEmailProviderAccountInput; +} +export interface CreatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + /** The `PlatformEmailSiteIdentity` to be created by this mutation. */ + platformEmailSiteIdentity: PlatformEmailSiteIdentityInput; +} export interface CreatePlatformManagedDomainInput { clientMutationId?: string; /** The `PlatformManagedDomain` to be created by this mutation. */ @@ -4041,6 +4384,10 @@ export interface DefaultPrivilegePatch { privilege?: string; schemaId?: string; } +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface DeleteApiSchemaInput { clientMutationId?: string; id: string; @@ -4049,7 +4396,11 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface DeleteApisInput { +export interface DeleteAppComponentInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppInput { clientMutationId?: string; id: string; } @@ -4101,6 +4452,18 @@ export interface DeleteDomainVerificationInput { clientMutationId?: string; id: string; } +export interface DeleteEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface DeleteEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface DeleteEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface DeleteEmbeddingChunkInput { clientMutationId?: string; id: string; @@ -4166,15 +4529,15 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApiSchemaInput { +export interface DeletePlatformApiInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApiSettingInput { +export interface DeletePlatformApiSchemaInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApisInput { +export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } @@ -4194,6 +4557,18 @@ export interface DeletePlatformDomainVerificationInput { clientMutationId?: string; id: string; } +export interface DeletePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface DeletePlatformManagedDomainInput { clientMutationId?: string; id: string; @@ -4840,6 +5215,277 @@ export interface DomainsAssignSubdomainInput { label?: string; maxAttempts?: number; } +/** A filter to be used against `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentities` relation. */ + emailSiteIdentities?: EmailIdentityToManyEmailSiteIdentityFilter; + /** `emailSiteIdentities` exist. */ + emailSiteIdentitiesExist?: boolean; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailIdentityFilter[]; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: EmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `EmailIdentity` */ +export interface EmailIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** Represents an update to a `EmailIdentity`. Fields that are set will be updated. */ +export interface EmailIdentityPatch { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** A filter to be used against many `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityToManyEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSiteIdentityFilter; +} +/** A filter to be used against `EmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountFilter { + /** Checks for all expressions in this list. */ + and?: EmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesByProviderAccountId` relation. */ + emailIdentitiesByProviderAccountId?: EmailProviderAccountToManyEmailIdentityFilter; + /** `emailIdentitiesByProviderAccountId` exist. */ + emailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: EmailProviderAccountFilter[]; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +/** An input for mutations affecting `EmailProviderAccount` */ +export interface EmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** Represents an update to a `EmailProviderAccount`. Fields that are set will be updated. */ +export interface EmailProviderAccountPatch { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** A filter to be used against many `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountToManyEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailIdentityFilter; +} +/** A filter to be used against `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: EmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `EmailSiteIdentity` */ +export interface EmailSiteIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} +/** Represents an update to a `EmailSiteIdentity`. Fields that are set will be updated. */ +export interface EmailSiteIdentityPatch { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + /** Identity this site sends as */ + emailIdentityId?: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string; + updatedAt?: string; +} /** A filter to be used against `EmbeddingChunk` object types. All fields are combined with a logical ‘and.’ */ export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ @@ -6152,12 +6798,87 @@ export interface PartitionPatch { tableId?: string; updatedAt?: string; } +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** Represents an update to a `PlatformApi`. Fields that are set will be updated. */ +export interface PlatformApiPatch { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name?: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** A filter to be used against `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -6200,7 +6921,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -6290,107 +7011,32 @@ export interface PlatformApiSettingPatch { /** Override: enable connection filter (NULL = inherit from database_settings) */ enableConnectionFilter?: boolean; /** Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) */ - enableDirectUploads?: boolean; - /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ - enableI18N?: boolean; - /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ - enableLlm?: boolean; - /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ - enableLtree?: boolean; - /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ - enableManyToMany?: boolean; - /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ - enablePostgis?: boolean; - /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ - enablePresignedUploads?: boolean; - /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ - enableRealtime?: boolean; - /** Override: enable unified search (NULL = inherit from database_settings) */ - enableSearch?: boolean; - id?: string; - /** Extensible JSON for additional per-API settings that do not have dedicated columns */ - options?: unknown; - /** Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. */ - statementTimeoutMs?: string; - updatedAt?: string; -} -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} -/** Represents an update to a `PlatformApis`. Fields that are set will be updated. */ -export interface PlatformApisPatch { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; + enableDirectUploads?: boolean; + /** Override: enable internationalization plugin (NULL = inherit from database_settings) */ + enableI18N?: boolean; + /** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */ + enableLlm?: boolean; + /** Override: enable ltree hierarchical data type (NULL = inherit from database_settings) */ + enableLtree?: boolean; + /** Override: enable many-to-many relationships (NULL = inherit from database_settings) */ + enableManyToMany?: boolean; + /** Override: enable PostGIS spatial types (NULL = inherit from database_settings) */ + enablePostgis?: boolean; + /** Override: enable presigned URL upload flow (NULL = inherit from database_settings) */ + enablePresignedUploads?: boolean; + /** Override: enable realtime subscriptions (NULL = inherit from database_settings) */ + enableRealtime?: boolean; + /** Override: enable unified search (NULL = inherit from database_settings) */ + enableSearch?: boolean; id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name?: string; - /** Authenticated role the API executes as */ - roleName?: string; + /** Extensible JSON for additional per-API settings that do not have dedicated columns */ + options?: unknown; + /** Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. */ + statementTimeoutMs?: string; updatedAt?: string; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -6405,7 +7051,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -6754,6 +7400,259 @@ export interface PlatformDomainsAssignSubdomainInput { label?: string; maxAttempts?: number; } +/** A filter to be used against `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. */ + platformEmailSiteIdentitiesByEmailIdentityId?: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter; + /** `platformEmailSiteIdentitiesByEmailIdentityId` exist. */ + platformEmailSiteIdentitiesByEmailIdentityIdExist?: boolean; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: PlatformEmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `PlatformEmailIdentity` */ +export interface PlatformEmailIdentityInput { + createdAt?: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** Represents an update to a `PlatformEmailIdentity`. Fields that are set will be updated. */ +export interface PlatformEmailIdentityPatch { + createdAt?: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** A filter to be used against many `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailSiteIdentityFilter; +} +/** A filter to be used against `PlatformEmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. */ + platformEmailIdentitiesByProviderAccountId?: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter; + /** `platformEmailIdentitiesByProviderAccountId` exist. */ + platformEmailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +/** An input for mutations affecting `PlatformEmailProviderAccount` */ +export interface PlatformEmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** Represents an update to a `PlatformEmailProviderAccount`. Fields that are set will be updated. */ +export interface PlatformEmailProviderAccountPatch { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** A filter to be used against many `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailIdentityFilter; +} +/** A filter to be used against `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: PlatformEmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformEmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: PlatformSiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `PlatformEmailSiteIdentity` */ +export interface PlatformEmailSiteIdentityInput { + createdAt?: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} +/** Represents an update to a `PlatformEmailSiteIdentity`. Fields that are set will be updated. */ +export interface PlatformEmailSiteIdentityPatch { + createdAt?: string; + /** Identity this site sends as */ + emailIdentityId?: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string; + updatedAt?: string; +} /** A filter to be used against `PlatformManagedDomain` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformManagedDomainFilter { /** Filter by the object’s `allowPublicUsage` field. */ @@ -7141,6 +8040,10 @@ export interface PlatformSiteFilter { not?: PlatformSiteFilter; /** Checks for any expressions in this list. */ or?: PlatformSiteFilter[]; + /** Filter by the object’s `platformEmailSiteIdentityBySiteId` relation. */ + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentityFilter; + /** A related `platformEmailSiteIdentityBySiteId` exists. */ + platformEmailSiteIdentityBySiteIdExists?: boolean; /** Filter by the object’s `platformPagesBySiteId` relation. */ platformPagesBySiteId?: PlatformSiteToManyPlatformPageFilter; /** `platformPagesBySiteId` exist. */ @@ -7855,10 +8758,6 @@ export interface PubkeySettingPatch { /** Field name used to identify the user in crypto auth functions */ userField?: string; } -export interface RejectDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} export interface RequestDatabaseInput { clientMutationId?: string; databaseName?: string; @@ -8634,6 +9533,10 @@ export interface SiteFilter { databaseId?: UUIDFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; + /** Filter by the object’s `emailSiteIdentity` relation. */ + emailSiteIdentity?: EmailSiteIdentityFilter; + /** A related `emailSiteIdentity` exists. */ + emailSiteIdentityExists?: boolean; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `installationId` field. */ @@ -9187,39 +10090,6 @@ export interface SpatialRelationPatch { tags?: string[]; updatedAt?: string; } -/** A filter to be used against `SqlAction` object types. All fields are combined with a logical ‘and.’ */ -export interface SqlActionFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: SqlActionFilter[]; - /** Filter by the object’s `content` field. */ - content?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: StringFilter; - /** Filter by the object’s `deps` field. */ - deps?: StringListFilter; - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: SqlActionFilter; - /** Checks for any expressions in this list. */ - or?: SqlActionFilter[]; - /** Filter by the object’s `revert` field. */ - revert?: StringFilter; - /** Filter by the object’s `verify` field. */ - verify?: StringFilter; -} /** A filter to be used against `TableBehavior` object types. All fields are combined with a logical ‘and.’ */ export interface TableBehaviorFilter { /** Checks for all expressions in this list. */ @@ -9944,6 +10814,12 @@ export interface UniqueConstraintToManyUniqueConstraintBehaviorFilter { /** Filters to entities where at least one related entity matches. */ some?: UniqueConstraintBehaviorFilter; } +export interface UpdateApiInput { + /** An object where the defined keys will be set on the `Api` being updated. */ + apiPatch: ApiPatch; + clientMutationId?: string; + id: string; +} export interface UpdateApiSchemaInput { /** An object where the defined keys will be set on the `ApiSchema` being updated. */ apiSchemaPatch: ApiSchemaPatch; @@ -9956,9 +10832,15 @@ export interface UpdateApiSettingInput { clientMutationId?: string; id: string; } -export interface UpdateApisInput { - /** An object where the defined keys will be set on the `Apis` being updated. */ - apisPatch: ApisPatch; +export interface UpdateAppComponentInput { + /** An object where the defined keys will be set on the `AppComponent` being updated. */ + appComponentPatch: AppComponentPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppInput { + /** An object where the defined keys will be set on the `App` being updated. */ + appPatch: AppPatch; clientMutationId?: string; id: string; } @@ -10034,6 +10916,24 @@ export interface UpdateDomainVerificationInput { domainVerificationPatch: DomainVerificationPatch; id: string; } +export interface UpdateEmailIdentityInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `EmailIdentity` being updated. */ + emailIdentityPatch: EmailIdentityPatch; + id: string; +} +export interface UpdateEmailProviderAccountInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `EmailProviderAccount` being updated. */ + emailProviderAccountPatch: EmailProviderAccountPatch; + id: string; +} +export interface UpdateEmailSiteIdentityInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `EmailSiteIdentity` being updated. */ + emailSiteIdentityPatch: EmailSiteIdentityPatch; + id: string; +} export interface UpdateEmbeddingChunkInput { clientMutationId?: string; /** An object where the defined keys will be set on the `EmbeddingChunk` being updated. */ @@ -10131,6 +11031,12 @@ export interface UpdatePartitionInput { /** An object where the defined keys will be set on the `Partition` being updated. */ partitionPatch: PartitionPatch; } +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformApi` being updated. */ + platformApiPatch: PlatformApiPatch; +} export interface UpdatePlatformApiSchemaInput { clientMutationId?: string; id: string; @@ -10143,12 +11049,6 @@ export interface UpdatePlatformApiSettingInput { /** An object where the defined keys will be set on the `PlatformApiSetting` being updated. */ platformApiSettingPatch: PlatformApiSettingPatch; } -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `PlatformApis` being updated. */ - platformApisPatch: PlatformApisPatch; -} export interface UpdatePlatformCorsSettingInput { clientMutationId?: string; id: string; @@ -10173,6 +11073,24 @@ export interface UpdatePlatformDomainVerificationInput { /** An object where the defined keys will be set on the `PlatformDomainVerification` being updated. */ platformDomainVerificationPatch: PlatformDomainVerificationPatch; } +export interface UpdatePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformEmailIdentity` being updated. */ + platformEmailIdentityPatch: PlatformEmailIdentityPatch; +} +export interface UpdatePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformEmailProviderAccount` being updated. */ + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; +} +export interface UpdatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformEmailSiteIdentity` being updated. */ + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; +} export interface UpdatePlatformManagedDomainInput { clientMutationId?: string; id: string; @@ -10922,17 +11840,24 @@ export interface ApiSettingConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `Apis` values. */ -export interface ApisConnection { - edges: ApisEdge[]; - nodes: Apis[]; +/** A connection to a list of `Api` values. */ +export interface ApiConnection { + edges: ApiEdge[]; + nodes: Api[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppComponent` values. */ +export interface AppComponentConnection { + edges: AppComponentEdge[]; + nodes: AppComponent[]; pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AstMigration` values. */ -export interface AstMigrationConnection { - edges: AstMigrationEdge[]; - nodes: AstMigration[]; +/** A connection to a list of `App` values. */ +export interface AppConnection { + edges: AppEdge[]; + nodes: App[]; pageInfo: PageInfo; totalCount: number; } @@ -11020,6 +11945,27 @@ export interface DomainConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `EmailIdentity` values. */ +export interface EmailIdentityConnection { + edges: EmailIdentityEdge[]; + nodes: EmailIdentity[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `EmailProviderAccount` values. */ +export interface EmailProviderAccountConnection { + edges: EmailProviderAccountEdge[]; + nodes: EmailProviderAccount[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `EmailSiteIdentity` values. */ +export interface EmailSiteIdentityConnection { + edges: EmailSiteIdentityEdge[]; + nodes: EmailSiteIdentity[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `EmbeddingChunk` values. */ export interface EmbeddingChunkConnection { edges: EmbeddingChunkEdge[]; @@ -11146,10 +12092,10 @@ export interface PlatformApiSettingConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `PlatformApis` values. */ -export interface PlatformApisConnection { - edges: PlatformApisEdge[]; - nodes: PlatformApis[]; +/** A connection to a list of `PlatformApi` values. */ +export interface PlatformApiConnection { + edges: PlatformApiEdge[]; + nodes: PlatformApi[]; pageInfo: PageInfo; totalCount: number; } @@ -11181,6 +12127,27 @@ export interface PlatformDomainConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PlatformEmailIdentity` values. */ +export interface PlatformEmailIdentityConnection { + edges: PlatformEmailIdentityEdge[]; + nodes: PlatformEmailIdentity[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlatformEmailProviderAccount` values. */ +export interface PlatformEmailProviderAccountConnection { + edges: PlatformEmailProviderAccountEdge[]; + nodes: PlatformEmailProviderAccount[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlatformEmailSiteIdentity` values. */ +export interface PlatformEmailSiteIdentityConnection { + edges: PlatformEmailSiteIdentityEdge[]; + nodes: PlatformEmailSiteIdentity[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PlatformManagedDomain` values. */ export interface PlatformManagedDomainConnection { edges: PlatformManagedDomainEdge[]; @@ -11398,13 +12365,6 @@ export interface SpatialRelationConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `SqlAction` values. */ -export interface SqlActionConnection { - edges: SqlActionEdge[]; - nodes: SqlAction[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `TableBehavior` values. */ export interface TableBehaviorConnection { edges: TableBehaviorEdge[]; @@ -11496,16 +12456,25 @@ export interface WebauthnSettingConnection { pageInfo: PageInfo; totalCount: number; } -export interface AcceptDatabaseTransferPayload { +export interface ApplyRlsPayload { clientMutationId?: string | null; - result?: boolean | null; } -export interface ApplyRlsPayload { +export interface AppsInstallAppPayload { + appEdge?: AppEdge | null; clientMutationId?: string | null; + result?: App | null; } -export interface CancelDatabaseTransferPayload { +export interface AppsUninstallAppPayload { + clientMutationId?: string | null; +} +export interface AppsUpgradeAppPayload { + clientMutationId?: string | null; +} +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; clientMutationId?: string | null; - result?: boolean | null; } export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ @@ -11519,10 +12488,16 @@ export interface CreateApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface CreateAppPayload { + /** The `App` that was created by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppComponentPayload { + /** The `AppComponent` that was created by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; clientMutationId?: string | null; } export interface CreateCheckConstraintPayload { @@ -11597,6 +12572,24 @@ export interface CreateDomainVerificationPayload { domainVerification?: DomainVerification | null; domainVerificationEdge?: DomainVerificationEdge | null; } +export interface CreateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was created by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export interface CreateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was created by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export interface CreateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was created by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} export interface CreateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was created by this mutation. */ @@ -11693,6 +12686,12 @@ export interface CreatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -11705,12 +12704,6 @@ export interface CreatePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -11735,6 +12728,24 @@ export interface CreatePlatformDomainVerificationPayload { platformDomainVerification?: PlatformDomainVerification | null; platformDomainVerificationEdge?: PlatformDomainVerificationEdge | null; } +export interface CreatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was created by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export interface CreatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was created by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export interface CreatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was created by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} export interface CreatePlatformManagedDomainPayload { clientMutationId?: string | null; /** The `PlatformManagedDomain` that was created by this mutation. */ @@ -11975,6 +12986,12 @@ export interface CreateWebauthnSettingPayload { webauthnSetting?: WebauthnSetting | null; webauthnSettingEdge?: WebauthnSettingEdge | null; } +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} export interface DeleteApiSchemaPayload { /** The `ApiSchema` that was deleted by this mutation. */ apiSchema?: ApiSchema | null; @@ -11987,10 +13004,16 @@ export interface DeleteApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface DeleteAppPayload { + /** The `App` that was deleted by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppComponentPayload { + /** The `AppComponent` that was deleted by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; clientMutationId?: string | null; } export interface DeleteCheckConstraintPayload { @@ -12065,6 +13088,24 @@ export interface DeleteDomainVerificationPayload { domainVerification?: DomainVerification | null; domainVerificationEdge?: DomainVerificationEdge | null; } +export interface DeleteEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was deleted by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export interface DeleteEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was deleted by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export interface DeleteEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was deleted by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} export interface DeleteEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was deleted by this mutation. */ @@ -12161,6 +13202,12 @@ export interface DeletePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface DeletePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was deleted by this mutation. */ @@ -12173,12 +13220,6 @@ export interface DeletePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface DeletePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was deleted by this mutation. */ @@ -12203,6 +13244,24 @@ export interface DeletePlatformDomainVerificationPayload { platformDomainVerification?: PlatformDomainVerification | null; platformDomainVerificationEdge?: PlatformDomainVerificationEdge | null; } +export interface DeletePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was deleted by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export interface DeletePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was deleted by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export interface DeletePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was deleted by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} export interface DeletePlatformManagedDomainPayload { clientMutationId?: string | null; /** The `PlatformManagedDomain` that was deleted by this mutation. */ @@ -12471,10 +13530,6 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } -export interface RejectDatabaseTransferPayload { - clientMutationId?: string | null; - result?: boolean | null; -} export interface RequestDatabasePayload { clientMutationId?: string | null; result?: DatabaseProvisionModule | null; @@ -12486,6 +13541,12 @@ export interface SitesProvisionStaticSitePayload { clientMutationId?: string | null; result?: PlatformRoute | null; } +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} export interface UpdateApiSchemaPayload { /** The `ApiSchema` that was updated by this mutation. */ apiSchema?: ApiSchema | null; @@ -12498,10 +13559,16 @@ export interface UpdateApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface UpdateAppPayload { + /** The `App` that was updated by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppComponentPayload { + /** The `AppComponent` that was updated by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; clientMutationId?: string | null; } export interface UpdateCheckConstraintPayload { @@ -12576,6 +13643,24 @@ export interface UpdateDomainVerificationPayload { domainVerification?: DomainVerification | null; domainVerificationEdge?: DomainVerificationEdge | null; } +export interface UpdateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was updated by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export interface UpdateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was updated by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export interface UpdateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was updated by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} export interface UpdateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was updated by this mutation. */ @@ -12672,6 +13757,12 @@ export interface UpdatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface UpdatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was updated by this mutation. */ @@ -12684,12 +13775,6 @@ export interface UpdatePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface UpdatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was updated by this mutation. */ @@ -12714,6 +13799,24 @@ export interface UpdatePlatformDomainVerificationPayload { platformDomainVerification?: PlatformDomainVerification | null; platformDomainVerificationEdge?: PlatformDomainVerificationEdge | null; } +export interface UpdatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was updated by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export interface UpdatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was updated by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export interface UpdatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was updated by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} export interface UpdatePlatformManagedDomainPayload { clientMutationId?: string | null; /** The `PlatformManagedDomain` that was updated by this mutation. */ @@ -13004,17 +14107,23 @@ export interface ApiSettingEdge { /** The `ApiSetting` at the end of the edge. */ node?: ApiSetting | null; } -/** A `Apis` edge in the connection. */ -export interface ApisEdge { +/** A `Api` edge in the connection. */ +export interface ApiEdge { cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; } -/** A `AstMigration` edge in the connection. */ -export interface AstMigrationEdge { +/** A `AppComponent` edge in the connection. */ +export interface AppComponentEdge { cursor?: string | null; - /** The `AstMigration` at the end of the edge. */ - node?: AstMigration | null; + /** The `AppComponent` at the end of the edge. */ + node?: AppComponent | null; +} +/** A `App` edge in the connection. */ +export interface AppEdge { + cursor?: string | null; + /** The `App` at the end of the edge. */ + node?: App | null; } /** A `CheckConstraint` edge in the connection. */ export interface CheckConstraintEdge { @@ -13088,6 +14197,24 @@ export interface DomainEdge { /** The `Domain` at the end of the edge. */ node?: Domain | null; } +/** A `EmailIdentity` edge in the connection. */ +export interface EmailIdentityEdge { + cursor?: string | null; + /** The `EmailIdentity` at the end of the edge. */ + node?: EmailIdentity | null; +} +/** A `EmailProviderAccount` edge in the connection. */ +export interface EmailProviderAccountEdge { + cursor?: string | null; + /** The `EmailProviderAccount` at the end of the edge. */ + node?: EmailProviderAccount | null; +} +/** A `EmailSiteIdentity` edge in the connection. */ +export interface EmailSiteIdentityEdge { + cursor?: string | null; + /** The `EmailSiteIdentity` at the end of the edge. */ + node?: EmailSiteIdentity | null; +} /** A `EmbeddingChunk` edge in the connection. */ export interface EmbeddingChunkEdge { cursor?: string | null; @@ -13196,11 +14323,11 @@ export interface PlatformApiSettingEdge { /** The `PlatformApiSetting` at the end of the edge. */ node?: PlatformApiSetting | null; } -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; } /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { @@ -13226,6 +14353,24 @@ export interface PlatformDomainEdge { /** The `PlatformDomain` at the end of the edge. */ node?: PlatformDomain | null; } +/** A `PlatformEmailIdentity` edge in the connection. */ +export interface PlatformEmailIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailIdentity` at the end of the edge. */ + node?: PlatformEmailIdentity | null; +} +/** A `PlatformEmailProviderAccount` edge in the connection. */ +export interface PlatformEmailProviderAccountEdge { + cursor?: string | null; + /** The `PlatformEmailProviderAccount` at the end of the edge. */ + node?: PlatformEmailProviderAccount | null; +} +/** A `PlatformEmailSiteIdentity` edge in the connection. */ +export interface PlatformEmailSiteIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailSiteIdentity` at the end of the edge. */ + node?: PlatformEmailSiteIdentity | null; +} /** A `PlatformManagedDomain` edge in the connection. */ export interface PlatformManagedDomainEdge { cursor?: string | null; @@ -13388,12 +14533,6 @@ export interface SpatialRelationEdge { /** The `SpatialRelation` at the end of the edge. */ node?: SpatialRelation | null; } -/** A `SqlAction` edge in the connection. */ -export interface SqlActionEdge { - cursor?: string | null; - /** The `SqlAction` at the end of the edge. */ - node?: SqlAction | null; -} /** A `TableBehavior` edge in the connection. */ export interface TableBehaviorEdge { cursor?: string | null; @@ -13522,7 +14661,7 @@ export interface DatabaseProvisionModule { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string | null; id: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules: unknown; /** Additional configuration options for provisioning */ options: unknown; diff --git a/sdk/constructive-react/src/api/types.ts b/sdk/constructive-react/src/api/types.ts index 00bdabb02a..1b3f7a477f 100644 --- a/sdk/constructive-react/src/api/types.ts +++ b/sdk/constructive-react/src/api/types.ts @@ -5,6 +5,18 @@ */ import type { ApiExposureLevel, ObjectCategory } from './schema-types'; export type ConstructiveInternalTypeImage = unknown; +export interface Api { + anonRole: string | null; + config: unknown | null; + createdAt: string | null; + databaseId: string | null; + dbname: string | null; + id: string | null; + isPublished: boolean | null; + name: string | null; + roleName: string | null; + updatedAt: string | null; +} export interface ApiSchema { apiId: string | null; createdAt: string | null; @@ -34,32 +46,30 @@ export interface ApiSetting { statementTimeoutMs: string | null; updatedAt: string | null; } -export interface Apis { - anonRole: string | null; +export interface AppComponent { + appId: string | null; + componentApiId: string | null; + componentDomainId: string | null; + componentInstallationId: string | null; + componentSiteId: string | null; + componentType: string | null; config: unknown | null; createdAt: string | null; databaseId: string | null; - dbname: string | null; id: string | null; - isPublished: boolean | null; - name: string | null; - roleName: string | null; updatedAt: string | null; } -export interface AstMigration { - actionId: string | null; - actionName: string | null; - actorId: string | null; +export interface App { + config: unknown | null; createdAt: string | null; databaseId: string | null; - deploy: unknown | null; - deploys: string | null; - id: number | null; + description: string | null; + id: string | null; + isPublished: boolean | null; name: string | null; - payload: unknown | null; - requires: string[] | null; - revert: unknown | null; - verify: unknown | null; + status: string | null; + title: string | null; + updatedAt: string | null; } export interface CheckConstraint { category: ObjectCategory | null; @@ -228,6 +238,47 @@ export interface DomainVerification { updatedAt: string | null; verifiedAt: string | null; } +export interface EmailIdentity { + createdAt: string | null; + databaseId: string | null; + fromAddress: string | null; + fromName: string | null; + id: string | null; + isActive: boolean | null; + isDefault: boolean | null; + name: string | null; + providerAccountId: string | null; + replyToAddress: string | null; + supportAddress: string | null; + transportMode: string | null; + updatedAt: string | null; +} +export interface EmailProviderAccount { + apiBaseUrl: string | null; + createdAt: string | null; + credentialsSecretName: string | null; + databaseId: string | null; + id: string | null; + isActive: boolean | null; + name: string | null; + provider: string | null; + providerAccountName: string | null; + region: string | null; + smtpHost: string | null; + smtpPort: number | null; + smtpSecure: boolean | null; + smtpUser: string | null; + updatedAt: string | null; + webhookSigningSecretName: string | null; +} +export interface EmailSiteIdentity { + createdAt: string | null; + databaseId: string | null; + emailIdentityId: string | null; + id: string | null; + siteId: string | null; + updatedAt: string | null; +} export interface EmbeddingChunk { chunkOverlap: number | null; chunkSize: number | null; @@ -463,6 +514,17 @@ export interface Partition { tableId: string | null; updatedAt: string | null; } +export interface PlatformApi { + anonRole: string | null; + config: unknown | null; + createdAt: string | null; + dbname: string | null; + id: string | null; + isPublished: boolean | null; + name: string | null; + roleName: string | null; + updatedAt: string | null; +} export interface PlatformApiSchema { apiId: string | null; createdAt: string | null; @@ -490,17 +552,6 @@ export interface PlatformApiSetting { statementTimeoutMs: string | null; updatedAt: string | null; } -export interface PlatformApis { - anonRole: string | null; - config: unknown | null; - createdAt: string | null; - dbname: string | null; - id: string | null; - isPublished: boolean | null; - name: string | null; - roleName: string | null; - updatedAt: string | null; -} export interface PlatformCorsSetting { allowedOrigins: string[] | null; apiId: string | null; @@ -553,6 +604,44 @@ export interface PlatformDomainVerification { updatedAt: string | null; verifiedAt: string | null; } +export interface PlatformEmailIdentity { + createdAt: string | null; + fromAddress: string | null; + fromName: string | null; + id: string | null; + isActive: boolean | null; + isDefault: boolean | null; + name: string | null; + providerAccountId: string | null; + replyToAddress: string | null; + supportAddress: string | null; + transportMode: string | null; + updatedAt: string | null; +} +export interface PlatformEmailProviderAccount { + apiBaseUrl: string | null; + createdAt: string | null; + credentialsSecretName: string | null; + id: string | null; + isActive: boolean | null; + name: string | null; + provider: string | null; + providerAccountName: string | null; + region: string | null; + smtpHost: string | null; + smtpPort: number | null; + smtpSecure: boolean | null; + smtpUser: string | null; + updatedAt: string | null; + webhookSigningSecretName: string | null; +} +export interface PlatformEmailSiteIdentity { + createdAt: string | null; + emailIdentityId: string | null; + id: string | null; + siteId: string | null; + updatedAt: string | null; +} export interface PlatformManagedDomain { allowPublicUsage: boolean | null; annotations: unknown | null; @@ -903,21 +992,6 @@ export interface SpatialRelation { tags: string[] | null; updatedAt: string | null; } -export interface SqlAction { - actionId: string | null; - actionName: string | null; - actorId: string | null; - content: string | null; - createdAt: string | null; - databaseId: string | null; - deploy: string | null; - deps: string[] | null; - id: number | null; - name: string | null; - payload: unknown | null; - revert: string | null; - verify: string | null; -} export interface TableBehavior { createdAt: string | null; databaseId: string | null; diff --git a/sdk/constructive-react/src/auth/README.md b/sdk/constructive-react/src/auth/README.md index a422c4e1fc..5c1acabd90 100644 --- a/sdk/constructive-react/src/auth/README.md +++ b/sdk/constructive-react/src/auth/README.md @@ -10,7 +10,7 @@ - **Tables:** 13 - **Custom queries:** 5 -- **Custom mutations:** 30 +- **Custom mutations:** 32 **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 c7a8ab245a..d5dcd7b361 100644 --- a/sdk/constructive-react/src/auth/hooks/README.md +++ b/sdk/constructive-react/src/auth/hooks/README.md @@ -69,11 +69,11 @@ function App() { | `useCreatePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | | `useUpdatePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | | `useDeletePrincipalEntityMutation` | Mutation | Association table scoping principals to specific organizations | -| `usePrincipalScopeOverridesQuery` | Query | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | -| `usePrincipalScopeOverrideQuery` | Query | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | -| `useCreatePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | -| `useUpdatePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | -| `useDeletePrincipalScopeOverrideMutation` | Mutation | Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. | +| `usePrincipalScopeOverridesQuery` | Query | Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. | +| `usePrincipalScopeOverrideQuery` | Query | Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. | +| `useCreatePrincipalScopeOverrideMutation` | Mutation | Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. | +| `useUpdatePrincipalScopeOverrideMutation` | Mutation | Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. | +| `useDeletePrincipalScopeOverrideMutation` | Mutation | Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. | | `useRoleTypesQuery` | Query | List all roleTypes | | `useRoleTypeQuery` | Query | Get one roleType | | `useCreateRoleTypeMutation` | Mutation | Create a roleType | @@ -125,9 +125,11 @@ and lifecycle settings. | | `useSetPasswordMutation` | Mutation | setPassword | | `useSignInMutation` | Mutation | signIn | | `useSignInCrossOriginMutation` | Mutation | signInCrossOrigin | +| `useSignInMagicLinkMutation` | Mutation | signInMagicLink | | `useSignInSmsOtpMutation` | Mutation | signInSmsOtp | | `useSignOutMutation` | Mutation | signOut | | `useSignUpMutation` | Mutation | signUp | +| `useSignUpMagicLinkMutation` | Mutation | signUpMagicLink | | `useSignUpSmsMutation` | Mutation | signUpSms | | `useVerifyEmailMutation` | Mutation | verifyEmail | | `useVerifyPasswordMutation` | Mutation | verifyPassword | @@ -699,6 +701,17 @@ signInCrossOrigin |----------|------| | `input` | SignInCrossOriginInput (required) | +### `useSignInMagicLinkMutation` + +signInMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInMagicLinkInput (required) | + ### `useSignInSmsOtpMutation` signInSmsOtp @@ -732,6 +745,17 @@ signUp |----------|------| | `input` | SignUpInput (required) | +### `useSignUpMagicLinkMutation` + +signUpMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignUpMagicLinkInput (required) | + ### `useSignUpSmsMutation` signUpSms diff --git a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts index f288e7b2b7..168402ac9e 100644 --- a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts @@ -232,6 +232,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'signInCrossOrigin', identifier] as const) : (['mutation', 'signInCrossOrigin'] as const), + /** Mutation key for signInMagicLink */ signInMagicLink: (identifier?: string) => + identifier + ? (['mutation', 'signInMagicLink', identifier] as const) + : (['mutation', 'signInMagicLink'] as const), /** Mutation key for signInSmsOtp */ signInSmsOtp: (identifier?: string) => identifier ? (['mutation', 'signInSmsOtp', identifier] as const) @@ -242,6 +246,10 @@ export const customMutationKeys = { : (['mutation', 'signOut'] as const), /** Mutation key for signUp */ signUp: (identifier?: string) => identifier ? (['mutation', 'signUp', identifier] as const) : (['mutation', 'signUp'] as const), + /** Mutation key for signUpMagicLink */ signUpMagicLink: (identifier?: string) => + identifier + ? (['mutation', 'signUpMagicLink', identifier] as const) + : (['mutation', 'signUpMagicLink'] as const), /** Mutation key for signUpSms */ signUpSms: (identifier?: string) => identifier ? (['mutation', 'signUpSms', identifier] 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 5348c0d00f..b82c9b4728 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/index.ts @@ -55,9 +55,11 @@ export * from './useSendVerificationEmailMutation'; export * from './useSetPasswordMutation'; export * from './useSignInMutation'; export * from './useSignInCrossOriginMutation'; +export * from './useSignInMagicLinkMutation'; export * from './useSignInSmsOtpMutation'; export * from './useSignOutMutation'; export * from './useSignUpMutation'; +export * from './useSignUpMagicLinkMutation'; export * from './useSignUpSmsMutation'; export * from './useVerifyEmailMutation'; export * from './useVerifyPasswordMutation'; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts index c54e6183dd..9d93c21aef 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalScopeOverrideMutation.ts @@ -1,5 +1,5 @@ /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreatePrincipalScopeOverrideInput, } from '../../orm/input-types'; /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```tsx diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useSignInMagicLinkMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useSignInMagicLinkMutation.ts new file mode 100644 index 0000000000..46d5701907 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useSignInMagicLinkMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for signInMagicLink + * @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 { SignInMagicLinkVariables } from '../../orm/mutation'; +import type { SignInMagicLinkPayloadSelect, SignInMagicLinkPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SignInMagicLinkVariables } from '../../orm/mutation'; +export type { SignInMagicLinkPayloadSelect } from '../../orm/input-types'; +export function useSignInMagicLinkMutation( + params: { + selection: { + fields: S & SignInMagicLinkPayloadSelect; + } & HookStrictSelect, SignInMagicLinkPayloadSelect>; + } & Omit< + UseMutationOptions< + { + signInMagicLink: InferSelectResult | null; + }, + Error, + SignInMagicLinkVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + signInMagicLink: InferSelectResult | null; + }, + Error, + SignInMagicLinkVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.signInMagicLink(), + mutationFn: (variables: SignInMagicLinkVariables) => + getClient() + .mutation.signInMagicLink(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useSignUpMagicLinkMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useSignUpMagicLinkMutation.ts new file mode 100644 index 0000000000..dd79403961 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useSignUpMagicLinkMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for signUpMagicLink + * @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 { SignUpMagicLinkVariables } from '../../orm/mutation'; +import type { SignUpMagicLinkPayloadSelect, SignUpMagicLinkPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SignUpMagicLinkVariables } from '../../orm/mutation'; +export type { SignUpMagicLinkPayloadSelect } from '../../orm/input-types'; +export function useSignUpMagicLinkMutation( + params: { + selection: { + fields: S & SignUpMagicLinkPayloadSelect; + } & HookStrictSelect, SignUpMagicLinkPayloadSelect>; + } & Omit< + UseMutationOptions< + { + signUpMagicLink: InferSelectResult | null; + }, + Error, + SignUpMagicLinkVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + signUpMagicLink: InferSelectResult | null; + }, + Error, + SignUpMagicLinkVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.signUpMagicLink(), + mutationFn: (variables: SignUpMagicLinkVariables) => + getClient() + .mutation.signUpMagicLink(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts index 9930844113..dce6310fa7 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverrideQuery.ts @@ -1,5 +1,5 @@ /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -22,7 +22,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const principalScopeOverrideQueryKey = principalScopeOverrideKeys.detail; /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```tsx @@ -76,7 +76,7 @@ export function usePrincipalScopeOverrideQuery( }); } /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```ts @@ -109,7 +109,7 @@ export async function fetchPrincipalScopeOverrideQuery(params: { .unwrap(); } /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```ts diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts index 521c5fdee6..549305b1d4 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/usePrincipalScopeOverridesQuery.ts @@ -1,5 +1,5 @@ /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const principalScopeOverridesQueryKey = principalScopeOverrideKeys.list; /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```tsx @@ -97,7 +97,7 @@ export function usePrincipalScopeOverridesQuery( }); } /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```ts @@ -139,7 +139,7 @@ export async function fetchPrincipalScopeOverridesQuery(params: { return getClient().principalScopeOverride.findMany(args).unwrap(); } /** - * Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. + * Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. * * @example * ```ts diff --git a/sdk/constructive-react/src/auth/orm/README.md b/sdk/constructive-react/src/auth/orm/README.md index 79d52a6c09..1e4f99a142 100644 --- a/sdk/constructive-react/src/auth/orm/README.md +++ b/sdk/constructive-react/src/auth/orm/README.md @@ -921,6 +921,21 @@ signInCrossOrigin const result = await db.mutation.signInCrossOrigin({ input: { credentialKind: '', token: '' } }).execute(); ``` +### `db.mutation.signInMagicLink` + +signInMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInMagicLinkInput (required) | + +```typescript +const result = await db.mutation.signInMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` + ### `db.mutation.signInSmsOtp` signInSmsOtp @@ -966,6 +981,21 @@ signUp const result = await db.mutation.signUp({ input: '' }).execute(); ``` +### `db.mutation.signUpMagicLink` + +signUpMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignUpMagicLinkInput (required) | + +```typescript +const result = await db.mutation.signUpMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` + ### `db.mutation.signUpSms` signUpSms diff --git a/sdk/constructive-react/src/auth/orm/input-types.ts b/sdk/constructive-react/src/auth/orm/input-types.ts index b59a65f3f1..f2ea8e5716 100644 --- a/sdk/constructive-react/src/auth/orm/input-types.ts +++ b/sdk/constructive-react/src/auth/orm/input-types.ts @@ -306,7 +306,7 @@ export interface OrgApiKeyList { } /** User phone numbers with country code, verification, and primary-number management */ export interface PhoneNumber { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc?: string | null; createdAt?: string | null; id: string; @@ -316,7 +316,7 @@ export interface PhoneNumber { isVerified?: boolean | null; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string | null; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number?: string | null; ownerId?: string | null; updatedAt?: string | null; @@ -351,9 +351,9 @@ export interface PrincipalEntity { principalId?: string | null; updatedAt?: string | null; } -/** Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. */ +/** Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. */ export interface PrincipalScopeOverride { - /** Optional permission mask; AND-masked with parent permissions during cascade. NULL means no extra mask. */ + /** Optional capability mask; AND-masked with parent capabilities during cascade. NULL means no extra mask. */ allowedMask?: string | null; createdAt?: string | null; id: string; @@ -1866,6 +1866,13 @@ export interface SignInCrossOriginInput { credentialKind?: string; token?: string; } +export interface SignInMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignInSmsOtpInput { clientMutationId?: string; code?: string; @@ -1886,6 +1893,13 @@ export interface SignUpInput { password?: string; rememberMe?: boolean; } +export interface SignUpMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignUpSmsInput { clientMutationId?: string; code?: string; @@ -2332,7 +2346,7 @@ export interface EmailInput { } /** An input for mutations affecting `PhoneNumber` */ export interface PhoneNumberInput { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc: string; createdAt?: string; id?: string; @@ -2342,7 +2356,7 @@ export interface PhoneNumberInput { isVerified?: boolean; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number: string; ownerId?: string; updatedAt?: string; @@ -3271,6 +3285,16 @@ export type SignInCrossOriginPayloadSelect = { select: SignInCrossOriginRecordSelect; }; }; +export interface SignInMagicLinkPayload { + clientMutationId?: string | null; + result?: SignInMagicLinkRecord | null; +} +export type SignInMagicLinkPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInMagicLinkRecordSelect; + }; +}; export interface SignInSmsOtpPayload { clientMutationId?: string | null; result?: SignInSmsOtpRecord | null; @@ -3297,6 +3321,16 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; +export interface SignUpMagicLinkPayload { + clientMutationId?: string | null; + result?: SignUpMagicLinkRecord | null; +} +export type SignUpMagicLinkPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignUpMagicLinkRecordSelect; + }; +}; export interface SignUpSmsPayload { clientMutationId?: string | null; result?: SignUpSmsRecord | null; @@ -3765,6 +3799,16 @@ export type SignInCrossOriginRecordSelect = { totpEnabled?: boolean; userId?: boolean; }; +export interface SignInMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} +export type SignInMagicLinkRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + userId?: boolean; +}; export interface SignInSmsOtpRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; @@ -3791,6 +3835,16 @@ export type SignUpRecordSelect = { totpEnabled?: boolean; userId?: boolean; }; +export interface SignUpMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} +export type SignUpMagicLinkRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + userId?: boolean; +}; export interface SignUpSmsRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-react/src/auth/orm/mutation/index.ts b/sdk/constructive-react/src/auth/orm/mutation/index.ts index ae0973c7fb..d1531288e5 100644 --- a/sdk/constructive-react/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-react/src/auth/orm/mutation/index.ts @@ -30,9 +30,11 @@ import type { SetPasswordInput, SignInInput, SignInCrossOriginInput, + SignInMagicLinkInput, SignInSmsOtpInput, SignOutInput, SignUpInput, + SignUpMagicLinkInput, SignUpSmsInput, VerifyEmailInput, VerifyPasswordInput, @@ -60,9 +62,11 @@ import type { SetPasswordPayload, SignInPayload, SignInCrossOriginPayload, + SignInMagicLinkPayload, SignInSmsOtpPayload, SignOutPayload, SignUpPayload, + SignUpMagicLinkPayload, SignUpSmsPayload, VerifyEmailPayload, VerifyPasswordPayload, @@ -90,9 +94,11 @@ import type { SetPasswordPayloadSelect, SignInPayloadSelect, SignInCrossOriginPayloadSelect, + SignInMagicLinkPayloadSelect, SignInSmsOtpPayloadSelect, SignOutPayloadSelect, SignUpPayloadSelect, + SignUpMagicLinkPayloadSelect, SignUpSmsPayloadSelect, VerifyEmailPayloadSelect, VerifyPasswordPayloadSelect, @@ -175,6 +181,9 @@ export interface SignInVariables { export interface SignInCrossOriginVariables { input: SignInCrossOriginInput; } +export interface SignInMagicLinkVariables { + input: SignInMagicLinkInput; +} export interface SignInSmsOtpVariables { input: SignInSmsOtpInput; } @@ -184,6 +193,9 @@ export interface SignOutVariables { export interface SignUpVariables { input: SignUpInput; } +export interface SignUpMagicLinkVariables { + input: SignUpMagicLinkInput; +} export interface SignUpSmsVariables { input: SignUpSmsInput; } @@ -865,6 +877,35 @@ export function createMutationOperations(client: OrmClient) { 'SignInCrossOriginPayload' ), }), + signInMagicLink: ( + args: SignInMagicLinkVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signInMagicLink: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SignInMagicLink', + fieldName: 'signInMagicLink', + ...buildCustomDocument( + 'mutation', + 'SignInMagicLink', + 'signInMagicLink', + options.select, + args, + [ + { + name: 'input', + type: 'SignInMagicLinkInput!', + }, + ], + connectionFieldsMap, + 'SignInMagicLinkPayload' + ), + }), signInSmsOtp: ( args: SignInSmsOtpVariables, options: { @@ -952,6 +993,35 @@ export function createMutationOperations(client: OrmClient) { 'SignUpPayload' ), }), + signUpMagicLink: ( + args: SignUpMagicLinkVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signUpMagicLink: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SignUpMagicLink', + fieldName: 'signUpMagicLink', + ...buildCustomDocument( + 'mutation', + 'SignUpMagicLink', + 'signUpMagicLink', + options.select, + args, + [ + { + name: 'input', + type: 'SignUpMagicLinkInput!', + }, + ], + connectionFieldsMap, + 'SignUpMagicLinkPayload' + ), + }), signUpSms: ( args: SignUpSmsVariables, options: { diff --git a/sdk/constructive-react/src/auth/schema-types.ts b/sdk/constructive-react/src/auth/schema-types.ts index f0c12b9dff..6c3a334363 100644 --- a/sdk/constructive-react/src/auth/schema-types.ts +++ b/sdk/constructive-react/src/auth/schema-types.ts @@ -942,7 +942,7 @@ export interface PhoneNumberFilter { } /** An input for mutations affecting `PhoneNumber` */ export interface PhoneNumberInput { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc: string; createdAt?: string; id?: string; @@ -952,14 +952,14 @@ export interface PhoneNumberInput { isVerified?: boolean; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number: string; ownerId?: string; updatedAt?: string; } /** Represents an update to a `PhoneNumber`. Fields that are set will be updated. */ export interface PhoneNumberPatch { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc?: string; createdAt?: string; id?: string; @@ -969,7 +969,7 @@ export interface PhoneNumberPatch { isVerified?: boolean; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number?: string; ownerId?: string; updatedAt?: string; @@ -1200,6 +1200,13 @@ export interface SignInInput { password?: string; rememberMe?: boolean; } +export interface SignInMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignInSmsOtpInput { clientMutationId?: string; code?: string; @@ -1220,6 +1227,13 @@ export interface SignUpInput { password?: string; rememberMe?: boolean; } +export interface SignUpMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignUpSmsInput { clientMutationId?: string; code?: string; @@ -1944,6 +1958,10 @@ export interface SignInCrossOriginPayload { clientMutationId?: string | null; result?: SignInCrossOriginRecord | null; } +export interface SignInMagicLinkPayload { + clientMutationId?: string | null; + result?: SignInMagicLinkRecord | null; +} export interface SignInSmsOtpPayload { clientMutationId?: string | null; result?: SignInSmsOtpRecord | null; @@ -1955,6 +1973,10 @@ export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; } +export interface SignUpMagicLinkPayload { + clientMutationId?: string | null; + result?: SignUpMagicLinkRecord | null; +} export interface SignUpSmsPayload { clientMutationId?: string | null; result?: SignUpSmsRecord | null; @@ -2168,6 +2190,11 @@ export interface SignInCrossOriginRecord { totpEnabled?: boolean | null; userId?: string | null; } +export interface SignInMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} export interface SignInSmsOtpRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; @@ -2181,6 +2208,11 @@ export interface SignUpRecord { totpEnabled?: boolean | null; userId?: string | null; } +export interface SignUpMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} export interface SignUpSmsRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-react/src/compute/README.md b/sdk/constructive-react/src/compute/README.md index 588bc458a8..632b02d5a3 100644 --- a/sdk/constructive-react/src/compute/README.md +++ b/sdk/constructive-react/src/compute/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 69 +- **Tables:** 70 - **Custom queries:** 1 -- **Custom mutations:** 28 +- **Custom mutations:** 37 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/compute/hooks/README.md b/sdk/constructive-react/src/compute/hooks/README.md index b46fe2311e..fcd6647c76 100644 --- a/sdk/constructive-react/src/compute/hooks/README.md +++ b/sdk/constructive-react/src/compute/hooks/README.md @@ -32,6 +32,11 @@ function App() { | Hook | Type | Description | |------|------|-------------| +| `useContentPresetsQuery` | Query | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | +| `useContentPresetQuery` | Query | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | +| `useCreateContentPresetMutation` | Mutation | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | +| `useUpdateContentPresetMutation` | Mutation | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | +| `useDeleteContentPresetMutation` | Mutation | Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store | | `useDbPresetsQuery` | Query | Database provisioning preset catalog — merkle-versioned head over the infra store | | `useDbPresetQuery` | Query | Database provisioning preset catalog — merkle-versioned head over the infra store | | `useCreateDbPresetMutation` | Mutation | Database provisioning preset catalog — merkle-versioned head over the infra store | @@ -354,12 +359,19 @@ function App() { | `useImportGraphJsonMutation` | Mutation | importGraphJson | | `useInfraInitEmptyRepoMutation` | Mutation | infraInitEmptyRepo | | `useInfraInsertNodeAtPathMutation` | Mutation | infraInsertNodeAtPath | +| `useInfraInsertNodesAtPathsMutation` | Mutation | infraInsertNodesAtPaths | +| `useInfraSetAndCommitMutation` | Mutation | infraSetAndCommit | | `useInfraSetDataAtPathMutation` | Mutation | infraSetDataAtPath | +| `useInfraSetManyAndCommitMutation` | Mutation | infraSetManyAndCommit | | `useInitEmptyRepoMutation` | Mutation | initEmptyRepo | | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | +| `useInsertNodesAtPathsMutation` | Mutation | insertNodesAtPaths | | `usePlatformInfraInitEmptyRepoMutation` | Mutation | platformInfraInitEmptyRepo | | `usePlatformInfraInsertNodeAtPathMutation` | Mutation | platformInfraInsertNodeAtPath | +| `usePlatformInfraInsertNodesAtPathsMutation` | Mutation | platformInfraInsertNodesAtPaths | +| `usePlatformInfraSetAndCommitMutation` | Mutation | platformInfraSetAndCommit | | `usePlatformInfraSetDataAtPathMutation` | Mutation | platformInfraSetDataAtPath | +| `usePlatformInfraSetManyAndCommitMutation` | Mutation | platformInfraSetManyAndCommit | | `usePlatformResourceInstallationsInstallMutation` | Mutation | platformResourceInstallationsInstall | | `usePlatformResourceInstallationsRollbackMutation` | Mutation | platformResourceInstallationsRollback | | `usePlatformResourceInstallationsUninstallMutation` | Mutation | platformResourceInstallationsUninstall | @@ -373,12 +385,35 @@ and lifecycle settings. | | `useResourceInstallationsUninstallMutation` | Mutation | resourceInstallationsUninstall | | `useResourceInstallationsUpgradeMutation` | Mutation | resourceInstallationsUpgrade | | `useSaveGraphMutation` | Mutation | saveGraph | +| `useSetAndCommitMutation` | Mutation | setAndCommit | | `useSetDataAtPathMutation` | Mutation | setDataAtPath | +| `useSetManyAndCommitMutation` | Mutation | setManyAndCommit | | `useStartExecutionMutation` | Mutation | startExecution | | `useValidateFunctionGraphMutation` | Mutation | validateFunctionGraph | ## Table Hooks +### ContentPreset + +```typescript +// List all contentPresets +const { data, isLoading } = useContentPresetsQuery({ + selection: { fields: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }, +}); + +// Get one contentPreset +const { data: item } = useContentPresetQuery({ + id: '', + selection: { fields: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }, +}); + +// Create a contentPreset +const { mutate: create } = useCreateContentPresetMutation({ + selection: { fields: { id: true } }, +}); +create({ active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }); +``` + ### DbPreset ```typescript @@ -447,20 +482,20 @@ create({ bucketId: '', databaseId: '', functionId: '', graphId ```typescript // List all functionDefinitions const { data, isLoading } = useFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Get one functionDefinition const { data: item } = useFunctionDefinitionQuery({ id: '', - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Create a functionDefinition const { mutate: create } = useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -create({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +create({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` ### FunctionDeployment @@ -468,20 +503,20 @@ create({ accessChannels: '', category: '', concurrency: '', ```typescript // List all functionDeployments const { data, isLoading } = useFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Get one functionDeployment const { data: item } = useFunctionDeploymentQuery({ id: '', - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Create a functionDeployment const { mutate: create } = useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -create({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +create({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` ### FunctionDeploymentEvent @@ -960,20 +995,20 @@ create({ bucketId: '', functionId: '', graphId: '', key: '', - selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Create a platformFunctionDefinition const { mutate: create } = useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -create({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +create({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` ### PlatformFunctionDeployment @@ -981,20 +1016,20 @@ create({ accessChannels: '', billable: '', category: '' ```typescript // List all platformFunctionDeployments const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Get one platformFunctionDeployment const { data: item } = usePlatformFunctionDeploymentQuery({ id: '', - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Create a platformFunctionDeployment const { mutate: create } = useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -create({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +create({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` ### PlatformFunctionDeploymentEvent @@ -1874,6 +1909,28 @@ infraInsertNodeAtPath |----------|------| | `input` | InfraInsertNodeAtPathInput (required) | +### `useInfraInsertNodesAtPathsMutation` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +### `useInfraSetAndCommitMutation` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + ### `useInfraSetDataAtPathMutation` infraSetDataAtPath @@ -1885,6 +1942,17 @@ infraSetDataAtPath |----------|------| | `input` | InfraSetDataAtPathInput (required) | +### `useInfraSetManyAndCommitMutation` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + ### `useInitEmptyRepoMutation` initEmptyRepo @@ -1907,6 +1975,17 @@ insertNodeAtPath |----------|------| | `input` | InsertNodeAtPathInput (required) | +### `useInsertNodesAtPathsMutation` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + ### `usePlatformInfraInitEmptyRepoMutation` platformInfraInitEmptyRepo @@ -1929,6 +2008,28 @@ platformInfraInsertNodeAtPath |----------|------| | `input` | PlatformInfraInsertNodeAtPathInput (required) | +### `usePlatformInfraInsertNodesAtPathsMutation` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +### `usePlatformInfraSetAndCommitMutation` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + ### `usePlatformInfraSetDataAtPathMutation` platformInfraSetDataAtPath @@ -1940,6 +2041,17 @@ platformInfraSetDataAtPath |----------|------| | `input` | PlatformInfraSetDataAtPathInput (required) | +### `usePlatformInfraSetManyAndCommitMutation` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + ### `usePlatformResourceInstallationsInstallMutation` platformResourceInstallationsInstall @@ -2053,6 +2165,17 @@ saveGraph |----------|------| | `input` | SaveGraphInput (required) | +### `useSetAndCommitMutation` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + ### `useSetDataAtPathMutation` setDataAtPath @@ -2064,6 +2187,17 @@ setDataAtPath |----------|------| | `input` | SetDataAtPathInput (required) | +### `useSetManyAndCommitMutation` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + ### `useStartExecutionMutation` startExecution diff --git a/sdk/constructive-react/src/compute/hooks/index.ts b/sdk/constructive-react/src/compute/hooks/index.ts index 1ae73239df..0507a6d4e8 100644 --- a/sdk/constructive-react/src/compute/hooks/index.ts +++ b/sdk/constructive-react/src/compute/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: DbPreset, FunctionApiBinding, FunctionCapabilityBinding, FunctionDefinition, FunctionDeployment, FunctionDeploymentEvent, FunctionExecutionLog, FunctionGraphCommit, FunctionGraph, FunctionGraphExecution, FunctionGraphExecutionNodeState, FunctionGraphExecutionOutput, FunctionGraphObject, FunctionGraphRef, FunctionGraphStore, FunctionInvocationAttempt, FunctionInvocation, GetAllTreeNodesRecord, InfraCommit, InfraGetAllTreeNodesRecord, InfraObject, InfraRef, InfraStore, IntegrationProvider, Namespace, NamespaceEvent, PlatformFunctionApiBinding, PlatformFunctionCapabilityBinding, PlatformFunctionDefinition, PlatformFunctionDeployment, PlatformFunctionDeploymentEvent, PlatformFunctionExecutionLog, PlatformFunctionInvocationAttempt, PlatformFunctionInvocation, PlatformInfraCommit, PlatformInfraGetAllTreeNodesRecord, PlatformInfraObject, PlatformInfraRef, PlatformInfraStore, PlatformNamespace, PlatformNamespaceEvent, PlatformResource, PlatformResourceDeclaredCapacity, PlatformResourceDefinition, PlatformResourceEvent, PlatformResourceInstallation, PlatformResourceStatusCheck, PlatformResourceUsageLog, PlatformResourceUsageSummary, PlatformResourceUtilization, PlatformResourcesHealth, PlatformResourcesRequirementsState, PlatformResourcesResolvedRequirement, PlatformWebhookEndpoint, PlatformWebhookEvent, Resource, ResourceDeclaredCapacity, ResourceDefinition, ResourceEvent, ResourceInstallation, ResourceStatusCheck, ResourceUsageLog, ResourceUsageSummary, ResourceUtilization, ResourcesHealth, ResourcesRequirementsState, ResourcesResolvedRequirement, WebhookEndpoint, WebhookEvent + * Tables: ContentPreset, DbPreset, FunctionApiBinding, FunctionCapabilityBinding, FunctionDefinition, FunctionDeployment, FunctionDeploymentEvent, FunctionExecutionLog, FunctionGraphCommit, FunctionGraph, FunctionGraphExecution, FunctionGraphExecutionNodeState, FunctionGraphExecutionOutput, FunctionGraphObject, FunctionGraphRef, FunctionGraphStore, FunctionInvocationAttempt, FunctionInvocation, GetAllTreeNodesRecord, InfraCommit, InfraGetAllTreeNodesRecord, InfraObject, InfraRef, InfraStore, IntegrationProvider, Namespace, NamespaceEvent, PlatformFunctionApiBinding, PlatformFunctionCapabilityBinding, PlatformFunctionDefinition, PlatformFunctionDeployment, PlatformFunctionDeploymentEvent, PlatformFunctionExecutionLog, PlatformFunctionInvocationAttempt, PlatformFunctionInvocation, PlatformInfraCommit, PlatformInfraGetAllTreeNodesRecord, PlatformInfraObject, PlatformInfraRef, PlatformInfraStore, PlatformNamespace, PlatformNamespaceEvent, PlatformResource, PlatformResourceDeclaredCapacity, PlatformResourceDefinition, PlatformResourceEvent, PlatformResourceInstallation, PlatformResourceStatusCheck, PlatformResourceUsageLog, PlatformResourceUsageSummary, PlatformResourceUtilization, PlatformResourcesHealth, PlatformResourcesRequirementsState, PlatformResourcesResolvedRequirement, PlatformWebhookEndpoint, PlatformWebhookEvent, Resource, ResourceDeclaredCapacity, ResourceDefinition, ResourceEvent, ResourceInstallation, ResourceStatusCheck, ResourceUsageLog, ResourceUsageSummary, ResourceUtilization, ResourcesHealth, ResourcesRequirementsState, ResourcesResolvedRequirement, WebhookEndpoint, WebhookEvent * * Usage: * diff --git a/sdk/constructive-react/src/compute/hooks/invalidation.ts b/sdk/constructive-react/src/compute/hooks/invalidation.ts index c97b212a12..968d643276 100644 --- a/sdk/constructive-react/src/compute/hooks/invalidation.ts +++ b/sdk/constructive-react/src/compute/hooks/invalidation.ts @@ -15,6 +15,7 @@ import type { QueryClient } from '@tanstack/react-query'; import { + contentPresetKeys, dbPresetKeys, functionApiBindingKeys, functionCapabilityBindingKeys, @@ -105,6 +106,23 @@ import { * ``` */ export const invalidate = { + /** Invalidate contentPreset queries */ contentPreset: { + /** Invalidate all contentPreset queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.all, + }), + /** Invalidate contentPreset list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.lists(), + }), + /** Invalidate a specific contentPreset */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.detail(id), + }), + }, /** Invalidate dbPreset queries */ dbPreset: { /** Invalidate all dbPreset queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1311,6 +1329,14 @@ export const invalidate = { * instead of just invalidating (which would trigger a refetch). */ export const remove = { + /** Remove contentPreset from cache */ contentPreset: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: contentPresetKeys.detail(id), + }); + }, /** Remove dbPreset from cache */ dbPreset: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: dbPresetKeys.detail(id), diff --git a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts index 0464eaef3e..2f18965532 100644 --- a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts @@ -18,6 +18,15 @@ // Entity Mutation Keys // ============================================================================ +export const contentPresetMutationKeys = { + /** All contentPreset mutation keys */ all: ['mutation', 'contentpreset'] as const, + /** Create contentPreset mutation key */ create: () => + ['mutation', 'contentpreset', 'create'] as const, + /** Update contentPreset mutation key */ update: (id: string | number) => + ['mutation', 'contentpreset', 'update', id] as const, + /** Delete contentPreset mutation key */ delete: (id: string | number) => + ['mutation', 'contentpreset', 'delete', id] as const, +} as const; export const dbPresetMutationKeys = { /** All dbPreset mutation keys */ all: ['mutation', 'dbpreset'] as const, /** Create dbPreset mutation key */ create: () => ['mutation', 'dbpreset', 'create'] as const, @@ -775,10 +784,22 @@ export const customMutationKeys = { identifier ? (['mutation', 'infraInsertNodeAtPath', identifier] as const) : (['mutation', 'infraInsertNodeAtPath'] as const), + /** Mutation key for infraInsertNodesAtPaths */ infraInsertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'infraInsertNodesAtPaths', identifier] as const) + : (['mutation', 'infraInsertNodesAtPaths'] as const), + /** Mutation key for infraSetAndCommit */ infraSetAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'infraSetAndCommit', identifier] as const) + : (['mutation', 'infraSetAndCommit'] as const), /** Mutation key for infraSetDataAtPath */ infraSetDataAtPath: (identifier?: string) => identifier ? (['mutation', 'infraSetDataAtPath', identifier] as const) : (['mutation', 'infraSetDataAtPath'] as const), + /** Mutation key for infraSetManyAndCommit */ infraSetManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'infraSetManyAndCommit', identifier] as const) + : (['mutation', 'infraSetManyAndCommit'] as const), /** Mutation key for initEmptyRepo */ initEmptyRepo: (identifier?: string) => identifier ? (['mutation', 'initEmptyRepo', identifier] as const) @@ -787,6 +808,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'insertNodeAtPath', identifier] as const) : (['mutation', 'insertNodeAtPath'] as const), + /** Mutation key for insertNodesAtPaths */ insertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'insertNodesAtPaths', identifier] as const) + : (['mutation', 'insertNodesAtPaths'] as const), /** Mutation key for platformInfraInitEmptyRepo */ platformInfraInitEmptyRepo: ( identifier?: string ) => @@ -799,12 +824,30 @@ export const customMutationKeys = { identifier ? (['mutation', 'platformInfraInsertNodeAtPath', identifier] as const) : (['mutation', 'platformInfraInsertNodeAtPath'] as const), + /** Mutation key for platformInfraInsertNodesAtPaths */ platformInfraInsertNodesAtPaths: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraInsertNodesAtPaths', identifier] as const) + : (['mutation', 'platformInfraInsertNodesAtPaths'] as const), + /** Mutation key for platformInfraSetAndCommit */ platformInfraSetAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetAndCommit'] as const), /** Mutation key for platformInfraSetDataAtPath */ platformInfraSetDataAtPath: ( identifier?: string ) => identifier ? (['mutation', 'platformInfraSetDataAtPath', identifier] as const) : (['mutation', 'platformInfraSetDataAtPath'] as const), + /** Mutation key for platformInfraSetManyAndCommit */ platformInfraSetManyAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetManyAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetManyAndCommit'] as const), /** Mutation key for platformResourceInstallationsInstall */ platformResourceInstallationsInstall: (identifier?: string) => identifier @@ -857,10 +900,18 @@ export const customMutationKeys = { identifier ? (['mutation', 'saveGraph', identifier] as const) : (['mutation', 'saveGraph'] as const), + /** Mutation key for setAndCommit */ setAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setAndCommit', identifier] as const) + : (['mutation', 'setAndCommit'] as const), /** Mutation key for setDataAtPath */ setDataAtPath: (identifier?: string) => identifier ? (['mutation', 'setDataAtPath', identifier] as const) : (['mutation', 'setDataAtPath'] as const), + /** Mutation key for setManyAndCommit */ setManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setManyAndCommit', identifier] as const) + : (['mutation', 'setManyAndCommit'] as const), /** Mutation key for startExecution */ startExecution: (identifier?: string) => identifier ? (['mutation', 'startExecution', identifier] as const) @@ -893,6 +944,7 @@ export const customMutationKeys = { * ``` */ export const mutationKeys = { + contentPreset: contentPresetMutationKeys, dbPreset: dbPresetMutationKeys, functionApiBinding: functionApiBindingMutationKeys, functionCapabilityBinding: functionCapabilityBindingMutationKeys, diff --git a/sdk/constructive-react/src/compute/hooks/mutations/index.ts b/sdk/constructive-react/src/compute/hooks/mutations/index.ts index e44b98ba84..c2ec348302 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/index.ts @@ -3,6 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useCreateContentPresetMutation'; +export * from './useUpdateContentPresetMutation'; +export * from './useDeleteContentPresetMutation'; export * from './useCreateDbPresetMutation'; export * from './useUpdateDbPresetMutation'; export * from './useDeleteDbPresetMutation'; @@ -193,12 +196,19 @@ export * from './useImportDefinitionsMutation'; export * from './useImportGraphJsonMutation'; export * from './useInfraInitEmptyRepoMutation'; export * from './useInfraInsertNodeAtPathMutation'; +export * from './useInfraInsertNodesAtPathsMutation'; +export * from './useInfraSetAndCommitMutation'; export * from './useInfraSetDataAtPathMutation'; +export * from './useInfraSetManyAndCommitMutation'; export * from './useInitEmptyRepoMutation'; export * from './useInsertNodeAtPathMutation'; +export * from './useInsertNodesAtPathsMutation'; export * from './usePlatformInfraInitEmptyRepoMutation'; export * from './usePlatformInfraInsertNodeAtPathMutation'; +export * from './usePlatformInfraInsertNodesAtPathsMutation'; +export * from './usePlatformInfraSetAndCommitMutation'; export * from './usePlatformInfraSetDataAtPathMutation'; +export * from './usePlatformInfraSetManyAndCommitMutation'; export * from './usePlatformResourceInstallationsInstallMutation'; export * from './usePlatformResourceInstallationsRollbackMutation'; export * from './usePlatformResourceInstallationsUninstallMutation'; @@ -209,6 +219,8 @@ export * from './useResourceInstallationsRollbackMutation'; export * from './useResourceInstallationsUninstallMutation'; export * from './useResourceInstallationsUpgradeMutation'; export * from './useSaveGraphMutation'; +export * from './useSetAndCommitMutation'; export * from './useSetDataAtPathMutation'; +export * from './useSetManyAndCommitMutation'; export * from './useStartExecutionMutation'; export * from './useValidateFunctionGraphMutation'; diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useCreateContentPresetMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useCreateContentPresetMutation.ts new file mode 100644 index 0000000000..b710975d4a --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useCreateContentPresetMutation.ts @@ -0,0 +1,88 @@ +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * @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 { contentPresetKeys } from '../query-keys'; +import { contentPresetMutationKeys } from '../mutation-keys'; +import type { + ContentPresetSelect, + ContentPresetWithRelations, + CreateContentPresetInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetSelect, + ContentPresetWithRelations, + CreateContentPresetInput, +} from '../../orm/input-types'; +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateContentPresetMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateContentPresetMutation( + params: { + selection: { + fields: S & ContentPresetSelect; + } & HookStrictSelect, ContentPresetSelect>; + } & Omit< + UseMutationOptions< + { + createContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + CreateContentPresetInput['contentPreset'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + CreateContentPresetInput['contentPreset'] +>; +export function useCreateContentPresetMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: contentPresetMutationKeys.create(), + mutationFn: (data: CreateContentPresetInput['contentPreset']) => + getClient() + .contentPreset.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useDeleteContentPresetMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteContentPresetMutation.ts new file mode 100644 index 0000000000..3ef5345b7b --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useDeleteContentPresetMutation.ts @@ -0,0 +1,98 @@ +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * @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 { contentPresetKeys } from '../query-keys'; +import { contentPresetMutationKeys } from '../mutation-keys'; +import type { ContentPresetSelect, ContentPresetWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ContentPresetSelect, ContentPresetWithRelations } from '../../orm/input-types'; +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteContentPresetMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteContentPresetMutation( + params: { + selection: { + fields: S & ContentPresetSelect; + } & HookStrictSelect, ContentPresetSelect>; + } & Omit< + UseMutationOptions< + { + deleteContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteContentPresetMutation( + 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: contentPresetMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .contentPreset.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: contentPresetKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts index 62ee82bcb1..f9b756d583 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionFullTextSearch + * Custom mutation hook for infraInsertNodesAtPaths * @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 { ProvisionFullTextSearchVariables } from '../../orm/mutation'; +import type { InfraInsertNodesAtPathsVariables } from '../../orm/mutation'; import type { - ProvisionFullTextSearchPayloadSelect, - ProvisionFullTextSearchPayload, + InfraInsertNodesAtPathsPayloadSelect, + InfraInsertNodesAtPathsPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionFullTextSearchVariables } from '../../orm/mutation'; -export type { ProvisionFullTextSearchPayloadSelect } from '../../orm/input-types'; -export function useProvisionFullTextSearchMutation( +export type { InfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInfraInsertNodesAtPathsMutation( params: { selection: { - fields: S & ProvisionFullTextSearchPayloadSelect; - } & HookStrictSelect, ProvisionFullTextSearchPayloadSelect>; + fields: S & InfraInsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InfraInsertNodesAtPathsPayloadSelect>; } & Omit< UseMutationOptions< { - provisionFullTextSearch: InferSelectResult | null; + infraInsertNodesAtPaths: InferSelectResult | null; }, Error, - ProvisionFullTextSearchVariables + InfraInsertNodesAtPathsVariables >, 'mutationFn' > ): UseMutationResult< { - provisionFullTextSearch: InferSelectResult | null; + infraInsertNodesAtPaths: InferSelectResult | null; }, Error, - ProvisionFullTextSearchVariables + InfraInsertNodesAtPathsVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionFullTextSearch(), - mutationFn: (variables: ProvisionFullTextSearchVariables) => + mutationKey: customMutationKeys.infraInsertNodesAtPaths(), + mutationFn: (variables: InfraInsertNodesAtPathsVariables) => getClient() - .mutation.provisionFullTextSearch(variables, { + .mutation.infraInsertNodesAtPaths(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts similarity index 54% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts index bb8032dba0..46a2bad5c9 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionRelation + * Custom mutation hook for infraSetAndCommit * @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 { ProvisionRelationVariables } from '../../orm/mutation'; +import type { InfraSetAndCommitVariables } from '../../orm/mutation'; import type { - ProvisionRelationPayloadSelect, - ProvisionRelationPayload, + InfraSetAndCommitPayloadSelect, + InfraSetAndCommitPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionRelationVariables } from '../../orm/mutation'; -export type { ProvisionRelationPayloadSelect } from '../../orm/input-types'; -export function useProvisionRelationMutation( +export type { InfraSetAndCommitVariables } from '../../orm/mutation'; +export type { InfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useInfraSetAndCommitMutation( params: { selection: { - fields: S & ProvisionRelationPayloadSelect; - } & HookStrictSelect, ProvisionRelationPayloadSelect>; + fields: S & InfraSetAndCommitPayloadSelect; + } & HookStrictSelect, InfraSetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionRelation: InferSelectResult | null; + infraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionRelationVariables + InfraSetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionRelation: InferSelectResult | null; + infraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionRelationVariables + InfraSetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionRelation(), - mutationFn: (variables: ProvisionRelationVariables) => + mutationKey: customMutationKeys.infraSetAndCommit(), + mutationFn: (variables: InfraSetAndCommitVariables) => getClient() - .mutation.provisionRelation(variables, { + .mutation.infraSetAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..0f388c9cd3 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for infraSetManyAndCommit + * @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 { InfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { + InfraSetManyAndCommitPayloadSelect, + InfraSetManyAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InfraSetManyAndCommitVariables } from '../../orm/mutation'; +export type { InfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useInfraSetManyAndCommitMutation( + params: { + selection: { + fields: S & InfraSetManyAndCommitPayloadSelect; + } & HookStrictSelect, InfraSetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + infraSetManyAndCommit: InferSelectResult | null; + }, + Error, + InfraSetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + infraSetManyAndCommit: InferSelectResult | null; + }, + Error, + InfraSetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.infraSetManyAndCommit(), + mutationFn: (variables: InfraSetManyAndCommitVariables) => + getClient() + .mutation.infraSetManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..70612f27eb --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for insertNodesAtPaths + * @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 { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + InsertNodesAtPathsPayloadSelect, + InsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInsertNodesAtPathsMutation( + params: { + selection: { + fields: S & InsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.insertNodesAtPaths(), + mutationFn: (variables: InsertNodesAtPathsVariables) => + getClient() + .mutation.insertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..924154505d --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraInsertNodesAtPaths + * @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 { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraInsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { PlatformInfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraInsertNodesAtPathsMutation< + S extends PlatformInfraInsertNodesAtPathsPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraInsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, PlatformInfraInsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraInsertNodesAtPaths(), + mutationFn: (variables: PlatformInfraInsertNodesAtPathsVariables) => + getClient() + .mutation.platformInfraInsertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts index 7af850b840..9bac5e7fd6 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionUniqueConstraint + * Custom mutation hook for platformInfraSetAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,50 +10,50 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionUniqueConstraintVariables } from '../../orm/mutation'; +import type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; import type { - ProvisionUniqueConstraintPayloadSelect, - ProvisionUniqueConstraintPayload, + PlatformInfraSetAndCommitPayloadSelect, + PlatformInfraSetAndCommitPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionUniqueConstraintVariables } from '../../orm/mutation'; -export type { ProvisionUniqueConstraintPayloadSelect } from '../../orm/input-types'; -export function useProvisionUniqueConstraintMutation< - S extends ProvisionUniqueConstraintPayloadSelect, +export type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetAndCommitMutation< + S extends PlatformInfraSetAndCommitPayloadSelect, >( params: { selection: { - fields: S & ProvisionUniqueConstraintPayloadSelect; - } & HookStrictSelect, ProvisionUniqueConstraintPayloadSelect>; + fields: S & PlatformInfraSetAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionUniqueConstraint: InferSelectResult | null; + platformInfraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionUniqueConstraintVariables + PlatformInfraSetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionUniqueConstraint: InferSelectResult | null; + platformInfraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionUniqueConstraintVariables + PlatformInfraSetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionUniqueConstraint(), - mutationFn: (variables: ProvisionUniqueConstraintVariables) => + mutationKey: customMutationKeys.platformInfraSetAndCommit(), + mutationFn: (variables: PlatformInfraSetAndCommitVariables) => getClient() - .mutation.provisionUniqueConstraint(variables, { + .mutation.platformInfraSetAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..a6a7fcf2d0 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraSetManyAndCommit + * @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 { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { + PlatformInfraSetManyAndCommitPayloadSelect, + PlatformInfraSetManyAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetManyAndCommitMutation< + S extends PlatformInfraSetManyAndCommitPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraSetManyAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraSetManyAndCommit(), + mutationFn: (variables: PlatformInfraSetManyAndCommitVariables) => + getClient() + .mutation.platformInfraSetManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts new file mode 100644 index 0000000000..efbed76921 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setAndCommit + * @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 { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect, SetAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetAndCommitVariables } from '../../orm/mutation'; +export type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetAndCommitMutation( + params: { + selection: { + fields: S & SetAndCommitPayloadSelect; + } & HookStrictSelect, SetAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setAndCommit: InferSelectResult | null; + }, + Error, + SetAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setAndCommit: InferSelectResult | null; + }, + Error, + SetAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setAndCommit(), + mutationFn: (variables: SetAndCommitVariables) => + getClient() + .mutation.setAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..91ead94fd0 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setManyAndCommit + * @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 { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect, SetManyAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetManyAndCommitVariables } from '../../orm/mutation'; +export type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetManyAndCommitMutation( + params: { + selection: { + fields: S & SetManyAndCommitPayloadSelect; + } & HookStrictSelect, SetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setManyAndCommit(), + mutationFn: (variables: SetManyAndCommitVariables) => + getClient() + .mutation.setManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useUpdateContentPresetMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateContentPresetMutation.ts new file mode 100644 index 0000000000..85a7fce776 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useUpdateContentPresetMutation.ts @@ -0,0 +1,116 @@ +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * @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 { contentPresetKeys } from '../query-keys'; +import { contentPresetMutationKeys } from '../mutation-keys'; +import type { + ContentPresetSelect, + ContentPresetWithRelations, + ContentPresetPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetSelect, + ContentPresetWithRelations, + ContentPresetPatch, +} from '../../orm/input-types'; +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateContentPresetMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', contentPresetPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateContentPresetMutation( + params: { + selection: { + fields: S & ContentPresetSelect; + } & HookStrictSelect, ContentPresetSelect>; + } & Omit< + UseMutationOptions< + { + updateContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + { + id: string; + contentPresetPatch: ContentPresetPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateContentPreset: { + contentPreset: InferSelectResult; + }; + }, + Error, + { + id: string; + contentPresetPatch: ContentPresetPatch; + } +>; +export function useUpdateContentPresetMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + contentPresetPatch: ContentPresetPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: contentPresetMutationKeys.all, + mutationFn: ({ + id, + contentPresetPatch, + }: { + id: string; + contentPresetPatch: ContentPresetPatch; + }) => + getClient() + .contentPreset.update({ + where: { + id, + }, + data: contentPresetPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: contentPresetKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/index.ts b/sdk/constructive-react/src/compute/hooks/queries/index.ts index 4ce588ee01..f6ad0cde08 100644 --- a/sdk/constructive-react/src/compute/hooks/queries/index.ts +++ b/sdk/constructive-react/src/compute/hooks/queries/index.ts @@ -3,6 +3,8 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useContentPresetsQuery'; +export * from './useContentPresetQuery'; export * from './useDbPresetsQuery'; export * from './useDbPresetQuery'; export * from './useFunctionApiBindingsQuery'; diff --git a/sdk/constructive-react/src/compute/hooks/queries/useContentPresetQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useContentPresetQuery.ts new file mode 100644 index 0000000000..61687e0ba3 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useContentPresetQuery.ts @@ -0,0 +1,138 @@ +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * @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 { contentPresetKeys } from '../query-keys'; +import type { ContentPresetSelect, ContentPresetWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ContentPresetSelect, ContentPresetWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const contentPresetQueryKey = contentPresetKeys.detail; +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```tsx + * const { data, isLoading } = useContentPresetQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useContentPresetQuery< + S extends ContentPresetSelect, + TData = { + contentPreset: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetSelect>; + } & Omit< + UseQueryOptions< + { + contentPreset: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useContentPresetQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: contentPresetKeys.detail(params.id), + queryFn: () => + getClient() + .contentPreset.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```ts + * const data = await fetchContentPresetQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchContentPresetQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetSelect>; +}): Promise<{ + contentPreset: InferSelectResult | null; +}>; +export async function fetchContentPresetQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .contentPreset.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```ts + * await prefetchContentPresetQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchContentPresetQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetSelect>; + } +): Promise; +export async function prefetchContentPresetQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: contentPresetKeys.detail(params.id), + queryFn: () => + getClient() + .contentPreset.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/queries/useContentPresetsQuery.ts b/sdk/constructive-react/src/compute/hooks/queries/useContentPresetsQuery.ts new file mode 100644 index 0000000000..c43b4f9766 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/queries/useContentPresetsQuery.ts @@ -0,0 +1,151 @@ +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * @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 { contentPresetKeys } from '../query-keys'; +import type { + ContentPresetSelect, + ContentPresetWithRelations, + ContentPresetFilter, + ContentPresetOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ContentPresetSelect, + ContentPresetWithRelations, + ContentPresetFilter, + ContentPresetOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const contentPresetsQueryKey = contentPresetKeys.list; +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```tsx + * const { data, isLoading } = useContentPresetsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useContentPresetsQuery< + S extends ContentPresetSelect, + TData = { + contentPresets: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ContentPresetSelect>; + } & Omit< + UseQueryOptions< + { + contentPresets: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useContentPresetsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ContentPresetSelect, + ContentPresetFilter, + ContentPresetOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: contentPresetKeys.list(args), + queryFn: () => getClient().contentPreset.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```ts + * const data = await fetchContentPresetsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchContentPresetsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ContentPresetSelect>; +}): Promise<{ + contentPresets: ConnectionResult>; +}>; +export async function fetchContentPresetsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + ContentPresetSelect, + ContentPresetFilter, + ContentPresetOrderBy + >(params.selection); + return getClient().contentPreset.findMany(args).unwrap(); +} +/** + * Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store + * + * @example + * ```ts + * await prefetchContentPresetsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchContentPresetsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ContentPresetSelect>; + } +): Promise; +export async function prefetchContentPresetsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + ContentPresetSelect, + ContentPresetFilter, + ContentPresetOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: contentPresetKeys.list(args), + queryFn: () => getClient().contentPreset.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/query-keys.ts b/sdk/constructive-react/src/compute/hooks/query-keys.ts index 5156963bb3..4958367027 100644 --- a/sdk/constructive-react/src/compute/hooks/query-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/query-keys.ts @@ -19,6 +19,15 @@ // Entity Query Keys // ============================================================================ +export const contentPresetKeys = { + /** All contentPreset queries */ all: ['contentpreset'] as const, + /** List query keys */ lists: () => [...contentPresetKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...contentPresetKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...contentPresetKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...contentPresetKeys.details(), id] as const, +} as const; export const dbPresetKeys = { /** All dbPreset queries */ all: ['dbpreset'] as const, /** List query keys */ lists: () => [...dbPresetKeys.all, 'list'] as const, @@ -716,6 +725,7 @@ export const customQueryKeys = { * ``` */ export const queryKeys = { + contentPreset: contentPresetKeys, dbPreset: dbPresetKeys, functionApiBinding: functionApiBindingKeys, functionCapabilityBinding: functionCapabilityBindingKeys, diff --git a/sdk/constructive-react/src/compute/orm/README.md b/sdk/constructive-react/src/compute/orm/README.md index d1a03c4e98..a3ab572efd 100644 --- a/sdk/constructive-react/src/compute/orm/README.md +++ b/sdk/constructive-react/src/compute/orm/README.md @@ -21,6 +21,7 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `contentPreset` | findMany, findOne, create, update, delete | | `dbPreset` | findMany, findOne, create, update, delete | | `functionApiBinding` | findMany, findOne, create, update, delete | | `functionCapabilityBinding` | findMany, findOne, create, update, delete | @@ -93,6 +94,45 @@ const db = createClient({ ## Table Operations +### `db.contentPreset` + +CRUD operations for ContentPreset records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `active` | Boolean | Yes | +| `commitId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `definition` | JSON | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `label` | String | Yes | +| `slug` | String | Yes | +| `storeId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all contentPreset records +const items = await db.contentPreset.findMany({ select: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.contentPreset.findOne({ id: '', select: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.contentPreset.create({ data: { active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.contentPreset.update({ where: { id: '' }, data: { active: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.contentPreset.delete({ where: { id: '' } }).execute(); +``` + ### `db.dbPreset` CRUD operations for DbPreset records. @@ -245,6 +285,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -261,13 +302,13 @@ CRUD operations for FunctionDefinition records. ```typescript // List all functionDefinition records -const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -297,6 +338,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -311,13 +353,13 @@ CRUD operations for FunctionDeployment records. ```typescript // List all functionDeployment records -const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -1227,6 +1269,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -1244,13 +1287,13 @@ CRUD operations for PlatformFunctionDefinition records. ```typescript // List all platformFunctionDefinition records -const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -1279,6 +1322,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -1293,13 +1337,13 @@ CRUD operations for PlatformFunctionDeployment records. ```typescript // List all platformFunctionDeployment records -const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -3053,6 +3097,36 @@ infraInsertNodeAtPath const result = await db.mutation.infraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.infraInsertNodesAtPaths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.infraSetAndCommit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.infraSetDataAtPath` infraSetDataAtPath @@ -3068,6 +3142,21 @@ infraSetDataAtPath const result = await db.mutation.infraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.infraSetManyAndCommit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.initEmptyRepo` initEmptyRepo @@ -3098,6 +3187,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraInitEmptyRepo` platformInfraInitEmptyRepo @@ -3128,6 +3232,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -3143,6 +3277,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.platformResourceInstallationsInstall` platformResourceInstallationsInstall @@ -3296,6 +3445,21 @@ saveGraph const result = await db.mutation.saveGraph({ input: { graphId: '', message: '', rootHash: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -3311,6 +3475,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.startExecution` startExecution diff --git a/sdk/constructive-react/src/compute/orm/index.ts b/sdk/constructive-react/src/compute/orm/index.ts index 531cf363ab..62973ed4f2 100644 --- a/sdk/constructive-react/src/compute/orm/index.ts +++ b/sdk/constructive-react/src/compute/orm/index.ts @@ -5,6 +5,7 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ContentPresetModel } from './models/contentPreset'; import { DbPresetModel } from './models/dbPreset'; import { FunctionApiBindingModel } from './models/functionApiBinding'; import { FunctionCapabilityBindingModel } from './models/functionCapabilityBinding'; @@ -109,6 +110,7 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + contentPreset: new ContentPresetModel(client), dbPreset: new DbPresetModel(client), functionApiBinding: new FunctionApiBindingModel(client), functionCapabilityBinding: new FunctionCapabilityBindingModel(client), diff --git a/sdk/constructive-react/src/compute/orm/input-types.ts b/sdk/constructive-react/src/compute/orm/input-types.ts index a132305584..566e3f81b1 100644 --- a/sdk/constructive-react/src/compute/orm/input-types.ts +++ b/sdk/constructive-react/src/compute/orm/input-types.ts @@ -234,8 +234,33 @@ export interface UUIDListFilter { export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeImage = unknown; export type ResourceRequirement = unknown; -/** Database provisioning preset catalog — merkle-versioned head over the infra store */ +/** Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store */ // ============ Entity Types ============ +export interface ContentPreset { + /** Whether this preset is selectable at provision time */ + active?: boolean | null; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string | null; + /** Timestamp of preset creation */ + createdAt?: string | null; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition?: Record | null; + /** Human-readable description of the preset */ + description?: string | null; + /** Unique preset identifier */ + id: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind?: string | null; + /** Human-readable preset name */ + label?: string | null; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug?: string | null; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string | null; + /** Timestamp of last modification */ + updatedAt?: string | null; +} +/** Database provisioning preset catalog — merkle-versioned head over the infra store */ export interface DbPreset { /** Whether this preset is selectable for new databases */ active?: boolean | null; @@ -296,7 +321,7 @@ export interface FunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface FunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string | null; @@ -352,12 +377,14 @@ export interface FunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -406,6 +433,8 @@ export interface FunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -911,7 +940,7 @@ export interface PlatformFunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface PlatformFunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean | null; @@ -967,12 +996,14 @@ export interface PlatformFunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -1021,6 +1052,8 @@ export interface PlatformFunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -1946,6 +1979,7 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ContentPresetRelations {} export interface DbPresetRelations {} export interface FunctionApiBindingRelations { functionDefinition?: FunctionDefinition | null; @@ -2098,6 +2132,7 @@ export interface WebhookEventRelations { endpoint?: WebhookEndpoint | null; } // ============ Entity Types With Relations ============ +export type ContentPresetWithRelations = ContentPreset & ContentPresetRelations; export type DbPresetWithRelations = DbPreset & DbPresetRelations; export type FunctionApiBindingWithRelations = FunctionApiBinding & FunctionApiBindingRelations; export type FunctionCapabilityBindingWithRelations = FunctionCapabilityBinding & @@ -2205,6 +2240,19 @@ export type ResourcesResolvedRequirementWithRelations = ResourcesResolvedRequire export type WebhookEndpointWithRelations = WebhookEndpoint & WebhookEndpointRelations; export type WebhookEventWithRelations = WebhookEvent & WebhookEventRelations; // ============ Entity Select Types ============ +export type ContentPresetSelect = { + active?: boolean; + commitId?: boolean; + createdAt?: boolean; + definition?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + label?: boolean; + slug?: boolean; + storeId?: boolean; + updatedAt?: boolean; +}; export type DbPresetSelect = { active?: boolean; commitId?: boolean; @@ -2284,6 +2332,7 @@ export type FunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2328,6 +2377,7 @@ export type FunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -2697,6 +2747,7 @@ export type PlatformFunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2744,6 +2795,7 @@ export type PlatformFunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -3472,6 +3524,36 @@ export type WebhookEventSelect = { }; }; // ============ Table Filter Types ============ +export interface ContentPresetFilter { + /** Filter by the object’s `active` field. */ + active?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ContentPresetFilter[]; + /** Filter by the object’s `commitId` field. */ + commitId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `definition` field. */ + definition?: JSONFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Negates the expression. */ + not?: ContentPresetFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface DbPresetFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -3639,6 +3721,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3699,6 +3783,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -4451,6 +4537,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -4507,6 +4595,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -5912,6 +6002,32 @@ export interface WebhookEventFilter { updatedAt?: DatetimeFilter; } // ============ OrderBy Types ============ +export type ContentPresetOrderBy = + | 'ACTIVE_ASC' + | 'ACTIVE_DESC' + | 'COMMIT_ID_ASC' + | 'COMMIT_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DEFINITION_ASC' + | 'DEFINITION_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type DbPresetOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -6048,6 +6164,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6100,6 +6218,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -6712,6 +6832,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6764,6 +6886,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -7921,6 +8045,38 @@ export type WebhookEventOrderBy = | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; // ============ CRUD Input Types ============ +export interface CreateContentPresetInput { + clientMutationId?: string; + contentPreset: { + active?: boolean; + commitId?: string; + definition: Record; + description?: string; + kind: string; + label?: string; + slug: string; + storeId?: string; + }; +} +export interface ContentPresetPatch { + active?: boolean | null; + commitId?: string | null; + definition?: Record | null; + description?: string | null; + kind?: string | null; + label?: string | null; + slug?: string | null; + storeId?: string | null; +} +export interface UpdateContentPresetInput { + clientMutationId?: string; + id: string; + contentPresetPatch: ContentPresetPatch; +} +export interface DeleteContentPresetInput { + clientMutationId?: string; + id: string; +} export interface CreateDbPresetInput { clientMutationId?: string; dbPreset: { @@ -8036,6 +8192,7 @@ export interface CreateFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8074,6 +8231,7 @@ export interface FunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8107,6 +8265,7 @@ export interface CreateFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8129,6 +8288,7 @@ export interface FunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -8895,6 +9055,7 @@ export interface CreatePlatformFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8934,6 +9095,7 @@ export interface PlatformFunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8967,6 +9129,7 @@ export interface CreatePlatformFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8988,6 +9151,7 @@ export interface PlatformFunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -10613,6 +10777,26 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10620,6 +10804,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface InitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10634,6 +10826,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface PlatformInfraInitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10648,6 +10849,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10655,6 +10876,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformResourceInstallationsInstallInput { clientMutationId?: string; definitionIds?: string[]; @@ -10714,6 +10943,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10721,6 +10961,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -11067,6 +11315,31 @@ export interface WebhookEndpointToManyWebhookEventFilter { /** Filters to entities where at least one related entity matches. */ some?: WebhookEventFilter; } +/** An input for mutations affecting `ContentPreset` */ +export interface ContentPresetInput { + /** Whether this preset is selectable at provision time */ + active?: boolean; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string; + /** Timestamp of preset creation */ + createdAt?: string; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition: Record; + /** Human-readable description of the preset */ + description?: string; + /** Unique preset identifier */ + id?: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind: string; + /** Human-readable preset name */ + label?: string; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug: string; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string; + /** Timestamp of last modification */ + updatedAt?: string; +} /** An input for mutations affecting `DbPreset` */ export interface DbPresetInput { /** Whether this preset is selectable for new databases */ @@ -11128,7 +11401,7 @@ export interface FunctionCapabilityBindingInput { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -11176,12 +11449,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11234,6 +11509,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -11704,7 +11981,7 @@ export interface PlatformFunctionCapabilityBindingInput { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -11752,12 +12029,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11804,6 +12083,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -12841,6 +13122,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -12900,6 +13183,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13282,6 +13567,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13882,6 +14169,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -14189,6 +14478,28 @@ export type InfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14197,6 +14508,20 @@ export type InfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14211,6 +14536,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14225,6 +14558,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14233,6 +14588,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -14315,6 +14684,20 @@ export type SaveGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14323,6 +14706,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; @@ -14339,6 +14736,51 @@ export type ValidateFunctionGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was created by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type CreateContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; +export interface UpdateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was updated by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type UpdateContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; +export interface DeleteContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was deleted by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type DeleteContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; export interface CreateDbPresetPayload { clientMutationId?: string | null; /** The `DbPreset` that was created by this mutation. */ @@ -16852,6 +17294,54 @@ export type DeleteWebhookEventPayloadSelect = { select: WebhookEventEdgeSelect; }; }; +/** A `InfraCommit` edge in the connection. */ +export interface InfraCommitEdge { + cursor?: string | null; + /** The `InfraCommit` at the end of the edge. */ + node?: InfraCommit | null; +} +export type InfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: InfraCommitSelect; + }; +}; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; +/** A `FunctionGraphCommit` edge in the connection. */ +export interface FunctionGraphCommitEdge { + cursor?: string | null; + /** The `FunctionGraphCommit` at the end of the edge. */ + node?: FunctionGraphCommit | null; +} +export type FunctionGraphCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphCommitSelect; + }; +}; +/** A `ContentPreset` edge in the connection. */ +export interface ContentPresetEdge { + cursor?: string | null; + /** The `ContentPreset` at the end of the edge. */ + node?: ContentPreset | null; +} +export type ContentPresetEdgeSelect = { + cursor?: boolean; + node?: { + select: ContentPresetSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -16936,18 +17426,6 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; -/** A `FunctionGraphCommit` edge in the connection. */ -export interface FunctionGraphCommitEdge { - cursor?: string | null; - /** The `FunctionGraphCommit` at the end of the edge. */ - node?: FunctionGraphCommit | null; -} -export type FunctionGraphCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionGraphCommitSelect; - }; -}; /** A `FunctionGraph` edge in the connection. */ export interface FunctionGraphEdge { cursor?: string | null; @@ -17056,18 +17534,6 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; -/** A `InfraCommit` edge in the connection. */ -export interface InfraCommitEdge { - cursor?: string | null; - /** The `InfraCommit` at the end of the edge. */ - node?: InfraCommit | null; -} -export type InfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: InfraCommitSelect; - }; -}; /** A `InfraObject` edge in the connection. */ export interface InfraObjectEdge { cursor?: string | null; @@ -17236,18 +17702,6 @@ export type PlatformFunctionInvocationEdgeSelect = { select: PlatformFunctionInvocationSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts b/sdk/constructive-react/src/compute/orm/models/contentPreset.ts similarity index 53% rename from sdk/constructive-sdk/src/admin/orm/models/appPermission.ts rename to sdk/constructive-react/src/compute/orm/models/contentPreset.ts index efa4812398..20242ccc78 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts +++ b/sdk/constructive-react/src/compute/orm/models/contentPreset.ts @@ -1,5 +1,5 @@ /** - * AppPermission model for ORM client + * ContentPreset 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 { - AppPermission, - AppPermissionWithRelations, - AppPermissionSelect, - AppPermissionFilter, - AppPermissionOrderBy, - CreateAppPermissionInput, - UpdateAppPermissionInput, - AppPermissionPatch, + ContentPreset, + ContentPresetWithRelations, + ContentPresetSelect, + ContentPresetFilter, + ContentPresetOrderBy, + CreateContentPresetInput, + UpdateContentPresetInput, + ContentPresetPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class AppPermissionModel { +export class ContentPresetModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermissions: ConnectionResult>; + contentPresets: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'AppPermission', - 'appPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class AppPermissionModel { before: args?.before, offset: args?.offset, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermissions', + operationName: 'ContentPreset', + fieldName: 'contentPresets', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermission: InferSelectResult | null; + contentPreset: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'AppPermission', - 'appPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermission', + operationName: 'ContentPreset', + fieldName: 'contentPreset', document, variables, transform: (data: { - appPermissions?: { - nodes?: InferSelectResult[]; + contentPresets?: { + nodes?: InferSelectResult[]; }; }) => ({ - appPermission: data.appPermissions?.nodes?.[0] ?? null, + contentPreset: data.contentPresets?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermission: InferSelectResult | null; + contentPreset: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'AppPermission', - 'appPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: { @@ -124,91 +124,91 @@ export class AppPermissionModel { }, first: 1, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermission', + operationName: 'ContentPreset', + fieldName: 'contentPreset', document, variables, transform: (data: { - appPermissions?: { - nodes?: InferSelectResult[]; + contentPresets?: { + nodes?: InferSelectResult[]; }; }) => ({ - appPermission: data.appPermissions?.nodes?.[0] ?? null, + contentPreset: data.contentPresets?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createAppPermission: { - appPermission: InferSelectResult; + createContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'AppPermission', - 'createAppPermission', - 'appPermission', + 'ContentPreset', + 'createContentPreset', + 'contentPreset', args.select, args.data, - 'CreateAppPermissionInput', + 'CreateContentPresetInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'createAppPermission', + operationName: 'ContentPreset', + fieldName: 'createContentPreset', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - AppPermissionPatch + ContentPresetPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateAppPermission: { - appPermission: InferSelectResult; + updateContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'AppPermission', - 'updateAppPermission', - 'appPermission', + 'ContentPreset', + 'updateContentPreset', + 'contentPreset', args.select, args.where.id, args.data, - 'UpdateAppPermissionInput', + 'UpdateContentPresetInput', 'id', - 'appPermissionPatch', + 'contentPresetPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'updateAppPermission', + operationName: 'ContentPreset', + fieldName: 'updateContentPreset', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class AppPermissionModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteAppPermission: { - appPermission: InferSelectResult; + deleteContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'AppPermission', - 'deleteAppPermission', - 'appPermission', + 'ContentPreset', + 'deleteContentPreset', + 'contentPreset', { id: args.where.id, }, - 'DeleteAppPermissionInput', + 'DeleteContentPresetInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'deleteAppPermission', + operationName: 'ContentPreset', + fieldName: 'deleteContentPreset', document, variables, }); diff --git a/sdk/constructive-react/src/compute/orm/models/index.ts b/sdk/constructive-react/src/compute/orm/models/index.ts index e2480958de..bb1916cea6 100644 --- a/sdk/constructive-react/src/compute/orm/models/index.ts +++ b/sdk/constructive-react/src/compute/orm/models/index.ts @@ -3,6 +3,7 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ContentPresetModel } from './contentPreset'; export { DbPresetModel } from './dbPreset'; export { FunctionApiBindingModel } from './functionApiBinding'; export { FunctionCapabilityBindingModel } from './functionCapabilityBinding'; diff --git a/sdk/constructive-react/src/compute/orm/mutation/index.ts b/sdk/constructive-react/src/compute/orm/mutation/index.ts index c5bc975047..948d1e8903 100644 --- a/sdk/constructive-react/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-react/src/compute/orm/mutation/index.ts @@ -16,12 +16,19 @@ import type { ImportGraphJsonInput, InfraInitEmptyRepoInput, InfraInsertNodeAtPathInput, + InfraInsertNodesAtPathsInput, + InfraSetAndCommitInput, InfraSetDataAtPathInput, + InfraSetManyAndCommitInput, InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, PlatformResourceInstallationsInstallInput, PlatformResourceInstallationsRollbackInput, PlatformResourceInstallationsUninstallInput, @@ -32,7 +39,9 @@ import type { ResourceInstallationsUninstallInput, ResourceInstallationsUpgradeInput, SaveGraphInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, StartExecutionInput, ValidateFunctionGraphInput, AddEdgePayload, @@ -44,12 +53,19 @@ import type { ImportGraphJsonPayload, InfraInitEmptyRepoPayload, InfraInsertNodeAtPathPayload, + InfraInsertNodesAtPathsPayload, + InfraSetAndCommitPayload, InfraSetDataAtPathPayload, + InfraSetManyAndCommitPayload, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, PlatformResourceInstallationsInstallPayload, PlatformResourceInstallationsRollbackPayload, PlatformResourceInstallationsUninstallPayload, @@ -60,7 +76,9 @@ import type { ResourceInstallationsUninstallPayload, ResourceInstallationsUpgradePayload, SaveGraphPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, StartExecutionPayload, ValidateFunctionGraphPayload, AddEdgePayloadSelect, @@ -72,12 +90,19 @@ import type { ImportGraphJsonPayloadSelect, InfraInitEmptyRepoPayloadSelect, InfraInsertNodeAtPathPayloadSelect, + InfraInsertNodesAtPathsPayloadSelect, + InfraSetAndCommitPayloadSelect, InfraSetDataAtPathPayloadSelect, + InfraSetManyAndCommitPayloadSelect, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, PlatformResourceInstallationsInstallPayloadSelect, PlatformResourceInstallationsRollbackPayloadSelect, PlatformResourceInstallationsUninstallPayloadSelect, @@ -88,7 +113,9 @@ import type { ResourceInstallationsUninstallPayloadSelect, ResourceInstallationsUpgradePayloadSelect, SaveGraphPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, StartExecutionPayloadSelect, ValidateFunctionGraphPayloadSelect, } from '../input-types'; @@ -120,24 +147,45 @@ export interface InfraInitEmptyRepoVariables { export interface InfraInsertNodeAtPathVariables { input: InfraInsertNodeAtPathInput; } +export interface InfraInsertNodesAtPathsVariables { + input: InfraInsertNodesAtPathsInput; +} +export interface InfraSetAndCommitVariables { + input: InfraSetAndCommitInput; +} export interface InfraSetDataAtPathVariables { input: InfraSetDataAtPathInput; } +export interface InfraSetManyAndCommitVariables { + input: InfraSetManyAndCommitInput; +} export interface InitEmptyRepoVariables { input: InitEmptyRepoInput; } export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} export interface PlatformInfraInitEmptyRepoVariables { input: PlatformInfraInitEmptyRepoInput; } export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} export interface PlatformResourceInstallationsInstallVariables { input: PlatformResourceInstallationsInstallInput; } @@ -175,9 +223,15 @@ export interface ResourceInstallationsUpgradeVariables { export interface SaveGraphVariables { input: SaveGraphInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export interface StartExecutionVariables { input: StartExecutionInput; } @@ -447,6 +501,64 @@ export function createMutationOperations(client: OrmClient) { 'InfraInsertNodeAtPathPayload' ), }), + infraInsertNodesAtPaths: ( + args: InfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraInsertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraInsertNodesAtPaths', + fieldName: 'infraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InfraInsertNodesAtPaths', + 'infraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InfraInsertNodesAtPathsPayload' + ), + }), + infraSetAndCommit: ( + args: InfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetAndCommit', + fieldName: 'infraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetAndCommit', + 'infraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetAndCommitPayload' + ), + }), infraSetDataAtPath: ( args: InfraSetDataAtPathVariables, options: { @@ -476,6 +588,35 @@ export function createMutationOperations(client: OrmClient) { 'InfraSetDataAtPathPayload' ), }), + infraSetManyAndCommit: ( + args: InfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetManyAndCommit', + fieldName: 'infraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetManyAndCommit', + 'infraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetManyAndCommitPayload' + ), + }), initEmptyRepo: ( args: InitEmptyRepoVariables, options: { @@ -534,6 +675,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), platformInfraInitEmptyRepo: ( args: PlatformInfraInitEmptyRepoVariables, options: { @@ -595,6 +765,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -624,6 +855,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), platformResourceInstallationsInstall: < S extends PlatformResourceInstallationsInstallPayloadSelect, >( @@ -946,6 +1209,35 @@ export function createMutationOperations(client: OrmClient) { 'SaveGraphPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -975,6 +1267,35 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), startExecution: ( args: StartExecutionVariables, options: { diff --git a/sdk/constructive-react/src/compute/schema-types.ts b/sdk/constructive-react/src/compute/schema-types.ts index 0bf71d7986..1b51e2e9f3 100644 --- a/sdk/constructive-react/src/compute/schema-types.ts +++ b/sdk/constructive-react/src/compute/schema-types.ts @@ -5,6 +5,7 @@ */ import type { + ContentPreset, DbPreset, FunctionApiBinding, FunctionCapabilityBinding, @@ -94,6 +95,33 @@ import type { } from './types'; export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeImage = unknown; +/** Methods to use when ordering `ContentPreset`. */ +export type ContentPresetOrderBy = + | 'ACTIVE_ASC' + | 'ACTIVE_DESC' + | 'COMMIT_ID_ASC' + | 'COMMIT_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DEFINITION_ASC' + | 'DEFINITION_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `DbPreset`. */ export type DbPresetOrderBy = | 'ACTIVE_ASC' @@ -234,6 +262,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -308,6 +338,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -905,6 +937,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -977,6 +1011,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -2236,12 +2272,98 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } +/** A filter to be used against `ContentPreset` object types. All fields are combined with a logical ‘and.’ */ +export interface ContentPresetFilter { + /** Filter by the object’s `active` field. */ + active?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ContentPresetFilter[]; + /** Filter by the object’s `commitId` field. */ + commitId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `definition` field. */ + definition?: JSONFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Negates the expression. */ + not?: ContentPresetFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `ContentPreset` */ +export interface ContentPresetInput { + /** Whether this preset is selectable at provision time */ + active?: boolean; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string; + /** Timestamp of preset creation */ + createdAt?: string; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition: unknown; + /** Human-readable description of the preset */ + description?: string; + /** Unique preset identifier */ + id?: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind: string; + /** Human-readable preset name */ + label?: string; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug: string; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string; + /** Timestamp of last modification */ + updatedAt?: string; +} +/** Represents an update to a `ContentPreset`. Fields that are set will be updated. */ +export interface ContentPresetPatch { + /** Whether this preset is selectable at provision time */ + active?: boolean; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string; + /** Timestamp of preset creation */ + createdAt?: string; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition?: unknown; + /** Human-readable description of the preset */ + description?: string; + /** Unique preset identifier */ + id?: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind?: string; + /** Human-readable preset name */ + label?: string; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug?: string; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string; + /** Timestamp of last modification */ + updatedAt?: string; +} export interface CopyGraphInput { clientMutationId?: string; graphId?: string; name?: string; scopeId?: string; } +export interface CreateContentPresetInput { + clientMutationId?: string; + /** The `ContentPreset` to be created by this mutation. */ + contentPreset: ContentPresetInput; +} export interface CreateDbPresetInput { clientMutationId?: string; /** The `DbPreset` to be created by this mutation. */ @@ -2607,6 +2729,11 @@ export interface DbPresetPatch { /** Timestamp of last modification */ updatedAt?: string; } +export interface DeleteContentPresetInput { + clientMutationId?: string; + /** Unique preset identifier */ + id: string; +} export interface DeleteDbPresetInput { clientMutationId?: string; /** Unique preset identifier */ @@ -3139,6 +3266,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3166,7 +3295,7 @@ export interface FunctionDefinitionFilter { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -3214,12 +3343,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -3242,7 +3373,7 @@ export interface FunctionDefinitionInput { } /** Represents an update to a `FunctionDefinition`. Fields that are set will be updated. */ export interface FunctionDefinitionPatch { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string; @@ -3290,12 +3421,14 @@ export interface FunctionDefinitionPatch { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -3442,6 +3575,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -3487,6 +3622,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -3531,6 +3668,8 @@ export interface FunctionDeploymentPatch { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -4605,6 +4744,15 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `InfraObject` object types. All fields are combined with a logical ‘and.’ */ export interface InfraObjectFilter { /** Checks for all expressions in this list. */ @@ -4701,6 +4849,17 @@ export interface InfraRefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -4708,6 +4867,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `InfraStore` object types. All fields are combined with a logical ‘and.’ */ export interface InfraStoreFilter { /** Checks for all expressions in this list. */ @@ -4767,6 +4934,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `IntegrationProvider` object types. All fields are combined with a logical ‘and.’ */ export interface IntegrationProviderFilter { /** Checks for all expressions in this list. */ @@ -5324,6 +5500,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -5349,7 +5527,7 @@ export interface PlatformFunctionDefinitionFilter { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -5397,12 +5575,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -5427,7 +5607,7 @@ export interface PlatformFunctionDefinitionInput { } /** Represents an update to a `PlatformFunctionDefinition`. Fields that are set will be updated. */ export interface PlatformFunctionDefinitionPatch { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -5475,12 +5655,14 @@ export interface PlatformFunctionDefinitionPatch { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -5621,6 +5803,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -5664,6 +5848,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -5706,6 +5892,8 @@ export interface PlatformFunctionDeploymentPatch { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -6096,6 +6284,15 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `PlatformInfraObject` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraObjectFilter { /** Checks for all expressions in this list. */ @@ -6192,6 +6389,17 @@ export interface PlatformInfraRefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -6199,6 +6407,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `PlatformInfraStore` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraStoreFilter { /** Checks for all expressions in this list. */ @@ -8449,6 +8665,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -8456,6 +8683,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -8469,6 +8704,13 @@ export interface StartExecutionInput { parentNodeName?: string; timeoutInterval?: IntervalInput; } +export interface UpdateContentPresetInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `ContentPreset` being updated. */ + contentPresetPatch: ContentPresetPatch; + /** Unique preset identifier */ + id: string; +} export interface UpdateDbPresetInput { clientMutationId?: string; /** An object where the defined keys will be set on the `DbPreset` being updated. */ @@ -9099,6 +9341,13 @@ export interface WebhookEventPatch { export interface MetaSchema { tables: MetaTable[]; } +/** A connection to a list of `ContentPreset` values. */ +export interface ContentPresetConnection { + edges: ContentPresetEdge[]; + nodes: ContentPreset[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `DbPreset` values. */ export interface DbPresetConnection { edges: DbPresetEdge[]; @@ -9602,6 +9851,12 @@ export interface CopyGraphPayload { clientMutationId?: string | null; result?: string | null; } +export interface CreateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was created by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} export interface CreateDbPresetPayload { clientMutationId?: string | null; /** The `DbPreset` that was created by this mutation. */ @@ -9936,6 +10191,12 @@ export interface CreateWebhookEventPayload { webhookEvent?: WebhookEvent | null; webhookEventEdge?: WebhookEventEdge | null; } +export interface DeleteContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was deleted by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} export interface DeleteDbPresetPayload { clientMutationId?: string | null; /** The `DbPreset` that was deleted by this mutation. */ @@ -10286,10 +10547,24 @@ export interface InfraInsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -10297,6 +10572,10 @@ export interface InsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -10304,10 +10583,24 @@ export interface PlatformInfraInsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -10352,14 +10645,30 @@ export interface SaveGraphPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; } +export interface UpdateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was updated by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} export interface UpdateDbPresetPayload { clientMutationId?: string | null; /** The `DbPreset` that was updated by this mutation. */ @@ -10727,11 +11036,11 @@ export interface MetaTable { tableName: string; uniqueConstraints: MetaUniqueConstraint[]; } -/** A `DbPreset` edge in the connection. */ -export interface DbPresetEdge { +/** A `ContentPreset` edge in the connection. */ +export interface ContentPresetEdge { cursor?: string | null; - /** The `DbPreset` at the end of the edge. */ - node?: DbPreset | null; + /** The `ContentPreset` at the end of the edge. */ + node?: ContentPreset | null; } /** Information about pagination in a connection. */ export interface PageInfo { @@ -10744,6 +11053,12 @@ export interface PageInfo { /** When paginating backwards, the cursor to continue. */ startCursor?: string | null; } +/** A `DbPreset` edge in the connection. */ +export interface DbPresetEdge { + cursor?: string | null; + /** The `DbPreset` at the end of the edge. */ + node?: DbPreset | null; +} /** A `FunctionApiBinding` edge in the connection. */ export interface FunctionApiBindingEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/compute/types.ts b/sdk/constructive-react/src/compute/types.ts index 808fcda5a5..c7435471f3 100644 --- a/sdk/constructive-react/src/compute/types.ts +++ b/sdk/constructive-react/src/compute/types.ts @@ -6,6 +6,19 @@ export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeImage = unknown; export type ResourceRequirement = unknown; +export interface ContentPreset { + active: boolean | null; + commitId: string | null; + createdAt: string | null; + definition: unknown | null; + description: string | null; + id: string | null; + kind: string | null; + label: string | null; + slug: string | null; + storeId: string | null; + updatedAt: string | null; +} export interface DbPreset { active: boolean | null; commitId: string | null; @@ -73,6 +86,7 @@ export interface FunctionDefinition { requiredBuckets: string[] | null; requiredConfigs: ResourceRequirement[] | null; requiredModels: string[] | null; + requiredModules: string[] | null; requiredSecrets: ResourceRequirement[] | null; resources: unknown | null; runtime: string | null; @@ -99,6 +113,7 @@ export interface FunctionDeployment { lastError: string | null; lastErrorAt: string | null; namespaceId: string | null; + realm: string | null; resources: unknown | null; revision: number | null; scaleMax: number | null; @@ -405,6 +420,7 @@ export interface PlatformFunctionDefinition { requiredBuckets: string[] | null; requiredConfigs: ResourceRequirement[] | null; requiredModels: string[] | null; + requiredModules: string[] | null; requiredSecrets: ResourceRequirement[] | null; resources: unknown | null; runtime: string | null; @@ -431,6 +447,7 @@ export interface PlatformFunctionDeployment { lastError: string | null; lastErrorAt: string | null; namespaceId: string | null; + realm: string | null; resources: unknown | null; revision: number | null; scaleMax: number | null; diff --git a/sdk/constructive-react/src/modules/README.md b/sdk/constructive-react/src/modules/README.md index df958f0479..89d33f4a84 100644 --- a/sdk/constructive-react/src/modules/README.md +++ b/sdk/constructive-react/src/modules/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 76 -- **Custom queries:** 2 -- **Custom mutations:** 10 +- **Tables:** 83 +- **Custom queries:** 0 +- **Custom mutations:** 3 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/modules/hooks/README.md b/sdk/constructive-react/src/modules/hooks/README.md index d9c19b58b1..5110084f23 100644 --- a/sdk/constructive-react/src/modules/hooks/README.md +++ b/sdk/constructive-react/src/modules/hooks/README.md @@ -72,6 +72,11 @@ function App() { | `useCreateBlueprintTemplateMutation` | Mutation | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | | `useUpdateBlueprintTemplateMutation` | Mutation | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | | `useDeleteBlueprintTemplateMutation` | Mutation | A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible). | +| `useCapabilitiesModulesQuery` | Query | List all capabilitiesModules | +| `useCapabilitiesModuleQuery` | Query | Get one capabilitiesModule | +| `useCreateCapabilitiesModuleMutation` | Mutation | Create a capabilitiesModule | +| `useUpdateCapabilitiesModuleMutation` | Mutation | Update a capabilitiesModule | +| `useDeleteCapabilitiesModuleMutation` | Mutation | Delete a capabilitiesModule | | `useCatalogModulesQuery` | Query | List all catalogModules | | `useCatalogModuleQuery` | Query | Get one catalogModule | | `useCreateCatalogModuleMutation` | Mutation | Create a catalogModule | @@ -92,6 +97,11 @@ function App() { | `useCreateConnectedAccountsModuleMutation` | Mutation | Create a connectedAccountsModule | | `useUpdateConnectedAccountsModuleMutation` | Mutation | Update a connectedAccountsModule | | `useDeleteConnectedAccountsModuleMutation` | Mutation | Delete a connectedAccountsModule | +| `useContentPresetModulesQuery` | Query | List all contentPresetModules | +| `useContentPresetModuleQuery` | Query | Get one contentPresetModule | +| `useCreateContentPresetModuleMutation` | Mutation | Create a contentPresetModule | +| `useUpdateContentPresetModuleMutation` | Mutation | Update a contentPresetModule | +| `useDeleteContentPresetModuleMutation` | Mutation | Delete a contentPresetModule | | `useCryptoAddressesModulesQuery` | Query | List all cryptoAddressesModules | | `useCryptoAddressesModuleQuery` | Query | Get one cryptoAddressesModule | | `useCreateCryptoAddressesModuleMutation` | Mutation | Create a cryptoAddressesModule | @@ -102,6 +112,11 @@ function App() { | `useCreateCryptoAuthModuleMutation` | Mutation | Create a cryptoAuthModule | | `useUpdateCryptoAuthModuleMutation` | Mutation | Update a cryptoAuthModule | | `useDeleteCryptoAuthModuleMutation` | Mutation | Delete a cryptoAuthModule | +| `useDataCapabilitiesFieldsQuery` | Query | List all dataCapabilitiesFields | +| `useDataCapabilitiesFieldQuery` | Query | Get one dataCapabilitiesField | +| `useCreateDataCapabilitiesFieldMutation` | Mutation | Create a dataCapabilitiesField | +| `useUpdateDataCapabilitiesFieldMutation` | Mutation | Update a dataCapabilitiesField | +| `useDeleteDataCapabilitiesFieldMutation` | Mutation | Delete a dataCapabilitiesField | | `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. | @@ -152,13 +167,18 @@ function App() { | `useCreateDomainModuleMutation` | Mutation | Create a domainModule | | `useUpdateDomainModuleMutation` | Mutation | Update a domainModule | | `useDeleteDomainModuleMutation` | Mutation | Delete a domainModule | +| `useEmailSenderModulesQuery` | Query | List all emailSenderModules | +| `useEmailSenderModuleQuery` | Query | Get one emailSenderModule | +| `useCreateEmailSenderModuleMutation` | Mutation | Create a emailSenderModule | +| `useUpdateEmailSenderModuleMutation` | Mutation | Update a emailSenderModule | +| `useDeleteEmailSenderModuleMutation` | Mutation | Delete a emailSenderModule | | `useEmailsModulesQuery` | Query | List all emailsModules | | `useEmailsModuleQuery` | Query | Get one emailsModule | | `useCreateEmailsModuleMutation` | Mutation | Create a emailsModule | | `useUpdateEmailsModuleMutation` | Mutation | Update a emailsModule | | `useDeleteEmailsModuleMutation` | Mutation | Delete a emailsModule | | `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). + and installs the required modules (capabilities, 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). @@ -166,7 +186,7 @@ function App() { 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). + and installs the required modules (capabilities, 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). @@ -174,7 +194,7 @@ function App() { 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). + and installs the required modules (capabilities, 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). @@ -182,7 +202,7 @@ function App() { 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). + and installs the required modules (capabilities, 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). @@ -190,7 +210,7 @@ function App() { 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). + and installs the required modules (capabilities, 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). @@ -202,6 +222,11 @@ function App() { | `useCreateEventsModuleMutation` | Mutation | Create a eventsModule | | `useUpdateEventsModuleMutation` | Mutation | Update a eventsModule | | `useDeleteEventsModuleMutation` | Mutation | Delete a eventsModule | +| `useFileRefFieldsQuery` | Query | List all fileRefFields | +| `useFileRefFieldQuery` | Query | Get one fileRefField | +| `useCreateFileRefFieldMutation` | Mutation | Create a fileRefField | +| `useUpdateFileRefFieldMutation` | Mutation | Update a fileRefField | +| `useDeleteFileRefFieldMutation` | Mutation | Delete a fileRefField | | `useFunctionDeploymentModulesQuery` | Query | List all functionDeploymentModules | | `useFunctionDeploymentModuleQuery` | Query | Get one functionDeploymentModule | | `useCreateFunctionDeploymentModuleMutation` | Mutation | Create a functionDeploymentModule | @@ -367,16 +392,41 @@ function App() { | `useCreateNotificationsModuleMutation` | Mutation | Create a notificationsModule | | `useUpdateNotificationsModuleMutation` | Mutation | Update a notificationsModule | | `useDeleteNotificationsModuleMutation` | Mutation | Delete a notificationsModule | +| `useOauthRequestsModulesQuery` | Query | Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. | +| `useOauthRequestsModuleQuery` | Query | Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. | +| `useCreateOauthRequestsModuleMutation` | Mutation | Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. | +| `useUpdateOauthRequestsModuleMutation` | Mutation | Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. | +| `useDeleteOauthRequestsModuleMutation` | Mutation | Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. | | `usePagesModulesQuery` | Query | List all pagesModules | | `usePagesModuleQuery` | Query | Get one pagesModule | | `useCreatePagesModuleMutation` | Mutation | Create a pagesModule | | `useUpdatePagesModuleMutation` | Mutation | Update a pagesModule | | `useDeletePagesModuleMutation` | Mutation | Delete a pagesModule | -| `usePermissionsModulesQuery` | Query | List all permissionsModules | -| `usePermissionsModuleQuery` | Query | Get one permissionsModule | -| `useCreatePermissionsModuleMutation` | Mutation | Create a permissionsModule | -| `useUpdatePermissionsModuleMutation` | Mutation | Update a permissionsModule | -| `useDeletePermissionsModuleMutation` | Mutation | Delete a permissionsModule | | `usePhoneNumbersModulesQuery` | Query | List all phoneNumbersModules | | `usePhoneNumbersModuleQuery` | Query | Get one phoneNumbersModule | | `useCreatePhoneNumbersModuleMutation` | Mutation | Create a phoneNumbersModule | @@ -467,6 +517,11 @@ function App() { | `useCreateRouteModuleMutation` | Mutation | Create a routeModule | | `useUpdateRouteModuleMutation` | Mutation | Update a routeModule | | `useDeleteRouteModuleMutation` | Mutation | Delete a routeModule | +| `useScopeTypesModulesQuery` | Query | List all scopeTypesModules | +| `useScopeTypesModuleQuery` | Query | Get one scopeTypesModule | +| `useCreateScopeTypesModuleMutation` | Mutation | Create a scopeTypesModule | +| `useUpdateScopeTypesModuleMutation` | Mutation | Update a scopeTypesModule | +| `useDeleteScopeTypesModuleMutation` | Mutation | Delete a scopeTypesModule | | `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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). 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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). 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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | @@ -527,6 +582,11 @@ function App() { | `useCreateUserSettingsModuleMutation` | Mutation | Create a userSettingsModule | | `useUpdateUserSettingsModuleMutation` | Mutation | Update a userSettingsModule | | `useDeleteUserSettingsModuleMutation` | Mutation | Delete a userSettingsModule | +| `useUserSettingsSecurityModulesQuery` | Query | List all userSettingsSecurityModules | +| `useUserSettingsSecurityModuleQuery` | Query | Get one userSettingsSecurityModule | +| `useCreateUserSettingsSecurityModuleMutation` | Mutation | Create a userSettingsSecurityModule | +| `useUpdateUserSettingsSecurityModuleMutation` | Mutation | Update a userSettingsSecurityModule | +| `useDeleteUserSettingsSecurityModuleMutation` | Mutation | Delete a userSettingsSecurityModule | | `useUserStateModulesQuery` | Query | List all userStateModules | | `useUserStateModuleQuery` | Query | Get one userStateModule | | `useCreateUserStateModuleMutation` | Mutation | Create a userStateModule | @@ -552,21 +612,12 @@ function App() { | `useCreateWebhookModuleMutation` | Mutation | Create a webhookModule | | `useUpdateWebhookModuleMutation` | Mutation | Update a webhookModule | | `useDeleteWebhookModuleMutation` | Mutation | Delete a webhookModule | -| `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. | -| `useResolveBlueprintTableQuery` | Query | 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. | | `useConstructBlueprintMutation` | Mutation | Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (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, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. | | `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. | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | -| `useProvisionCheckConstraintMutation` | Mutation | Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. | -| `useProvisionFullTextSearchMutation` | Mutation | 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. | -| `useProvisionIndexMutation` | Mutation | 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. | -| `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). | -| `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. | -| `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). | -| `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. | ## Table Hooks @@ -575,20 +626,20 @@ and lifecycle settings. | ```typescript // List all agentModules const { data, isLoading } = useAgentModulesQuery({ - selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, + selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, }); // Get one agentModule const { data: item } = useAgentModuleQuery({ id: '', - selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, + selection: { fields: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }, }); // Create a agentModule const { mutate: create } = useCreateAgentModuleMutation({ selection: { fields: { id: true } }, }); -create({ agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }); +create({ agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }); ``` ### ApiSurfaceModule @@ -596,20 +647,20 @@ create({ agentTableId: '', agentTableName: '', apiName: '' ```typescript // List all apiSurfaceModules const { data, isLoading } = useApiSurfaceModulesQuery({ - selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Get one apiSurfaceModule const { data: item } = useApiSurfaceModuleQuery({ id: '', - selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a apiSurfaceModule const { mutate: create } = useCreateApiSurfaceModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### AppModule @@ -617,20 +668,20 @@ create({ apiName: '', apiSchemasTableId: '', apiSchemasTableName: ```typescript // List all appModules const { data, isLoading } = useAppModulesQuery({ - selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Get one appModule const { data: item } = useAppModuleQuery({ id: '', - selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a appModule const { mutate: create } = useCreateAppModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### BillingModule @@ -638,20 +689,20 @@ create({ apiName: '', appComponentsTableId: '', appComponentsTable ```typescript // List all billingModules const { data, isLoading } = useBillingModulesQuery({ - selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, + selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, }); // Get one billingModule const { data: item } = useBillingModuleQuery({ id: '', - selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, + selection: { fields: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }, }); // Create a billingModule const { mutate: create } = useCreateBillingModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }); +create({ apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }); ``` ### BillingProviderModule @@ -659,20 +710,20 @@ create({ apiName: '', balancesTableId: '', balancesTableName: '', - selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }, + selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }, }); // Create a billingProviderModule const { mutate: create } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }); +create({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }); ``` ### Blueprint @@ -738,25 +789,46 @@ const { mutate: create } = useCreateBlueprintTemplateMutation({ create({ categories: '', complexity: '', copyCount: '', definition: '', definitionHash: '', definitionSchemaVersion: '', description: '', displayName: '', forkCount: '', forkedFromId: '', name: '', ownerId: '', source: '', tableHashes: '', tags: '', version: '', visibility: '' }); ``` +### CapabilitiesModule + +```typescript +// List all capabilitiesModules +const { data, isLoading } = useCapabilitiesModulesQuery({ + selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, +}); + +// Get one capabilitiesModule +const { data: item } = useCapabilitiesModuleQuery({ + id: '', + selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, +}); + +// Create a capabilitiesModule +const { mutate: create } = useCreateCapabilitiesModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +``` + ### CatalogModule ```typescript // List all catalogModules const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Get one catalogModule const { data: item } = useCatalogModuleQuery({ id: '', - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Create a catalogModule const { mutate: create } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +create({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` ### ComputeLogModule @@ -822,6 +894,27 @@ const { mutate: create } = useCreateConnectedAccountsModuleMutation({ create({ apiName: '', databaseId: '', ownerTableId: '', privateApiName: '', privateSchemaId: '', schemaId: '', tableId: '', tableName: '' }); ``` +### ContentPresetModule + +```typescript +// List all contentPresetModules +const { data, isLoading } = useContentPresetModulesQuery({ + selection: { fields: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }, +}); + +// Get one contentPresetModule +const { data: item } = useContentPresetModuleQuery({ + id: '', + selection: { fields: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }, +}); + +// Create a contentPresetModule +const { mutate: create } = useCreateContentPresetModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }); +``` + ### CryptoAddressesModule ```typescript @@ -864,6 +957,27 @@ const { mutate: create } = useCreateCryptoAuthModuleMutation({ create({ addressesTableId: '', cryptoNetwork: '', databaseId: '', schemaId: '', secretsTableId: '', sessionCredentialsTableId: '', sessionsTableId: '', signInRecordFailure: '', signInRequestChallenge: '', signInWithChallenge: '', signUpWithKey: '', userField: '', usersTableId: '' }); ``` +### DataCapabilitiesField + +```typescript +// List all dataCapabilitiesFields +const { data, isLoading } = useDataCapabilitiesFieldsQuery({ + selection: { fields: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }, +}); + +// Get one dataCapabilitiesField +const { data: item } = useDataCapabilitiesFieldQuery({ + id: '', + selection: { fields: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }, +}); + +// Create a dataCapabilitiesField +const { mutate: create } = useCreateDataCapabilitiesFieldMutation({ + selection: { fields: { id: true } }, +}); +create({ capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }); +``` + ### DatabaseProvisionModule ```typescript @@ -890,20 +1004,20 @@ create({ async: '', bootstrapError: '', bootstrapStatus: '', - selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }, + selection: { fields: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }, }); // Create a databaseSettingsModule const { mutate: create } = useCreateDatabaseSettingsModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }); +create({ apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }); ``` ### DbPoolConfig @@ -974,20 +1088,20 @@ create({ apiName: '', databaseId: '', dbPresetsTableId: '', ```typescript // List all dbUsageModules const { data, isLoading } = useDbUsageModulesQuery({ - selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, + selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, }); // Get one dbUsageModule const { data: item } = useDbUsageModuleQuery({ id: '', - selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, + selection: { fields: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }, }); // Create a dbUsageModule const { mutate: create } = useCreateDbUsageModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }); +create({ apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }); ``` ### DefaultIdsModule @@ -1058,20 +1172,41 @@ create({ databaseId: '', deviceSettingsTableId: '', deviceSettingsTa ```typescript // List all domainModules const { data, isLoading } = useDomainModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Get one domainModule const { data: item } = useDomainModuleQuery({ id: '', - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a domainModule const { mutate: create } = useCreateDomainModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +``` + +### EmailSenderModule + +```typescript +// List all emailSenderModules +const { data, isLoading } = useEmailSenderModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }, +}); + +// Get one emailSenderModule +const { data: item } = useEmailSenderModuleQuery({ + id: '', + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }, +}); + +// Create a emailSenderModule +const { mutate: create } = useCreateEmailSenderModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }); ``` ### EmailsModule @@ -1121,20 +1256,41 @@ create({ agents: '', databaseId: '', description: '', functi ```typescript // List all eventsModules const { data, isLoading } = useEventsModulesQuery({ - selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }, + selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }, }); // Get one eventsModule const { data: item } = useEventsModuleQuery({ id: '', - selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }, + selection: { fields: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }, }); // Create a eventsModule const { mutate: create } = useCreateEventsModuleMutation({ selection: { fields: { id: true } }, }); -create({ achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }); +create({ achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }); +``` + +### FileRefField + +```typescript +// List all fileRefFields +const { data, isLoading } = useFileRefFieldsQuery({ + selection: { fields: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }, +}); + +// Get one fileRefField +const { data: item } = useFileRefFieldQuery({ + id: '', + selection: { fields: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }, +}); + +// Create a fileRefField +const { mutate: create } = useCreateFileRefFieldMutation({ + selection: { fields: { id: true } }, +}); +create({ bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }); ``` ### FunctionDeploymentModule @@ -1142,20 +1298,20 @@ create({ achievementRewardsTableId: '', achievementRewardsTableName: '', - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a functionDeploymentModule const { mutate: create } = useCreateFunctionDeploymentModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### FunctionInvocationModule @@ -1163,20 +1319,20 @@ create({ apiName: '', databaseId: '', defaultPermissions: '', - selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a functionInvocationModule const { mutate: create } = useCreateFunctionInvocationModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### FunctionModule @@ -1184,20 +1340,20 @@ create({ apiName: '', attemptsTableId: '', attemptsTableName: '', - selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }, }); // Create a functionModule const { mutate: create } = useCreateFunctionModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }); +create({ apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }); ``` ### GraphExecutionModule @@ -1205,20 +1361,20 @@ create({ apiName: '', bindingsTableId: '', bindingsTableName: '', - selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a graphExecutionModule const { mutate: create } = useCreateGraphExecutionModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### GraphModule @@ -1226,20 +1382,20 @@ create({ apiName: '', databaseId: '', defaultPermissions: '', - selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }, + selection: { fields: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }, }); // Create a graphModule const { mutate: create } = useCreateGraphModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }); ``` ### HierarchyModule @@ -1247,20 +1403,20 @@ create({ apiName: '', databaseId: '', defaultPermissions: '', - selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }, + selection: { fields: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }, }); // Create a hierarchyModule const { mutate: create } = useCreateHierarchyModuleMutation({ selection: { fields: { id: true } }, }); -create({ chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }); +create({ chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }); ``` ### HttpRouteModule @@ -1268,20 +1424,20 @@ create({ chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', ```typescript // List all httpRouteModules const { data, isLoading } = useHttpRouteModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, }); // Get one httpRouteModule const { data: item } = useHttpRouteModuleQuery({ id: '', - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }, }); // Create a httpRouteModule const { mutate: create } = useCreateHttpRouteModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }); ``` ### I18NModule @@ -1457,20 +1613,20 @@ create({ apiName: '', claimedInvitesTableId: '', claimedInvitesTab ```typescript // List all limitsModules const { data, isLoading } = useLimitsModulesQuery({ - selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); // Get one limitsModule const { data: item } = useLimitsModuleQuery({ id: '', - selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); // Create a limitsModule const { mutate: create } = useCreateLimitsModuleMutation({ selection: { fields: { id: true } }, }); -create({ actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +create({ actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }); ``` ### MembershipTypesModule @@ -1499,20 +1655,20 @@ create({ databaseId: '', schemaId: '', tableId: '', tableName: ```typescript // List all membershipsModules const { data, isLoading } = useMembershipsModulesQuery({ - selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, + selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, }); // Get one membershipsModule const { data: item } = useMembershipsModuleQuery({ id: '', - selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, + selection: { fields: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }, }); // Create a membershipsModule const { mutate: create } = useCreateMembershipsModuleMutation({ selection: { fields: { id: true } }, }); -create({ actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }); +create({ actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }); ``` ### MerkleStoreModule @@ -1520,20 +1676,20 @@ create({ actorMaskCheck: '', actorPermCheck: '', actorTableId: ' ```typescript // List all merkleStoreModules const { data, isLoading } = useMerkleStoreModulesQuery({ - selection: { fields: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, + selection: { fields: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, }); // Get one merkleStoreModule const { data: item } = useMerkleStoreModuleQuery({ id: '', - selection: { fields: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, + selection: { fields: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }, }); // Create a merkleStoreModule const { mutate: create } = useCreateMerkleStoreModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }); +create({ apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }); ``` ### NamespaceModule @@ -1541,20 +1697,20 @@ create({ apiName: '', commitTableId: '', databaseId: '', ent ```typescript // List all namespaceModules const { data, isLoading } = useNamespaceModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Get one namespaceModule const { data: item } = useNamespaceModuleQuery({ id: '', - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }, }); // Create a namespaceModule const { mutate: create } = useCreateNamespaceModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }); ``` ### NotificationsModule @@ -1562,62 +1718,62 @@ create({ apiName: '', databaseId: '', defaultPermissions: '', - selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }, + selection: { fields: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }, }); // Create a notificationsModule const { mutate: create } = useCreateNotificationsModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }); +create({ apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }); ``` -### PagesModule +### OauthRequestsModule ```typescript -// List all pagesModules -const { data, isLoading } = usePagesModulesQuery({ - selection: { fields: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }, +// List all oauthRequestsModules +const { data, isLoading } = useOauthRequestsModulesQuery({ + selection: { fields: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }, }); -// Get one pagesModule -const { data: item } = usePagesModuleQuery({ +// Get one oauthRequestsModule +const { data: item } = useOauthRequestsModuleQuery({ id: '', - selection: { fields: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }, + selection: { fields: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }, }); -// Create a pagesModule -const { mutate: create } = useCreatePagesModuleMutation({ +// Create a oauthRequestsModule +const { mutate: create } = useCreateOauthRequestsModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }); +create({ databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }); ``` -### PermissionsModule +### PagesModule ```typescript -// List all permissionsModules -const { data, isLoading } = usePermissionsModulesQuery({ - selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, +// List all pagesModules +const { data, isLoading } = usePagesModulesQuery({ + selection: { fields: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }, }); -// Get one permissionsModule -const { data: item } = usePermissionsModuleQuery({ +// Get one pagesModule +const { data: item } = usePagesModuleQuery({ id: '', - selection: { fields: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }, }); -// Create a permissionsModule -const { mutate: create } = useCreatePermissionsModuleMutation({ +// Create a pagesModule +const { mutate: create } = useCreatePagesModuleMutation({ selection: { fields: { id: true } }, }); -create({ actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +create({ apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }); ``` ### PhoneNumbersModule @@ -1688,20 +1844,20 @@ create({ apiName: '', auditsTableId: '', createOrgApiKeyFunction: ```typescript // List all profilesModules const { data, isLoading } = useProfilesModulesQuery({ - selection: { fields: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); // Get one profilesModule const { data: item } = useProfilesModuleQuery({ id: '', - selection: { fields: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, + selection: { fields: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }, }); // Create a profilesModule const { mutate: create } = useCreateProfilesModuleMutation({ selection: { fields: { id: true } }, }); -create({ actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); +create({ actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }); ``` ### RateLimitMetersModule @@ -1709,20 +1865,20 @@ create({ actorTableId: '', apiName: '', databaseId: '', enti ```typescript // List all rateLimitMetersModules const { data, isLoading } = useRateLimitMetersModulesQuery({ - selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, + selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, }); // Get one rateLimitMetersModule const { data: item } = useRateLimitMetersModuleQuery({ id: '', - selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, + selection: { fields: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }, }); // Create a rateLimitMetersModule const { mutate: create } = useCreateRateLimitMetersModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }); +create({ apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }); ``` ### RateLimitsModule @@ -1793,20 +1949,20 @@ create({ apiRequired: '', createIndex: '', databaseId: ' ```typescript // List all resourceModules const { data, isLoading } = useResourceModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, }); // Get one resourceModule const { data: item } = useResourceModuleQuery({ id: '', - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }, }); // Create a resourceModule const { mutate: create } = useCreateResourceModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }); ``` ### RlsModule @@ -1835,20 +1991,41 @@ create({ apiName: '', authenticate: '', authenticateStrict: '', - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, }); // Create a routeModule const { mutate: create } = useCreateRouteModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +create({ apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +``` + +### ScopeTypesModule + +```typescript +// List all scopeTypesModules +const { data, isLoading } = useScopeTypesModulesQuery({ + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); + +// Get one scopeTypesModule +const { data: item } = useScopeTypesModuleQuery({ + id: '', + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); + +// Create a scopeTypesModule +const { mutate: create } = useCreateScopeTypesModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }); ``` ### SecureTableProvision @@ -1919,20 +2096,20 @@ create({ authSettingsTableId: '', authSettingsTableName: '', datab ```typescript // List all siteSurfaceModules const { data, isLoading } = useSiteSurfaceModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, }); // Get one siteSurfaceModule const { data: item } = useSiteSurfaceModuleQuery({ id: '', - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, + selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }, }); // Create a siteSurfaceModule const { mutate: create } = useCreateSiteSurfaceModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }); +create({ apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }); ``` ### StorageLogModule @@ -1961,20 +2138,20 @@ create({ actorFkTableId: '', apiName: '', databaseId: '', en ```typescript // List all storageModules const { data, isLoading } = useStorageModulesQuery({ - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); // Get one storageModule const { data: item } = useStorageModuleQuery({ id: '', - selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, + selection: { fields: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }, }); // Create a storageModule const { mutate: create } = useCreateStorageModuleMutation({ selection: { fields: { id: true } }, }); -create({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); +create({ allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }); ``` ### TransferLogModule @@ -2061,6 +2238,27 @@ const { mutate: create } = useCreateUserSettingsModuleMutation({ create({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); ``` +### UserSettingsSecurityModule + +```typescript +// List all userSettingsSecurityModules +const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); + +// Get one userSettingsSecurityModule +const { data: item } = useUserSettingsSecurityModuleQuery({ + id: '', + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); + +// Create a userSettingsSecurityModule +const { mutate: create } = useCreateUserSettingsSecurityModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); +``` + ### UserStateModule ```typescript @@ -2150,52 +2348,24 @@ create({ apiName: '', databaseId: '', ownerTableId: '', priv ```typescript // List all webhookModules const { data, isLoading } = useWebhookModulesQuery({ - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, }); // Get one webhookModule const { data: item } = useWebhookModuleQuery({ id: '', - selection: { fields: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, + selection: { fields: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }, }); // Create a webhookModule const { mutate: create } = useCreateWebhookModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }); +create({ apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }); ``` ## Custom Operation Hooks -### `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 | - | `fieldName` | String | - | `tableId` | UUID | - -### `useResolveBlueprintTableQuery` - -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. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - ### `useConstructBlueprintMutation` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (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, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -2232,83 +2402,6 @@ and lifecycle settings. |----------|------| | `input` | ProvisionBucketInput (required) | -### `useProvisionCheckConstraintMutation` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -### `useProvisionFullTextSearchMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -### `useProvisionIndexMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -### `useProvisionRelationMutation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (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) | - -### `useProvisionTableMutation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -### `useProvisionUniqueConstraintMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/modules/hooks/index.ts b/sdk/constructive-react/src/modules/hooks/index.ts index a13c0bdc09..368f66ae10 100644 --- a/sdk/constructive-react/src/modules/hooks/index.ts +++ b/sdk/constructive-react/src/modules/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: AgentModule, ApiSurfaceModule, AppModule, BillingModule, BillingProviderModule, Blueprint, BlueprintConstruction, BlueprintTemplate, CatalogModule, ComputeLogModule, ConfigSecretsUserModule, ConnectedAccountsModule, CryptoAddressesModule, CryptoAuthModule, DatabaseProvisionModule, DatabaseSettingsModule, DbPoolConfig, DbPool, DbPresetModule, DbUsageModule, DefaultIdsModule, DenormalizedTableField, DevicesModule, DomainModule, EmailsModule, EntityTypeProvision, EventsModule, FunctionDeploymentModule, FunctionInvocationModule, FunctionModule, GraphExecutionModule, GraphModule, HierarchyModule, HttpRouteModule, I18NModule, IdentityProvidersModule, InferenceLogModule, InfraConfigModule, InfraSecretsModule, IntegrationProvidersModule, InternalSecretsModule, InvitesModule, LimitsModule, MembershipTypesModule, MembershipsModule, MerkleStoreModule, NamespaceModule, NotificationsModule, PagesModule, PermissionsModule, PhoneNumbersModule, PlansModule, PrincipalAuthModule, ProfilesModule, RateLimitMetersModule, RateLimitsModule, RealtimeModule, RelationProvision, ResourceModule, RlsModule, RouteModule, SecureTableProvision, SessionSecretsModule, SessionsModule, SiteSurfaceModule, StorageLogModule, StorageModule, TransferLogModule, UserAuthModule, UserCredentialsModule, UserSettingsModule, UserStateModule, UsersModule, WebauthnAuthModule, WebauthnCredentialsModule, WebhookModule + * Tables: AgentModule, ApiSurfaceModule, AppModule, BillingModule, BillingProviderModule, Blueprint, BlueprintConstruction, BlueprintTemplate, CapabilitiesModule, CatalogModule, ComputeLogModule, ConfigSecretsUserModule, ConnectedAccountsModule, ContentPresetModule, CryptoAddressesModule, CryptoAuthModule, DataCapabilitiesField, DatabaseProvisionModule, DatabaseSettingsModule, DbPoolConfig, DbPool, DbPresetModule, DbUsageModule, DefaultIdsModule, DenormalizedTableField, DevicesModule, DomainModule, EmailSenderModule, EmailsModule, EntityTypeProvision, EventsModule, FileRefField, FunctionDeploymentModule, FunctionInvocationModule, FunctionModule, GraphExecutionModule, GraphModule, HierarchyModule, HttpRouteModule, I18NModule, IdentityProvidersModule, InferenceLogModule, InfraConfigModule, InfraSecretsModule, IntegrationProvidersModule, InternalSecretsModule, InvitesModule, LimitsModule, MembershipTypesModule, MembershipsModule, MerkleStoreModule, NamespaceModule, NotificationsModule, OauthRequestsModule, PagesModule, PhoneNumbersModule, PlansModule, PrincipalAuthModule, ProfilesModule, RateLimitMetersModule, RateLimitsModule, RealtimeModule, RelationProvision, ResourceModule, RlsModule, RouteModule, ScopeTypesModule, SecureTableProvision, SessionSecretsModule, SessionsModule, SiteSurfaceModule, StorageLogModule, StorageModule, TransferLogModule, UserAuthModule, UserCredentialsModule, UserSettingsModule, UserSettingsSecurityModule, UserStateModule, UsersModule, WebauthnAuthModule, WebauthnCredentialsModule, WebhookModule * * Usage: * diff --git a/sdk/constructive-react/src/modules/hooks/invalidation.ts b/sdk/constructive-react/src/modules/hooks/invalidation.ts index 4c3a195f3e..24cafc48e2 100644 --- a/sdk/constructive-react/src/modules/hooks/invalidation.ts +++ b/sdk/constructive-react/src/modules/hooks/invalidation.ts @@ -23,12 +23,15 @@ import { blueprintKeys, blueprintConstructionKeys, blueprintTemplateKeys, + capabilitiesModuleKeys, catalogModuleKeys, computeLogModuleKeys, configSecretsUserModuleKeys, connectedAccountsModuleKeys, + contentPresetModuleKeys, cryptoAddressesModuleKeys, cryptoAuthModuleKeys, + dataCapabilitiesFieldKeys, databaseProvisionModuleKeys, databaseSettingsModuleKeys, dbPoolConfigKeys, @@ -39,9 +42,11 @@ import { denormalizedTableFieldKeys, devicesModuleKeys, domainModuleKeys, + emailSenderModuleKeys, emailsModuleKeys, entityTypeProvisionKeys, eventsModuleKeys, + fileRefFieldKeys, functionDeploymentModuleKeys, functionInvocationModuleKeys, functionModuleKeys, @@ -63,8 +68,8 @@ import { merkleStoreModuleKeys, namespaceModuleKeys, notificationsModuleKeys, + oauthRequestsModuleKeys, pagesModuleKeys, - permissionsModuleKeys, phoneNumbersModuleKeys, plansModuleKeys, principalAuthModuleKeys, @@ -76,6 +81,7 @@ import { resourceModuleKeys, rlsModuleKeys, routeModuleKeys, + scopeTypesModuleKeys, secureTableProvisionKeys, sessionSecretsModuleKeys, sessionsModuleKeys, @@ -86,6 +92,7 @@ import { userAuthModuleKeys, userCredentialsModuleKeys, userSettingsModuleKeys, + userSettingsSecurityModuleKeys, userStateModuleKeys, usersModuleKeys, webauthnAuthModuleKeys, @@ -248,6 +255,23 @@ export const invalidate = { queryKey: blueprintTemplateKeys.detail(id), }), }, + /** Invalidate capabilitiesModule queries */ capabilitiesModule: { + /** Invalidate all capabilitiesModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.all, + }), + /** Invalidate capabilitiesModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.lists(), + }), + /** Invalidate a specific capabilitiesModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.detail(id), + }), + }, /** Invalidate catalogModule queries */ catalogModule: { /** Invalidate all catalogModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -316,6 +340,23 @@ export const invalidate = { queryKey: connectedAccountsModuleKeys.detail(id), }), }, + /** Invalidate contentPresetModule queries */ contentPresetModule: { + /** Invalidate all contentPresetModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.all, + }), + /** Invalidate contentPresetModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.lists(), + }), + /** Invalidate a specific contentPresetModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.detail(id), + }), + }, /** Invalidate cryptoAddressesModule queries */ cryptoAddressesModule: { /** Invalidate all cryptoAddressesModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -350,6 +391,23 @@ export const invalidate = { queryKey: cryptoAuthModuleKeys.detail(id), }), }, + /** Invalidate dataCapabilitiesField queries */ dataCapabilitiesField: { + /** Invalidate all dataCapabilitiesField queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.all, + }), + /** Invalidate dataCapabilitiesField list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.lists(), + }), + /** Invalidate a specific dataCapabilitiesField */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.detail(id), + }), + }, /** Invalidate databaseProvisionModule queries */ databaseProvisionModule: { /** Invalidate all databaseProvisionModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -517,6 +575,23 @@ export const invalidate = { queryKey: domainModuleKeys.detail(id), }), }, + /** Invalidate emailSenderModule queries */ emailSenderModule: { + /** Invalidate all emailSenderModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailSenderModuleKeys.all, + }), + /** Invalidate emailSenderModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: emailSenderModuleKeys.lists(), + }), + /** Invalidate a specific emailSenderModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: emailSenderModuleKeys.detail(id), + }), + }, /** Invalidate emailsModule queries */ emailsModule: { /** Invalidate all emailsModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -568,6 +643,23 @@ export const invalidate = { queryKey: eventsModuleKeys.detail(id), }), }, + /** Invalidate fileRefField queries */ fileRefField: { + /** Invalidate all fileRefField queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.all, + }), + /** Invalidate fileRefField list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.lists(), + }), + /** Invalidate a specific fileRefField */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.detail(id), + }), + }, /** Invalidate functionDeploymentModule queries */ functionDeploymentModule: { /** Invalidate all functionDeploymentModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -925,38 +1017,38 @@ export const invalidate = { queryKey: notificationsModuleKeys.detail(id), }), }, - /** Invalidate pagesModule queries */ pagesModule: { - /** Invalidate all pagesModule queries */ all: (queryClient: QueryClient) => + /** Invalidate oauthRequestsModule queries */ oauthRequestsModule: { + /** Invalidate all oauthRequestsModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: pagesModuleKeys.all, + queryKey: oauthRequestsModuleKeys.all, }), - /** Invalidate pagesModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate oauthRequestsModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: pagesModuleKeys.lists(), + queryKey: oauthRequestsModuleKeys.lists(), }), - /** Invalidate a specific pagesModule */ detail: ( + /** Invalidate a specific oauthRequestsModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: pagesModuleKeys.detail(id), + queryKey: oauthRequestsModuleKeys.detail(id), }), }, - /** Invalidate permissionsModule queries */ permissionsModule: { - /** Invalidate all permissionsModule queries */ all: (queryClient: QueryClient) => + /** Invalidate pagesModule queries */ pagesModule: { + /** Invalidate all pagesModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.all, + queryKey: pagesModuleKeys.all, }), - /** Invalidate permissionsModule list queries */ lists: (queryClient: QueryClient) => + /** Invalidate pagesModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.lists(), + queryKey: pagesModuleKeys.lists(), }), - /** Invalidate a specific permissionsModule */ detail: ( + /** Invalidate a specific pagesModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.detail(id), + queryKey: pagesModuleKeys.detail(id), }), }, /** Invalidate phoneNumbersModule queries */ phoneNumbersModule: { @@ -1146,6 +1238,23 @@ export const invalidate = { queryKey: routeModuleKeys.detail(id), }), }, + /** Invalidate scopeTypesModule queries */ scopeTypesModule: { + /** Invalidate all scopeTypesModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.all, + }), + /** Invalidate scopeTypesModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }), + /** Invalidate a specific scopeTypesModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.detail(id), + }), + }, /** Invalidate secureTableProvision queries */ secureTableProvision: { /** Invalidate all secureTableProvision queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1316,6 +1425,23 @@ export const invalidate = { queryKey: userSettingsModuleKeys.detail(id), }), }, + /** Invalidate userSettingsSecurityModule queries */ userSettingsSecurityModule: { + /** Invalidate all userSettingsSecurityModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.all, + }), + /** Invalidate userSettingsSecurityModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }), + /** Invalidate a specific userSettingsSecurityModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(id), + }), + }, /** Invalidate userStateModule queries */ userStateModule: { /** Invalidate all userStateModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1472,6 +1598,14 @@ export const remove = { queryKey: blueprintTemplateKeys.detail(id), }); }, + /** Remove capabilitiesModule from cache */ capabilitiesModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: capabilitiesModuleKeys.detail(id), + }); + }, /** Remove catalogModule from cache */ catalogModule: ( queryClient: QueryClient, id: string | number @@ -1504,6 +1638,14 @@ export const remove = { queryKey: connectedAccountsModuleKeys.detail(id), }); }, + /** Remove contentPresetModule from cache */ contentPresetModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: contentPresetModuleKeys.detail(id), + }); + }, /** Remove cryptoAddressesModule from cache */ cryptoAddressesModule: ( queryClient: QueryClient, id: string | number @@ -1520,6 +1662,14 @@ export const remove = { queryKey: cryptoAuthModuleKeys.detail(id), }); }, + /** Remove dataCapabilitiesField from cache */ dataCapabilitiesField: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: dataCapabilitiesFieldKeys.detail(id), + }); + }, /** Remove databaseProvisionModule from cache */ databaseProvisionModule: ( queryClient: QueryClient, id: string | number @@ -1597,6 +1747,14 @@ export const remove = { queryKey: domainModuleKeys.detail(id), }); }, + /** Remove emailSenderModule from cache */ emailSenderModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: emailSenderModuleKeys.detail(id), + }); + }, /** Remove emailsModule from cache */ emailsModule: ( queryClient: QueryClient, id: string | number @@ -1621,6 +1779,14 @@ export const remove = { queryKey: eventsModuleKeys.detail(id), }); }, + /** Remove fileRefField from cache */ fileRefField: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: fileRefFieldKeys.detail(id), + }); + }, /** Remove functionDeploymentModule from cache */ functionDeploymentModule: ( queryClient: QueryClient, id: string | number @@ -1789,20 +1955,20 @@ export const remove = { queryKey: notificationsModuleKeys.detail(id), }); }, - /** Remove pagesModule from cache */ pagesModule: ( + /** Remove oauthRequestsModule from cache */ oauthRequestsModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: pagesModuleKeys.detail(id), + queryKey: oauthRequestsModuleKeys.detail(id), }); }, - /** Remove permissionsModule from cache */ permissionsModule: ( + /** Remove pagesModule from cache */ pagesModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: permissionsModuleKeys.detail(id), + queryKey: pagesModuleKeys.detail(id), }); }, /** Remove phoneNumbersModule from cache */ phoneNumbersModule: ( @@ -1890,6 +2056,14 @@ export const remove = { queryKey: routeModuleKeys.detail(id), }); }, + /** Remove scopeTypesModule from cache */ scopeTypesModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: scopeTypesModuleKeys.detail(id), + }); + }, /** Remove secureTableProvision from cache */ secureTableProvision: ( queryClient: QueryClient, id: string | number @@ -1970,6 +2144,14 @@ export const remove = { queryKey: userSettingsModuleKeys.detail(id), }); }, + /** Remove userSettingsSecurityModule from cache */ userSettingsSecurityModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(id), + }); + }, /** Remove userStateModule from cache */ userStateModule: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts index 44e0c9e14f..4a5f10aa7f 100644 --- a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts @@ -94,6 +94,15 @@ export const blueprintTemplateMutationKeys = { /** Delete blueprintTemplate mutation key */ delete: (id: string | number) => ['mutation', 'blueprinttemplate', 'delete', id] as const, } as const; +export const capabilitiesModuleMutationKeys = { + /** All capabilitiesModule mutation keys */ all: ['mutation', 'capabilitiesmodule'] as const, + /** Create capabilitiesModule mutation key */ create: () => + ['mutation', 'capabilitiesmodule', 'create'] as const, + /** Update capabilitiesModule mutation key */ update: (id: string | number) => + ['mutation', 'capabilitiesmodule', 'update', id] as const, + /** Delete capabilitiesModule mutation key */ delete: (id: string | number) => + ['mutation', 'capabilitiesmodule', 'delete', id] as const, +} as const; export const catalogModuleMutationKeys = { /** All catalogModule mutation keys */ all: ['mutation', 'catalogmodule'] as const, /** Create catalogModule mutation key */ create: () => @@ -136,6 +145,15 @@ export const connectedAccountsModuleMutationKeys = { /** Delete connectedAccountsModule mutation key */ delete: (id: string | number) => ['mutation', 'connectedaccountsmodule', 'delete', id] as const, } as const; +export const contentPresetModuleMutationKeys = { + /** All contentPresetModule mutation keys */ all: ['mutation', 'contentpresetmodule'] as const, + /** Create contentPresetModule mutation key */ create: () => + ['mutation', 'contentpresetmodule', 'create'] as const, + /** Update contentPresetModule mutation key */ update: (id: string | number) => + ['mutation', 'contentpresetmodule', 'update', id] as const, + /** Delete contentPresetModule mutation key */ delete: (id: string | number) => + ['mutation', 'contentpresetmodule', 'delete', id] as const, +} as const; export const cryptoAddressesModuleMutationKeys = { /** All cryptoAddressesModule mutation keys */ all: [ 'mutation', @@ -157,6 +175,18 @@ export const cryptoAuthModuleMutationKeys = { /** Delete cryptoAuthModule mutation key */ delete: (id: string | number) => ['mutation', 'cryptoauthmodule', 'delete', id] as const, } as const; +export const dataCapabilitiesFieldMutationKeys = { + /** All dataCapabilitiesField mutation keys */ all: [ + 'mutation', + 'datacapabilitiesfield', + ] as const, + /** Create dataCapabilitiesField mutation key */ create: () => + ['mutation', 'datacapabilitiesfield', 'create'] as const, + /** Update dataCapabilitiesField mutation key */ update: (id: string | number) => + ['mutation', 'datacapabilitiesfield', 'update', id] as const, + /** Delete dataCapabilitiesField mutation key */ delete: (id: string | number) => + ['mutation', 'datacapabilitiesfield', 'delete', id] as const, +} as const; export const databaseProvisionModuleMutationKeys = { /** All databaseProvisionModule mutation keys */ all: [ 'mutation', @@ -255,6 +285,15 @@ export const domainModuleMutationKeys = { /** Delete domainModule mutation key */ delete: (id: string | number) => ['mutation', 'domainmodule', 'delete', id] as const, } as const; +export const emailSenderModuleMutationKeys = { + /** All emailSenderModule mutation keys */ all: ['mutation', 'emailsendermodule'] as const, + /** Create emailSenderModule mutation key */ create: () => + ['mutation', 'emailsendermodule', 'create'] as const, + /** Update emailSenderModule mutation key */ update: (id: string | number) => + ['mutation', 'emailsendermodule', 'update', id] as const, + /** Delete emailSenderModule mutation key */ delete: (id: string | number) => + ['mutation', 'emailsendermodule', 'delete', id] as const, +} as const; export const emailsModuleMutationKeys = { /** All emailsModule mutation keys */ all: ['mutation', 'emailsmodule'] as const, /** Create emailsModule mutation key */ create: () => @@ -282,6 +321,15 @@ export const eventsModuleMutationKeys = { /** Delete eventsModule mutation key */ delete: (id: string | number) => ['mutation', 'eventsmodule', 'delete', id] as const, } as const; +export const fileRefFieldMutationKeys = { + /** All fileRefField mutation keys */ all: ['mutation', 'filereffield'] as const, + /** Create fileRefField mutation key */ create: () => + ['mutation', 'filereffield', 'create'] as const, + /** Update fileRefField mutation key */ update: (id: string | number) => + ['mutation', 'filereffield', 'update', id] as const, + /** Delete fileRefField mutation key */ delete: (id: string | number) => + ['mutation', 'filereffield', 'delete', id] as const, +} as const; export const functionDeploymentModuleMutationKeys = { /** All functionDeploymentModule mutation keys */ all: [ 'mutation', @@ -488,6 +536,15 @@ export const notificationsModuleMutationKeys = { /** Delete notificationsModule mutation key */ delete: (id: string | number) => ['mutation', 'notificationsmodule', 'delete', id] as const, } as const; +export const oauthRequestsModuleMutationKeys = { + /** All oauthRequestsModule mutation keys */ all: ['mutation', 'oauthrequestsmodule'] as const, + /** Create oauthRequestsModule mutation key */ create: () => + ['mutation', 'oauthrequestsmodule', 'create'] as const, + /** Update oauthRequestsModule mutation key */ update: (id: string | number) => + ['mutation', 'oauthrequestsmodule', 'update', id] as const, + /** Delete oauthRequestsModule mutation key */ delete: (id: string | number) => + ['mutation', 'oauthrequestsmodule', 'delete', id] as const, +} as const; export const pagesModuleMutationKeys = { /** All pagesModule mutation keys */ all: ['mutation', 'pagesmodule'] as const, /** Create pagesModule mutation key */ create: () => @@ -497,15 +554,6 @@ export const pagesModuleMutationKeys = { /** Delete pagesModule mutation key */ delete: (id: string | number) => ['mutation', 'pagesmodule', 'delete', id] as const, } as const; -export const permissionsModuleMutationKeys = { - /** All permissionsModule mutation keys */ all: ['mutation', 'permissionsmodule'] as const, - /** Create permissionsModule mutation key */ create: () => - ['mutation', 'permissionsmodule', 'create'] as const, - /** Update permissionsModule mutation key */ update: (id: string | number) => - ['mutation', 'permissionsmodule', 'update', id] as const, - /** Delete permissionsModule mutation key */ delete: (id: string | number) => - ['mutation', 'permissionsmodule', 'delete', id] as const, -} as const; export const phoneNumbersModuleMutationKeys = { /** All phoneNumbersModule mutation keys */ all: ['mutation', 'phonenumbersmodule'] as const, /** Create phoneNumbersModule mutation key */ create: () => @@ -607,6 +655,15 @@ export const routeModuleMutationKeys = { /** Delete routeModule mutation key */ delete: (id: string | number) => ['mutation', 'routemodule', 'delete', id] as const, } as const; +export const scopeTypesModuleMutationKeys = { + /** All scopeTypesModule mutation keys */ all: ['mutation', 'scopetypesmodule'] as const, + /** Create scopeTypesModule mutation key */ create: () => + ['mutation', 'scopetypesmodule', 'create'] as const, + /** Update scopeTypesModule mutation key */ update: (id: string | number) => + ['mutation', 'scopetypesmodule', 'update', id] as const, + /** Delete scopeTypesModule mutation key */ delete: (id: string | number) => + ['mutation', 'scopetypesmodule', 'delete', id] as const, +} as const; export const secureTableProvisionMutationKeys = { /** All secureTableProvision mutation keys */ all: ['mutation', 'securetableprovision'] as const, /** Create secureTableProvision mutation key */ create: () => @@ -700,6 +757,18 @@ export const userSettingsModuleMutationKeys = { /** Delete userSettingsModule mutation key */ delete: (id: string | number) => ['mutation', 'usersettingsmodule', 'delete', id] as const, } as const; +export const userSettingsSecurityModuleMutationKeys = { + /** All userSettingsSecurityModule mutation keys */ all: [ + 'mutation', + 'usersettingssecuritymodule', + ] as const, + /** Create userSettingsSecurityModule mutation key */ create: () => + ['mutation', 'usersettingssecuritymodule', 'create'] as const, + /** Update userSettingsSecurityModule mutation key */ update: (id: string | number) => + ['mutation', 'usersettingssecuritymodule', 'update', id] as const, + /** Delete userSettingsSecurityModule mutation key */ delete: (id: string | number) => + ['mutation', 'usersettingssecuritymodule', 'delete', id] as const, +} as const; export const userStateModuleMutationKeys = { /** All userStateModule mutation keys */ all: ['mutation', 'userstatemodule'] as const, /** Create userStateModule mutation key */ create: () => @@ -766,40 +835,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), - /** Mutation key for provisionCheckConstraint */ provisionCheckConstraint: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionCheckConstraint', identifier] as const) - : (['mutation', 'provisionCheckConstraint'] as const), - /** Mutation key for provisionFullTextSearch */ provisionFullTextSearch: (identifier?: string) => - identifier - ? (['mutation', 'provisionFullTextSearch', identifier] as const) - : (['mutation', 'provisionFullTextSearch'] as const), - /** Mutation key for provisionIndex */ provisionIndex: (identifier?: string) => - identifier - ? (['mutation', 'provisionIndex', identifier] as const) - : (['mutation', 'provisionIndex'] as const), - /** Mutation key for provisionRelation */ provisionRelation: (identifier?: string) => - identifier - ? (['mutation', 'provisionRelation', identifier] as const) - : (['mutation', 'provisionRelation'] as const), - /** Mutation key for provisionSpatialRelation */ provisionSpatialRelation: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionSpatialRelation', identifier] as const) - : (['mutation', 'provisionSpatialRelation'] as const), - /** Mutation key for provisionTable */ provisionTable: (identifier?: string) => - identifier - ? (['mutation', 'provisionTable', identifier] as const) - : (['mutation', 'provisionTable'] as const), - /** Mutation key for provisionUniqueConstraint */ provisionUniqueConstraint: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionUniqueConstraint', identifier] as const) - : (['mutation', 'provisionUniqueConstraint'] as const), } as const; /** @@ -832,12 +867,15 @@ export const mutationKeys = { blueprint: blueprintMutationKeys, blueprintConstruction: blueprintConstructionMutationKeys, blueprintTemplate: blueprintTemplateMutationKeys, + capabilitiesModule: capabilitiesModuleMutationKeys, catalogModule: catalogModuleMutationKeys, computeLogModule: computeLogModuleMutationKeys, configSecretsUserModule: configSecretsUserModuleMutationKeys, connectedAccountsModule: connectedAccountsModuleMutationKeys, + contentPresetModule: contentPresetModuleMutationKeys, cryptoAddressesModule: cryptoAddressesModuleMutationKeys, cryptoAuthModule: cryptoAuthModuleMutationKeys, + dataCapabilitiesField: dataCapabilitiesFieldMutationKeys, databaseProvisionModule: databaseProvisionModuleMutationKeys, databaseSettingsModule: databaseSettingsModuleMutationKeys, dbPoolConfig: dbPoolConfigMutationKeys, @@ -848,9 +886,11 @@ export const mutationKeys = { denormalizedTableField: denormalizedTableFieldMutationKeys, devicesModule: devicesModuleMutationKeys, domainModule: domainModuleMutationKeys, + emailSenderModule: emailSenderModuleMutationKeys, emailsModule: emailsModuleMutationKeys, entityTypeProvision: entityTypeProvisionMutationKeys, eventsModule: eventsModuleMutationKeys, + fileRefField: fileRefFieldMutationKeys, functionDeploymentModule: functionDeploymentModuleMutationKeys, functionInvocationModule: functionInvocationModuleMutationKeys, functionModule: functionModuleMutationKeys, @@ -872,8 +912,8 @@ export const mutationKeys = { merkleStoreModule: merkleStoreModuleMutationKeys, namespaceModule: namespaceModuleMutationKeys, notificationsModule: notificationsModuleMutationKeys, + oauthRequestsModule: oauthRequestsModuleMutationKeys, pagesModule: pagesModuleMutationKeys, - permissionsModule: permissionsModuleMutationKeys, phoneNumbersModule: phoneNumbersModuleMutationKeys, plansModule: plansModuleMutationKeys, principalAuthModule: principalAuthModuleMutationKeys, @@ -885,6 +925,7 @@ export const mutationKeys = { resourceModule: resourceModuleMutationKeys, rlsModule: rlsModuleMutationKeys, routeModule: routeModuleMutationKeys, + scopeTypesModule: scopeTypesModuleMutationKeys, secureTableProvision: secureTableProvisionMutationKeys, sessionSecretsModule: sessionSecretsModuleMutationKeys, sessionsModule: sessionsModuleMutationKeys, @@ -895,6 +936,7 @@ export const mutationKeys = { userAuthModule: userAuthModuleMutationKeys, userCredentialsModule: userCredentialsModuleMutationKeys, userSettingsModule: userSettingsModuleMutationKeys, + userSettingsSecurityModule: userSettingsSecurityModuleMutationKeys, userStateModule: userStateModuleMutationKeys, usersModule: usersModuleMutationKeys, webauthnAuthModule: webauthnAuthModuleMutationKeys, diff --git a/sdk/constructive-react/src/modules/hooks/mutations/index.ts b/sdk/constructive-react/src/modules/hooks/mutations/index.ts index afa01ead8e..f0869015b6 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/index.ts @@ -27,6 +27,9 @@ export * from './useDeleteBlueprintConstructionMutation'; export * from './useCreateBlueprintTemplateMutation'; export * from './useUpdateBlueprintTemplateMutation'; export * from './useDeleteBlueprintTemplateMutation'; +export * from './useCreateCapabilitiesModuleMutation'; +export * from './useUpdateCapabilitiesModuleMutation'; +export * from './useDeleteCapabilitiesModuleMutation'; export * from './useCreateCatalogModuleMutation'; export * from './useUpdateCatalogModuleMutation'; export * from './useDeleteCatalogModuleMutation'; @@ -39,12 +42,18 @@ export * from './useDeleteConfigSecretsUserModuleMutation'; export * from './useCreateConnectedAccountsModuleMutation'; export * from './useUpdateConnectedAccountsModuleMutation'; export * from './useDeleteConnectedAccountsModuleMutation'; +export * from './useCreateContentPresetModuleMutation'; +export * from './useUpdateContentPresetModuleMutation'; +export * from './useDeleteContentPresetModuleMutation'; export * from './useCreateCryptoAddressesModuleMutation'; export * from './useUpdateCryptoAddressesModuleMutation'; export * from './useDeleteCryptoAddressesModuleMutation'; export * from './useCreateCryptoAuthModuleMutation'; export * from './useUpdateCryptoAuthModuleMutation'; export * from './useDeleteCryptoAuthModuleMutation'; +export * from './useCreateDataCapabilitiesFieldMutation'; +export * from './useUpdateDataCapabilitiesFieldMutation'; +export * from './useDeleteDataCapabilitiesFieldMutation'; export * from './useCreateDatabaseProvisionModuleMutation'; export * from './useUpdateDatabaseProvisionModuleMutation'; export * from './useDeleteDatabaseProvisionModuleMutation'; @@ -75,6 +84,9 @@ export * from './useDeleteDevicesModuleMutation'; export * from './useCreateDomainModuleMutation'; export * from './useUpdateDomainModuleMutation'; export * from './useDeleteDomainModuleMutation'; +export * from './useCreateEmailSenderModuleMutation'; +export * from './useUpdateEmailSenderModuleMutation'; +export * from './useDeleteEmailSenderModuleMutation'; export * from './useCreateEmailsModuleMutation'; export * from './useUpdateEmailsModuleMutation'; export * from './useDeleteEmailsModuleMutation'; @@ -84,6 +96,9 @@ export * from './useDeleteEntityTypeProvisionMutation'; export * from './useCreateEventsModuleMutation'; export * from './useUpdateEventsModuleMutation'; export * from './useDeleteEventsModuleMutation'; +export * from './useCreateFileRefFieldMutation'; +export * from './useUpdateFileRefFieldMutation'; +export * from './useDeleteFileRefFieldMutation'; export * from './useCreateFunctionDeploymentModuleMutation'; export * from './useUpdateFunctionDeploymentModuleMutation'; export * from './useDeleteFunctionDeploymentModuleMutation'; @@ -147,12 +162,12 @@ export * from './useDeleteNamespaceModuleMutation'; export * from './useCreateNotificationsModuleMutation'; export * from './useUpdateNotificationsModuleMutation'; export * from './useDeleteNotificationsModuleMutation'; +export * from './useCreateOauthRequestsModuleMutation'; +export * from './useUpdateOauthRequestsModuleMutation'; +export * from './useDeleteOauthRequestsModuleMutation'; export * from './useCreatePagesModuleMutation'; export * from './useUpdatePagesModuleMutation'; export * from './useDeletePagesModuleMutation'; -export * from './useCreatePermissionsModuleMutation'; -export * from './useUpdatePermissionsModuleMutation'; -export * from './useDeletePermissionsModuleMutation'; export * from './useCreatePhoneNumbersModuleMutation'; export * from './useUpdatePhoneNumbersModuleMutation'; export * from './useDeletePhoneNumbersModuleMutation'; @@ -186,6 +201,9 @@ export * from './useDeleteRlsModuleMutation'; export * from './useCreateRouteModuleMutation'; export * from './useUpdateRouteModuleMutation'; export * from './useDeleteRouteModuleMutation'; +export * from './useCreateScopeTypesModuleMutation'; +export * from './useUpdateScopeTypesModuleMutation'; +export * from './useDeleteScopeTypesModuleMutation'; export * from './useCreateSecureTableProvisionMutation'; export * from './useUpdateSecureTableProvisionMutation'; export * from './useDeleteSecureTableProvisionMutation'; @@ -216,6 +234,9 @@ export * from './useDeleteUserCredentialsModuleMutation'; export * from './useCreateUserSettingsModuleMutation'; export * from './useUpdateUserSettingsModuleMutation'; export * from './useDeleteUserSettingsModuleMutation'; +export * from './useCreateUserSettingsSecurityModuleMutation'; +export * from './useUpdateUserSettingsSecurityModuleMutation'; +export * from './useDeleteUserSettingsSecurityModuleMutation'; export * from './useCreateUserStateModuleMutation'; export * from './useUpdateUserStateModuleMutation'; export * from './useDeleteUserStateModuleMutation'; @@ -234,10 +255,3 @@ export * from './useDeleteWebhookModuleMutation'; export * from './useConstructBlueprintMutation'; export * from './useCopyTemplateToBlueprintMutation'; export * from './useProvisionBucketMutation'; -export * from './useProvisionCheckConstraintMutation'; -export * from './useProvisionFullTextSearchMutation'; -export * from './useProvisionIndexMutation'; -export * from './useProvisionRelationMutation'; -export * from './useProvisionSpatialRelationMutation'; -export * from './useProvisionTableMutation'; -export * from './useProvisionUniqueConstraintMutation'; diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateCapabilitiesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateCapabilitiesModuleMutation.ts new file mode 100644 index 0000000000..73de15dbe0 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateCapabilitiesModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for CapabilitiesModule + * @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 { capabilitiesModuleKeys } from '../query-keys'; +import { capabilitiesModuleMutationKeys } from '../mutation-keys'; +import type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CreateCapabilitiesModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CreateCapabilitiesModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a CapabilitiesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateCapabilitiesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateCapabilitiesModuleMutation( + params: { + selection: { + fields: S & CapabilitiesModuleSelect; + } & HookStrictSelect, CapabilitiesModuleSelect>; + } & Omit< + UseMutationOptions< + { + createCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + CreateCapabilitiesModuleInput['capabilitiesModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + CreateCapabilitiesModuleInput['capabilitiesModule'] +>; +export function useCreateCapabilitiesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: capabilitiesModuleMutationKeys.create(), + mutationFn: (data: CreateCapabilitiesModuleInput['capabilitiesModule']) => + getClient() + .capabilitiesModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateContentPresetModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateContentPresetModuleMutation.ts new file mode 100644 index 0000000000..d8158494a9 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateContentPresetModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for ContentPresetModule + * @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 { contentPresetModuleKeys } from '../query-keys'; +import { contentPresetModuleMutationKeys } from '../mutation-keys'; +import type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + CreateContentPresetModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + CreateContentPresetModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a ContentPresetModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateContentPresetModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateContentPresetModuleMutation( + params: { + selection: { + fields: S & ContentPresetModuleSelect; + } & HookStrictSelect, ContentPresetModuleSelect>; + } & Omit< + UseMutationOptions< + { + createContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + CreateContentPresetModuleInput['contentPresetModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + CreateContentPresetModuleInput['contentPresetModule'] +>; +export function useCreateContentPresetModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: contentPresetModuleMutationKeys.create(), + mutationFn: (data: CreateContentPresetModuleInput['contentPresetModule']) => + getClient() + .contentPresetModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateDataCapabilitiesFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateDataCapabilitiesFieldMutation.ts new file mode 100644 index 0000000000..f68de28f55 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateDataCapabilitiesFieldMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for DataCapabilitiesField + * @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 { dataCapabilitiesFieldKeys } from '../query-keys'; +import { dataCapabilitiesFieldMutationKeys } from '../mutation-keys'; +import type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + CreateDataCapabilitiesFieldInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + CreateDataCapabilitiesFieldInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a DataCapabilitiesField + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateDataCapabilitiesFieldMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateDataCapabilitiesFieldMutation( + params: { + selection: { + fields: S & DataCapabilitiesFieldSelect; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; + } & Omit< + UseMutationOptions< + { + createDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + CreateDataCapabilitiesFieldInput['dataCapabilitiesField'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + CreateDataCapabilitiesFieldInput['dataCapabilitiesField'] +>; +export function useCreateDataCapabilitiesFieldMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: dataCapabilitiesFieldMutationKeys.create(), + mutationFn: (data: CreateDataCapabilitiesFieldInput['dataCapabilitiesField']) => + getClient() + .dataCapabilitiesField.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateEmailSenderModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateEmailSenderModuleMutation.ts new file mode 100644 index 0000000000..f06644ecc3 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateEmailSenderModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for EmailSenderModule + * @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 { emailSenderModuleKeys } from '../query-keys'; +import { emailSenderModuleMutationKeys } from '../mutation-keys'; +import type { + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + CreateEmailSenderModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + CreateEmailSenderModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a EmailSenderModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateEmailSenderModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateEmailSenderModuleMutation( + params: { + selection: { + fields: S & EmailSenderModuleSelect; + } & HookStrictSelect, EmailSenderModuleSelect>; + } & Omit< + UseMutationOptions< + { + createEmailSenderModule: { + emailSenderModule: InferSelectResult; + }; + }, + Error, + CreateEmailSenderModuleInput['emailSenderModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createEmailSenderModule: { + emailSenderModule: InferSelectResult; + }; + }, + Error, + CreateEmailSenderModuleInput['emailSenderModule'] +>; +export function useCreateEmailSenderModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: emailSenderModuleMutationKeys.create(), + mutationFn: (data: CreateEmailSenderModuleInput['emailSenderModule']) => + getClient() + .emailSenderModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: emailSenderModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateEntityTypeProvisionMutation.ts index 70139cea17..933bb73f80 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useCreateEntityTypeProvisionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateEntityTypeProvisionMutation.ts @@ -1,6 +1,6 @@ /** * 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). + and installs the required modules (capabilities, 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). @@ -31,7 +31,7 @@ export type { } 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). + and installs the required modules (capabilities, 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). diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateFileRefFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateFileRefFieldMutation.ts new file mode 100644 index 0000000000..417e18b8a4 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateFileRefFieldMutation.ts @@ -0,0 +1,88 @@ +/** + * Create mutation hook for FileRefField + * @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 { fileRefFieldKeys } from '../query-keys'; +import { fileRefFieldMutationKeys } from '../mutation-keys'; +import type { + FileRefFieldSelect, + FileRefFieldWithRelations, + CreateFileRefFieldInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + FileRefFieldSelect, + FileRefFieldWithRelations, + CreateFileRefFieldInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a FileRefField + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateFileRefFieldMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateFileRefFieldMutation( + params: { + selection: { + fields: S & FileRefFieldSelect; + } & HookStrictSelect, FileRefFieldSelect>; + } & Omit< + UseMutationOptions< + { + createFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + CreateFileRefFieldInput['fileRefField'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + CreateFileRefFieldInput['fileRefField'] +>; +export function useCreateFileRefFieldMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: fileRefFieldMutationKeys.create(), + mutationFn: (data: CreateFileRefFieldInput['fileRefField']) => + getClient() + .fileRefField.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateOauthRequestsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateOauthRequestsModuleMutation.ts new file mode 100644 index 0000000000..be7ac42edc --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateOauthRequestsModuleMutation.ts @@ -0,0 +1,101 @@ +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * @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 { oauthRequestsModuleKeys } from '../query-keys'; +import { oauthRequestsModuleMutationKeys } from '../mutation-keys'; +import type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + CreateOauthRequestsModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + CreateOauthRequestsModuleInput, +} from '../../orm/input-types'; +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOauthRequestsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOauthRequestsModuleMutation( + params: { + selection: { + fields: S & OauthRequestsModuleSelect; + } & HookStrictSelect, OauthRequestsModuleSelect>; + } & Omit< + UseMutationOptions< + { + createOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + CreateOauthRequestsModuleInput['oauthRequestsModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + CreateOauthRequestsModuleInput['oauthRequestsModule'] +>; +export function useCreateOauthRequestsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: oauthRequestsModuleMutationKeys.create(), + mutationFn: (data: CreateOauthRequestsModuleInput['oauthRequestsModule']) => + getClient() + .oauthRequestsModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: oauthRequestsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreatePermissionsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreatePermissionsModuleMutation.ts deleted file mode 100644 index 38c0b3b9ba..0000000000 --- a/sdk/constructive-react/src/modules/hooks/mutations/useCreatePermissionsModuleMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Create mutation hook for PermissionsModule - * @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 { permissionsModuleKeys } from '../query-keys'; -import { permissionsModuleMutationKeys } from '../mutation-keys'; -import type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - CreatePermissionsModuleInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - CreatePermissionsModuleInput, -} from '../../orm/input-types'; -/** - * Mutation hook for creating a PermissionsModule - * - * @example - * ```tsx - * const { mutate, isPending } = useCreatePermissionsModuleMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreatePermissionsModuleMutation( - params: { - selection: { - fields: S & PermissionsModuleSelect; - } & HookStrictSelect, PermissionsModuleSelect>; - } & Omit< - UseMutationOptions< - { - createPermissionsModule: { - permissionsModule: InferSelectResult; - }; - }, - Error, - CreatePermissionsModuleInput['permissionsModule'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createPermissionsModule: { - permissionsModule: InferSelectResult; - }; - }, - Error, - CreatePermissionsModuleInput['permissionsModule'] ->; -export function useCreatePermissionsModuleMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: permissionsModuleMutationKeys.create(), - mutationFn: (data: CreatePermissionsModuleInput['permissionsModule']) => - getClient() - .permissionsModule.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..3dd632d3c7 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for ScopeTypesModule + * @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 { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + CreateScopeTypesModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + CreateScopeTypesModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a ScopeTypesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateScopeTypesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + CreateScopeTypesModuleInput['scopeTypesModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + CreateScopeTypesModuleInput['scopeTypesModule'] +>; +export function useCreateScopeTypesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: scopeTypesModuleMutationKeys.create(), + mutationFn: (data: CreateScopeTypesModuleInput['scopeTypesModule']) => + getClient() + .scopeTypesModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..7214deae9f --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,97 @@ +/** + * Create mutation hook for UserSettingsSecurityModule + * @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 { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + CreateUserSettingsSecurityModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + CreateUserSettingsSecurityModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a UserSettingsSecurityModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] +>; +export function useCreateUserSettingsSecurityModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userSettingsSecurityModuleMutationKeys.create(), + mutationFn: (data: CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule']) => + getClient() + .userSettingsSecurityModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteCapabilitiesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteCapabilitiesModuleMutation.ts new file mode 100644 index 0000000000..fc27226b9a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteCapabilitiesModuleMutation.ts @@ -0,0 +1,104 @@ +/** + * Delete mutation hook for CapabilitiesModule + * @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 { capabilitiesModuleKeys } from '../query-keys'; +import { capabilitiesModuleMutationKeys } from '../mutation-keys'; +import type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, +} from '../../orm/input-types'; +/** + * Mutation hook for deleting a CapabilitiesModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteCapabilitiesModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteCapabilitiesModuleMutation( + params: { + selection: { + fields: S & CapabilitiesModuleSelect; + } & HookStrictSelect, CapabilitiesModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteCapabilitiesModuleMutation( + 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: capabilitiesModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .capabilitiesModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: capabilitiesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteContentPresetModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteContentPresetModuleMutation.ts new file mode 100644 index 0000000000..cddd9cc2f4 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteContentPresetModuleMutation.ts @@ -0,0 +1,104 @@ +/** + * Delete mutation hook for ContentPresetModule + * @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 { contentPresetModuleKeys } from '../query-keys'; +import { contentPresetModuleMutationKeys } from '../mutation-keys'; +import type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, +} from '../../orm/input-types'; +/** + * Mutation hook for deleting a ContentPresetModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteContentPresetModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteContentPresetModuleMutation( + params: { + selection: { + fields: S & ContentPresetModuleSelect; + } & HookStrictSelect, ContentPresetModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteContentPresetModuleMutation( + 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: contentPresetModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .contentPresetModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: contentPresetModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteDataCapabilitiesFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteDataCapabilitiesFieldMutation.ts new file mode 100644 index 0000000000..2cd3621b76 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteDataCapabilitiesFieldMutation.ts @@ -0,0 +1,104 @@ +/** + * Delete mutation hook for DataCapabilitiesField + * @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 { dataCapabilitiesFieldKeys } from '../query-keys'; +import { dataCapabilitiesFieldMutationKeys } from '../mutation-keys'; +import type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, +} from '../../orm/input-types'; +/** + * Mutation hook for deleting a DataCapabilitiesField with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteDataCapabilitiesFieldMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteDataCapabilitiesFieldMutation( + params: { + selection: { + fields: S & DataCapabilitiesFieldSelect; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; + } & Omit< + UseMutationOptions< + { + deleteDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteDataCapabilitiesFieldMutation( + 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: dataCapabilitiesFieldMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .dataCapabilitiesField.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: dataCapabilitiesFieldKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeletePermissionsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEmailSenderModuleMutation.ts similarity index 58% rename from sdk/constructive-react/src/modules/hooks/mutations/useDeletePermissionsModuleMutation.ts rename to sdk/constructive-react/src/modules/hooks/mutations/useDeleteEmailSenderModuleMutation.ts index bcd6060e21..02d700d918 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useDeletePermissionsModuleMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEmailSenderModuleMutation.ts @@ -1,5 +1,5 @@ /** - * Delete mutation hook for PermissionsModule + * Delete mutation hook for EmailSenderModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,39 +9,39 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { permissionsModuleKeys } from '../query-keys'; -import { permissionsModuleMutationKeys } from '../mutation-keys'; +import { emailSenderModuleKeys } from '../query-keys'; +import { emailSenderModuleMutationKeys } from '../mutation-keys'; import type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, } from '../../orm/input-types'; /** - * Mutation hook for deleting a PermissionsModule with typed selection + * Mutation hook for deleting a EmailSenderModule with typed selection * * @example * ```tsx - * const { mutate, isPending } = useDeletePermissionsModuleMutation({ + * const { mutate, isPending } = useDeleteEmailSenderModuleMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeletePermissionsModuleMutation( +export function useDeleteEmailSenderModuleMutation( params: { selection: { - fields: S & PermissionsModuleSelect; - } & HookStrictSelect, PermissionsModuleSelect>; + fields: S & EmailSenderModuleSelect; + } & HookStrictSelect, EmailSenderModuleSelect>; } & Omit< UseMutationOptions< { - deletePermissionsModule: { - permissionsModule: InferSelectResult; + deleteEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }, Error, @@ -53,8 +53,8 @@ export function useDeletePermissionsModuleMutation ): UseMutationResult< { - deletePermissionsModule: { - permissionsModule: InferSelectResult; + deleteEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }, Error, @@ -62,9 +62,9 @@ export function useDeletePermissionsModuleMutation; -export function useDeletePermissionsModuleMutation( +export function useDeleteEmailSenderModuleMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -76,15 +76,15 @@ export function useDeletePermissionsModuleMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: permissionsModuleMutationKeys.all, + mutationKey: emailSenderModuleMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .permissionsModule.delete({ + .emailSenderModule.delete({ where: { id, }, @@ -93,10 +93,10 @@ export function useDeletePermissionsModuleMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: permissionsModuleKeys.detail(variables.id), + queryKey: emailSenderModuleKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.lists(), + queryKey: emailSenderModuleKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts index 0029e7138c..e1f54bcd45 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts @@ -1,6 +1,6 @@ /** * 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). + and installs the required modules (capabilities, 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). @@ -29,7 +29,7 @@ export type { } 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). + and installs the required modules (capabilities, 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). diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteFileRefFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteFileRefFieldMutation.ts new file mode 100644 index 0000000000..7755e2a4c6 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteFileRefFieldMutation.ts @@ -0,0 +1,98 @@ +/** + * Delete mutation hook for FileRefField + * @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 { fileRefFieldKeys } from '../query-keys'; +import { fileRefFieldMutationKeys } from '../mutation-keys'; +import type { FileRefFieldSelect, FileRefFieldWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { FileRefFieldSelect, FileRefFieldWithRelations } from '../../orm/input-types'; +/** + * Mutation hook for deleting a FileRefField with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteFileRefFieldMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteFileRefFieldMutation( + params: { + selection: { + fields: S & FileRefFieldSelect; + } & HookStrictSelect, FileRefFieldSelect>; + } & Omit< + UseMutationOptions< + { + deleteFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteFileRefFieldMutation( + 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: fileRefFieldMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .fileRefField.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: fileRefFieldKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteOauthRequestsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteOauthRequestsModuleMutation.ts new file mode 100644 index 0000000000..db16ac442a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteOauthRequestsModuleMutation.ts @@ -0,0 +1,114 @@ +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * @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 { oauthRequestsModuleKeys } from '../query-keys'; +import { oauthRequestsModuleMutationKeys } from '../mutation-keys'; +import type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, +} from '../../orm/input-types'; +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteOauthRequestsModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteOauthRequestsModuleMutation( + params: { + selection: { + fields: S & OauthRequestsModuleSelect; + } & HookStrictSelect, OauthRequestsModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteOauthRequestsModuleMutation( + 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: oauthRequestsModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .oauthRequestsModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: oauthRequestsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: oauthRequestsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..5191b35c59 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts @@ -0,0 +1,98 @@ +/** + * Delete mutation hook for ScopeTypesModule + * @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 { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +/** + * Mutation hook for deleting a ScopeTypesModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteScopeTypesModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteScopeTypesModuleMutation( + 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: scopeTypesModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .scopeTypesModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: scopeTypesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..e57f31108e --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,106 @@ +/** + * Delete mutation hook for UserSettingsSecurityModule + * @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 { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +/** + * Mutation hook for deleting a UserSettingsSecurityModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteUserSettingsSecurityModuleMutation( + 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: userSettingsSecurityModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .userSettingsSecurityModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts deleted file mode 100644 index 2e18ad6276..0000000000 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Custom mutation hook for provisionCheckConstraint - * @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 { ProvisionCheckConstraintVariables } from '../../orm/mutation'; -import type { - ProvisionCheckConstraintPayloadSelect, - ProvisionCheckConstraintPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionCheckConstraintVariables } from '../../orm/mutation'; -export type { ProvisionCheckConstraintPayloadSelect } from '../../orm/input-types'; -export function useProvisionCheckConstraintMutation< - S extends ProvisionCheckConstraintPayloadSelect, ->( - params: { - selection: { - fields: S & ProvisionCheckConstraintPayloadSelect; - } & HookStrictSelect, ProvisionCheckConstraintPayloadSelect>; - } & Omit< - UseMutationOptions< - { - provisionCheckConstraint: InferSelectResult | null; - }, - Error, - ProvisionCheckConstraintVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - provisionCheckConstraint: InferSelectResult | null; - }, - Error, - ProvisionCheckConstraintVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.provisionCheckConstraint(), - mutationFn: (variables: ProvisionCheckConstraintVariables) => - getClient() - .mutation.provisionCheckConstraint(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts deleted file mode 100644 index 5d09d35fdb..0000000000 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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/modules/hooks/mutations/useUpdateCapabilitiesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateCapabilitiesModuleMutation.ts new file mode 100644 index 0000000000..c0f08082ed --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateCapabilitiesModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for CapabilitiesModule + * @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 { capabilitiesModuleKeys } from '../query-keys'; +import { capabilitiesModuleMutationKeys } from '../mutation-keys'; +import type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CapabilitiesModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CapabilitiesModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a CapabilitiesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateCapabilitiesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', capabilitiesModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateCapabilitiesModuleMutation( + params: { + selection: { + fields: S & CapabilitiesModuleSelect; + } & HookStrictSelect, CapabilitiesModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; + } +>; +export function useUpdateCapabilitiesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: capabilitiesModuleMutationKeys.all, + mutationFn: ({ + id, + capabilitiesModulePatch, + }: { + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; + }) => + getClient() + .capabilitiesModule.update({ + where: { + id, + }, + data: capabilitiesModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: capabilitiesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateContentPresetModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateContentPresetModuleMutation.ts new file mode 100644 index 0000000000..f3c61ab72b --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateContentPresetModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for ContentPresetModule + * @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 { contentPresetModuleKeys } from '../query-keys'; +import { contentPresetModuleMutationKeys } from '../mutation-keys'; +import type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + ContentPresetModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + ContentPresetModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a ContentPresetModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateContentPresetModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', contentPresetModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateContentPresetModuleMutation( + params: { + selection: { + fields: S & ContentPresetModuleSelect; + } & HookStrictSelect, ContentPresetModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + { + id: string; + contentPresetModulePatch: ContentPresetModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }, + Error, + { + id: string; + contentPresetModulePatch: ContentPresetModulePatch; + } +>; +export function useUpdateContentPresetModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + contentPresetModulePatch: ContentPresetModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: contentPresetModuleMutationKeys.all, + mutationFn: ({ + id, + contentPresetModulePatch, + }: { + id: string; + contentPresetModulePatch: ContentPresetModulePatch; + }) => + getClient() + .contentPresetModule.update({ + where: { + id, + }, + data: contentPresetModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: contentPresetModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateDataCapabilitiesFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateDataCapabilitiesFieldMutation.ts new file mode 100644 index 0000000000..dbf3135915 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateDataCapabilitiesFieldMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for DataCapabilitiesField + * @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 { dataCapabilitiesFieldKeys } from '../query-keys'; +import { dataCapabilitiesFieldMutationKeys } from '../mutation-keys'; +import type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldPatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a DataCapabilitiesField + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateDataCapabilitiesFieldMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', dataCapabilitiesFieldPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateDataCapabilitiesFieldMutation( + params: { + selection: { + fields: S & DataCapabilitiesFieldSelect; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; + } & Omit< + UseMutationOptions< + { + updateDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + { + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }, + Error, + { + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; + } +>; +export function useUpdateDataCapabilitiesFieldMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: dataCapabilitiesFieldMutationKeys.all, + mutationFn: ({ + id, + dataCapabilitiesFieldPatch, + }: { + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; + }) => + getClient() + .dataCapabilitiesField.update({ + where: { + id, + }, + data: dataCapabilitiesFieldPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: dataCapabilitiesFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdatePermissionsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEmailSenderModuleMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useUpdatePermissionsModuleMutation.ts rename to sdk/constructive-react/src/modules/hooks/mutations/useUpdateEmailSenderModuleMutation.ts index de206e8b71..c5839781c8 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useUpdatePermissionsModuleMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEmailSenderModuleMutation.ts @@ -1,5 +1,5 @@ /** - * Update mutation hook for PermissionsModule + * Update mutation hook for EmailSenderModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,106 +9,106 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { permissionsModuleKeys } from '../query-keys'; -import { permissionsModuleMutationKeys } from '../mutation-keys'; +import { emailSenderModuleKeys } from '../query-keys'; +import { emailSenderModuleMutationKeys } from '../mutation-keys'; import type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - PermissionsModulePatch, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + EmailSenderModulePatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - PermissionsModulePatch, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + EmailSenderModulePatch, } from '../../orm/input-types'; /** - * Mutation hook for updating a PermissionsModule + * Mutation hook for updating a EmailSenderModule * * @example * ```tsx - * const { mutate, isPending } = useUpdatePermissionsModuleMutation({ + * const { mutate, isPending } = useUpdateEmailSenderModuleMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', permissionsModulePatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', emailSenderModulePatch: { name: 'Updated' } }); * ``` */ -export function useUpdatePermissionsModuleMutation( +export function useUpdateEmailSenderModuleMutation( params: { selection: { - fields: S & PermissionsModuleSelect; - } & HookStrictSelect, PermissionsModuleSelect>; + fields: S & EmailSenderModuleSelect; + } & HookStrictSelect, EmailSenderModuleSelect>; } & Omit< UseMutationOptions< { - updatePermissionsModule: { - permissionsModule: InferSelectResult; + updateEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }, Error, { id: string; - permissionsModulePatch: PermissionsModulePatch; + emailSenderModulePatch: EmailSenderModulePatch; } >, 'mutationFn' > ): UseMutationResult< { - updatePermissionsModule: { - permissionsModule: InferSelectResult; + updateEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }, Error, { id: string; - permissionsModulePatch: PermissionsModulePatch; + emailSenderModulePatch: EmailSenderModulePatch; } >; -export function useUpdatePermissionsModuleMutation( +export function useUpdateEmailSenderModuleMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - permissionsModulePatch: PermissionsModulePatch; + emailSenderModulePatch: EmailSenderModulePatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: permissionsModuleMutationKeys.all, + mutationKey: emailSenderModuleMutationKeys.all, mutationFn: ({ id, - permissionsModulePatch, + emailSenderModulePatch, }: { id: string; - permissionsModulePatch: PermissionsModulePatch; + emailSenderModulePatch: EmailSenderModulePatch; }) => getClient() - .permissionsModule.update({ + .emailSenderModule.update({ where: { id, }, - data: permissionsModulePatch, + data: emailSenderModulePatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.detail(variables.id), + queryKey: emailSenderModuleKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: permissionsModuleKeys.lists(), + queryKey: emailSenderModuleKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts index a95af50c3c..fe9fac1871 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts @@ -1,6 +1,6 @@ /** * 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). + and installs the required modules (capabilities, 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). @@ -31,7 +31,7 @@ export type { } 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). + and installs the required modules (capabilities, 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). diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateFileRefFieldMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateFileRefFieldMutation.ts new file mode 100644 index 0000000000..ede25c7898 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateFileRefFieldMutation.ts @@ -0,0 +1,110 @@ +/** + * Update mutation hook for FileRefField + * @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 { fileRefFieldKeys } from '../query-keys'; +import { fileRefFieldMutationKeys } from '../mutation-keys'; +import type { + FileRefFieldSelect, + FileRefFieldWithRelations, + FileRefFieldPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + FileRefFieldSelect, + FileRefFieldWithRelations, + FileRefFieldPatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a FileRefField + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateFileRefFieldMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', fileRefFieldPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateFileRefFieldMutation( + params: { + selection: { + fields: S & FileRefFieldSelect; + } & HookStrictSelect, FileRefFieldSelect>; + } & Omit< + UseMutationOptions< + { + updateFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + { + id: string; + fileRefFieldPatch: FileRefFieldPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateFileRefField: { + fileRefField: InferSelectResult; + }; + }, + Error, + { + id: string; + fileRefFieldPatch: FileRefFieldPatch; + } +>; +export function useUpdateFileRefFieldMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + fileRefFieldPatch: FileRefFieldPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: fileRefFieldMutationKeys.all, + mutationFn: ({ id, fileRefFieldPatch }: { id: string; fileRefFieldPatch: FileRefFieldPatch }) => + getClient() + .fileRefField.update({ + where: { + id, + }, + data: fileRefFieldPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: fileRefFieldKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateOauthRequestsModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateOauthRequestsModuleMutation.ts new file mode 100644 index 0000000000..b7abf1eda4 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateOauthRequestsModuleMutation.ts @@ -0,0 +1,126 @@ +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * @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 { oauthRequestsModuleKeys } from '../query-keys'; +import { oauthRequestsModuleMutationKeys } from '../mutation-keys'; +import type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + OauthRequestsModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + OauthRequestsModulePatch, +} from '../../orm/input-types'; +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOauthRequestsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', oauthRequestsModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOauthRequestsModuleMutation( + params: { + selection: { + fields: S & OauthRequestsModuleSelect; + } & HookStrictSelect, OauthRequestsModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; + } +>; +export function useUpdateOauthRequestsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: oauthRequestsModuleMutationKeys.all, + mutationFn: ({ + id, + oauthRequestsModulePatch, + }: { + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; + }) => + getClient() + .oauthRequestsModule.update({ + where: { + id, + }, + data: oauthRequestsModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: oauthRequestsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: oauthRequestsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..0d9cef2f70 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for ScopeTypesModule + * @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 { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a ScopeTypesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateScopeTypesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', scopeTypesModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } +>; +export function useUpdateScopeTypesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: scopeTypesModuleMutationKeys.all, + mutationFn: ({ + id, + scopeTypesModulePatch, + }: { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + }) => + getClient() + .scopeTypesModule.update({ + where: { + id, + }, + data: scopeTypesModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..28a09bbe4a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,118 @@ +/** + * Update mutation hook for UserSettingsSecurityModule + * @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 { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a UserSettingsSecurityModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', userSettingsSecurityModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } +>; +export function useUpdateUserSettingsSecurityModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userSettingsSecurityModuleMutationKeys.all, + mutationFn: ({ + id, + userSettingsSecurityModulePatch, + }: { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + }) => + getClient() + .userSettingsSecurityModule.update({ + where: { + id, + }, + data: userSettingsSecurityModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/index.ts b/sdk/constructive-react/src/modules/hooks/queries/index.ts index a12257a67f..c47aede539 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/index.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/index.ts @@ -19,6 +19,8 @@ export * from './useBlueprintConstructionsQuery'; export * from './useBlueprintConstructionQuery'; export * from './useBlueprintTemplatesQuery'; export * from './useBlueprintTemplateQuery'; +export * from './useCapabilitiesModulesQuery'; +export * from './useCapabilitiesModuleQuery'; export * from './useCatalogModulesQuery'; export * from './useCatalogModuleQuery'; export * from './useComputeLogModulesQuery'; @@ -27,10 +29,14 @@ export * from './useConfigSecretsUserModulesQuery'; export * from './useConfigSecretsUserModuleQuery'; export * from './useConnectedAccountsModulesQuery'; export * from './useConnectedAccountsModuleQuery'; +export * from './useContentPresetModulesQuery'; +export * from './useContentPresetModuleQuery'; export * from './useCryptoAddressesModulesQuery'; export * from './useCryptoAddressesModuleQuery'; export * from './useCryptoAuthModulesQuery'; export * from './useCryptoAuthModuleQuery'; +export * from './useDataCapabilitiesFieldsQuery'; +export * from './useDataCapabilitiesFieldQuery'; export * from './useDatabaseProvisionModulesQuery'; export * from './useDatabaseProvisionModuleQuery'; export * from './useDatabaseSettingsModulesQuery'; @@ -51,12 +57,16 @@ export * from './useDevicesModulesQuery'; export * from './useDevicesModuleQuery'; export * from './useDomainModulesQuery'; export * from './useDomainModuleQuery'; +export * from './useEmailSenderModulesQuery'; +export * from './useEmailSenderModuleQuery'; export * from './useEmailsModulesQuery'; export * from './useEmailsModuleQuery'; export * from './useEntityTypeProvisionsQuery'; export * from './useEntityTypeProvisionQuery'; export * from './useEventsModulesQuery'; export * from './useEventsModuleQuery'; +export * from './useFileRefFieldsQuery'; +export * from './useFileRefFieldQuery'; export * from './useFunctionDeploymentModulesQuery'; export * from './useFunctionDeploymentModuleQuery'; export * from './useFunctionInvocationModulesQuery'; @@ -99,10 +109,10 @@ export * from './useNamespaceModulesQuery'; export * from './useNamespaceModuleQuery'; export * from './useNotificationsModulesQuery'; export * from './useNotificationsModuleQuery'; +export * from './useOauthRequestsModulesQuery'; +export * from './useOauthRequestsModuleQuery'; export * from './usePagesModulesQuery'; export * from './usePagesModuleQuery'; -export * from './usePermissionsModulesQuery'; -export * from './usePermissionsModuleQuery'; export * from './usePhoneNumbersModulesQuery'; export * from './usePhoneNumbersModuleQuery'; export * from './usePlansModulesQuery'; @@ -125,6 +135,8 @@ export * from './useRlsModulesQuery'; export * from './useRlsModuleQuery'; export * from './useRouteModulesQuery'; export * from './useRouteModuleQuery'; +export * from './useScopeTypesModulesQuery'; +export * from './useScopeTypesModuleQuery'; export * from './useSecureTableProvisionsQuery'; export * from './useSecureTableProvisionQuery'; export * from './useSessionSecretsModulesQuery'; @@ -145,6 +157,8 @@ export * from './useUserCredentialsModulesQuery'; export * from './useUserCredentialsModuleQuery'; export * from './useUserSettingsModulesQuery'; export * from './useUserSettingsModuleQuery'; +export * from './useUserSettingsSecurityModulesQuery'; +export * from './useUserSettingsSecurityModuleQuery'; export * from './useUserStateModulesQuery'; export * from './useUserStateModuleQuery'; export * from './useUsersModulesQuery'; @@ -155,5 +169,3 @@ export * from './useWebauthnCredentialsModulesQuery'; export * from './useWebauthnCredentialsModuleQuery'; export * from './useWebhookModulesQuery'; export * from './useWebhookModuleQuery'; -export * from './useResolveBlueprintFieldQuery'; -export * from './useResolveBlueprintTableQuery'; diff --git a/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModuleQuery.ts new file mode 100644 index 0000000000..3ec3daec29 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModuleQuery.ts @@ -0,0 +1,144 @@ +/** + * Single item query hook for CapabilitiesModule + * @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 { capabilitiesModuleKeys } from '../query-keys'; +import type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const capabilitiesModuleQueryKey = capabilitiesModuleKeys.detail; +/** + * Query hook for fetching a single CapabilitiesModule + * + * @example + * ```tsx + * const { data, isLoading } = useCapabilitiesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useCapabilitiesModuleQuery< + S extends CapabilitiesModuleSelect, + TData = { + capabilitiesModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, CapabilitiesModuleSelect>; + } & Omit< + UseQueryOptions< + { + capabilitiesModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCapabilitiesModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: capabilitiesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .capabilitiesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single CapabilitiesModule without React hooks + * + * @example + * ```ts + * const data = await fetchCapabilitiesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchCapabilitiesModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, CapabilitiesModuleSelect>; +}): Promise<{ + capabilitiesModule: InferSelectResult | null; +}>; +export async function fetchCapabilitiesModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .capabilitiesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single CapabilitiesModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchCapabilitiesModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchCapabilitiesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, CapabilitiesModuleSelect>; + } +): Promise; +export async function prefetchCapabilitiesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: capabilitiesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .capabilitiesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModulesQuery.ts new file mode 100644 index 0000000000..86fda8b65b --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useCapabilitiesModulesQuery.ts @@ -0,0 +1,171 @@ +/** + * List query hook for CapabilitiesModule + * @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 { capabilitiesModuleKeys } from '../query-keys'; +import type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + CapabilitiesModuleSelect, + CapabilitiesModuleWithRelations, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const capabilitiesModulesQueryKey = capabilitiesModuleKeys.list; +/** + * Query hook for fetching CapabilitiesModule list + * + * @example + * ```tsx + * const { data, isLoading } = useCapabilitiesModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useCapabilitiesModulesQuery< + S extends CapabilitiesModuleSelect, + TData = { + capabilitiesModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, CapabilitiesModuleSelect>; + } & Omit< + UseQueryOptions< + { + capabilitiesModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCapabilitiesModulesQuery( + params: { + selection: ListSelectionConfig< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: capabilitiesModuleKeys.list(args), + queryFn: () => getClient().capabilitiesModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch CapabilitiesModule list without React hooks + * + * @example + * ```ts + * const data = await fetchCapabilitiesModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchCapabilitiesModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, CapabilitiesModuleSelect>; +}): Promise<{ + capabilitiesModules: ConnectionResult>; +}>; +export async function fetchCapabilitiesModulesQuery(params: { + selection: ListSelectionConfig< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >(params.selection); + return getClient().capabilitiesModule.findMany(args).unwrap(); +} +/** + * Prefetch CapabilitiesModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchCapabilitiesModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchCapabilitiesModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, CapabilitiesModuleSelect>; + } +): Promise; +export async function prefetchCapabilitiesModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: capabilitiesModuleKeys.list(args), + queryFn: () => getClient().capabilitiesModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModuleQuery.ts new file mode 100644 index 0000000000..a15114e866 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModuleQuery.ts @@ -0,0 +1,144 @@ +/** + * Single item query hook for ContentPresetModule + * @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 { contentPresetModuleKeys } from '../query-keys'; +import type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const contentPresetModuleQueryKey = contentPresetModuleKeys.detail; +/** + * Query hook for fetching a single ContentPresetModule + * + * @example + * ```tsx + * const { data, isLoading } = useContentPresetModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useContentPresetModuleQuery< + S extends ContentPresetModuleSelect, + TData = { + contentPresetModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetModuleSelect>; + } & Omit< + UseQueryOptions< + { + contentPresetModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useContentPresetModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: contentPresetModuleKeys.detail(params.id), + queryFn: () => + getClient() + .contentPresetModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single ContentPresetModule without React hooks + * + * @example + * ```ts + * const data = await fetchContentPresetModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchContentPresetModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetModuleSelect>; +}): Promise<{ + contentPresetModule: InferSelectResult | null; +}>; +export async function fetchContentPresetModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .contentPresetModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single ContentPresetModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchContentPresetModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchContentPresetModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ContentPresetModuleSelect>; + } +): Promise; +export async function prefetchContentPresetModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: contentPresetModuleKeys.detail(params.id), + queryFn: () => + getClient() + .contentPresetModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModulesQuery.ts new file mode 100644 index 0000000000..700fae624b --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useContentPresetModulesQuery.ts @@ -0,0 +1,174 @@ +/** + * List query hook for ContentPresetModule + * @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 { contentPresetModuleKeys } from '../query-keys'; +import type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ContentPresetModuleSelect, + ContentPresetModuleWithRelations, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const contentPresetModulesQueryKey = contentPresetModuleKeys.list; +/** + * Query hook for fetching ContentPresetModule list + * + * @example + * ```tsx + * const { data, isLoading } = useContentPresetModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useContentPresetModulesQuery< + S extends ContentPresetModuleSelect, + TData = { + contentPresetModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, ContentPresetModuleSelect>; + } & Omit< + UseQueryOptions< + { + contentPresetModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useContentPresetModulesQuery( + params: { + selection: ListSelectionConfig< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: contentPresetModuleKeys.list(args), + queryFn: () => getClient().contentPresetModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch ContentPresetModule list without React hooks + * + * @example + * ```ts + * const data = await fetchContentPresetModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchContentPresetModulesQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, ContentPresetModuleSelect>; +}): Promise<{ + contentPresetModules: ConnectionResult>; +}>; +export async function fetchContentPresetModulesQuery(params: { + selection: ListSelectionConfig< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >(params.selection); + return getClient().contentPresetModule.findMany(args).unwrap(); +} +/** + * Prefetch ContentPresetModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchContentPresetModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchContentPresetModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, ContentPresetModuleSelect>; + } +): Promise; +export async function prefetchContentPresetModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: contentPresetModuleKeys.list(args), + queryFn: () => getClient().contentPresetModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldQuery.ts new file mode 100644 index 0000000000..13b5fbc87a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldQuery.ts @@ -0,0 +1,146 @@ +/** + * Single item query hook for DataCapabilitiesField + * @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 { dataCapabilitiesFieldKeys } from '../query-keys'; +import type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const dataCapabilitiesFieldQueryKey = dataCapabilitiesFieldKeys.detail; +/** + * Query hook for fetching a single DataCapabilitiesField + * + * @example + * ```tsx + * const { data, isLoading } = useDataCapabilitiesFieldQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useDataCapabilitiesFieldQuery< + S extends DataCapabilitiesFieldSelect, + TData = { + dataCapabilitiesField: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; + } & Omit< + UseQueryOptions< + { + dataCapabilitiesField: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useDataCapabilitiesFieldQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: dataCapabilitiesFieldKeys.detail(params.id), + queryFn: () => + getClient() + .dataCapabilitiesField.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single DataCapabilitiesField without React hooks + * + * @example + * ```ts + * const data = await fetchDataCapabilitiesFieldQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchDataCapabilitiesFieldQuery< + S extends DataCapabilitiesFieldSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; +}): Promise<{ + dataCapabilitiesField: InferSelectResult | null; +}>; +export async function fetchDataCapabilitiesFieldQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .dataCapabilitiesField.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single DataCapabilitiesField for SSR or cache warming + * + * @example + * ```ts + * await prefetchDataCapabilitiesFieldQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchDataCapabilitiesFieldQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DataCapabilitiesFieldSelect>; + } +): Promise; +export async function prefetchDataCapabilitiesFieldQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: dataCapabilitiesFieldKeys.detail(params.id), + queryFn: () => + getClient() + .dataCapabilitiesField.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldsQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldsQuery.ts new file mode 100644 index 0000000000..5886a0ff95 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useDataCapabilitiesFieldsQuery.ts @@ -0,0 +1,180 @@ +/** + * List query hook for DataCapabilitiesField + * @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 { dataCapabilitiesFieldKeys } from '../query-keys'; +import type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const dataCapabilitiesFieldsQueryKey = dataCapabilitiesFieldKeys.list; +/** + * Query hook for fetching DataCapabilitiesField list + * + * @example + * ```tsx + * const { data, isLoading } = useDataCapabilitiesFieldsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useDataCapabilitiesFieldsQuery< + S extends DataCapabilitiesFieldSelect, + TData = { + dataCapabilitiesFields: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, DataCapabilitiesFieldSelect>; + } & Omit< + UseQueryOptions< + { + dataCapabilitiesFields: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useDataCapabilitiesFieldsQuery( + params: { + selection: ListSelectionConfig< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: dataCapabilitiesFieldKeys.list(args), + queryFn: () => getClient().dataCapabilitiesField.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch DataCapabilitiesField list without React hooks + * + * @example + * ```ts + * const data = await fetchDataCapabilitiesFieldsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchDataCapabilitiesFieldsQuery< + S extends DataCapabilitiesFieldSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, DataCapabilitiesFieldSelect>; +}): Promise<{ + dataCapabilitiesFields: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchDataCapabilitiesFieldsQuery(params: { + selection: ListSelectionConfig< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >; +}) { + const args = buildListSelectionArgs< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >(params.selection); + return getClient().dataCapabilitiesField.findMany(args).unwrap(); +} +/** + * Prefetch DataCapabilitiesField list for SSR or cache warming + * + * @example + * ```ts + * await prefetchDataCapabilitiesFieldsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchDataCapabilitiesFieldsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, DataCapabilitiesFieldSelect>; + } +): Promise; +export async function prefetchDataCapabilitiesFieldsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: dataCapabilitiesFieldKeys.list(args), + queryFn: () => getClient().dataCapabilitiesField.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/usePermissionsModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModuleQuery.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/queries/usePermissionsModuleQuery.ts rename to sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModuleQuery.ts index 5c5a951399..3fb095e18c 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/usePermissionsModuleQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModuleQuery.ts @@ -1,5 +1,5 @@ /** - * Single item query hook for PermissionsModule + * Single item query hook for EmailSenderModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,44 +9,44 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { permissionsModuleKeys } from '../query-keys'; +import { emailSenderModuleKeys } from '../query-keys'; import type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const permissionsModuleQueryKey = permissionsModuleKeys.detail; +export const emailSenderModuleQueryKey = emailSenderModuleKeys.detail; /** - * Query hook for fetching a single PermissionsModule + * Query hook for fetching a single EmailSenderModule * * @example * ```tsx - * const { data, isLoading } = usePermissionsModuleQuery({ + * const { data, isLoading } = useEmailSenderModuleQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function usePermissionsModuleQuery< - S extends PermissionsModuleSelect, +export function useEmailSenderModuleQuery< + S extends EmailSenderModuleSelect, TData = { - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }, >( params: { id: string; selection: { fields: S; - } & HookStrictSelect, PermissionsModuleSelect>; + } & HookStrictSelect, EmailSenderModuleSelect>; } & Omit< UseQueryOptions< { - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }, Error, TData @@ -54,20 +54,20 @@ export function usePermissionsModuleQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function usePermissionsModuleQuery( +export function useEmailSenderModuleQuery( params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: permissionsModuleKeys.detail(params.id), + queryKey: emailSenderModuleKeys.detail(params.id), queryFn: () => getClient() - .permissionsModule.findOne({ + .emailSenderModule.findOne({ id: params.id, select: args.select, }) @@ -76,66 +76,66 @@ export function usePermissionsModuleQuery( }); } /** - * Fetch a single PermissionsModule without React hooks + * Fetch a single EmailSenderModule without React hooks * * @example * ```ts - * const data = await fetchPermissionsModuleQuery({ + * const data = await fetchEmailSenderModuleQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchPermissionsModuleQuery(params: { +export async function fetchEmailSenderModuleQuery(params: { id: string; selection: { fields: S; - } & HookStrictSelect, PermissionsModuleSelect>; + } & HookStrictSelect, EmailSenderModuleSelect>; }): Promise<{ - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }>; -export async function fetchPermissionsModuleQuery(params: { +export async function fetchEmailSenderModuleQuery(params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .permissionsModule.findOne({ + .emailSenderModule.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Prefetch a single PermissionsModule for SSR or cache warming + * Prefetch a single EmailSenderModule for SSR or cache warming * * @example * ```ts - * await prefetchPermissionsModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchEmailSenderModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchPermissionsModuleQuery( +export async function prefetchEmailSenderModuleQuery( queryClient: QueryClient, params: { id: string; selection: { fields: S; - } & HookStrictSelect, PermissionsModuleSelect>; + } & HookStrictSelect, EmailSenderModuleSelect>; } ): Promise; -export async function prefetchPermissionsModuleQuery( +export async function prefetchEmailSenderModuleQuery( queryClient: QueryClient, params: { id: string; - selection: SelectionConfig; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: permissionsModuleKeys.detail(params.id), + queryKey: emailSenderModuleKeys.detail(params.id), queryFn: () => getClient() - .permissionsModule.findOne({ + .emailSenderModule.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModulesQuery.ts new file mode 100644 index 0000000000..0ab385323e --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useEmailSenderModulesQuery.ts @@ -0,0 +1,163 @@ +/** + * List query hook for EmailSenderModule + * @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 { emailSenderModuleKeys } from '../query-keys'; +import type { + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + EmailSenderModuleSelect, + EmailSenderModuleWithRelations, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const emailSenderModulesQueryKey = emailSenderModuleKeys.list; +/** + * Query hook for fetching EmailSenderModule list + * + * @example + * ```tsx + * const { data, isLoading } = useEmailSenderModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useEmailSenderModulesQuery< + S extends EmailSenderModuleSelect, + TData = { + emailSenderModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSenderModuleSelect>; + } & Omit< + UseQueryOptions< + { + emailSenderModules: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEmailSenderModulesQuery( + params: { + selection: ListSelectionConfig< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: emailSenderModuleKeys.list(args), + queryFn: () => getClient().emailSenderModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch EmailSenderModule list without React hooks + * + * @example + * ```ts + * const data = await fetchEmailSenderModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchEmailSenderModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSenderModuleSelect>; +}): Promise<{ + emailSenderModules: ConnectionResult>; +}>; +export async function fetchEmailSenderModulesQuery(params: { + selection: ListSelectionConfig< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >(params.selection); + return getClient().emailSenderModule.findMany(args).unwrap(); +} +/** + * Prefetch EmailSenderModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchEmailSenderModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchEmailSenderModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, EmailSenderModuleSelect>; + } +): Promise; +export async function prefetchEmailSenderModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: emailSenderModuleKeys.list(args), + queryFn: () => getClient().emailSenderModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionQuery.ts index 5021910e27..ae6fc0d889 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionQuery.ts @@ -1,6 +1,6 @@ /** * 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). + and installs the required modules (capabilities, 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). @@ -30,7 +30,7 @@ export type { 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). + and installs the required modules (capabilities, 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). @@ -91,7 +91,7 @@ export function useEntityTypeProvisionQuery( } /** * 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). + and installs the required modules (capabilities, 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). @@ -129,7 +129,7 @@ export async function fetchEntityTypeProvisionQuery(params: { } /** * 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). + and installs the required modules (capabilities, 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). diff --git a/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionsQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionsQuery.ts index 4c1c2fbba1..d1f97d4e7d 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionsQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useEntityTypeProvisionsQuery.ts @@ -1,6 +1,6 @@ /** * 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). + and installs the required modules (capabilities, 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). @@ -39,7 +39,7 @@ export type { 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). + and installs the required modules (capabilities, 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). @@ -110,7 +110,7 @@ export function useEntityTypeProvisionsQuery( } /** * 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). + and installs the required modules (capabilities, 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). @@ -155,7 +155,7 @@ export async function fetchEntityTypeProvisionsQuery(params: { } /** * 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). + and installs the required modules (capabilities, 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). diff --git a/sdk/constructive-react/src/api/hooks/queries/useAstMigrationQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldQuery.ts similarity index 50% rename from sdk/constructive-react/src/api/hooks/queries/useAstMigrationQuery.ts rename to sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldQuery.ts index ef2c2a95e3..d1b5539cc4 100644 --- a/sdk/constructive-react/src/api/hooks/queries/useAstMigrationQuery.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldQuery.ts @@ -1,5 +1,5 @@ /** - * Single item query hook for AstMigration + * Single item query hook for FileRefField * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,38 +9,38 @@ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/rea import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { astMigrationKeys } from '../query-keys'; -import type { AstMigrationSelect, AstMigrationWithRelations } from '../../orm/input-types'; +import { fileRefFieldKeys } from '../query-keys'; +import type { FileRefFieldSelect, FileRefFieldWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { AstMigrationSelect, AstMigrationWithRelations } from '../../orm/input-types'; +export type { FileRefFieldSelect, FileRefFieldWithRelations } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const astMigrationQueryKey = astMigrationKeys.detail; +export const fileRefFieldQueryKey = fileRefFieldKeys.detail; /** - * Query hook for fetching a single AstMigration + * Query hook for fetching a single FileRefField * * @example * ```tsx - * const { data, isLoading } = useAstMigrationQuery({ + * const { data, isLoading } = useFileRefFieldQuery({ * id: 'some-id', * selection: { fields: { id: true, name: true } }, * }); * ``` */ -export function useAstMigrationQuery< - S extends AstMigrationSelect, +export function useFileRefFieldQuery< + S extends FileRefFieldSelect, TData = { - astMigration: InferSelectResult | null; + fileRefField: InferSelectResult | null; }, >( params: { - id: number; + id: string; selection: { fields: S; - } & HookStrictSelect, AstMigrationSelect>; + } & HookStrictSelect, FileRefFieldSelect>; } & Omit< UseQueryOptions< { - astMigration: InferSelectResult | null; + fileRefField: InferSelectResult | null; }, Error, TData @@ -48,20 +48,20 @@ export function useAstMigrationQuery< 'queryKey' | 'queryFn' > ): UseQueryResult; -export function useAstMigrationQuery( +export function useFileRefFieldQuery( params: { - id: number; - selection: SelectionConfig; + id: string; + selection: SelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: astMigrationKeys.detail(params.id), + queryKey: fileRefFieldKeys.detail(params.id), queryFn: () => getClient() - .astMigration.findOne({ + .fileRefField.findOne({ id: params.id, select: args.select, }) @@ -70,66 +70,66 @@ export function useAstMigrationQuery( }); } /** - * Fetch a single AstMigration without React hooks + * Fetch a single FileRefField without React hooks * * @example * ```ts - * const data = await fetchAstMigrationQuery({ + * const data = await fetchFileRefFieldQuery({ * id: 'some-id', * selection: { fields: { id: true } }, * }); * ``` */ -export async function fetchAstMigrationQuery(params: { - id: number; +export async function fetchFileRefFieldQuery(params: { + id: string; selection: { fields: S; - } & HookStrictSelect, AstMigrationSelect>; + } & HookStrictSelect, FileRefFieldSelect>; }): Promise<{ - astMigration: InferSelectResult | null; + fileRefField: InferSelectResult | null; }>; -export async function fetchAstMigrationQuery(params: { - id: number; - selection: SelectionConfig; +export async function fetchFileRefFieldQuery(params: { + id: string; + selection: SelectionConfig; }): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); return getClient() - .astMigration.findOne({ + .fileRefField.findOne({ id: params.id, select: args.select, }) .unwrap(); } /** - * Prefetch a single AstMigration for SSR or cache warming + * Prefetch a single FileRefField for SSR or cache warming * * @example * ```ts - * await prefetchAstMigrationQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchFileRefFieldQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); * ``` */ -export async function prefetchAstMigrationQuery( +export async function prefetchFileRefFieldQuery( queryClient: QueryClient, params: { - id: number; + id: string; selection: { fields: S; - } & HookStrictSelect, AstMigrationSelect>; + } & HookStrictSelect, FileRefFieldSelect>; } ): Promise; -export async function prefetchAstMigrationQuery( +export async function prefetchFileRefFieldQuery( queryClient: QueryClient, params: { - id: number; - selection: SelectionConfig; + id: string; + selection: SelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: astMigrationKeys.detail(params.id), + queryKey: fileRefFieldKeys.detail(params.id), queryFn: () => getClient() - .astMigration.findOne({ + .fileRefField.findOne({ id: params.id, select: args.select, }) diff --git a/sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldsQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldsQuery.ts new file mode 100644 index 0000000000..dc5b8fe6f8 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useFileRefFieldsQuery.ts @@ -0,0 +1,145 @@ +/** + * List query hook for FileRefField + * @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 { fileRefFieldKeys } from '../query-keys'; +import type { + FileRefFieldSelect, + FileRefFieldWithRelations, + FileRefFieldFilter, + FileRefFieldOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + FileRefFieldSelect, + FileRefFieldWithRelations, + FileRefFieldFilter, + FileRefFieldOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const fileRefFieldsQueryKey = fileRefFieldKeys.list; +/** + * Query hook for fetching FileRefField list + * + * @example + * ```tsx + * const { data, isLoading } = useFileRefFieldsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useFileRefFieldsQuery< + S extends FileRefFieldSelect, + TData = { + fileRefFields: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, FileRefFieldSelect>; + } & Omit< + UseQueryOptions< + { + fileRefFields: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useFileRefFieldsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: fileRefFieldKeys.list(args), + queryFn: () => getClient().fileRefField.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch FileRefField list without React hooks + * + * @example + * ```ts + * const data = await fetchFileRefFieldsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchFileRefFieldsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, FileRefFieldSelect>; +}): Promise<{ + fileRefFields: ConnectionResult>; +}>; +export async function fetchFileRefFieldsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().fileRefField.findMany(args).unwrap(); +} +/** + * Prefetch FileRefField list for SSR or cache warming + * + * @example + * ```ts + * await prefetchFileRefFieldsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchFileRefFieldsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, FileRefFieldSelect>; + } +): Promise; +export async function prefetchFileRefFieldsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: fileRefFieldKeys.list(args), + queryFn: () => getClient().fileRefField.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModuleQuery.ts new file mode 100644 index 0000000000..e88e021dd9 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModuleQuery.ts @@ -0,0 +1,164 @@ +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * @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 { oauthRequestsModuleKeys } from '../query-keys'; +import type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const oauthRequestsModuleQueryKey = oauthRequestsModuleKeys.detail; +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```tsx + * const { data, isLoading } = useOauthRequestsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOauthRequestsModuleQuery< + S extends OauthRequestsModuleSelect, + TData = { + oauthRequestsModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OauthRequestsModuleSelect>; + } & Omit< + UseQueryOptions< + { + oauthRequestsModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOauthRequestsModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: oauthRequestsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .oauthRequestsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```ts + * const data = await fetchOauthRequestsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOauthRequestsModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OauthRequestsModuleSelect>; +}): Promise<{ + oauthRequestsModule: InferSelectResult | null; +}>; +export async function fetchOauthRequestsModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .oauthRequestsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```ts + * await prefetchOauthRequestsModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOauthRequestsModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OauthRequestsModuleSelect>; + } +): Promise; +export async function prefetchOauthRequestsModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: oauthRequestsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .oauthRequestsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModulesQuery.ts new file mode 100644 index 0000000000..b464b73243 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useOauthRequestsModulesQuery.ts @@ -0,0 +1,194 @@ +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * @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 { oauthRequestsModuleKeys } from '../query-keys'; +import type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OauthRequestsModuleSelect, + OauthRequestsModuleWithRelations, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const oauthRequestsModulesQueryKey = oauthRequestsModuleKeys.list; +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```tsx + * const { data, isLoading } = useOauthRequestsModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOauthRequestsModulesQuery< + S extends OauthRequestsModuleSelect, + TData = { + oauthRequestsModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OauthRequestsModuleSelect>; + } & Omit< + UseQueryOptions< + { + oauthRequestsModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOauthRequestsModulesQuery( + params: { + selection: ListSelectionConfig< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: oauthRequestsModuleKeys.list(args), + queryFn: () => getClient().oauthRequestsModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```ts + * const data = await fetchOauthRequestsModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOauthRequestsModulesQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OauthRequestsModuleSelect>; +}): Promise<{ + oauthRequestsModules: ConnectionResult>; +}>; +export async function fetchOauthRequestsModulesQuery(params: { + selection: ListSelectionConfig< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >(params.selection); + return getClient().oauthRequestsModule.findMany(args).unwrap(); +} +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. + * + * @example + * ```ts + * await prefetchOauthRequestsModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOauthRequestsModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, OauthRequestsModuleSelect>; + } +): Promise; +export async function prefetchOauthRequestsModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: oauthRequestsModuleKeys.list(args), + queryFn: () => getClient().oauthRequestsModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/usePermissionsModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/usePermissionsModulesQuery.ts deleted file mode 100644 index ccfc68c12b..0000000000 --- a/sdk/constructive-react/src/modules/hooks/queries/usePermissionsModulesQuery.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * List query hook for PermissionsModule - * @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 { permissionsModuleKeys } from '../query-keys'; -import type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - PermissionsModuleFilter, - PermissionsModuleOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - PermissionsModuleSelect, - PermissionsModuleWithRelations, - PermissionsModuleFilter, - PermissionsModuleOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const permissionsModulesQueryKey = permissionsModuleKeys.list; -/** - * Query hook for fetching PermissionsModule list - * - * @example - * ```tsx - * const { data, isLoading } = usePermissionsModulesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function usePermissionsModulesQuery< - S extends PermissionsModuleSelect, - TData = { - permissionsModules: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PermissionsModuleSelect>; - } & Omit< - UseQueryOptions< - { - permissionsModules: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function usePermissionsModulesQuery( - params: { - selection: ListSelectionConfig< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: permissionsModuleKeys.list(args), - queryFn: () => getClient().permissionsModule.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch PermissionsModule list without React hooks - * - * @example - * ```ts - * const data = await fetchPermissionsModulesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchPermissionsModulesQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PermissionsModuleSelect>; -}): Promise<{ - permissionsModules: ConnectionResult>; -}>; -export async function fetchPermissionsModulesQuery(params: { - selection: ListSelectionConfig< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >; -}) { - const args = buildListSelectionArgs< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >(params.selection); - return getClient().permissionsModule.findMany(args).unwrap(); -} -/** - * Prefetch PermissionsModule list for SSR or cache warming - * - * @example - * ```ts - * await prefetchPermissionsModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchPermissionsModulesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PermissionsModuleSelect>; - } -): Promise; -export async function prefetchPermissionsModulesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: permissionsModuleKeys.list(args), - queryFn: () => getClient().permissionsModule.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts deleted file mode 100644 index 3584b7d36a..0000000000 --- a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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, fieldName, tableId } }); - * - * 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, fieldName, tableId } }); - * ``` - */ -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, fieldName, tableId } }); - * ``` - */ -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/modules/hooks/queries/useResolveBlueprintTableQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintTableQuery.ts deleted file mode 100644 index 906033d06c..0000000000 --- a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintTableQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for resolveBlueprintTable - * @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 { ResolveBlueprintTableVariables } from '../../orm/query'; -export type { ResolveBlueprintTableVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveBlueprintTableQueryKey = customQueryKeys.resolveBlueprintTable; -/** - * 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. - * - * @example - * ```tsx - * const { data, isLoading } = useResolveBlueprintTableQuery({ variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * - * if (data?.resolveBlueprintTable) { - * console.log(data.resolveBlueprintTable); - * } - * ``` - */ -export function useResolveBlueprintTableQuery< - TData = { - resolveBlueprintTable: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintTableVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintTable: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveBlueprintTableQuery< - TData = { - resolveBlueprintTable: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintTableVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintTable: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: resolveBlueprintTableQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveBlueprintTable without React hooks - * - * @example - * ```ts - * const data = await fetchResolveBlueprintTableQuery({ variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * ``` - */ -export async function fetchResolveBlueprintTableQuery(params?: { - variables?: ResolveBlueprintTableVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.resolveBlueprintTable(variables).unwrap(); -} -/** - * Prefetch resolveBlueprintTable for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveBlueprintTableQuery(queryClient, { variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * ``` - */ -export async function prefetchResolveBlueprintTableQuery( - queryClient: QueryClient, - params?: { - variables?: ResolveBlueprintTableVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: resolveBlueprintTableQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts new file mode 100644 index 0000000000..3f6cdcebc9 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for ScopeTypesModule + * @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 { scopeTypesModuleKeys } from '../query-keys'; +import type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const scopeTypesModuleQueryKey = scopeTypesModuleKeys.detail; +/** + * Query hook for fetching a single ScopeTypesModule + * + * @example + * ```tsx + * const { data, isLoading } = useScopeTypesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useScopeTypesModuleQuery< + S extends ScopeTypesModuleSelect, + TData = { + scopeTypesModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseQueryOptions< + { + scopeTypesModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useScopeTypesModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: scopeTypesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single ScopeTypesModule without React hooks + * + * @example + * ```ts + * const data = await fetchScopeTypesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchScopeTypesModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; +}): Promise<{ + scopeTypesModule: InferSelectResult | null; +}>; +export async function fetchScopeTypesModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single ScopeTypesModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchScopeTypesModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchScopeTypesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } +): Promise; +export async function prefetchScopeTypesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: scopeTypesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts new file mode 100644 index 0000000000..e04a11e99a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts @@ -0,0 +1,163 @@ +/** + * List query hook for ScopeTypesModule + * @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 { scopeTypesModuleKeys } from '../query-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const scopeTypesModulesQueryKey = scopeTypesModuleKeys.list; +/** + * Query hook for fetching ScopeTypesModule list + * + * @example + * ```tsx + * const { data, isLoading } = useScopeTypesModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useScopeTypesModulesQuery< + S extends ScopeTypesModuleSelect, + TData = { + scopeTypesModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseQueryOptions< + { + scopeTypesModules: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useScopeTypesModulesQuery( + params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: scopeTypesModuleKeys.list(args), + queryFn: () => getClient().scopeTypesModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch ScopeTypesModule list without React hooks + * + * @example + * ```ts + * const data = await fetchScopeTypesModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchScopeTypesModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; +}): Promise<{ + scopeTypesModules: ConnectionResult>; +}>; +export async function fetchScopeTypesModulesQuery(params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + return getClient().scopeTypesModule.findMany(args).unwrap(); +} +/** + * Prefetch ScopeTypesModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchScopeTypesModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchScopeTypesModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; + } +): Promise; +export async function prefetchScopeTypesModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: scopeTypesModuleKeys.list(args), + queryFn: () => getClient().scopeTypesModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts new file mode 100644 index 0000000000..ae6ffc138e --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts @@ -0,0 +1,154 @@ +/** + * Single item query hook for UserSettingsSecurityModule + * @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 { userSettingsSecurityModuleKeys } from '../query-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userSettingsSecurityModuleQueryKey = userSettingsSecurityModuleKeys.detail; +/** + * Query hook for fetching a single UserSettingsSecurityModule + * + * @example + * ```tsx + * const { data, isLoading } = useUserSettingsSecurityModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, + TData = { + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseQueryOptions< + { + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserSettingsSecurityModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userSettingsSecurityModuleKeys.detail(params.id), + queryFn: () => + getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single UserSettingsSecurityModule without React hooks + * + * @example + * ```ts + * const data = await fetchUserSettingsSecurityModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; +}): Promise<{ + userSettingsSecurityModule: InferSelectResult | null; +}>; +export async function fetchUserSettingsSecurityModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single UserSettingsSecurityModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserSettingsSecurityModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } +): Promise; +export async function prefetchUserSettingsSecurityModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: userSettingsSecurityModuleKeys.detail(params.id), + queryFn: () => + getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts new file mode 100644 index 0000000000..03736ac8df --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts @@ -0,0 +1,182 @@ +/** + * List query hook for UserSettingsSecurityModule + * @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 { userSettingsSecurityModuleKeys } from '../query-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userSettingsSecurityModulesQueryKey = userSettingsSecurityModuleKeys.list; +/** + * Query hook for fetching UserSettingsSecurityModule list + * + * @example + * ```tsx + * const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, + TData = { + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseQueryOptions< + { + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserSettingsSecurityModulesQuery( + params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userSettingsSecurityModuleKeys.list(args), + queryFn: () => getClient().userSettingsSecurityModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch UserSettingsSecurityModule list without React hooks + * + * @example + * ```ts + * const data = await fetchUserSettingsSecurityModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; +}): Promise<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchUserSettingsSecurityModulesQuery(params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + return getClient().userSettingsSecurityModule.findMany(args).unwrap(); +} +/** + * Prefetch UserSettingsSecurityModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserSettingsSecurityModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; + } +): Promise; +export async function prefetchUserSettingsSecurityModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: userSettingsSecurityModuleKeys.list(args), + queryFn: () => getClient().userSettingsSecurityModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/query-keys.ts b/sdk/constructive-react/src/modules/hooks/query-keys.ts index 551484d6ec..8e143a3f84 100644 --- a/sdk/constructive-react/src/modules/hooks/query-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/query-keys.ts @@ -91,6 +91,15 @@ export const blueprintTemplateKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...blueprintTemplateKeys.details(), id] as const, } as const; +export const capabilitiesModuleKeys = { + /** All capabilitiesModule queries */ all: ['capabilitiesmodule'] as const, + /** List query keys */ lists: () => [...capabilitiesModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...capabilitiesModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...capabilitiesModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...capabilitiesModuleKeys.details(), id] as const, +} as const; export const catalogModuleKeys = { /** All catalogModule queries */ all: ['catalogmodule'] as const, /** List query keys */ lists: () => [...catalogModuleKeys.all, 'list'] as const, @@ -127,6 +136,15 @@ export const connectedAccountsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...connectedAccountsModuleKeys.details(), id] as const, } as const; +export const contentPresetModuleKeys = { + /** All contentPresetModule queries */ all: ['contentpresetmodule'] as const, + /** List query keys */ lists: () => [...contentPresetModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...contentPresetModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...contentPresetModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...contentPresetModuleKeys.details(), id] as const, +} as const; export const cryptoAddressesModuleKeys = { /** All cryptoAddressesModule queries */ all: ['cryptoaddressesmodule'] as const, /** List query keys */ lists: () => [...cryptoAddressesModuleKeys.all, 'list'] as const, @@ -145,6 +163,15 @@ export const cryptoAuthModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...cryptoAuthModuleKeys.details(), id] as const, } as const; +export const dataCapabilitiesFieldKeys = { + /** All dataCapabilitiesField queries */ all: ['datacapabilitiesfield'] as const, + /** List query keys */ lists: () => [...dataCapabilitiesFieldKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...dataCapabilitiesFieldKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...dataCapabilitiesFieldKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...dataCapabilitiesFieldKeys.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, @@ -235,6 +262,15 @@ export const domainModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...domainModuleKeys.details(), id] as const, } as const; +export const emailSenderModuleKeys = { + /** All emailSenderModule queries */ all: ['emailsendermodule'] as const, + /** List query keys */ lists: () => [...emailSenderModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...emailSenderModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...emailSenderModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...emailSenderModuleKeys.details(), id] as const, +} as const; export const emailsModuleKeys = { /** All emailsModule queries */ all: ['emailsmodule'] as const, /** List query keys */ lists: () => [...emailsModuleKeys.all, 'list'] as const, @@ -262,6 +298,15 @@ export const eventsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...eventsModuleKeys.details(), id] as const, } as const; +export const fileRefFieldKeys = { + /** All fileRefField queries */ all: ['filereffield'] as const, + /** List query keys */ lists: () => [...fileRefFieldKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...fileRefFieldKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...fileRefFieldKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...fileRefFieldKeys.details(), id] as const, +} as const; export const functionDeploymentModuleKeys = { /** All functionDeploymentModule queries */ all: ['functiondeploymentmodule'] as const, /** List query keys */ lists: () => [...functionDeploymentModuleKeys.all, 'list'] as const, @@ -452,6 +497,15 @@ export const notificationsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...notificationsModuleKeys.details(), id] as const, } as const; +export const oauthRequestsModuleKeys = { + /** All oauthRequestsModule queries */ all: ['oauthrequestsmodule'] as const, + /** List query keys */ lists: () => [...oauthRequestsModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...oauthRequestsModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...oauthRequestsModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...oauthRequestsModuleKeys.details(), id] as const, +} as const; export const pagesModuleKeys = { /** All pagesModule queries */ all: ['pagesmodule'] as const, /** List query keys */ lists: () => [...pagesModuleKeys.all, 'list'] as const, @@ -461,15 +515,6 @@ export const pagesModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...pagesModuleKeys.details(), id] as const, } as const; -export const permissionsModuleKeys = { - /** All permissionsModule queries */ all: ['permissionsmodule'] as const, - /** List query keys */ lists: () => [...permissionsModuleKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...permissionsModuleKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...permissionsModuleKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...permissionsModuleKeys.details(), id] as const, -} as const; export const phoneNumbersModuleKeys = { /** All phoneNumbersModule queries */ all: ['phonenumbersmodule'] as const, /** List query keys */ lists: () => [...phoneNumbersModuleKeys.all, 'list'] as const, @@ -569,6 +614,15 @@ export const routeModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...routeModuleKeys.details(), id] as const, } as const; +export const scopeTypesModuleKeys = { + /** All scopeTypesModule queries */ all: ['scopetypesmodule'] as const, + /** List query keys */ lists: () => [...scopeTypesModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...scopeTypesModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...scopeTypesModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...scopeTypesModuleKeys.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, @@ -659,6 +713,16 @@ export const userSettingsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...userSettingsModuleKeys.details(), id] as const, } as const; +export const userSettingsSecurityModuleKeys = { + /** All userSettingsSecurityModule queries */ all: ['usersettingssecuritymodule'] as const, + /** List query keys */ lists: () => [...userSettingsSecurityModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...userSettingsSecurityModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => + [...userSettingsSecurityModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...userSettingsSecurityModuleKeys.details(), id] as const, +} as const; export const userStateModuleKeys = { /** All userStateModule queries */ all: ['userstatemodule'] as const, /** List query keys */ lists: () => [...userStateModuleKeys.all, 'list'] as const, @@ -704,17 +768,6 @@ export const webhookModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...webhookModuleKeys.details(), id] as const, } as const; - -// ============================================================================ -// Custom Query Keys -// ============================================================================ - -export const customQueryKeys = { - /** Query key for resolveBlueprintField */ resolveBlueprintField: (variables?: object) => - ['resolveBlueprintField', variables] as const, - /** Query key for resolveBlueprintTable */ resolveBlueprintTable: (variables?: object) => - ['resolveBlueprintTable', variables] as const, -} as const; /** // ============================================================================ @@ -746,12 +799,15 @@ export const queryKeys = { blueprint: blueprintKeys, blueprintConstruction: blueprintConstructionKeys, blueprintTemplate: blueprintTemplateKeys, + capabilitiesModule: capabilitiesModuleKeys, catalogModule: catalogModuleKeys, computeLogModule: computeLogModuleKeys, configSecretsUserModule: configSecretsUserModuleKeys, connectedAccountsModule: connectedAccountsModuleKeys, + contentPresetModule: contentPresetModuleKeys, cryptoAddressesModule: cryptoAddressesModuleKeys, cryptoAuthModule: cryptoAuthModuleKeys, + dataCapabilitiesField: dataCapabilitiesFieldKeys, databaseProvisionModule: databaseProvisionModuleKeys, databaseSettingsModule: databaseSettingsModuleKeys, dbPoolConfig: dbPoolConfigKeys, @@ -762,9 +818,11 @@ export const queryKeys = { denormalizedTableField: denormalizedTableFieldKeys, devicesModule: devicesModuleKeys, domainModule: domainModuleKeys, + emailSenderModule: emailSenderModuleKeys, emailsModule: emailsModuleKeys, entityTypeProvision: entityTypeProvisionKeys, eventsModule: eventsModuleKeys, + fileRefField: fileRefFieldKeys, functionDeploymentModule: functionDeploymentModuleKeys, functionInvocationModule: functionInvocationModuleKeys, functionModule: functionModuleKeys, @@ -786,8 +844,8 @@ export const queryKeys = { merkleStoreModule: merkleStoreModuleKeys, namespaceModule: namespaceModuleKeys, notificationsModule: notificationsModuleKeys, + oauthRequestsModule: oauthRequestsModuleKeys, pagesModule: pagesModuleKeys, - permissionsModule: permissionsModuleKeys, phoneNumbersModule: phoneNumbersModuleKeys, plansModule: plansModuleKeys, principalAuthModule: principalAuthModuleKeys, @@ -799,6 +857,7 @@ export const queryKeys = { resourceModule: resourceModuleKeys, rlsModule: rlsModuleKeys, routeModule: routeModuleKeys, + scopeTypesModule: scopeTypesModuleKeys, secureTableProvision: secureTableProvisionKeys, sessionSecretsModule: sessionSecretsModuleKeys, sessionsModule: sessionsModuleKeys, @@ -809,12 +868,12 @@ export const queryKeys = { userAuthModule: userAuthModuleKeys, userCredentialsModule: userCredentialsModuleKeys, userSettingsModule: userSettingsModuleKeys, + userSettingsSecurityModule: userSettingsSecurityModuleKeys, userStateModule: userStateModuleKeys, usersModule: usersModuleKeys, webauthnAuthModule: webauthnAuthModuleKeys, webauthnCredentialsModule: webauthnCredentialsModuleKeys, webhookModule: webhookModuleKeys, - custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ export type QueryKeyScope = keyof typeof queryKeys; diff --git a/sdk/constructive-react/src/modules/orm/README.md b/sdk/constructive-react/src/modules/orm/README.md index 7982fe489a..de92f9aee3 100644 --- a/sdk/constructive-react/src/modules/orm/README.md +++ b/sdk/constructive-react/src/modules/orm/README.md @@ -29,12 +29,15 @@ const db = createClient({ | `blueprint` | findMany, findOne, create, update, delete | | `blueprintConstruction` | findMany, findOne, create, update, delete | | `blueprintTemplate` | findMany, findOne, create, update, delete | +| `capabilitiesModule` | findMany, findOne, create, update, delete | | `catalogModule` | findMany, findOne, create, update, delete | | `computeLogModule` | findMany, findOne, create, update, delete | | `configSecretsUserModule` | findMany, findOne, create, update, delete | | `connectedAccountsModule` | findMany, findOne, create, update, delete | +| `contentPresetModule` | findMany, findOne, create, update, delete | | `cryptoAddressesModule` | findMany, findOne, create, update, delete | | `cryptoAuthModule` | findMany, findOne, create, update, delete | +| `dataCapabilitiesField` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `databaseSettingsModule` | findMany, findOne, create, update, delete | | `dbPoolConfig` | findMany, findOne, create, update, delete | @@ -45,9 +48,11 @@ const db = createClient({ | `denormalizedTableField` | findMany, findOne, create, update, delete | | `devicesModule` | findMany, findOne, create, update, delete | | `domainModule` | findMany, findOne, create, update, delete | +| `emailSenderModule` | findMany, findOne, create, update, delete | | `emailsModule` | findMany, findOne, create, update, delete | | `entityTypeProvision` | findMany, findOne, create, update, delete | | `eventsModule` | findMany, findOne, create, update, delete | +| `fileRefField` | findMany, findOne, create, update, delete | | `functionDeploymentModule` | findMany, findOne, create, update, delete | | `functionInvocationModule` | findMany, findOne, create, update, delete | | `functionModule` | findMany, findOne, create, update, delete | @@ -69,8 +74,8 @@ const db = createClient({ | `merkleStoreModule` | findMany, findOne, create, update, delete | | `namespaceModule` | findMany, findOne, create, update, delete | | `notificationsModule` | findMany, findOne, create, update, delete | +| `oauthRequestsModule` | findMany, findOne, create, update, delete | | `pagesModule` | findMany, findOne, create, update, delete | -| `permissionsModule` | findMany, findOne, create, update, delete | | `phoneNumbersModule` | findMany, findOne, create, update, delete | | `plansModule` | findMany, findOne, create, update, delete | | `principalAuthModule` | findMany, findOne, create, update, delete | @@ -82,6 +87,7 @@ const db = createClient({ | `resourceModule` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `routeModule` | findMany, findOne, create, update, delete | +| `scopeTypesModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `sessionSecretsModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | @@ -92,6 +98,7 @@ const db = createClient({ | `userAuthModule` | findMany, findOne, create, update, delete | | `userCredentialsModule` | findMany, findOne, create, update, delete | | `userSettingsModule` | findMany, findOne, create, update, delete | +| `userSettingsSecurityModule` | findMany, findOne, create, update, delete | | `userStateModule` | findMany, findOne, create, update, delete | | `usersModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | @@ -112,7 +119,7 @@ CRUD operations for AgentModule records. | `agentTableName` | String | Yes | | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `hasAgents` | Boolean | Yes | @@ -149,13 +156,13 @@ CRUD operations for AgentModule records. ```typescript // List all agentModule records -const items = await db.agentModule.findMany({ select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); +const items = await db.agentModule.findMany({ select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); // Get one by id -const item = await db.agentModule.findOne({ id: '', select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); +const item = await db.agentModule.findOne({ id: '', select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); // Create -const created = await db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute(); +const created = await db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.agentModule.update({ where: { id: '' }, data: { agentTableId: '' }, select: { id: true } }).execute(); @@ -183,7 +190,7 @@ CRUD operations for ApiSurfaceModule records. | `corsSettingsTableId` | UUID | Yes | | `corsSettingsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -199,13 +206,13 @@ CRUD operations for ApiSurfaceModule records. ```typescript // List all apiSurfaceModule records -const items = await db.apiSurfaceModule.findMany({ select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.apiSurfaceModule.findMany({ select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.apiSurfaceModule.findOne({ id: '', select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.apiSurfaceModule.findOne({ id: '', select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.apiSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -229,7 +236,7 @@ CRUD operations for AppModule records. | `appsTableName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -247,13 +254,13 @@ CRUD operations for AppModule records. ```typescript // List all appModule records -const items = await db.appModule.findMany({ select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.appModule.findMany({ select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.appModule.findOne({ id: '', select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.appModule.findOne({ id: '', select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.appModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -274,8 +281,8 @@ CRUD operations for BillingModule records. | `balancesTableId` | UUID | Yes | | `balancesTableName` | String | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | | `defaultMeterCatalog` | JSON | Yes | -| `defaultPermissions` | String | Yes | | `id` | UUID | No | | `ledgerTableId` | UUID | Yes | | `ledgerTableName` | String | Yes | @@ -303,13 +310,13 @@ CRUD operations for BillingModule records. ```typescript // List all billingModule records -const items = await db.billingModule.findMany({ select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); +const items = await db.billingModule.findMany({ select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); // Get one by id -const item = await db.billingModule.findOne({ id: '', select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); +const item = await db.billingModule.findOne({ id: '', select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); // Create -const created = await db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute(); +const created = await db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -329,16 +336,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | +| `billingInvoicesTableId` | UUID | Yes | +| `billingInvoicesTableName` | String | Yes | | `billingPricesTableId` | UUID | Yes | | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingRefundsTableId` | UUID | Yes | +| `billingRefundsTableName` | String | Yes | | `billingSubscriptionsTableId` | UUID | Yes | | `billingSubscriptionsTableName` | String | Yes | | `billingWebhookEventsTableId` | UUID | Yes | | `billingWebhookEventsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `id` | UUID | No | +| `listPendingUsageSyncFunction` | String | Yes | +| `markUsageSyncedFunction` | String | Yes | | `prefix` | String | Yes | | `pricesTableId` | UUID | Yes | | `privateApiName` | String | Yes | @@ -346,20 +359,22 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordRefundFunction` | String | Yes | | `schemaId` | UUID | Yes | | `subscriptionsTableId` | UUID | Yes | +| `upsertInvoiceFunction` | String | Yes | **Operations:** ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -495,6 +510,56 @@ const updated = await db.blueprintTemplate.update({ where: { id: '' }, dat const deleted = await db.blueprintTemplate.delete({ where: { id: '' } }).execute(); ``` +### `db.capabilitiesModule` + +CRUD operations for CapabilitiesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorTableId` | UUID | Yes | +| `apiName` | String | Yes | +| `bitlen` | Int | Yes | +| `databaseId` | UUID | Yes | +| `defaultTableId` | UUID | Yes | +| `defaultTableName` | String | Yes | +| `entityField` | String | Yes | +| `entityTableId` | UUID | Yes | +| `getByMask` | String | Yes | +| `getMask` | String | Yes | +| `getMaskByName` | String | Yes | +| `getPaddedMask` | String | Yes | +| `id` | UUID | No | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `privateSchemaId` | UUID | Yes | +| `privateSchemaName` | String | Yes | +| `publicSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scope` | String | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all capabilitiesModule records +const items = await db.capabilitiesModule.findMany({ select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.capabilitiesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.capabilitiesModule.create({ data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.capabilitiesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.capabilitiesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.catalogModule` CRUD operations for CatalogModule records. @@ -508,10 +573,12 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | Yes | | `appsTableId` | UUID | Yes | | `appsTableName` | String | Yes | +| `bindingsTableId` | UUID | Yes | +| `bindingsTableName` | String | Yes | | `bucketsTableId` | UUID | Yes | | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainsTableId` | UUID | Yes | | `domainsTableName` | String | Yes | | `entityTableId` | UUID | Yes | @@ -547,13 +614,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -683,6 +750,51 @@ const updated = await db.connectedAccountsModule.update({ where: { id: '' const deleted = await db.connectedAccountsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.contentPresetModule` + +CRUD operations for ContentPresetModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `contentPresetsTableId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `entityTableId` | UUID | Yes | +| `id` | UUID | No | +| `merkleStoreModuleId` | UUID | Yes | +| `policies` | JSON | Yes | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `privateSchemaId` | UUID | Yes | +| `privateSchemaName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `scope` | String | Yes | +| `storeName` | String | Yes | + +**Operations:** + +```typescript +// List all contentPresetModule records +const items = await db.contentPresetModule.findMany({ select: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }).execute(); + +// Get one by id +const item = await db.contentPresetModule.findOne({ id: '', select: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }).execute(); + +// Create +const created = await db.contentPresetModule.create({ data: { apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.contentPresetModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.contentPresetModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.cryptoAddressesModule` CRUD operations for CryptoAddressesModule records. @@ -763,6 +875,45 @@ const updated = await db.cryptoAuthModule.update({ where: { id: '' }, data const deleted = await db.cryptoAuthModule.delete({ where: { id: '' } }).execute(); ``` +### `db.dataCapabilitiesField` + +CRUD operations for DataCapabilitiesField records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilitiesModuleId` | UUID | Yes | +| `databaseId` | UUID | Yes | +| `fieldId` | UUID | Yes | +| `fromFieldId` | UUID | Yes | +| `id` | UUID | No | +| `mappingFieldId` | UUID | Yes | +| `mappingKeyFieldId` | UUID | Yes | +| `mappingTableId` | UUID | Yes | +| `mode` | String | Yes | +| `subsetGuard` | Boolean | Yes | +| `tableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all dataCapabilitiesField records +const items = await db.dataCapabilitiesField.findMany({ select: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }).execute(); + +// Get one by id +const item = await db.dataCapabilitiesField.findOne({ id: '', select: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }).execute(); + +// Create +const created = await db.dataCapabilitiesField.create({ data: { capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.dataCapabilitiesField.update({ where: { id: '' }, data: { capabilitiesModuleId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.dataCapabilitiesField.delete({ where: { id: '' } }).execute(); +``` + ### `db.databaseProvisionModule` CRUD operations for DatabaseProvisionModule records. @@ -822,7 +973,7 @@ CRUD operations for DatabaseSettingsModule records. | `databaseId` | UUID | Yes | | `databaseSettingsTableId` | UUID | Yes | | `databaseSettingsTableName` | String | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -844,13 +995,13 @@ CRUD operations for DatabaseSettingsModule records. ```typescript // List all databaseSettingsModule records -const items = await db.databaseSettingsModule.findMany({ select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); +const items = await db.databaseSettingsModule.findMany({ select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); // Get one by id -const item = await db.databaseSettingsModule.findOne({ id: '', select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); +const item = await db.databaseSettingsModule.findOne({ id: '', select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); // Create -const created = await db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute(); +const created = await db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.databaseSettingsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -995,7 +1146,7 @@ CRUD operations for DbUsageModule records. | `collectDbQueryStatsFunction` | String | Yes | | `collectDbTableStatsFunction` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `id` | UUID | No | | `interval` | String | Yes | @@ -1023,13 +1174,13 @@ CRUD operations for DbUsageModule records. ```typescript // List all dbUsageModule records -const items = await db.dbUsageModule.findMany({ select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); +const items = await db.dbUsageModule.findMany({ select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); // Get one by id -const item = await db.dbUsageModule.findOne({ id: '', select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); +const item = await db.dbUsageModule.findOne({ id: '', select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); // Create -const created = await db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute(); +const created = await db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.dbUsageModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1154,7 +1305,7 @@ CRUD operations for DomainModule records. | `apiName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainEventsTableId` | UUID | Yes | | `domainEventsTableName` | String | Yes | | `domainVerificationsTableId` | UUID | Yes | @@ -1180,13 +1331,13 @@ CRUD operations for DomainModule records. ```typescript // List all domainModule records -const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1195,6 +1346,54 @@ const updated = await db.domainModule.update({ where: { id: '' }, data: { const deleted = await db.domainModule.delete({ where: { id: '' } }).execute(); ``` +### `db.emailSenderModule` + +CRUD operations for EmailSenderModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | +| `emailIdentitiesTableId` | UUID | Yes | +| `emailIdentitiesTableName` | String | Yes | +| `emailProviderAccountsTableId` | UUID | Yes | +| `emailProviderAccountsTableName` | String | Yes | +| `emailSiteIdentitiesTableId` | UUID | Yes | +| `emailSiteIdentitiesTableName` | String | Yes | +| `entityField` | String | Yes | +| `entityTableId` | UUID | Yes | +| `id` | UUID | No | +| `policies` | JSON | Yes | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scope` | String | Yes | +| `siteSurfaceModuleId` | UUID | Yes | + +**Operations:** + +```typescript +// List all emailSenderModule records +const items = await db.emailSenderModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }).execute(); + +// Get one by id +const item = await db.emailSenderModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }).execute(); + +// Create +const created = await db.emailSenderModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailSenderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailSenderModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.emailsModule` CRUD operations for EmailsModule records. @@ -1312,7 +1511,7 @@ CRUD operations for EventsModule records. | `actorTableId` | UUID | Yes | | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `eventAggregatesTableId` | UUID | Yes | @@ -1321,6 +1520,7 @@ CRUD operations for EventsModule records. | `eventTypesTableName` | String | Yes | | `eventsTableId` | UUID | Yes | | `eventsTableName` | String | Yes | +| `expireGrants` | String | Yes | | `grantAchievement` | String | Yes | | `id` | UUID | No | | `interval` | String | Yes | @@ -1337,9 +1537,11 @@ CRUD operations for EventsModule records. | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | | `publicSchemaName` | String | Yes | +| `recomputeCapabilities` | String | Yes | | `recordEvent` | String | Yes | | `removeEvent` | String | Yes | | `retention` | String | Yes | +| `revokeAchievement` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | | `stepsRequired` | String | Yes | @@ -1349,20 +1551,22 @@ CRUD operations for EventsModule records. | `tgEventBool` | String | Yes | | `tgEventToggle` | String | Yes | | `tgEventToggleBool` | String | Yes | +| `tgLevelGrantSync` | String | Yes | | `tgUpdateAggregates` | String | Yes | +| `trustLadder` | JSON | Yes | | `upsertAggregate` | String | Yes | **Operations:** ```typescript // List all eventsModule records -const items = await db.eventsModule.findMany({ select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }).execute(); +const items = await db.eventsModule.findMany({ select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }).execute(); // Get one by id -const item = await db.eventsModule.findOne({ id: '', select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }).execute(); +const item = await db.eventsModule.findOne({ id: '', select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }).execute(); // Create -const created = await db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }, select: { id: true } }).execute(); +const created = await db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }, select: { id: true } }).execute(); // Update const updated = await db.eventsModule.update({ where: { id: '' }, data: { achievementRewardsTableId: '' }, select: { id: true } }).execute(); @@ -1371,6 +1575,43 @@ const updated = await db.eventsModule.update({ where: { id: '' }, data: { const deleted = await db.eventsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.fileRefField` + +CRUD operations for FileRefField records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bucketKey` | String | Yes | +| `bucketTags` | String | Yes | +| `databaseId` | UUID | Yes | +| `enforceFk` | Boolean | Yes | +| `fieldId` | UUID | Yes | +| `id` | UUID | No | +| `isPublic` | Boolean | Yes | +| `storageModuleId` | UUID | Yes | +| `tableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all fileRefField records +const items = await db.fileRefField.findMany({ select: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }).execute(); + +// Get one by id +const item = await db.fileRefField.findOne({ id: '', select: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }).execute(); + +// Create +const created = await db.fileRefField.create({ data: { bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.fileRefField.update({ where: { id: '' }, data: { bucketKey: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.fileRefField.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionDeploymentModule` CRUD operations for FunctionDeploymentModule records. @@ -1381,7 +1622,7 @@ CRUD operations for FunctionDeploymentModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `deploymentEventsTableId` | UUID | Yes | | `deploymentEventsTableName` | String | Yes | | `deploymentsTableId` | UUID | Yes | @@ -1405,13 +1646,13 @@ CRUD operations for FunctionDeploymentModule records. ```typescript // List all functionDeploymentModule records -const items = await db.functionDeploymentModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionDeploymentModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionDeploymentModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionDeploymentModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeploymentModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1432,7 +1673,7 @@ CRUD operations for FunctionInvocationModule records. | `attemptsTableId` | UUID | Yes | | `attemptsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `executionLogsTableId` | UUID | Yes | @@ -1454,13 +1695,13 @@ CRUD operations for FunctionInvocationModule records. ```typescript // List all functionInvocationModule records -const items = await db.functionInvocationModule.findMany({ select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionInvocationModule.findMany({ select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionInvocationModule.findOne({ id: '', select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionInvocationModule.findOne({ id: '', select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionInvocationModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1482,7 +1723,7 @@ CRUD operations for FunctionModule records. | `bindingsTableName` | String | Yes | | `capabilityBindingsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `definitionsTableId` | UUID | Yes | | `definitionsTableName` | String | Yes | | `entityField` | String | Yes | @@ -1504,13 +1745,13 @@ CRUD operations for FunctionModule records. ```typescript // List all functionModule records -const items = await db.functionModule.findMany({ select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionModule.findMany({ select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionModule.findOne({ id: '', select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionModule.findOne({ id: '', select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1530,7 +1771,7 @@ CRUD operations for GraphExecutionModule records. | `apiName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `executionsTableId` | UUID | Yes | @@ -1555,13 +1796,13 @@ CRUD operations for GraphExecutionModule records. ```typescript // List all graphExecutionModule records -const items = await db.graphExecutionModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.graphExecutionModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.graphExecutionModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.graphExecutionModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.graphExecutionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1581,7 +1822,7 @@ CRUD operations for GraphModule records. | `apiName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `graphsTableId` | UUID | Yes | @@ -1601,13 +1842,13 @@ CRUD operations for GraphModule records. ```typescript // List all graphModule records -const items = await db.graphModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); +const items = await db.graphModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); // Get one by id -const item = await db.graphModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); +const item = await db.graphModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); // Create -const created = await db.graphModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.graphModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.graphModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1630,7 +1871,7 @@ CRUD operations for HierarchyModule records. | `chartEdgesTableName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `getManagersFunction` | String | Yes | @@ -1652,13 +1893,13 @@ CRUD operations for HierarchyModule records. ```typescript // List all hierarchyModule records -const items = await db.hierarchyModule.findMany({ select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); +const items = await db.hierarchyModule.findMany({ select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); // Get one by id -const item = await db.hierarchyModule.findOne({ id: '', select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); +const item = await db.hierarchyModule.findOne({ id: '', select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); // Create -const created = await db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute(); +const created = await db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.hierarchyModule.update({ where: { id: '' }, data: { chartEdgeGrantsTableId: '' }, select: { id: true } }).execute(); @@ -1677,7 +1918,7 @@ CRUD operations for HttpRouteModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `functionModuleId` | UUID | Yes | @@ -1701,13 +1942,13 @@ CRUD operations for HttpRouteModule records. ```typescript // List all httpRouteModule records -const items = await db.httpRouteModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); +const items = await db.httpRouteModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); // Get one by id -const item = await db.httpRouteModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); +const item = await db.httpRouteModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); // Create -const created = await db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute(); +const created = await db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute(); // Update const updated = await db.httpRouteModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2092,6 +2333,7 @@ CRUD operations for LimitsModule records. | `limitCreditsTableId` | UUID | Yes | | `limitDecrementFunction` | String | Yes | | `limitDecrementTrigger` | String | Yes | +| `limitDefaults` | JSON | Yes | | `limitIncrementFunction` | String | Yes | | `limitIncrementTrigger` | String | Yes | | `limitUpdateTrigger` | String | Yes | @@ -2112,13 +2354,13 @@ CRUD operations for LimitsModule records. ```typescript // List all limitsModule records -const items = await db.limitsModule.findMany({ select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const items = await db.limitsModule.findMany({ select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Get one by id -const item = await db.limitsModule.findOne({ id: '', select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.limitsModule.findOne({ id: '', select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Create -const created = await db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.limitsModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); @@ -2174,9 +2416,12 @@ CRUD operations for MembershipsModule records. | `adminGrantsTableId` | UUID | Yes | | `adminGrantsTableName` | String | Yes | | `apiName` | String | Yes | +| `capabilitiesTableId` | UUID | Yes | +| `capabilityDefaultCapabilitiesTableId` | UUID | Yes | +| `capabilityDefaultGrantsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilitiesTableId` | UUID | Yes | | `defaultLimitsTableId` | UUID | Yes | -| `defaultPermissionsTableId` | UUID | Yes | | `entityField` | String | Yes | | `entityIdsByMask` | String | Yes | | `entityIdsByPerm` | String | Yes | @@ -2199,9 +2444,6 @@ CRUD operations for MembershipsModule records. | `membershipsTableName` | String | Yes | | `ownerGrantsTableId` | UUID | Yes | | `ownerGrantsTableName` | String | Yes | -| `permissionDefaultGrantsTableId` | UUID | Yes | -| `permissionDefaultPermissionsTableId` | UUID | Yes | -| `permissionsTableId` | UUID | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | @@ -2215,13 +2457,13 @@ CRUD operations for MembershipsModule records. ```typescript // List all membershipsModule records -const items = await db.membershipsModule.findMany({ select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); +const items = await db.membershipsModule.findMany({ select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); // Get one by id -const item = await db.membershipsModule.findOne({ id: '', select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); +const item = await db.membershipsModule.findOne({ id: '', select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); // Create -const created = await db.membershipsModule.create({ data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute(); +const created = await db.membershipsModule.create({ data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.membershipsModule.update({ where: { id: '' }, data: { actorMaskCheck: '' }, select: { id: true } }).execute(); @@ -2239,6 +2481,7 @@ CRUD operations for MerkleStoreModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `capabilityKey` | String | Yes | | `commitTableId` | UUID | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | @@ -2246,7 +2489,6 @@ CRUD operations for MerkleStoreModule records. | `functionPrefix` | String | Yes | | `id` | UUID | No | | `objectTableId` | UUID | Yes | -| `permissionKey` | String | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | @@ -2261,13 +2503,13 @@ CRUD operations for MerkleStoreModule records. ```typescript // List all merkleStoreModule records -const items = await db.merkleStoreModule.findMany({ select: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); +const items = await db.merkleStoreModule.findMany({ select: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); // Get one by id -const item = await db.merkleStoreModule.findOne({ id: '', select: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); +const item = await db.merkleStoreModule.findOne({ id: '', select: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); // Create -const created = await db.merkleStoreModule.create({ data: { apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute(); +const created = await db.merkleStoreModule.create({ data: { apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2286,7 +2528,7 @@ CRUD operations for NamespaceModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -2308,13 +2550,13 @@ CRUD operations for NamespaceModule records. ```typescript // List all namespaceModule records -const items = await db.namespaceModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.namespaceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.namespaceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.namespaceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.namespaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2334,7 +2576,7 @@ CRUD operations for NotificationsModule records. | `apiName` | String | Yes | | `channelsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `deliveryLogTableId` | UUID | Yes | | `entityField` | String | Yes | | `hasChannels` | Boolean | Yes | @@ -2360,13 +2602,13 @@ CRUD operations for NotificationsModule records. ```typescript // List all notificationsModule records -const items = await db.notificationsModule.findMany({ select: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); +const items = await db.notificationsModule.findMany({ select: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); // Get one by id -const item = await db.notificationsModule.findOne({ id: '', select: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); +const item = await db.notificationsModule.findOne({ id: '', select: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); // Create -const created = await db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute(); +const created = await db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.notificationsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2375,101 +2617,91 @@ const updated = await db.notificationsModule.update({ where: { id: '' }, d const deleted = await db.notificationsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.pagesModule` +### `db.oauthRequestsModule` -CRUD operations for PagesModule records. +CRUD operations for OauthRequestsModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `apiName` | String | Yes | -| `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | +| `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | -| `merkleStoreModuleId` | UUID | Yes | -| `pagesTableId` | UUID | Yes | -| `policies` | JSON | Yes | +| `oauthAuthorizationRequestsTableId` | UUID | Yes | +| `oauthAuthorizationRequestsTableName` | String | Yes | +| `pendingIdentityLinksTableId` | UUID | Yes | +| `pendingIdentityLinksTableName` | String | Yes | | `prefix` | String | Yes | -| `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | -| `provisions` | JSON | Yes | -| `publicSchemaId` | UUID | Yes | -| `publicSchemaName` | String | Yes | | `scope` | String | Yes | -| `siteSurfaceModuleId` | UUID | Yes | -| `sitesTableId` | UUID | Yes | -| `storeNamePrefix` | String | Yes | **Operations:** ```typescript -// List all pagesModule records -const items = await db.pagesModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); +// List all oauthRequestsModule records +const items = await db.oauthRequestsModule.findMany({ select: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }).execute(); // Get one by id -const item = await db.pagesModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); +const item = await db.oauthRequestsModule.findOne({ id: '', select: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }).execute(); // Create -const created = await db.pagesModule.create({ data: { apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }, select: { id: true } }).execute(); +const created = await db.oauthRequestsModule.create({ data: { databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }, select: { id: true } }).execute(); // Update -const updated = await db.pagesModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); +const updated = await db.oauthRequestsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.pagesModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.oauthRequestsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.permissionsModule` +### `db.pagesModule` -CRUD operations for PermissionsModule records. +CRUD operations for PagesModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorTableId` | UUID | Yes | | `apiName` | String | Yes | -| `bitlen` | Int | Yes | +| `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultTableId` | UUID | Yes | -| `defaultTableName` | String | Yes | -| `entityField` | String | Yes | | `entityTableId` | UUID | Yes | -| `getByMask` | String | Yes | -| `getMask` | String | Yes | -| `getMaskByName` | String | Yes | -| `getPaddedMask` | String | Yes | | `id` | UUID | No | +| `merkleStoreModuleId` | UUID | Yes | +| `pagesTableId` | UUID | Yes | +| `policies` | JSON | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | -| `schemaId` | UUID | Yes | | `scope` | String | Yes | -| `tableId` | UUID | Yes | -| `tableName` | String | Yes | +| `siteSurfaceModuleId` | UUID | Yes | +| `sitesTableId` | UUID | Yes | +| `storeNamePrefix` | String | Yes | **Operations:** ```typescript -// List all permissionsModule records -const items = await db.permissionsModule.findMany({ select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +// List all pagesModule records +const items = await db.pagesModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); // Get one by id -const item = await db.permissionsModule.findOne({ id: '', select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.pagesModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); // Create -const created = await db.permissionsModule.create({ data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.pagesModule.create({ data: { apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }, select: { id: true } }).execute(); // Update -const updated = await db.permissionsModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); +const updated = await db.pagesModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.permissionsModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.pagesModule.delete({ where: { id: '' } }).execute(); ``` ### `db.phoneNumbersModule` @@ -2614,22 +2846,24 @@ CRUD operations for ProfilesModule records. |-------|------|----------| | `actorTableId` | UUID | Yes | | `apiName` | String | Yes | +| `capabilitiesTableId` | UUID | Yes | | `databaseId` | UUID | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | +| `membershipProfilesTableId` | UUID | Yes | +| `membershipProfilesTableName` | String | Yes | | `membershipsTableId` | UUID | Yes | -| `permissionsTableId` | UUID | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | +| `profileCapabilitiesTableId` | UUID | Yes | +| `profileCapabilitiesTableName` | String | Yes | | `profileDefinitionGrantsTableId` | UUID | Yes | | `profileDefinitionGrantsTableName` | String | Yes | | `profileGrantsTableId` | UUID | Yes | | `profileGrantsTableName` | String | Yes | -| `profilePermissionsTableId` | UUID | Yes | -| `profilePermissionsTableName` | String | Yes | | `profileTemplatesTableId` | UUID | Yes | | `profileTemplatesTableName` | String | Yes | | `publicSchemaName` | String | Yes | @@ -2642,13 +2876,13 @@ CRUD operations for ProfilesModule records. ```typescript // List all profilesModule records -const items = await db.profilesModule.findMany({ select: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const items = await db.profilesModule.findMany({ select: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Get one by id -const item = await db.profilesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.profilesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Create -const created = await db.profilesModule.create({ data: { actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.profilesModule.create({ data: { actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.profilesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); @@ -2668,7 +2902,7 @@ CRUD operations for RateLimitMetersModule records. | `apiName` | String | Yes | | `checkRateLimitFunction` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `id` | UUID | No | | `prefix` | String | Yes | | `privateApiName` | String | Yes | @@ -2687,13 +2921,13 @@ CRUD operations for RateLimitMetersModule records. ```typescript // List all rateLimitMetersModule records -const items = await db.rateLimitMetersModule.findMany({ select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); +const items = await db.rateLimitMetersModule.findMany({ select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); // Get one by id -const item = await db.rateLimitMetersModule.findOne({ id: '', select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); +const item = await db.rateLimitMetersModule.findOne({ id: '', select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); // Create -const created = await db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute(); +const created = await db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute(); // Update const updated = await db.rateLimitMetersModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2843,7 +3077,7 @@ CRUD operations for ResourceModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -2882,13 +3116,13 @@ CRUD operations for ResourceModule records. ```typescript // List all resourceModule records -const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2947,9 +3181,11 @@ CRUD operations for RouteModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `appLinksFunctionName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `deepLinkFunctionName` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainModuleId` | UUID | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | @@ -2975,13 +3211,13 @@ CRUD operations for RouteModule records. ```typescript // List all routeModule records -const items = await db.routeModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const items = await db.routeModule.findMany({ select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.routeModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const item = await db.routeModule.findOne({ id: '', select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2990,6 +3226,39 @@ const updated = await db.routeModule.update({ where: { id: '' }, data: { a const deleted = await db.routeModule.delete({ where: { id: '' } }).execute(); ``` +### `db.scopeTypesModule` + +CRUD operations for ScopeTypesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `privateSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scopeTypesTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all scopeTypesModule records +const items = await db.scopeTypesModule.findMany({ select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Get one by id +const item = await db.scopeTypesModule.findOne({ id: '', select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Create +const created = await db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.scopeTypesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -3113,7 +3382,7 @@ CRUD operations for SiteSurfaceModule records. | `apiName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -3147,13 +3416,13 @@ CRUD operations for SiteSurfaceModule records. ```typescript // List all siteSurfaceModule records -const items = await db.siteSurfaceModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); +const items = await db.siteSurfaceModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); // Get one by id -const item = await db.siteSurfaceModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); +const item = await db.siteSurfaceModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); // Create -const created = await db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute(); +const created = await db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.siteSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3226,8 +3495,8 @@ CRUD operations for StorageModule records. | `catalogModuleId` | UUID | Yes | | `confirmUploadDelay` | Interval | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | | `defaultMaxFileSize` | BigInt | Yes | -| `defaultPermissions` | String | Yes | | `downloadUrlExpirySeconds` | Int | Yes | | `endpoint` | String | Yes | | `entityField` | String | Yes | @@ -3264,13 +3533,13 @@ CRUD operations for StorageModule records. ```typescript // List all storageModule records -const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Get one by id -const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Create -const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); +const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute(); @@ -3453,6 +3722,41 @@ const updated = await db.userSettingsModule.update({ where: { id: '' }, da const deleted = await db.userSettingsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.userSettingsSecurityModule` + +CRUD operations for UserSettingsSecurityModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `ownerTableId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all userSettingsSecurityModule records +const items = await db.userSettingsSecurityModule.findMany({ select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.userSettingsSecurityModule.findOne({ id: '', select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.userStateModule` CRUD operations for UserStateModule records. @@ -3615,7 +3919,7 @@ CRUD operations for WebhookModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `functionInvocationModuleId` | UUID | Yes | @@ -3641,13 +3945,13 @@ CRUD operations for WebhookModule records. ```typescript // List all webhookModule records -const items = await db.webhookModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); +const items = await db.webhookModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); // Get one by id -const item = await db.webhookModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); +const item = await db.webhookModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); // Create -const created = await db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute(); +const created = await db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.webhookModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3658,42 +3962,6 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ## Custom Operations -### `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 | - | `fieldName` | String | - | `tableId` | UUID | - -```typescript -const result = await db.query.resolveBlueprintField({ databaseId: '', fieldName: '', tableId: '' }).execute(); -``` - -### `db.query.resolveBlueprintTable` - -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. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - -```typescript -const result = await db.query.resolveBlueprintTable({ databaseId: '', defaultSchemaId: '', schemaName: '', tableMap: '', tableName: '' }).execute(); -``` - ### `db.mutation.constructBlueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (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, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3742,111 +4010,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.provisionCheckConstraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionCheckConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionFullTextSearch` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -```typescript -const result = await db.mutation.provisionFullTextSearch({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionIndex` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -```typescript -const result = await db.mutation.provisionIndex({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionRelation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -```typescript -const result = await db.mutation.provisionRelation({ input: '' }).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.provisionTable` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -```typescript -const result = await db.mutation.provisionTable({ input: '' }).execute(); -``` - -### `db.mutation.provisionUniqueConstraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionUniqueConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/modules/orm/index.ts b/sdk/constructive-react/src/modules/orm/index.ts index 0951126688..249a7e5114 100644 --- a/sdk/constructive-react/src/modules/orm/index.ts +++ b/sdk/constructive-react/src/modules/orm/index.ts @@ -13,12 +13,15 @@ import { BillingProviderModuleModel } from './models/billingProviderModule'; import { BlueprintModel } from './models/blueprint'; import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { BlueprintTemplateModel } from './models/blueprintTemplate'; +import { CapabilitiesModuleModel } from './models/capabilitiesModule'; import { CatalogModuleModel } from './models/catalogModule'; import { ComputeLogModuleModel } from './models/computeLogModule'; import { ConfigSecretsUserModuleModel } from './models/configSecretsUserModule'; import { ConnectedAccountsModuleModel } from './models/connectedAccountsModule'; +import { ContentPresetModuleModel } from './models/contentPresetModule'; import { CryptoAddressesModuleModel } from './models/cryptoAddressesModule'; import { CryptoAuthModuleModel } from './models/cryptoAuthModule'; +import { DataCapabilitiesFieldModel } from './models/dataCapabilitiesField'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { DatabaseSettingsModuleModel } from './models/databaseSettingsModule'; import { DbPoolConfigModel } from './models/dbPoolConfig'; @@ -29,9 +32,11 @@ import { DefaultIdsModuleModel } from './models/defaultIdsModule'; import { DenormalizedTableFieldModel } from './models/denormalizedTableField'; import { DevicesModuleModel } from './models/devicesModule'; import { DomainModuleModel } from './models/domainModule'; +import { EmailSenderModuleModel } from './models/emailSenderModule'; import { EmailsModuleModel } from './models/emailsModule'; import { EntityTypeProvisionModel } from './models/entityTypeProvision'; import { EventsModuleModel } from './models/eventsModule'; +import { FileRefFieldModel } from './models/fileRefField'; import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule'; import { FunctionInvocationModuleModel } from './models/functionInvocationModule'; import { FunctionModuleModel } from './models/functionModule'; @@ -53,8 +58,8 @@ import { MembershipsModuleModel } from './models/membershipsModule'; import { MerkleStoreModuleModel } from './models/merkleStoreModule'; import { NamespaceModuleModel } from './models/namespaceModule'; import { NotificationsModuleModel } from './models/notificationsModule'; +import { OauthRequestsModuleModel } from './models/oauthRequestsModule'; import { PagesModuleModel } from './models/pagesModule'; -import { PermissionsModuleModel } from './models/permissionsModule'; import { PhoneNumbersModuleModel } from './models/phoneNumbersModule'; import { PlansModuleModel } from './models/plansModule'; import { PrincipalAuthModuleModel } from './models/principalAuthModule'; @@ -66,6 +71,7 @@ import { RelationProvisionModel } from './models/relationProvision'; import { ResourceModuleModel } from './models/resourceModule'; import { RlsModuleModel } from './models/rlsModule'; import { RouteModuleModel } from './models/routeModule'; +import { ScopeTypesModuleModel } from './models/scopeTypesModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SessionsModuleModel } from './models/sessionsModule'; @@ -76,19 +82,18 @@ import { TransferLogModuleModel } from './models/transferLogModule'; import { UserAuthModuleModel } from './models/userAuthModule'; import { UserCredentialsModuleModel } from './models/userCredentialsModule'; import { UserSettingsModuleModel } from './models/userSettingsModule'; +import { UserSettingsSecurityModuleModel } from './models/userSettingsSecurityModule'; import { UserStateModuleModel } from './models/userStateModule'; import { UsersModuleModel } from './models/usersModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { WebhookModuleModel } from './models/webhookModule'; -import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; -export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -124,12 +129,15 @@ export function createClient(config: OrmClientConfig) { blueprint: new BlueprintModel(client), blueprintConstruction: new BlueprintConstructionModel(client), blueprintTemplate: new BlueprintTemplateModel(client), + capabilitiesModule: new CapabilitiesModuleModel(client), catalogModule: new CatalogModuleModel(client), computeLogModule: new ComputeLogModuleModel(client), configSecretsUserModule: new ConfigSecretsUserModuleModel(client), connectedAccountsModule: new ConnectedAccountsModuleModel(client), + contentPresetModule: new ContentPresetModuleModel(client), cryptoAddressesModule: new CryptoAddressesModuleModel(client), cryptoAuthModule: new CryptoAuthModuleModel(client), + dataCapabilitiesField: new DataCapabilitiesFieldModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), databaseSettingsModule: new DatabaseSettingsModuleModel(client), dbPoolConfig: new DbPoolConfigModel(client), @@ -140,9 +148,11 @@ export function createClient(config: OrmClientConfig) { denormalizedTableField: new DenormalizedTableFieldModel(client), devicesModule: new DevicesModuleModel(client), domainModule: new DomainModuleModel(client), + emailSenderModule: new EmailSenderModuleModel(client), emailsModule: new EmailsModuleModel(client), entityTypeProvision: new EntityTypeProvisionModel(client), eventsModule: new EventsModuleModel(client), + fileRefField: new FileRefFieldModel(client), functionDeploymentModule: new FunctionDeploymentModuleModel(client), functionInvocationModule: new FunctionInvocationModuleModel(client), functionModule: new FunctionModuleModel(client), @@ -164,8 +174,8 @@ export function createClient(config: OrmClientConfig) { merkleStoreModule: new MerkleStoreModuleModel(client), namespaceModule: new NamespaceModuleModel(client), notificationsModule: new NotificationsModuleModel(client), + oauthRequestsModule: new OauthRequestsModuleModel(client), pagesModule: new PagesModuleModel(client), - permissionsModule: new PermissionsModuleModel(client), phoneNumbersModule: new PhoneNumbersModuleModel(client), plansModule: new PlansModuleModel(client), principalAuthModule: new PrincipalAuthModuleModel(client), @@ -177,6 +187,7 @@ export function createClient(config: OrmClientConfig) { resourceModule: new ResourceModuleModel(client), rlsModule: new RlsModuleModel(client), routeModule: new RouteModuleModel(client), + scopeTypesModule: new ScopeTypesModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), sessionSecretsModule: new SessionSecretsModuleModel(client), sessionsModule: new SessionsModuleModel(client), @@ -187,12 +198,12 @@ export function createClient(config: OrmClientConfig) { userAuthModule: new UserAuthModuleModel(client), userCredentialsModule: new UserCredentialsModuleModel(client), userSettingsModule: new UserSettingsModuleModel(client), + userSettingsSecurityModule: new UserSettingsSecurityModuleModel(client), userStateModule: new UserStateModuleModel(client), usersModule: new UsersModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), webhookModule: new WebhookModuleModel(client), - query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-react/src/modules/orm/input-types.ts b/sdk/constructive-react/src/modules/orm/input-types.ts index ed552e4810..27a0a0b958 100644 --- a/sdk/constructive-react/src/modules/orm/input-types.ts +++ b/sdk/constructive-react/src/modules/orm/input-types.ts @@ -236,7 +236,7 @@ export interface AgentModule { agentTableName?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; hasAgents?: boolean | null; @@ -281,7 +281,7 @@ export interface ApiSurfaceModule { corsSettingsTableId?: string | null; corsSettingsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -301,7 +301,7 @@ export interface AppModule { appsTableName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -320,8 +320,8 @@ export interface BillingModule { balancesTableId?: string | null; balancesTableName?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMeterCatalog?: Record | null; - defaultPermissions?: string[] | null; id: string; ledgerTableId?: string | null; ledgerTableName?: string | null; @@ -349,16 +349,22 @@ export interface BillingProviderModule { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; id: string; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -366,8 +372,10 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } /** An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build. */ export interface Blueprint { @@ -464,16 +472,42 @@ export interface BlueprintTemplate { /** Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private. */ visibility?: string | null; } +export interface CapabilitiesModule { + actorTableId?: string | null; + apiName?: string | null; + bitlen?: number | null; + databaseId?: string | null; + defaultTableId?: string | null; + defaultTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + getByMask?: string | null; + getMask?: string | null; + getMaskByName?: string | null; + getPaddedMask?: string | null; + id: string; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface CatalogModule { apiName?: string | null; apisTableId?: string | null; apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -548,6 +582,25 @@ export interface ConnectedAccountsModule { tableId?: string | null; tableName?: string | null; } +export interface ContentPresetModule { + apiName?: string | null; + contentPresetsTableId?: string | null; + createdAt?: string | null; + databaseId?: string | null; + entityTableId?: string | null; + id: string; + merkleStoreModuleId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + provisions?: Record | null; + publicSchemaId?: string | null; + publicSchemaName?: string | null; + scope?: string | null; + storeName?: string | null; +} export interface CryptoAddressesModule { apiName?: string | null; cryptoNetwork?: string | null; @@ -576,6 +629,19 @@ export interface CryptoAuthModule { userField?: string | null; usersTableId?: string | null; } +export interface DataCapabilitiesField { + capabilitiesModuleId?: string | null; + databaseId?: string | null; + fieldId?: string | null; + fromFieldId?: string | null; + id: string; + mappingFieldId?: string | null; + mappingKeyFieldId?: string | null; + mappingTableId?: string | null; + mode?: string | null; + subsetGuard?: boolean | null; + tableId?: 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 { /** When true, cold provisioning runs in the database:provision background job and the insert returns a pending ticket; when false, provisioning runs inline in the insert trigger */ @@ -598,7 +664,7 @@ export interface DatabaseProvisionModule { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string | null; id: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: Record | null; /** Additional configuration options for provisioning */ options?: Record | null; @@ -617,7 +683,7 @@ export interface DatabaseSettingsModule { databaseId?: string | null; databaseSettingsTableId?: string | null; databaseSettingsTableName?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -701,7 +767,7 @@ export interface DbUsageModule { collectDbQueryStatsFunction?: string | null; collectDbTableStatsFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; id: string; interval?: string | null; @@ -756,7 +822,7 @@ export interface DomainModule { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -778,6 +844,28 @@ export interface DomainModule { schemaId?: string | null; scope?: string | null; } +export interface EmailSenderModule { + apiName?: string | null; + databaseId?: string | null; + defaultCapabilities?: string[] | null; + emailIdentitiesTableId?: string | null; + emailIdentitiesTableName?: string | null; + emailProviderAccountsTableId?: string | null; + emailProviderAccountsTableName?: string | null; + emailSiteIdentitiesTableId?: string | null; + emailSiteIdentitiesTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + id: string; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + provisions?: Record | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + siteSurfaceModuleId?: string | null; +} export interface EmailsModule { apiName?: string | null; databaseId?: string | null; @@ -791,7 +879,7 @@ export interface EmailsModule { } /** * 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). + * and installs the required modules (capabilities, 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). @@ -813,7 +901,7 @@ export interface EntityTypeProvision { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: Record | null; @@ -823,9 +911,9 @@ export interface EntityTypeProvision { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -865,8 +953,11 @@ export interface EntityTypeProvision { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean | null; /** Unique identifier for this provision row. */ @@ -893,7 +984,7 @@ export interface EntityTypeProvision { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: Record | null; @@ -915,7 +1006,7 @@ export interface EntityTypeProvision { outGraphModuleId?: string | null; outGraphsTableId?: string | null; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_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; @@ -959,7 +1050,7 @@ export interface EntityTypeProvision { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -973,8 +1064,8 @@ export interface EntityTypeProvision { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean | null; @@ -993,7 +1084,7 @@ export interface EntityTypeProvision { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -1019,7 +1110,7 @@ export interface EntityTypeProvision { tableName?: string | 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -1056,7 +1147,7 @@ export interface EventsModule { actorTableId?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; eventAggregatesTableId?: string | null; @@ -1065,6 +1156,7 @@ export interface EventsModule { eventTypesTableName?: string | null; eventsTableId?: string | null; eventsTableName?: string | null; + expireGrants?: string | null; grantAchievement?: string | null; id: string; interval?: string | null; @@ -1081,9 +1173,11 @@ export interface EventsModule { privateSchemaId?: string | null; privateSchemaName?: string | null; publicSchemaName?: string | null; + recomputeCapabilities?: string | null; recordEvent?: string | null; removeEvent?: string | null; retention?: string | null; + revokeAchievement?: string | null; schemaId?: string | null; scope?: string | null; stepsRequired?: string | null; @@ -1093,13 +1187,26 @@ export interface EventsModule { tgEventBool?: string | null; tgEventToggle?: string | null; tgEventToggleBool?: string | null; + tgLevelGrantSync?: string | null; tgUpdateAggregates?: string | null; + trustLadder?: Record | null; upsertAggregate?: string | null; } +export interface FileRefField { + bucketKey?: string | null; + bucketTags?: string[] | null; + databaseId?: string | null; + enforceFk?: boolean | null; + fieldId?: string | null; + id: string; + isPublic?: boolean | null; + storageModuleId?: string | null; + tableId?: string | null; +} export interface FunctionDeploymentModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deploymentEventsTableId?: string | null; deploymentEventsTableName?: string | null; deploymentsTableId?: string | null; @@ -1124,7 +1231,7 @@ export interface FunctionInvocationModule { attemptsTableId?: string | null; attemptsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionLogsTableId?: string | null; @@ -1148,7 +1255,7 @@ export interface FunctionModule { bindingsTableName?: string | null; capabilityBindingsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; definitionsTableId?: string | null; definitionsTableName?: string | null; entityField?: string | null; @@ -1170,7 +1277,7 @@ export interface GraphExecutionModule { apiName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionsTableId?: string | null; @@ -1195,7 +1302,7 @@ export interface GraphModule { apiName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; graphsTableId?: string | null; @@ -1218,7 +1325,7 @@ export interface HierarchyModule { chartEdgesTableName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; getManagersFunction?: string | null; @@ -1239,7 +1346,7 @@ export interface HierarchyModule { export interface HttpRouteModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionModuleId?: string | null; @@ -1442,6 +1549,7 @@ export interface LimitsModule { limitCreditsTableId?: string | null; limitDecrementFunction?: string | null; limitDecrementTrigger?: string | null; + limitDefaults?: Record | null; limitIncrementFunction?: string | null; limitIncrementTrigger?: string | null; limitUpdateTrigger?: string | null; @@ -1472,9 +1580,12 @@ export interface MembershipsModule { adminGrantsTableId?: string | null; adminGrantsTableName?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; + capabilityDefaultCapabilitiesTableId?: string | null; + capabilityDefaultGrantsTableId?: string | null; databaseId?: string | null; + defaultCapabilitiesTableId?: string | null; defaultLimitsTableId?: string | null; - defaultPermissionsTableId?: string | null; entityField?: string | null; entityIdsByMask?: string | null; entityIdsByPerm?: string | null; @@ -1497,9 +1608,6 @@ export interface MembershipsModule { membershipsTableName?: string | null; ownerGrantsTableId?: string | null; ownerGrantsTableName?: string | null; - permissionDefaultGrantsTableId?: string | null; - permissionDefaultPermissionsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -1511,6 +1619,7 @@ export interface MembershipsModule { } export interface MerkleStoreModule { apiName?: string | null; + capabilityKey?: string | null; commitTableId?: string | null; createdAt?: string | null; databaseId?: string | null; @@ -1518,7 +1627,6 @@ export interface MerkleStoreModule { functionPrefix?: string | null; id: string; objectTableId?: string | null; - permissionKey?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -1532,7 +1640,7 @@ export interface MerkleStoreModule { export interface NamespaceModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -1554,7 +1662,7 @@ export interface NotificationsModule { apiName?: string | null; channelsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deliveryLogTableId?: string | null; entityField?: string | null; hasChannels?: boolean | null; @@ -1576,6 +1684,28 @@ export interface NotificationsModule { suppressionsTableId?: string | null; userSettingsTableId?: string | null; } +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + * sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + * pending identity links table (a verified identity parked under a single-use ticket), + * both private, plus the five SECURITY DEFINER procedures that are their only surface. + * Sibling of identity_providers_module (durable provider configuration) rather than part + * of it: this is ephemeral, purged flow state with its own retention. + */ +export interface OauthRequestsModule { + databaseId?: string | null; + entityField?: string | null; + entityTableId?: string | null; + id: string; + oauthAuthorizationRequestsTableId?: string | null; + oauthAuthorizationRequestsTableName?: string | null; + pendingIdentityLinksTableId?: string | null; + pendingIdentityLinksTableName?: string | null; + prefix?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + scope?: string | null; +} export interface PagesModule { apiName?: string | null; createdAt?: string | null; @@ -1597,30 +1727,6 @@ export interface PagesModule { sitesTableId?: string | null; storeNamePrefix?: string | null; } -export interface PermissionsModule { - actorTableId?: string | null; - apiName?: string | null; - bitlen?: number | null; - databaseId?: string | null; - defaultTableId?: string | null; - defaultTableName?: string | null; - entityField?: string | null; - entityTableId?: string | null; - getByMask?: string | null; - getMask?: string | null; - getMaskByName?: string | null; - getPaddedMask?: string | null; - id: string; - prefix?: string | null; - privateApiName?: string | null; - privateSchemaId?: string | null; - privateSchemaName?: string | null; - publicSchemaName?: string | null; - schemaId?: string | null; - scope?: string | null; - tableId?: string | null; - tableName?: string | null; -} export interface PhoneNumbersModule { apiName?: string | null; databaseId?: string | null; @@ -1679,22 +1785,24 @@ export interface PrincipalAuthModule { export interface ProfilesModule { actorTableId?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; databaseId?: string | null; entityField?: string | null; entityTableId?: string | null; id: string; + membershipProfilesTableId?: string | null; + membershipProfilesTableName?: string | null; membershipsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; privateSchemaName?: string | null; + profileCapabilitiesTableId?: string | null; + profileCapabilitiesTableName?: string | null; profileDefinitionGrantsTableId?: string | null; profileDefinitionGrantsTableName?: string | null; profileGrantsTableId?: string | null; profileGrantsTableName?: string | null; - profilePermissionsTableId?: string | null; - profilePermissionsTableName?: string | null; profileTemplatesTableId?: string | null; profileTemplatesTableName?: string | null; publicSchemaName?: string | null; @@ -1707,7 +1815,7 @@ export interface RateLimitMetersModule { apiName?: string | null; checkRateLimitFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; id: string; prefix?: string | null; privateApiName?: string | null; @@ -1885,7 +1993,7 @@ export interface RelationProvision { export interface ResourceModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -1937,9 +2045,11 @@ export interface RlsModule { } export interface RouteModule { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + deepLinkFunctionName?: string | null; + defaultCapabilities?: string[] | null; domainModuleId?: string | null; entityField?: string | null; entityTableId?: string | null; @@ -1961,6 +2071,13 @@ export interface RouteModule { schemaId?: string | null; scope?: string | null; } +export interface ScopeTypesModule { + databaseId?: string | null; + id: string; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | 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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** The database this provision belongs to. Required. */ @@ -2013,7 +2130,7 @@ export interface SiteSurfaceModule { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -2074,8 +2191,8 @@ export interface StorageModule { catalogModuleId?: string | null; confirmUploadDelay?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMaxFileSize?: string | null; - defaultPermissions?: string[] | null; downloadUrlExpirySeconds?: number | null; endpoint?: string | null; entityField?: string | null; @@ -2183,6 +2300,15 @@ export interface UserSettingsModule { tableId?: string | null; tableName?: string | null; } +export interface UserSettingsSecurityModule { + apiName?: string | null; + databaseId?: string | null; + id: string; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface UserStateModule { databaseId?: string | null; entityField?: string | null; @@ -2236,7 +2362,7 @@ export interface WebauthnCredentialsModule { export interface WebhookModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionInvocationModuleId?: string | null; @@ -2292,6 +2418,9 @@ export interface BlueprintTemplateRelations { blueprintTemplatesByForkedFromId?: ConnectionResult; blueprintsByTemplateId?: ConnectionResult; } +export interface CapabilitiesModuleRelations { + dataCapabilitiesFields?: ConnectionResult; +} export interface CatalogModuleRelations { apiSurfaceModules?: ConnectionResult; appModules?: ConnectionResult; @@ -2302,8 +2431,14 @@ export interface CatalogModuleRelations { export interface ComputeLogModuleRelations {} export interface ConfigSecretsUserModuleRelations {} export interface ConnectedAccountsModuleRelations {} +export interface ContentPresetModuleRelations { + merkleStoreModule?: MerkleStoreModule | null; +} export interface CryptoAddressesModuleRelations {} export interface CryptoAuthModuleRelations {} +export interface DataCapabilitiesFieldRelations { + capabilitiesModule?: CapabilitiesModule | null; +} export interface DatabaseProvisionModuleRelations {} export interface DatabaseSettingsModuleRelations {} export interface DbPoolConfigRelations {} @@ -2319,9 +2454,15 @@ export interface DomainModuleRelations { catalogModule?: CatalogModule | null; routeModules?: ConnectionResult; } +export interface EmailSenderModuleRelations { + siteSurfaceModule?: SiteSurfaceModule | null; +} export interface EmailsModuleRelations {} export interface EntityTypeProvisionRelations {} export interface EventsModuleRelations {} +export interface FileRefFieldRelations { + storageModule?: StorageModule | null; +} export interface FunctionDeploymentModuleRelations { functionModule?: FunctionModule | null; namespaceModule?: NamespaceModule | null; @@ -2361,6 +2502,7 @@ export interface LimitsModuleRelations {} export interface MembershipTypesModuleRelations {} export interface MembershipsModuleRelations {} export interface MerkleStoreModuleRelations { + contentPresetModules?: ConnectionResult; dbPresetModules?: ConnectionResult; graphModules?: ConnectionResult; pagesModules?: ConnectionResult; @@ -2372,11 +2514,11 @@ export interface NamespaceModuleRelations { webhookModules?: ConnectionResult; } export interface NotificationsModuleRelations {} +export interface OauthRequestsModuleRelations {} export interface PagesModuleRelations { merkleStoreModule?: MerkleStoreModule | null; siteSurfaceModule?: SiteSurfaceModule | null; } -export interface PermissionsModuleRelations {} export interface PhoneNumbersModuleRelations {} export interface PlansModuleRelations {} export interface PrincipalAuthModuleRelations {} @@ -2395,21 +2537,25 @@ export interface RouteModuleRelations { catalogModule?: CatalogModule | null; domainModule?: DomainModule | null; } +export interface ScopeTypesModuleRelations {} export interface SecureTableProvisionRelations {} export interface SessionSecretsModuleRelations {} export interface SessionsModuleRelations {} export interface SiteSurfaceModuleRelations { catalogModule?: CatalogModule | null; + emailSenderModules?: ConnectionResult; pagesModules?: ConnectionResult; } export interface StorageLogModuleRelations {} export interface StorageModuleRelations { + fileRefFields?: ConnectionResult; httpRouteModules?: ConnectionResult; } export interface TransferLogModuleRelations {} export interface UserAuthModuleRelations {} export interface UserCredentialsModuleRelations {} export interface UserSettingsModuleRelations {} +export interface UserSettingsSecurityModuleRelations {} export interface UserStateModuleRelations {} export interface UsersModuleRelations {} export interface WebauthnAuthModuleRelations {} @@ -2431,15 +2577,19 @@ export type BlueprintWithRelations = Blueprint & BlueprintRelations; export type BlueprintConstructionWithRelations = BlueprintConstruction & BlueprintConstructionRelations; export type BlueprintTemplateWithRelations = BlueprintTemplate & BlueprintTemplateRelations; +export type CapabilitiesModuleWithRelations = CapabilitiesModule & CapabilitiesModuleRelations; export type CatalogModuleWithRelations = CatalogModule & CatalogModuleRelations; export type ComputeLogModuleWithRelations = ComputeLogModule & ComputeLogModuleRelations; export type ConfigSecretsUserModuleWithRelations = ConfigSecretsUserModule & ConfigSecretsUserModuleRelations; export type ConnectedAccountsModuleWithRelations = ConnectedAccountsModule & ConnectedAccountsModuleRelations; +export type ContentPresetModuleWithRelations = ContentPresetModule & ContentPresetModuleRelations; export type CryptoAddressesModuleWithRelations = CryptoAddressesModule & CryptoAddressesModuleRelations; export type CryptoAuthModuleWithRelations = CryptoAuthModule & CryptoAuthModuleRelations; +export type DataCapabilitiesFieldWithRelations = DataCapabilitiesField & + DataCapabilitiesFieldRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type DatabaseSettingsModuleWithRelations = DatabaseSettingsModule & @@ -2453,9 +2603,11 @@ export type DenormalizedTableFieldWithRelations = DenormalizedTableField & DenormalizedTableFieldRelations; export type DevicesModuleWithRelations = DevicesModule & DevicesModuleRelations; export type DomainModuleWithRelations = DomainModule & DomainModuleRelations; +export type EmailSenderModuleWithRelations = EmailSenderModule & EmailSenderModuleRelations; export type EmailsModuleWithRelations = EmailsModule & EmailsModuleRelations; export type EntityTypeProvisionWithRelations = EntityTypeProvision & EntityTypeProvisionRelations; export type EventsModuleWithRelations = EventsModule & EventsModuleRelations; +export type FileRefFieldWithRelations = FileRefField & FileRefFieldRelations; export type FunctionDeploymentModuleWithRelations = FunctionDeploymentModule & FunctionDeploymentModuleRelations; export type FunctionInvocationModuleWithRelations = FunctionInvocationModule & @@ -2484,8 +2636,8 @@ export type MembershipsModuleWithRelations = MembershipsModule & MembershipsModu export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; export type NamespaceModuleWithRelations = NamespaceModule & NamespaceModuleRelations; export type NotificationsModuleWithRelations = NotificationsModule & NotificationsModuleRelations; +export type OauthRequestsModuleWithRelations = OauthRequestsModule & OauthRequestsModuleRelations; export type PagesModuleWithRelations = PagesModule & PagesModuleRelations; -export type PermissionsModuleWithRelations = PermissionsModule & PermissionsModuleRelations; export type PhoneNumbersModuleWithRelations = PhoneNumbersModule & PhoneNumbersModuleRelations; export type PlansModuleWithRelations = PlansModule & PlansModuleRelations; export type PrincipalAuthModuleWithRelations = PrincipalAuthModule & PrincipalAuthModuleRelations; @@ -2498,6 +2650,7 @@ export type RelationProvisionWithRelations = RelationProvision & RelationProvisi export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; export type RouteModuleWithRelations = RouteModule & RouteModuleRelations; +export type ScopeTypesModuleWithRelations = ScopeTypesModule & ScopeTypesModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type SessionSecretsModuleWithRelations = SessionSecretsModule & @@ -2511,6 +2664,8 @@ export type UserAuthModuleWithRelations = UserAuthModule & UserAuthModuleRelatio export type UserCredentialsModuleWithRelations = UserCredentialsModule & UserCredentialsModuleRelations; export type UserSettingsModuleWithRelations = UserSettingsModule & UserSettingsModuleRelations; +export type UserSettingsSecurityModuleWithRelations = UserSettingsSecurityModule & + UserSettingsSecurityModuleRelations; export type UserStateModuleWithRelations = UserStateModule & UserStateModuleRelations; export type UsersModuleWithRelations = UsersModule & UsersModuleRelations; export type WebauthnAuthModuleWithRelations = WebauthnAuthModule & WebauthnAuthModuleRelations; @@ -2523,7 +2678,7 @@ export type AgentModuleSelect = { agentTableName?: boolean; apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; hasAgents?: boolean; @@ -2568,7 +2723,7 @@ export type ApiSurfaceModuleSelect = { corsSettingsTableId?: boolean; corsSettingsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2591,7 +2746,7 @@ export type AppModuleSelect = { appsTableName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2613,8 +2768,8 @@ export type BillingModuleSelect = { balancesTableId?: boolean; balancesTableName?: boolean; databaseId?: boolean; + defaultCapabilities?: boolean; defaultMeterCatalog?: boolean; - defaultPermissions?: boolean; id?: boolean; ledgerTableId?: boolean; ledgerTableName?: boolean; @@ -2642,16 +2797,22 @@ export type BillingProviderModuleSelect = { apiName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; + billingInvoicesTableId?: boolean; + billingInvoicesTableName?: boolean; billingPricesTableId?: boolean; billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingRefundsTableId?: boolean; + billingRefundsTableName?: boolean; billingSubscriptionsTableId?: boolean; billingSubscriptionsTableName?: boolean; billingWebhookEventsTableId?: boolean; billingWebhookEventsTableName?: boolean; databaseId?: boolean; id?: boolean; + listPendingUsageSyncFunction?: boolean; + markUsageSyncedFunction?: boolean; prefix?: boolean; pricesTableId?: boolean; privateApiName?: boolean; @@ -2659,8 +2820,10 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordRefundFunction?: boolean; schemaId?: boolean; subscriptionsTableId?: boolean; + upsertInvoiceFunction?: boolean; }; export type BlueprintSelect = { createdAt?: boolean; @@ -2738,16 +2901,48 @@ export type BlueprintTemplateSelect = { orderBy?: BlueprintOrderBy[]; }; }; +export type CapabilitiesModuleSelect = { + actorTableId?: boolean; + apiName?: boolean; + bitlen?: boolean; + databaseId?: boolean; + defaultTableId?: boolean; + defaultTableName?: boolean; + entityField?: boolean; + entityTableId?: boolean; + getByMask?: boolean; + getMask?: boolean; + getMaskByName?: boolean; + getPaddedMask?: boolean; + id?: boolean; + prefix?: boolean; + privateApiName?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + publicSchemaName?: boolean; + schemaId?: boolean; + scope?: boolean; + tableId?: boolean; + tableName?: boolean; + dataCapabilitiesFields?: { + select: DataCapabilitiesFieldSelect; + first?: number; + filter?: DataCapabilitiesFieldFilter; + orderBy?: DataCapabilitiesFieldOrderBy[]; + }; +}; export type CatalogModuleSelect = { apiName?: boolean; apisTableId?: boolean; apisTableName?: boolean; appsTableId?: boolean; appsTableName?: boolean; + bindingsTableId?: boolean; + bindingsTableName?: boolean; bucketsTableId?: boolean; bucketsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; domainsTableId?: boolean; domainsTableName?: boolean; entityTableId?: boolean; @@ -2852,6 +3047,28 @@ export type ConnectedAccountsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type ContentPresetModuleSelect = { + apiName?: boolean; + contentPresetsTableId?: boolean; + createdAt?: boolean; + databaseId?: boolean; + entityTableId?: boolean; + id?: boolean; + merkleStoreModuleId?: boolean; + policies?: boolean; + prefix?: boolean; + privateApiName?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + provisions?: boolean; + publicSchemaId?: boolean; + publicSchemaName?: boolean; + scope?: boolean; + storeName?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; +}; export type CryptoAddressesModuleSelect = { apiName?: boolean; cryptoNetwork?: boolean; @@ -2880,6 +3097,22 @@ export type CryptoAuthModuleSelect = { userField?: boolean; usersTableId?: boolean; }; +export type DataCapabilitiesFieldSelect = { + capabilitiesModuleId?: boolean; + databaseId?: boolean; + fieldId?: boolean; + fromFieldId?: boolean; + id?: boolean; + mappingFieldId?: boolean; + mappingKeyFieldId?: boolean; + mappingTableId?: boolean; + mode?: boolean; + subsetGuard?: boolean; + tableId?: boolean; + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; +}; export type DatabaseProvisionModuleSelect = { async?: boolean; bootstrapError?: boolean; @@ -2906,7 +3139,7 @@ export type DatabaseSettingsModuleSelect = { databaseId?: boolean; databaseSettingsTableId?: boolean; databaseSettingsTableName?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2978,7 +3211,7 @@ export type DbUsageModuleSelect = { collectDbQueryStatsFunction?: boolean; collectDbTableStatsFunction?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; id?: boolean; interval?: boolean; @@ -3033,7 +3266,7 @@ export type DomainModuleSelect = { apiName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; domainEventsTableId?: boolean; domainEventsTableName?: boolean; domainVerificationsTableId?: boolean; @@ -3064,6 +3297,31 @@ export type DomainModuleSelect = { orderBy?: RouteModuleOrderBy[]; }; }; +export type EmailSenderModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + defaultCapabilities?: boolean; + emailIdentitiesTableId?: boolean; + emailIdentitiesTableName?: boolean; + emailProviderAccountsTableId?: boolean; + emailProviderAccountsTableName?: boolean; + emailSiteIdentitiesTableId?: boolean; + emailSiteIdentitiesTableName?: boolean; + entityField?: boolean; + entityTableId?: boolean; + id?: boolean; + policies?: boolean; + prefix?: boolean; + privateApiName?: boolean; + provisions?: boolean; + publicSchemaName?: boolean; + schemaId?: boolean; + scope?: boolean; + siteSurfaceModuleId?: boolean; + siteSurfaceModule?: { + select: SiteSurfaceModuleSelect; + }; +}; export type EmailsModuleSelect = { apiName?: boolean; databaseId?: boolean; @@ -3122,7 +3380,7 @@ export type EventsModuleSelect = { actorTableId?: boolean; apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; eventAggregatesTableId?: boolean; @@ -3131,6 +3389,7 @@ export type EventsModuleSelect = { eventTypesTableName?: boolean; eventsTableId?: boolean; eventsTableName?: boolean; + expireGrants?: boolean; grantAchievement?: boolean; id?: boolean; interval?: boolean; @@ -3147,9 +3406,11 @@ export type EventsModuleSelect = { privateSchemaId?: boolean; privateSchemaName?: boolean; publicSchemaName?: boolean; + recomputeCapabilities?: boolean; recordEvent?: boolean; removeEvent?: boolean; retention?: boolean; + revokeAchievement?: boolean; schemaId?: boolean; scope?: boolean; stepsRequired?: boolean; @@ -3159,13 +3420,29 @@ export type EventsModuleSelect = { tgEventBool?: boolean; tgEventToggle?: boolean; tgEventToggleBool?: boolean; + tgLevelGrantSync?: boolean; tgUpdateAggregates?: boolean; + trustLadder?: boolean; upsertAggregate?: boolean; }; +export type FileRefFieldSelect = { + bucketKey?: boolean; + bucketTags?: boolean; + databaseId?: boolean; + enforceFk?: boolean; + fieldId?: boolean; + id?: boolean; + isPublic?: boolean; + storageModuleId?: boolean; + tableId?: boolean; + storageModule?: { + select: StorageModuleSelect; + }; +}; export type FunctionDeploymentModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; deploymentEventsTableId?: boolean; deploymentEventsTableName?: boolean; deploymentsTableId?: boolean; @@ -3196,7 +3473,7 @@ export type FunctionInvocationModuleSelect = { attemptsTableId?: boolean; attemptsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; executionLogsTableId?: boolean; @@ -3226,7 +3503,7 @@ export type FunctionModuleSelect = { bindingsTableName?: boolean; capabilityBindingsTableId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; definitionsTableId?: boolean; definitionsTableName?: boolean; entityField?: boolean; @@ -3266,7 +3543,7 @@ export type GraphExecutionModuleSelect = { apiName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; executionsTableId?: boolean; @@ -3294,7 +3571,7 @@ export type GraphModuleSelect = { apiName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; graphsTableId?: boolean; @@ -3326,7 +3603,7 @@ export type HierarchyModuleSelect = { chartEdgesTableName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; getManagersFunction?: boolean; @@ -3347,7 +3624,7 @@ export type HierarchyModuleSelect = { export type HttpRouteModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; functionModuleId?: boolean; @@ -3543,6 +3820,7 @@ export type LimitsModuleSelect = { limitCreditsTableId?: boolean; limitDecrementFunction?: boolean; limitDecrementTrigger?: boolean; + limitDefaults?: boolean; limitIncrementFunction?: boolean; limitIncrementTrigger?: boolean; limitUpdateTrigger?: boolean; @@ -3573,9 +3851,12 @@ export type MembershipsModuleSelect = { adminGrantsTableId?: boolean; adminGrantsTableName?: boolean; apiName?: boolean; + capabilitiesTableId?: boolean; + capabilityDefaultCapabilitiesTableId?: boolean; + capabilityDefaultGrantsTableId?: boolean; databaseId?: boolean; + defaultCapabilitiesTableId?: boolean; defaultLimitsTableId?: boolean; - defaultPermissionsTableId?: boolean; entityField?: boolean; entityIdsByMask?: boolean; entityIdsByPerm?: boolean; @@ -3598,9 +3879,6 @@ export type MembershipsModuleSelect = { membershipsTableName?: boolean; ownerGrantsTableId?: boolean; ownerGrantsTableName?: boolean; - permissionDefaultGrantsTableId?: boolean; - permissionDefaultPermissionsTableId?: boolean; - permissionsTableId?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; @@ -3612,6 +3890,7 @@ export type MembershipsModuleSelect = { }; export type MerkleStoreModuleSelect = { apiName?: boolean; + capabilityKey?: boolean; commitTableId?: boolean; createdAt?: boolean; databaseId?: boolean; @@ -3619,7 +3898,6 @@ export type MerkleStoreModuleSelect = { functionPrefix?: boolean; id?: boolean; objectTableId?: boolean; - permissionKey?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; @@ -3629,6 +3907,12 @@ export type MerkleStoreModuleSelect = { schemaId?: boolean; scope?: boolean; storeTableId?: boolean; + contentPresetModules?: { + select: ContentPresetModuleSelect; + first?: number; + filter?: ContentPresetModuleFilter; + orderBy?: ContentPresetModuleOrderBy[]; + }; dbPresetModules?: { select: DbPresetModuleSelect; first?: number; @@ -3657,7 +3941,7 @@ export type MerkleStoreModuleSelect = { export type NamespaceModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -3697,7 +3981,7 @@ export type NotificationsModuleSelect = { apiName?: boolean; channelsTableId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; deliveryLogTableId?: boolean; entityField?: boolean; hasChannels?: boolean; @@ -3719,6 +4003,20 @@ export type NotificationsModuleSelect = { suppressionsTableId?: boolean; userSettingsTableId?: boolean; }; +export type OauthRequestsModuleSelect = { + databaseId?: boolean; + entityField?: boolean; + entityTableId?: boolean; + id?: boolean; + oauthAuthorizationRequestsTableId?: boolean; + oauthAuthorizationRequestsTableName?: boolean; + pendingIdentityLinksTableId?: boolean; + pendingIdentityLinksTableName?: boolean; + prefix?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + scope?: boolean; +}; export type PagesModuleSelect = { apiName?: boolean; createdAt?: boolean; @@ -3746,30 +4044,6 @@ export type PagesModuleSelect = { select: SiteSurfaceModuleSelect; }; }; -export type PermissionsModuleSelect = { - actorTableId?: boolean; - apiName?: boolean; - bitlen?: boolean; - databaseId?: boolean; - defaultTableId?: boolean; - defaultTableName?: boolean; - entityField?: boolean; - entityTableId?: boolean; - getByMask?: boolean; - getMask?: boolean; - getMaskByName?: boolean; - getPaddedMask?: boolean; - id?: boolean; - prefix?: boolean; - privateApiName?: boolean; - privateSchemaId?: boolean; - privateSchemaName?: boolean; - publicSchemaName?: boolean; - schemaId?: boolean; - scope?: boolean; - tableId?: boolean; - tableName?: boolean; -}; export type PhoneNumbersModuleSelect = { apiName?: boolean; databaseId?: boolean; @@ -3827,22 +4101,24 @@ export type PrincipalAuthModuleSelect = { export type ProfilesModuleSelect = { actorTableId?: boolean; apiName?: boolean; + capabilitiesTableId?: boolean; databaseId?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; + membershipProfilesTableId?: boolean; + membershipProfilesTableName?: boolean; membershipsTableId?: boolean; - permissionsTableId?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; privateSchemaName?: boolean; + profileCapabilitiesTableId?: boolean; + profileCapabilitiesTableName?: boolean; profileDefinitionGrantsTableId?: boolean; profileDefinitionGrantsTableName?: boolean; profileGrantsTableId?: boolean; profileGrantsTableName?: boolean; - profilePermissionsTableId?: boolean; - profilePermissionsTableName?: boolean; profileTemplatesTableId?: boolean; profileTemplatesTableName?: boolean; publicSchemaName?: boolean; @@ -3855,7 +4131,7 @@ export type RateLimitMetersModuleSelect = { apiName?: boolean; checkRateLimitFunction?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; id?: boolean; prefix?: boolean; privateApiName?: boolean; @@ -3926,7 +4202,7 @@ export type RelationProvisionSelect = { export type ResourceModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -3990,9 +4266,11 @@ export type RlsModuleSelect = { }; export type RouteModuleSelect = { apiName?: boolean; + appLinksFunctionName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + deepLinkFunctionName?: boolean; + defaultCapabilities?: boolean; domainModuleId?: boolean; entityField?: boolean; entityTableId?: boolean; @@ -4020,6 +4298,13 @@ export type RouteModuleSelect = { select: DomainModuleSelect; }; }; +export type ScopeTypesModuleSelect = { + databaseId?: boolean; + id?: boolean; + privateSchemaName?: boolean; + schemaId?: boolean; + scopeTypesTableId?: boolean; +}; export type SecureTableProvisionSelect = { databaseId?: boolean; fields?: boolean; @@ -4058,7 +4343,7 @@ export type SiteSurfaceModuleSelect = { apiName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -4090,6 +4375,12 @@ export type SiteSurfaceModuleSelect = { catalogModule?: { select: CatalogModuleSelect; }; + emailSenderModules?: { + select: EmailSenderModuleSelect; + first?: number; + filter?: EmailSenderModuleFilter; + orderBy?: EmailSenderModuleOrderBy[]; + }; pagesModules?: { select: PagesModuleSelect; first?: number; @@ -4128,8 +4419,8 @@ export type StorageModuleSelect = { catalogModuleId?: boolean; confirmUploadDelay?: boolean; databaseId?: boolean; + defaultCapabilities?: boolean; defaultMaxFileSize?: boolean; - defaultPermissions?: boolean; downloadUrlExpirySeconds?: boolean; endpoint?: boolean; entityField?: boolean; @@ -4161,6 +4452,12 @@ export type StorageModuleSelect = { schemaId?: boolean; scope?: boolean; uploadUrlExpirySeconds?: boolean; + fileRefFields?: { + select: FileRefFieldSelect; + first?: number; + filter?: FileRefFieldFilter; + orderBy?: FileRefFieldOrderBy[]; + }; httpRouteModules?: { select: HttpRouteModuleSelect; first?: number; @@ -4238,6 +4535,15 @@ export type UserSettingsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type UserSettingsSecurityModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + id?: boolean; + ownerTableId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; +}; export type UserStateModuleSelect = { databaseId?: boolean; entityField?: boolean; @@ -4289,7 +4595,7 @@ export type WebauthnCredentialsModuleSelect = { export type WebhookModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; functionInvocationModuleId?: boolean; @@ -4335,8 +4641,8 @@ export interface AgentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4433,8 +4739,8 @@ export interface ApiSurfaceModuleFilter { corsSettingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4481,8 +4787,8 @@ export interface AppModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4523,10 +4829,10 @@ export interface BillingModuleFilter { balancesTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMeterCatalog` field. */ defaultMeterCatalog?: JSONFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `ledgerTableId` field. */ @@ -4585,6 +4891,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -4593,6 +4903,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -4605,6 +4919,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -4623,10 +4941,14 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } export interface BlueprintFilter { /** Checks for all expressions in this list. */ @@ -4760,9 +5082,65 @@ export interface BlueprintTemplateFilter { /** Filter by the object’s `visibility` field. */ visibility?: StringFilter; } -export interface CatalogModuleFilter { +export interface CapabilitiesModuleFilter { + /** Filter by the object’s `actorTableId` field. */ + actorTableId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: CatalogModuleFilter[]; + and?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `bitlen` field. */ + bitlen?: IntFilter; + /** Filter by the object’s `dataCapabilitiesFields` relation. */ + dataCapabilitiesFields?: CapabilitiesModuleToManyDataCapabilitiesFieldFilter; + /** `dataCapabilitiesFields` exist. */ + dataCapabilitiesFieldsExist?: boolean; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultTableId` field. */ + defaultTableId?: UUIDFilter; + /** Filter by the object’s `defaultTableName` field. */ + defaultTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `getByMask` field. */ + getByMask?: StringFilter; + /** Filter by the object’s `getMask` field. */ + getMask?: StringFilter; + /** Filter by the object’s `getMaskByName` field. */ + getMaskByName?: StringFilter; + /** Filter by the object’s `getPaddedMask` field. */ + getPaddedMask?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: CapabilitiesModuleFilter; + /** Checks for any expressions in this list. */ + or?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +export interface CatalogModuleFilter { + /** Checks for all expressions in this list. */ + and?: CatalogModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `apiSurfaceModules` relation. */ @@ -4781,14 +5159,18 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ bucketsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModules` relation. */ domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ @@ -4964,6 +5346,50 @@ export interface ConnectedAccountsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface ContentPresetModuleFilter { + /** Checks for all expressions in this list. */ + and?: ContentPresetModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `contentPresetsTableId` field. */ + contentPresetsTableId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `merkleStoreModule` relation. */ + merkleStoreModule?: MerkleStoreModuleFilter; + /** Filter by the object’s `merkleStoreModuleId` field. */ + merkleStoreModuleId?: UUIDFilter; + /** Negates the expression. */ + not?: ContentPresetModuleFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaId` field. */ + publicSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `storeName` field. */ + storeName?: StringFilter; +} export interface CryptoAddressesModuleFilter { /** Checks for all expressions in this list. */ and?: CryptoAddressesModuleFilter[]; @@ -5028,6 +5454,38 @@ export interface CryptoAuthModuleFilter { /** Filter by the object’s `usersTableId` field. */ usersTableId?: UUIDFilter; } +export interface DataCapabilitiesFieldFilter { + /** Checks for all expressions in this list. */ + and?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `capabilitiesModule` relation. */ + capabilitiesModule?: CapabilitiesModuleFilter; + /** Filter by the object’s `capabilitiesModuleId` field. */ + capabilitiesModuleId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `fromFieldId` field. */ + fromFieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `mappingFieldId` field. */ + mappingFieldId?: UUIDFilter; + /** Filter by the object’s `mappingKeyFieldId` field. */ + mappingKeyFieldId?: UUIDFilter; + /** Filter by the object’s `mappingTableId` field. */ + mappingTableId?: UUIDFilter; + /** Filter by the object’s `mode` field. */ + mode?: StringFilter; + /** Negates the expression. */ + not?: DataCapabilitiesFieldFilter; + /** Checks for any expressions in this list. */ + or?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `subsetGuard` field. */ + subsetGuard?: BooleanFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} export interface DatabaseProvisionModuleFilter { /** Checks for all expressions in this list. */ and?: DatabaseProvisionModuleFilter[]; @@ -5085,8 +5543,8 @@ export interface DatabaseSettingsModuleFilter { databaseSettingsTableId?: UUIDFilter; /** Filter by the object’s `databaseSettingsTableName` field. */ databaseSettingsTableName?: StringFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5241,8 +5699,8 @@ export interface DbUsageModuleFilter { collectDbTableStatsFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `id` field. */ @@ -5371,8 +5829,8 @@ export interface DomainModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -5422,6 +5880,58 @@ export interface DomainModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface EmailSenderModuleFilter { + /** Checks for all expressions in this list. */ + and?: EmailSenderModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailIdentitiesTableId` field. */ + emailIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesTableName` field. */ + emailIdentitiesTableName?: StringFilter; + /** Filter by the object’s `emailProviderAccountsTableId` field. */ + emailProviderAccountsTableId?: UUIDFilter; + /** Filter by the object’s `emailProviderAccountsTableName` field. */ + emailProviderAccountsTableName?: StringFilter; + /** Filter by the object’s `emailSiteIdentitiesTableId` field. */ + emailSiteIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentitiesTableName` field. */ + emailSiteIdentitiesTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSenderModuleFilter; + /** Checks for any expressions in this list. */ + or?: EmailSenderModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `siteSurfaceModule` relation. */ + siteSurfaceModule?: SiteSurfaceModuleFilter; + /** A related `siteSurfaceModule` exists. */ + siteSurfaceModuleExists?: boolean; + /** Filter by the object’s `siteSurfaceModuleId` field. */ + siteSurfaceModuleId?: UUIDFilter; +} export interface EmailsModuleFilter { /** Checks for all expressions in this list. */ and?: EmailsModuleFilter[]; @@ -5547,8 +6057,8 @@ export interface EventsModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5565,6 +6075,8 @@ export interface EventsModuleFilter { eventsTableId?: UUIDFilter; /** Filter by the object’s `eventsTableName` field. */ eventsTableName?: StringFilter; + /** Filter by the object’s `expireGrants` field. */ + expireGrants?: StringFilter; /** Filter by the object’s `grantAchievement` field. */ grantAchievement?: StringFilter; /** Filter by the object’s `id` field. */ @@ -5601,12 +6113,16 @@ export interface EventsModuleFilter { privateSchemaName?: StringFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `recomputeCapabilities` field. */ + recomputeCapabilities?: StringFilter; /** Filter by the object’s `recordEvent` field. */ recordEvent?: StringFilter; /** Filter by the object’s `removeEvent` field. */ removeEvent?: StringFilter; /** Filter by the object’s `retention` field. */ retention?: StringFilter; + /** Filter by the object’s `revokeAchievement` field. */ + revokeAchievement?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ @@ -5625,11 +6141,43 @@ export interface EventsModuleFilter { tgEventToggle?: StringFilter; /** Filter by the object’s `tgEventToggleBool` field. */ tgEventToggleBool?: StringFilter; + /** Filter by the object’s `tgLevelGrantSync` field. */ + tgLevelGrantSync?: StringFilter; /** Filter by the object’s `tgUpdateAggregates` field. */ tgUpdateAggregates?: StringFilter; + /** Filter by the object’s `trustLadder` field. */ + trustLadder?: JSONFilter; /** Filter by the object’s `upsertAggregate` field. */ upsertAggregate?: StringFilter; } +export interface FileRefFieldFilter { + /** Checks for all expressions in this list. */ + and?: FileRefFieldFilter[]; + /** Filter by the object’s `bucketKey` field. */ + bucketKey?: StringFilter; + /** Filter by the object’s `bucketTags` field. */ + bucketTags?: StringListFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `enforceFk` field. */ + enforceFk?: BooleanFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublic` field. */ + isPublic?: BooleanFilter; + /** Negates the expression. */ + not?: FileRefFieldFilter; + /** Checks for any expressions in this list. */ + or?: FileRefFieldFilter[]; + /** Filter by the object’s `storageModule` relation. */ + storageModule?: StorageModuleFilter; + /** Filter by the object’s `storageModuleId` field. */ + storageModuleId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} export interface FunctionDeploymentModuleFilter { /** Checks for all expressions in this list. */ and?: FunctionDeploymentModuleFilter[]; @@ -5637,8 +6185,8 @@ export interface FunctionDeploymentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deploymentEventsTableId` field. */ deploymentEventsTableId?: UUIDFilter; /** Filter by the object’s `deploymentEventsTableName` field. */ @@ -5699,8 +6247,8 @@ export interface FunctionInvocationModuleFilter { attemptsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5755,8 +6303,8 @@ export interface FunctionModuleFilter { capabilityBindingsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `definitionsTableId` field. */ definitionsTableId?: UUIDFilter; /** Filter by the object’s `definitionsTableName` field. */ @@ -5815,8 +6363,8 @@ export interface GraphExecutionModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5871,8 +6419,8 @@ export interface GraphModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5927,8 +6475,8 @@ export interface HierarchyModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5973,8 +6521,8 @@ export interface HttpRouteModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -6387,6 +6935,8 @@ export interface LimitsModuleFilter { limitDecrementFunction?: StringFilter; /** Filter by the object’s `limitDecrementTrigger` field. */ limitDecrementTrigger?: StringFilter; + /** Filter by the object’s `limitDefaults` field. */ + limitDefaults?: JSONFilter; /** Filter by the object’s `limitIncrementFunction` field. */ limitIncrementFunction?: StringFilter; /** Filter by the object’s `limitIncrementTrigger` field. */ @@ -6455,12 +7005,18 @@ export interface MembershipsModuleFilter { and?: MembershipsModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultCapabilitiesTableId` field. */ + capabilityDefaultCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultGrantsTableId` field. */ + capabilityDefaultGrantsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilitiesTableId` field. */ + defaultCapabilitiesTableId?: UUIDFilter; /** Filter by the object’s `defaultLimitsTableId` field. */ defaultLimitsTableId?: UUIDFilter; - /** Filter by the object’s `defaultPermissionsTableId` field. */ - defaultPermissionsTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityIdsByMask` field. */ @@ -6509,12 +7065,6 @@ export interface MembershipsModuleFilter { ownerGrantsTableId?: UUIDFilter; /** Filter by the object’s `ownerGrantsTableName` field. */ ownerGrantsTableName?: StringFilter; - /** Filter by the object’s `permissionDefaultGrantsTableId` field. */ - permissionDefaultGrantsTableId?: UUIDFilter; - /** Filter by the object’s `permissionDefaultPermissionsTableId` field. */ - permissionDefaultPermissionsTableId?: UUIDFilter; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6537,8 +7087,14 @@ export interface MerkleStoreModuleFilter { and?: MerkleStoreModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilityKey` field. */ + capabilityKey?: StringFilter; /** Filter by the object’s `commitTableId` field. */ commitTableId?: UUIDFilter; + /** Filter by the object’s `contentPresetModules` relation. */ + contentPresetModules?: MerkleStoreModuleToManyContentPresetModuleFilter; + /** `contentPresetModules` exist. */ + contentPresetModulesExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -6567,8 +7123,6 @@ export interface MerkleStoreModuleFilter { pagesModules?: MerkleStoreModuleToManyPagesModuleFilter; /** `pagesModules` exist. */ pagesModulesExist?: boolean; - /** Filter by the object’s `permissionKey` field. */ - permissionKey?: StringFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6599,8 +7153,8 @@ export interface NamespaceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -6659,8 +7213,8 @@ export interface NotificationsModuleFilter { channelsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deliveryLogTableId` field. */ deliveryLogTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -6706,6 +7260,38 @@ export interface NotificationsModuleFilter { /** Filter by the object’s `userSettingsTableId` field. */ userSettingsTableId?: UUIDFilter; } +export interface OauthRequestsModuleFilter { + /** Checks for all expressions in this list. */ + and?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OauthRequestsModuleFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableId` field. */ + oauthAuthorizationRequestsTableId?: UUIDFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableName` field. */ + oauthAuthorizationRequestsTableName?: StringFilter; + /** Checks for any expressions in this list. */ + or?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `pendingIdentityLinksTableId` field. */ + pendingIdentityLinksTableId?: UUIDFilter; + /** Filter by the object’s `pendingIdentityLinksTableName` field. */ + pendingIdentityLinksTableName?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; +} export interface PagesModuleFilter { /** Checks for all expressions in this list. */ and?: PagesModuleFilter[]; @@ -6758,58 +7344,6 @@ export interface PagesModuleFilter { /** Filter by the object’s `storeNamePrefix` field. */ storeNamePrefix?: StringFilter; } -export interface PermissionsModuleFilter { - /** Filter by the object’s `actorTableId` field. */ - actorTableId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: PermissionsModuleFilter[]; - /** Filter by the object’s `apiName` field. */ - apiName?: StringFilter; - /** Filter by the object’s `bitlen` field. */ - bitlen?: IntFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `defaultTableId` field. */ - defaultTableId?: UUIDFilter; - /** Filter by the object’s `defaultTableName` field. */ - defaultTableName?: StringFilter; - /** Filter by the object’s `entityField` field. */ - entityField?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `getByMask` field. */ - getByMask?: StringFilter; - /** Filter by the object’s `getMask` field. */ - getMask?: StringFilter; - /** Filter by the object’s `getMaskByName` field. */ - getMaskByName?: StringFilter; - /** Filter by the object’s `getPaddedMask` field. */ - getPaddedMask?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Negates the expression. */ - not?: PermissionsModuleFilter; - /** Checks for any expressions in this list. */ - or?: PermissionsModuleFilter[]; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `privateApiName` field. */ - privateApiName?: StringFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `scope` field. */ - scope?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; -} export interface PhoneNumbersModuleFilter { /** Checks for all expressions in this list. */ and?: PhoneNumbersModuleFilter[]; @@ -6937,6 +7471,8 @@ export interface ProfilesModuleFilter { and?: ProfilesModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -6945,14 +7481,16 @@ export interface ProfilesModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableId` field. */ + membershipProfilesTableId?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableName` field. */ + membershipProfilesTableName?: StringFilter; /** Filter by the object’s `membershipsTableId` field. */ membershipsTableId?: UUIDFilter; /** Negates the expression. */ not?: ProfilesModuleFilter; /** Checks for any expressions in this list. */ or?: ProfilesModuleFilter[]; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6961,6 +7499,10 @@ export interface ProfilesModuleFilter { privateSchemaId?: UUIDFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; + /** Filter by the object’s `profileCapabilitiesTableId` field. */ + profileCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `profileCapabilitiesTableName` field. */ + profileCapabilitiesTableName?: StringFilter; /** Filter by the object’s `profileDefinitionGrantsTableId` field. */ profileDefinitionGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileDefinitionGrantsTableName` field. */ @@ -6969,10 +7511,6 @@ export interface ProfilesModuleFilter { profileGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileGrantsTableName` field. */ profileGrantsTableName?: StringFilter; - /** Filter by the object’s `profilePermissionsTableId` field. */ - profilePermissionsTableId?: UUIDFilter; - /** Filter by the object’s `profilePermissionsTableName` field. */ - profilePermissionsTableName?: StringFilter; /** Filter by the object’s `profileTemplatesTableId` field. */ profileTemplatesTableId?: UUIDFilter; /** Filter by the object’s `profileTemplatesTableName` field. */ @@ -6997,8 +7535,8 @@ export interface RateLimitMetersModuleFilter { checkRateLimitFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -7155,8 +7693,8 @@ export interface ResourceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7279,6 +7817,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -7287,8 +7827,10 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ domainModule?: DomainModuleFilter; /** A related `domainModule` exists. */ @@ -7338,6 +7880,24 @@ export interface RouteModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ and?: SecureTableProvisionFilter[]; @@ -7431,8 +7991,12 @@ export interface SiteSurfaceModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailSenderModules` relation. */ + emailSenderModules?: SiteSurfaceModuleToManyEmailSenderModuleFilter; + /** `emailSenderModules` exist. */ + emailSenderModulesExist?: boolean; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7565,10 +8129,10 @@ export interface StorageModuleFilter { confirmUploadDelay?: IntervalFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMaxFileSize` field. */ defaultMaxFileSize?: BigIntFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `downloadUrlExpirySeconds` field. */ downloadUrlExpirySeconds?: IntFilter; /** Filter by the object’s `endpoint` field. */ @@ -7579,6 +8143,10 @@ export interface StorageModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `fileEventsTableId` field. */ fileEventsTableId?: UUIDFilter; + /** Filter by the object’s `fileRefFields` relation. */ + fileRefFields?: StorageModuleToManyFileRefFieldFilter; + /** `fileRefFields` exist. */ + fileRefFieldsExist?: boolean; /** Filter by the object’s `filesTableId` field. */ filesTableId?: UUIDFilter; /** Filter by the object’s `filesTableName` field. */ @@ -7796,6 +8364,28 @@ export interface UserSettingsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: 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; +} export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ and?: UserStateModuleFilter[]; @@ -7915,8 +8505,8 @@ export interface WebhookModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7988,8 +8578,8 @@ export type AgentModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8078,8 +8668,8 @@ export type ApiSurfaceModuleOrderBy = | 'CORS_SETTINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8118,8 +8708,8 @@ export type AppModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8156,10 +8746,10 @@ export type BillingModuleOrderBy = | 'BALANCES_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_METER_CATALOG_ASC' | 'DEFAULT_METER_CATALOG_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'ID_ASC' | 'ID_DESC' | 'LEDGER_TABLE_ID_ASC' @@ -8214,6 +8804,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -8222,6 +8816,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -8234,6 +8832,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -8251,10 +8853,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; export type BlueprintOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -8353,25 +8959,77 @@ export type BlueprintTemplateOrderBy = | 'VERSION_DESC' | 'VISIBILITY_ASC' | 'VISIBILITY_DESC'; -export type CatalogModuleOrderBy = - | 'APIS_TABLE_ID_ASC' - | 'APIS_TABLE_ID_DESC' - | 'APIS_TABLE_NAME_ASC' - | 'APIS_TABLE_NAME_DESC' - | 'API_NAME_ASC' +export type CapabilitiesModuleOrderBy = + | 'ACTOR_TABLE_ID_ASC' + | 'ACTOR_TABLE_ID_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'BITLEN_ASC' + | 'BITLEN_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_TABLE_ID_ASC' + | 'DEFAULT_TABLE_ID_DESC' + | 'DEFAULT_TABLE_NAME_ASC' + | 'DEFAULT_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'GET_BY_MASK_ASC' + | 'GET_BY_MASK_DESC' + | 'GET_MASK_ASC' + | 'GET_MASK_BY_NAME_ASC' + | 'GET_MASK_BY_NAME_DESC' + | 'GET_MASK_DESC' + | 'GET_PADDED_MASK_ASC' + | 'GET_PADDED_MASK_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; +export type CatalogModuleOrderBy = + | 'APIS_TABLE_ID_ASC' + | 'APIS_TABLE_ID_DESC' + | 'APIS_TABLE_NAME_ASC' + | 'APIS_TABLE_NAME_DESC' + | 'API_NAME_ASC' | 'API_NAME_DESC' | 'APPS_TABLE_ID_ASC' | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -8521,6 +9179,44 @@ export type ConnectedAccountsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type ContentPresetModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'CONTENT_PRESETS_TABLE_ID_ASC' + | 'CONTENT_PRESETS_TABLE_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MERKLE_STORE_MODULE_ID_ASC' + | 'MERKLE_STORE_MODULE_ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'STORE_NAME_ASC' + | 'STORE_NAME_DESC'; export type CryptoAddressesModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -8577,6 +9273,32 @@ export type CryptoAuthModuleOrderBy = | 'USERS_TABLE_ID_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC'; +export type DataCapabilitiesFieldOrderBy = + | 'CAPABILITIES_MODULE_ID_ASC' + | 'CAPABILITIES_MODULE_ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'FROM_FIELD_ID_ASC' + | 'FROM_FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MAPPING_FIELD_ID_ASC' + | 'MAPPING_FIELD_ID_DESC' + | 'MAPPING_KEY_FIELD_ID_ASC' + | 'MAPPING_KEY_FIELD_ID_DESC' + | 'MAPPING_TABLE_ID_ASC' + | 'MAPPING_TABLE_ID_DESC' + | 'MODE_ASC' + | 'MODE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SUBSET_GUARD_ASC' + | 'SUBSET_GUARD_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; export type DatabaseProvisionModuleOrderBy = | 'ASYNC_ASC' | 'ASYNC_DESC' @@ -8628,8 +9350,8 @@ export type DatabaseSettingsModuleOrderBy = | 'DATABASE_SETTINGS_TABLE_ID_DESC' | 'DATABASE_SETTINGS_TABLE_NAME_ASC' | 'DATABASE_SETTINGS_TABLE_NAME_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8766,8 +9488,8 @@ export type DbUsageModuleOrderBy = | 'COLLECT_DB_TABLE_STATS_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ID_ASC' @@ -8876,8 +9598,8 @@ export type DomainModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -8921,6 +9643,50 @@ export type DomainModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type EmailSenderModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' + | 'EMAIL_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_IDENTITIES_TABLE_NAME_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'SITE_SURFACE_MODULE_ID_ASC' + | 'SITE_SURFACE_MODULE_ID_DESC'; export type EmailsModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -9036,8 +9802,8 @@ export type EventsModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9054,6 +9820,8 @@ export type EventsModuleOrderBy = | 'EVENT_TYPES_TABLE_ID_DESC' | 'EVENT_TYPES_TABLE_NAME_ASC' | 'EVENT_TYPES_TABLE_NAME_DESC' + | 'EXPIRE_GRANTS_ASC' + | 'EXPIRE_GRANTS_DESC' | 'GRANT_ACHIEVEMENT_ASC' | 'GRANT_ACHIEVEMENT_DESC' | 'ID_ASC' @@ -9089,12 +9857,16 @@ export type EventsModuleOrderBy = | 'PRIVATE_SCHEMA_NAME_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RECOMPUTE_CAPABILITIES_ASC' + | 'RECOMPUTE_CAPABILITIES_DESC' | 'RECORD_EVENT_ASC' | 'RECORD_EVENT_DESC' | 'REMOVE_EVENT_ASC' | 'REMOVE_EVENT_DESC' | 'RETENTION_ASC' | 'RETENTION_DESC' + | 'REVOKE_ACHIEVEMENT_ASC' + | 'REVOKE_ACHIEVEMENT_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' @@ -9113,17 +9885,43 @@ export type EventsModuleOrderBy = | 'TG_EVENT_TOGGLE_BOOL_ASC' | 'TG_EVENT_TOGGLE_BOOL_DESC' | 'TG_EVENT_TOGGLE_DESC' + | 'TG_LEVEL_GRANT_SYNC_ASC' + | 'TG_LEVEL_GRANT_SYNC_DESC' | 'TG_UPDATE_AGGREGATES_ASC' | 'TG_UPDATE_AGGREGATES_DESC' + | 'TRUST_LADDER_ASC' + | 'TRUST_LADDER_DESC' | 'UPSERT_AGGREGATE_ASC' | 'UPSERT_AGGREGATE_DESC'; +export type FileRefFieldOrderBy = + | 'BUCKET_KEY_ASC' + | 'BUCKET_KEY_DESC' + | 'BUCKET_TAGS_ASC' + | 'BUCKET_TAGS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENFORCE_FK_ASC' + | 'ENFORCE_FK_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLIC_ASC' + | 'IS_PUBLIC_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STORAGE_MODULE_ID_ASC' + | 'STORAGE_MODULE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; export type FunctionDeploymentModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEPLOYMENTS_TABLE_ID_ASC' | 'DEPLOYMENTS_TABLE_ID_DESC' | 'DEPLOYMENTS_TABLE_NAME_ASC' @@ -9172,8 +9970,8 @@ export type FunctionInvocationModuleOrderBy = | 'ATTEMPTS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9220,8 +10018,8 @@ export type FunctionModuleOrderBy = | 'CAPABILITY_BINDINGS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFINITIONS_TABLE_ID_ASC' | 'DEFINITIONS_TABLE_ID_DESC' | 'DEFINITIONS_TABLE_NAME_ASC' @@ -9264,8 +10062,8 @@ export type GraphExecutionModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9314,8 +10112,8 @@ export type GraphModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9360,8 +10158,8 @@ export type HierarchyModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9402,8 +10200,8 @@ export type HttpRouteModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9764,6 +10562,8 @@ export type LimitsModuleOrderBy = | 'LIMIT_DECREMENT_FUNCTION_DESC' | 'LIMIT_DECREMENT_TRIGGER_ASC' | 'LIMIT_DECREMENT_TRIGGER_DESC' + | 'LIMIT_DEFAULTS_ASC' + | 'LIMIT_DEFAULTS_DESC' | 'LIMIT_INCREMENT_FUNCTION_ASC' | 'LIMIT_INCREMENT_FUNCTION_DESC' | 'LIMIT_INCREMENT_TRIGGER_ASC' @@ -9824,12 +10624,18 @@ export type MembershipsModuleOrderBy = | 'ADMIN_GRANTS_TABLE_NAME_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_DESC' | 'DEFAULT_LIMITS_TABLE_ID_ASC' | 'DEFAULT_LIMITS_TABLE_ID_DESC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_IDS_BY_MASK_ASC' @@ -9875,12 +10681,6 @@ export type MembershipsModuleOrderBy = | 'OWNER_GRANTS_TABLE_ID_DESC' | 'OWNER_GRANTS_TABLE_NAME_ASC' | 'OWNER_GRANTS_TABLE_NAME_DESC' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -9902,6 +10702,8 @@ export type MembershipsModuleOrderBy = export type MerkleStoreModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITY_KEY_ASC' + | 'CAPABILITY_KEY_DESC' | 'COMMIT_TABLE_ID_ASC' | 'COMMIT_TABLE_ID_DESC' | 'CREATED_AT_ASC' @@ -9917,8 +10719,6 @@ export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'OBJECT_TABLE_ID_ASC' | 'OBJECT_TABLE_ID_DESC' - | 'PERMISSION_KEY_ASC' - | 'PERMISSION_KEY_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -9944,8 +10744,8 @@ export type NamespaceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9988,8 +10788,8 @@ export type NotificationsModuleOrderBy = | 'CHANNELS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DELIVERY_LOG_TABLE_ID_ASC' | 'DELIVERY_LOG_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10033,6 +10833,34 @@ export type NotificationsModuleOrderBy = | 'SUPPRESSIONS_TABLE_ID_DESC' | 'USER_SETTINGS_TABLE_ID_ASC' | 'USER_SETTINGS_TABLE_ID_DESC'; +export type OauthRequestsModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_DESC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC'; export type PagesModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -10075,54 +10903,6 @@ export type PagesModuleOrderBy = | 'SITE_SURFACE_MODULE_ID_DESC' | 'STORE_NAME_PREFIX_ASC' | 'STORE_NAME_PREFIX_DESC'; -export type PermissionsModuleOrderBy = - | 'ACTOR_TABLE_ID_ASC' - | 'ACTOR_TABLE_ID_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'BITLEN_ASC' - | 'BITLEN_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEFAULT_TABLE_ID_ASC' - | 'DEFAULT_TABLE_ID_DESC' - | 'DEFAULT_TABLE_NAME_ASC' - | 'DEFAULT_TABLE_NAME_DESC' - | 'ENTITY_FIELD_ASC' - | 'ENTITY_FIELD_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'GET_BY_MASK_ASC' - | 'GET_BY_MASK_DESC' - | 'GET_MASK_ASC' - | 'GET_MASK_BY_NAME_ASC' - | 'GET_MASK_BY_NAME_DESC' - | 'GET_MASK_DESC' - | 'GET_PADDED_MASK_ASC' - | 'GET_PADDED_MASK_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NATURAL' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC'; export type PhoneNumbersModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -10236,6 +11016,8 @@ export type ProfilesModuleOrderBy = | 'ACTOR_TABLE_ID_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10246,9 +11028,11 @@ export type ProfilesModuleOrderBy = | 'ID_DESC' | 'MEMBERSHIPS_TABLE_ID_ASC' | 'MEMBERSHIPS_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_DESC' | 'NATURAL' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -10259,6 +11043,10 @@ export type ProfilesModuleOrderBy = | 'PRIVATE_SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROFILE_CAPABILITIES_TABLE_ID_ASC' + | 'PROFILE_CAPABILITIES_TABLE_ID_DESC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_ASC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_ASC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_NAME_ASC' @@ -10267,10 +11055,6 @@ export type ProfilesModuleOrderBy = | 'PROFILE_GRANTS_TABLE_ID_DESC' | 'PROFILE_GRANTS_TABLE_NAME_ASC' | 'PROFILE_GRANTS_TABLE_NAME_DESC' - | 'PROFILE_PERMISSIONS_TABLE_ID_ASC' - | 'PROFILE_PERMISSIONS_TABLE_ID_DESC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_ASC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_DESC' | 'PROFILE_TEMPLATES_TABLE_ID_ASC' | 'PROFILE_TEMPLATES_TABLE_ID_DESC' | 'PROFILE_TEMPLATES_TABLE_NAME_ASC' @@ -10292,8 +11076,8 @@ export type RateLimitMetersModuleOrderBy = | 'CHECK_RATE_LIMIT_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10434,8 +11218,8 @@ export type ResourceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -10538,12 +11322,16 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAIN_MODULE_ID_ASC' | 'DOMAIN_MODULE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10587,6 +11375,20 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -10662,8 +11464,8 @@ export type SiteSurfaceModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -10784,10 +11586,10 @@ export type StorageModuleOrderBy = | 'CONFIRM_UPLOAD_DELAY_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'ENDPOINT_ASC' @@ -10993,6 +11795,24 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -11094,8 +11914,8 @@ export type WebhookModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -11147,7 +11967,7 @@ export interface CreateAgentModuleInput { agentTableName?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -11185,7 +12005,7 @@ export interface AgentModulePatch { agentTableName?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; hasAgents?: boolean | null; @@ -11240,7 +12060,7 @@ export interface CreateApiSurfaceModuleInput { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11264,7 +12084,7 @@ export interface ApiSurfaceModulePatch { corsSettingsTableId?: string | null; corsSettingsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -11294,7 +12114,7 @@ export interface CreateAppModuleInput { appsTableName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11316,7 +12136,7 @@ export interface AppModulePatch { appsTableName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -11345,8 +12165,8 @@ export interface CreateBillingModuleInput { balancesTableId?: string; balancesTableName?: string; databaseId: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: Record; - defaultPermissions?: string[]; ledgerTableId?: string; ledgerTableName?: string; meterCreditsTableId?: string; @@ -11375,8 +12195,8 @@ export interface BillingModulePatch { balancesTableId?: string | null; balancesTableName?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMeterCatalog?: Record | null; - defaultPermissions?: string[] | null; ledgerTableId?: string | null; ledgerTableName?: string | null; meterCreditsTableId?: string | null; @@ -11414,15 +12234,21 @@ export interface CreateBillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -11430,23 +12256,31 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; }; } export interface BillingProviderModulePatch { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -11454,8 +12288,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } export interface UpdateBillingProviderModuleInput { clientMutationId?: string; @@ -11582,27 +12418,87 @@ export interface DeleteBlueprintTemplateInput { clientMutationId?: string; id: string; } -export interface CreateCatalogModuleInput { +export interface CreateCapabilitiesModuleInput { clientMutationId?: string; - catalogModule: { + capabilitiesModule: { + actorTableId?: string; apiName?: string; - apisTableId?: string; - apisTableName?: string; - appsTableId?: string; - appsTableName?: string; - bucketsTableId?: string; - bucketsTableName?: string; + bitlen?: number; databaseId: string; - defaultPermissions?: string[]; - domainsTableId?: string; - domainsTableName?: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; entityTableId?: string; - functionsTableId?: string; - functionsTableName?: string; - namespacesTableId?: string; - namespacesTableName?: string; - policies?: Record; - privateApiName?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope: string; + tableId?: string; + tableName?: string; + }; +} +export interface CapabilitiesModulePatch { + actorTableId?: string | null; + apiName?: string | null; + bitlen?: number | null; + databaseId?: string | null; + defaultTableId?: string | null; + defaultTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + getByMask?: string | null; + getMask?: string | null; + getMaskByName?: string | null; + getPaddedMask?: string | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateCapabilitiesModuleInput { + clientMutationId?: string; + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; +} +export interface DeleteCapabilitiesModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateCatalogModuleInput { + clientMutationId?: string; + catalogModule: { + apiName?: string; + apisTableId?: string; + apisTableName?: string; + appsTableId?: string; + appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; + bucketsTableId?: string; + bucketsTableName?: string; + databaseId: string; + defaultCapabilities?: string[]; + domainsTableId?: string; + domainsTableName?: string; + entityTableId?: string; + functionsTableId?: string; + functionsTableName?: string; + namespacesTableId?: string; + namespacesTableName?: string; + policies?: Record; + privateApiName?: string; provisions?: Record; publicSchemaName?: string; resourceDefinitionsTableId?: string; @@ -11631,10 +12527,12 @@ export interface CatalogModulePatch { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -11790,6 +12688,52 @@ export interface DeleteConnectedAccountsModuleInput { clientMutationId?: string; id: string; } +export interface CreateContentPresetModuleInput { + clientMutationId?: string; + contentPresetModule: { + apiName?: string; + contentPresetsTableId?: string; + databaseId: string; + entityTableId?: string; + merkleStoreModuleId: string; + policies?: Record; + prefix: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: Record; + publicSchemaId?: string; + publicSchemaName?: string; + scope: string; + storeName: string; + }; +} +export interface ContentPresetModulePatch { + apiName?: string | null; + contentPresetsTableId?: string | null; + databaseId?: string | null; + entityTableId?: string | null; + merkleStoreModuleId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + provisions?: Record | null; + publicSchemaId?: string | null; + publicSchemaName?: string | null; + scope?: string | null; + storeName?: string | null; +} +export interface UpdateContentPresetModuleInput { + clientMutationId?: string; + id: string; + contentPresetModulePatch: ContentPresetModulePatch; +} +export interface DeleteContentPresetModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateCryptoAddressesModuleInput { clientMutationId?: string; cryptoAddressesModule: { @@ -11866,6 +12810,42 @@ export interface DeleteCryptoAuthModuleInput { clientMutationId?: string; id: string; } +export interface CreateDataCapabilitiesFieldInput { + clientMutationId?: string; + dataCapabilitiesField: { + capabilitiesModuleId: string; + databaseId: string; + fieldId: string; + fromFieldId?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId: string; + }; +} +export interface DataCapabilitiesFieldPatch { + capabilitiesModuleId?: string | null; + databaseId?: string | null; + fieldId?: string | null; + fromFieldId?: string | null; + mappingFieldId?: string | null; + mappingKeyFieldId?: string | null; + mappingTableId?: string | null; + mode?: string | null; + subsetGuard?: boolean | null; + tableId?: string | null; +} +export interface UpdateDataCapabilitiesFieldInput { + clientMutationId?: string; + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; +} +export interface DeleteDataCapabilitiesFieldInput { + clientMutationId?: string; + id: string; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -11921,7 +12901,7 @@ export interface CreateDatabaseSettingsModuleInput { databaseId: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11944,7 +12924,7 @@ export interface DatabaseSettingsModulePatch { databaseId?: string | null; databaseSettingsTableId?: string | null; databaseSettingsTableName?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -12089,7 +13069,7 @@ export interface CreateDbUsageModuleInput { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; interval?: string; prefix?: string; @@ -12118,7 +13098,7 @@ export interface DbUsageModulePatch { collectDbQueryStatsFunction?: string | null; collectDbTableStatsFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; interval?: string | null; prefix?: string | null; @@ -12240,7 +13220,7 @@ export interface CreateDomainModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -12266,7 +13246,7 @@ export interface DomainModulePatch { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -12296,6 +13276,60 @@ export interface DeleteDomainModuleInput { clientMutationId?: string; id: string; } +export interface CreateEmailSenderModuleInput { + clientMutationId?: string; + emailSenderModule: { + apiName?: string; + databaseId: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + policies?: Record; + prefix?: string; + privateApiName?: string; + provisions?: Record; + publicSchemaName?: string; + schemaId?: string; + scope: string; + siteSurfaceModuleId?: string; + }; +} +export interface EmailSenderModulePatch { + apiName?: string | null; + databaseId?: string | null; + defaultCapabilities?: string[] | null; + emailIdentitiesTableId?: string | null; + emailIdentitiesTableName?: string | null; + emailProviderAccountsTableId?: string | null; + emailProviderAccountsTableName?: string | null; + emailSiteIdentitiesTableId?: string | null; + emailSiteIdentitiesTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + provisions?: Record | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + siteSurfaceModuleId?: string | null; +} +export interface UpdateEmailSenderModuleInput { + clientMutationId?: string; + id: string; + emailSenderModulePatch: EmailSenderModulePatch; +} +export interface DeleteEmailSenderModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateEmailsModuleInput { clientMutationId?: string; emailsModule: { @@ -12428,7 +13462,7 @@ export interface CreateEventsModuleInput { actorTableId?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -12437,6 +13471,7 @@ export interface CreateEventsModuleInput { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; interval?: string; levelAchieved?: string; @@ -12452,9 +13487,11 @@ export interface CreateEventsModuleInput { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope: string; stepsRequired?: string; @@ -12464,7 +13501,9 @@ export interface CreateEventsModuleInput { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: Record; upsertAggregate?: string; }; } @@ -12474,7 +13513,7 @@ export interface EventsModulePatch { actorTableId?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; eventAggregatesTableId?: string | null; @@ -12483,6 +13522,7 @@ export interface EventsModulePatch { eventTypesTableName?: string | null; eventsTableId?: string | null; eventsTableName?: string | null; + expireGrants?: string | null; grantAchievement?: string | null; interval?: string | null; levelAchieved?: string | null; @@ -12498,9 +13538,11 @@ export interface EventsModulePatch { privateSchemaId?: string | null; privateSchemaName?: string | null; publicSchemaName?: string | null; + recomputeCapabilities?: string | null; recordEvent?: string | null; removeEvent?: string | null; retention?: string | null; + revokeAchievement?: string | null; schemaId?: string | null; scope?: string | null; stepsRequired?: string | null; @@ -12510,7 +13552,9 @@ export interface EventsModulePatch { tgEventBool?: string | null; tgEventToggle?: string | null; tgEventToggleBool?: string | null; + tgLevelGrantSync?: string | null; tgUpdateAggregates?: string | null; + trustLadder?: Record | null; upsertAggregate?: string | null; } export interface UpdateEventsModuleInput { @@ -12522,12 +13566,44 @@ export interface DeleteEventsModuleInput { clientMutationId?: string; id: string; } +export interface CreateFileRefFieldInput { + clientMutationId?: string; + fileRefField: { + bucketKey?: string; + bucketTags?: string[]; + databaseId: string; + enforceFk?: boolean; + fieldId: string; + isPublic?: boolean; + storageModuleId: string; + tableId: string; + }; +} +export interface FileRefFieldPatch { + bucketKey?: string | null; + bucketTags?: string[] | null; + databaseId?: string | null; + enforceFk?: boolean | null; + fieldId?: string | null; + isPublic?: boolean | null; + storageModuleId?: string | null; + tableId?: string | null; +} +export interface UpdateFileRefFieldInput { + clientMutationId?: string; + id: string; + fileRefFieldPatch: FileRefFieldPatch; +} +export interface DeleteFileRefFieldInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionDeploymentModuleInput { clientMutationId?: string; functionDeploymentModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -12550,7 +13626,7 @@ export interface CreateFunctionDeploymentModuleInput { export interface FunctionDeploymentModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deploymentEventsTableId?: string | null; deploymentEventsTableName?: string | null; deploymentsTableId?: string | null; @@ -12585,7 +13661,7 @@ export interface CreateFunctionInvocationModuleInput { attemptsTableId?: string; attemptsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -12608,7 +13684,7 @@ export interface FunctionInvocationModulePatch { attemptsTableId?: string | null; attemptsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionLogsTableId?: string | null; @@ -12642,7 +13718,7 @@ export interface CreateFunctionModuleInput { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -12666,7 +13742,7 @@ export interface FunctionModulePatch { bindingsTableName?: string | null; capabilityBindingsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; definitionsTableId?: string | null; definitionsTableName?: string | null; entityField?: string | null; @@ -12697,7 +13773,7 @@ export interface CreateGraphExecutionModuleInput { graphExecutionModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -12721,7 +13797,7 @@ export interface CreateGraphExecutionModuleInput { export interface GraphExecutionModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionsTableId?: string | null; @@ -12755,7 +13831,7 @@ export interface CreateGraphModuleInput { graphModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -12774,7 +13850,7 @@ export interface CreateGraphModuleInput { export interface GraphModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; graphsTableId?: string | null; @@ -12806,7 +13882,7 @@ export interface CreateHierarchyModuleInput { chartEdgesTableId?: string; chartEdgesTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId: string; getManagersFunction?: string; @@ -12830,7 +13906,7 @@ export interface HierarchyModulePatch { chartEdgesTableId?: string | null; chartEdgesTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; getManagersFunction?: string | null; @@ -12861,7 +13937,7 @@ export interface CreateHttpRouteModuleInput { httpRouteModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -12884,7 +13960,7 @@ export interface CreateHttpRouteModuleInput { export interface HttpRouteModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionModuleId?: string | null; @@ -13292,6 +14368,7 @@ export interface CreateLimitsModuleInput { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: Record; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -13331,6 +14408,7 @@ export interface LimitsModulePatch { limitCreditsTableId?: string | null; limitDecrementFunction?: string | null; limitDecrementTrigger?: string | null; + limitDefaults?: Record | null; limitIncrementFunction?: string | null; limitIncrementTrigger?: string | null; limitUpdateTrigger?: string | null; @@ -13389,9 +14467,12 @@ export interface CreateMembershipsModuleInput { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -13413,9 +14494,6 @@ export interface CreateMembershipsModuleInput { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13433,9 +14511,12 @@ export interface MembershipsModulePatch { adminGrantsTableId?: string | null; adminGrantsTableName?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; + capabilityDefaultCapabilitiesTableId?: string | null; + capabilityDefaultGrantsTableId?: string | null; databaseId?: string | null; + defaultCapabilitiesTableId?: string | null; defaultLimitsTableId?: string | null; - defaultPermissionsTableId?: string | null; entityField?: string | null; entityIdsByMask?: string | null; entityIdsByPerm?: string | null; @@ -13457,9 +14538,6 @@ export interface MembershipsModulePatch { membershipsTableName?: string | null; ownerGrantsTableId?: string | null; ownerGrantsTableName?: string | null; - permissionDefaultGrantsTableId?: string | null; - permissionDefaultPermissionsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -13482,12 +14560,12 @@ export interface CreateMerkleStoreModuleInput { clientMutationId?: string; merkleStoreModule: { apiName?: string; + capabilityKey?: string; commitTableId?: string; databaseId: string; entityField?: string; functionPrefix?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13501,12 +14579,12 @@ export interface CreateMerkleStoreModuleInput { } export interface MerkleStoreModulePatch { apiName?: string | null; + capabilityKey?: string | null; commitTableId?: string | null; databaseId?: string | null; entityField?: string | null; functionPrefix?: string | null; objectTableId?: string | null; - permissionKey?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -13531,7 +14609,7 @@ export interface CreateNamespaceModuleInput { namespaceModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; namespaceEventsTableId?: string; @@ -13552,7 +14630,7 @@ export interface CreateNamespaceModuleInput { export interface NamespaceModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; namespaceEventsTableId?: string | null; @@ -13584,7 +14662,7 @@ export interface CreateNotificationsModuleInput { apiName?: string; channelsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -13610,7 +14688,7 @@ export interface NotificationsModulePatch { apiName?: string | null; channelsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deliveryLogTableId?: string | null; entityField?: string | null; hasChannels?: boolean | null; @@ -13640,6 +14718,44 @@ export interface DeleteNotificationsModuleInput { clientMutationId?: string; id: string; } +export interface CreateOauthRequestsModuleInput { + clientMutationId?: string; + oauthRequestsModule: { + databaseId: string; + entityField?: string; + entityTableId?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope: string; + }; +} +export interface OauthRequestsModulePatch { + databaseId?: string | null; + entityField?: string | null; + entityTableId?: string | null; + oauthAuthorizationRequestsTableId?: string | null; + oauthAuthorizationRequestsTableName?: string | null; + pendingIdentityLinksTableId?: string | null; + pendingIdentityLinksTableName?: string | null; + prefix?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + scope?: string | null; +} +export interface UpdateOauthRequestsModuleInput { + clientMutationId?: string; + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; +} +export interface DeleteOauthRequestsModuleInput { + clientMutationId?: string; + id: string; +} export interface CreatePagesModuleInput { clientMutationId?: string; pagesModule: { @@ -13690,64 +14806,6 @@ export interface DeletePagesModuleInput { clientMutationId?: string; id: string; } -export interface CreatePermissionsModuleInput { - clientMutationId?: string; - permissionsModule: { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; - }; -} -export interface PermissionsModulePatch { - actorTableId?: string | null; - apiName?: string | null; - bitlen?: number | null; - databaseId?: string | null; - defaultTableId?: string | null; - defaultTableName?: string | null; - entityField?: string | null; - entityTableId?: string | null; - getByMask?: string | null; - getMask?: string | null; - getMaskByName?: string | null; - getPaddedMask?: string | null; - prefix?: string | null; - privateApiName?: string | null; - privateSchemaId?: string | null; - privateSchemaName?: string | null; - publicSchemaName?: string | null; - schemaId?: string | null; - scope?: string | null; - tableId?: string | null; - tableName?: string | null; -} -export interface UpdatePermissionsModuleInput { - clientMutationId?: string; - id: string; - permissionsModulePatch: PermissionsModulePatch; -} -export interface DeletePermissionsModuleInput { - clientMutationId?: string; - id: string; -} export interface CreatePhoneNumbersModuleInput { clientMutationId?: string; phoneNumbersModule: { @@ -13891,21 +14949,23 @@ export interface CreateProfilesModuleInput { profilesModule: { actorTableId?: string; apiName?: string; + capabilitiesTableId?: string; databaseId: string; entityField?: string; entityTableId?: string; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; membershipsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; profileDefinitionGrantsTableId?: string; profileDefinitionGrantsTableName?: string; profileGrantsTableId?: string; profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; profileTemplatesTableId?: string; profileTemplatesTableName?: string; publicSchemaName?: string; @@ -13918,21 +14978,23 @@ export interface CreateProfilesModuleInput { export interface ProfilesModulePatch { actorTableId?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; databaseId?: string | null; entityField?: string | null; entityTableId?: string | null; + membershipProfilesTableId?: string | null; + membershipProfilesTableName?: string | null; membershipsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; privateSchemaName?: string | null; + profileCapabilitiesTableId?: string | null; + profileCapabilitiesTableName?: string | null; profileDefinitionGrantsTableId?: string | null; profileDefinitionGrantsTableName?: string | null; profileGrantsTableId?: string | null; profileGrantsTableName?: string | null; - profilePermissionsTableId?: string | null; - profilePermissionsTableName?: string | null; profileTemplatesTableId?: string | null; profileTemplatesTableName?: string | null; publicSchemaName?: string | null; @@ -13956,7 +15018,7 @@ export interface CreateRateLimitMetersModuleInput { apiName?: string; checkRateLimitFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13975,7 +15037,7 @@ export interface RateLimitMetersModulePatch { apiName?: string | null; checkRateLimitFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -14139,7 +15201,7 @@ export interface CreateResourceModuleInput { resourceModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; installationStoreName?: string; @@ -14177,7 +15239,7 @@ export interface CreateResourceModuleInput { export interface ResourceModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; installationStoreName?: string | null; @@ -14264,9 +15326,11 @@ export interface CreateRouteModuleInput { clientMutationId?: string; routeModule: { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -14290,9 +15354,11 @@ export interface CreateRouteModuleInput { } export interface RouteModulePatch { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + deepLinkFunctionName?: string | null; + defaultCapabilities?: string[] | null; domainModuleId?: string | null; entityField?: string | null; entityTableId?: string | null; @@ -14322,15 +15388,39 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } -export interface CreateSecureTableProvisionInput { +export interface CreateScopeTypesModuleInput { clientMutationId?: string; - secureTableProvision: { + scopeTypesModule: { databaseId: string; - fields?: Record[]; - grants?: Record; - nodes?: Record; - outFields?: string[]; - policies?: Record; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; + }; +} +export interface ScopeTypesModulePatch { + databaseId?: string | null; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; +} +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateSecureTableProvisionInput { + clientMutationId?: string; + secureTableProvision: { + databaseId: string; + fields?: Record[]; + grants?: Record; + nodes?: Record; + outFields?: string[]; + policies?: Record; schemaId?: string; tableId?: string; tableName?: string; @@ -14426,7 +15516,7 @@ export interface CreateSiteSurfaceModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -14460,7 +15550,7 @@ export interface SiteSurfaceModulePatch { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -14563,8 +15653,8 @@ export interface CreateStorageModuleInput { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -14606,8 +15696,8 @@ export interface StorageModulePatch { catalogModuleId?: string | null; confirmUploadDelay?: IntervalInput | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMaxFileSize?: string | null; - defaultPermissions?: string[] | null; downloadUrlExpirySeconds?: number | null; endpoint?: string | null; entityField?: string | null; @@ -14828,6 +15918,34 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + userSettingsSecurityModule: { + apiName?: string; + databaseId: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + }; +} +export interface UserSettingsSecurityModulePatch { + apiName?: string | null; + databaseId?: string | null; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateUserStateModuleInput { clientMutationId?: string; userStateModule: { @@ -14969,7 +16087,7 @@ export interface CreateWebhookModuleInput { webhookModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -14994,7 +16112,7 @@ export interface CreateWebhookModuleInput { export interface WebhookModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionInvocationModuleId?: string | null; @@ -15033,6 +16151,9 @@ export const connectionFieldsMap = { blueprintTemplatesByForkedFromId: 'BlueprintTemplate', blueprintsByTemplateId: 'Blueprint', }, + CapabilitiesModule: { + dataCapabilitiesFields: 'DataCapabilitiesField', + }, CatalogModule: { apiSurfaceModules: 'ApiSurfaceModule', appModules: 'AppModule', @@ -15058,6 +16179,7 @@ export const connectionFieldsMap = { webhookModules: 'WebhookModule', }, MerkleStoreModule: { + contentPresetModules: 'ContentPresetModule', dbPresetModules: 'DbPresetModule', graphModules: 'GraphModule', pagesModules: 'PagesModule', @@ -15072,9 +16194,11 @@ export const connectionFieldsMap = { httpRouteModules: 'HttpRouteModule', }, SiteSurfaceModule: { + emailSenderModules: 'EmailSenderModule', pagesModules: 'PagesModule', }, StorageModule: { + fileRefFields: 'FileRefField', httpRouteModules: 'HttpRouteModule', }, } as Record>; @@ -15101,79 +16225,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: Record; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: Record; - policies?: Record; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: Record; - fullTextSearches?: Record; - grants?: Record; - indexes?: Record; - nodes?: Record; - policies?: Record; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: Record; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} /** A filter to be used against many `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where every related entity matches. */ @@ -15201,6 +16252,15 @@ export interface BlueprintTemplateToManyBlueprintFilter { /** Filters to entities where at least one related entity matches. */ some?: BlueprintFilter; } +/** A filter to be used against many `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleToManyDataCapabilitiesFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: DataCapabilitiesFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: DataCapabilitiesFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: DataCapabilitiesFieldFilter; +} /** A filter to be used against many `ApiSurfaceModule` object types. All fields are combined with a logical ‘and.’ */ export interface CatalogModuleToManyApiSurfaceModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15334,6 +16394,15 @@ export interface InfraSecretsModuleToManyWebhookModuleFilter { /** Filters to entities where at least one related entity matches. */ some?: WebhookModuleFilter; } +/** A filter to be used against many `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface MerkleStoreModuleToManyContentPresetModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: ContentPresetModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: ContentPresetModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ContentPresetModuleFilter; +} /** A filter to be used against many `DbPresetModule` object types. All fields are combined with a logical ‘and.’ */ export interface MerkleStoreModuleToManyDbPresetModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15445,6 +16514,15 @@ export interface JSONListFilter { /** Overlaps the specified list of values. */ overlaps?: Record[]; } +/** A filter to be used against many `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteSurfaceModuleToManyEmailSenderModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSenderModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSenderModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSenderModuleFilter; +} /** A filter to be used against many `PagesModule` object types. All fields are combined with a logical ‘and.’ */ export interface SiteSurfaceModuleToManyPagesModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15454,6 +16532,15 @@ export interface SiteSurfaceModuleToManyPagesModuleFilter { /** Filters to entities where at least one related entity matches. */ some?: PagesModuleFilter; } +/** A filter to be used against many `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface StorageModuleToManyFileRefFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: FileRefFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: FileRefFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: FileRefFieldFilter; +} /** A filter to be used against many `HttpRouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface StorageModuleToManyHttpRouteModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15469,7 +16556,7 @@ export interface AgentModuleInput { agentTableName?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -15515,7 +16602,7 @@ export interface ApiSurfaceModuleInput { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15536,7 +16623,7 @@ export interface AppModuleInput { appsTableName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15556,8 +16643,8 @@ export interface BillingModuleInput { balancesTableId?: string; balancesTableName?: string; databaseId: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: Record; - defaultPermissions?: string[]; id?: string; ledgerTableId?: string; ledgerTableName?: string; @@ -15586,16 +16673,22 @@ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -15603,8 +16696,10 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** An input for mutations affecting `Blueprint` */ export interface BlueprintInput { @@ -15701,6 +16796,31 @@ export interface BlueprintTemplateInput { /** Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private. */ visibility?: string; } +/** An input for mutations affecting `CapabilitiesModule` */ +export interface CapabilitiesModuleInput { + actorTableId?: string; + apiName?: string; + bitlen?: number; + databaseId: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; + entityTableId?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + id?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `CatalogModule` */ export interface CatalogModuleInput { apiName?: string; @@ -15708,10 +16828,12 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -15789,6 +16911,26 @@ export interface ConnectedAccountsModuleInput { tableId?: string; tableName: string; } +/** An input for mutations affecting `ContentPresetModule` */ +export interface ContentPresetModuleInput { + apiName?: string; + contentPresetsTableId?: string; + createdAt?: string; + databaseId: string; + entityTableId?: string; + id?: string; + merkleStoreModuleId: string; + policies?: Record; + prefix: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: Record; + publicSchemaId?: string; + publicSchemaName?: string; + scope: string; + storeName: string; +} /** An input for mutations affecting `CryptoAddressesModule` */ export interface CryptoAddressesModuleInput { apiName?: string; @@ -15819,6 +16961,20 @@ export interface CryptoAuthModuleInput { userField: string; usersTableId?: string; } +/** An input for mutations affecting `DataCapabilitiesField` */ +export interface DataCapabilitiesFieldInput { + capabilitiesModuleId: string; + databaseId: string; + fieldId: string; + fromFieldId?: string; + id?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId: string; +} /** An input for mutations affecting `DatabaseProvisionModule` */ export interface DatabaseProvisionModuleInput { /** When true, cold provisioning runs in the database:provision background job and the insert returns a pending ticket; when false, provisioning runs inline in the insert trigger */ @@ -15841,7 +16997,7 @@ export interface DatabaseProvisionModuleInput { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string; id?: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: Record; /** Additional configuration options for provisioning */ options?: Record; @@ -15861,7 +17017,7 @@ export interface DatabaseSettingsModuleInput { databaseId: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15966,7 +17122,7 @@ export interface DbUsageModuleInput { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; id?: string; interval?: string; @@ -16025,7 +17181,7 @@ export interface DomainModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -16047,6 +17203,29 @@ export interface DomainModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `EmailSenderModule` */ +export interface EmailSenderModuleInput { + apiName?: string; + databaseId: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + id?: string; + policies?: Record; + prefix?: string; + privateApiName?: string; + provisions?: Record; + publicSchemaName?: string; + schemaId?: string; + scope: string; + siteSurfaceModuleId?: string; +} /** An input for mutations affecting `EmailsModule` */ export interface EmailsModuleInput { apiName?: string; @@ -16074,7 +17253,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: Record; @@ -16084,9 +17263,9 @@ export interface EntityTypeProvisionInput { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -16126,8 +17305,11 @@ export interface EntityTypeProvisionInput { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean; /** Unique identifier for this provision row. */ @@ -16154,7 +17336,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: Record; @@ -16176,7 +17358,7 @@ export interface EntityTypeProvisionInput { outGraphModuleId?: string; outGraphsTableId?: string; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). * Populated by the trigger. Useful for verifying which modules were provisioned. */ outInstalledModules?: string[]; @@ -16220,7 +17402,7 @@ export interface EntityTypeProvisionInput { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -16234,8 +17416,8 @@ export interface EntityTypeProvisionInput { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean; @@ -16254,7 +17436,7 @@ export interface EntityTypeProvisionInput { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -16280,7 +17462,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -16318,7 +17500,7 @@ export interface EventsModuleInput { actorTableId?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -16327,6 +17509,7 @@ export interface EventsModuleInput { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; id?: string; interval?: string; @@ -16343,9 +17526,11 @@ export interface EventsModuleInput { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope: string; stepsRequired?: string; @@ -16355,14 +17540,28 @@ export interface EventsModuleInput { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: Record; upsertAggregate?: string; } +/** An input for mutations affecting `FileRefField` */ +export interface FileRefFieldInput { + bucketKey?: string; + bucketTags?: string[]; + databaseId: string; + enforceFk?: boolean; + fieldId: string; + id?: string; + isPublic?: boolean; + storageModuleId: string; + tableId: string; +} /** An input for mutations affecting `FunctionDeploymentModule` */ export interface FunctionDeploymentModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -16388,7 +17587,7 @@ export interface FunctionInvocationModuleInput { attemptsTableId?: string; attemptsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -16413,7 +17612,7 @@ export interface FunctionModuleInput { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -16436,7 +17635,7 @@ export interface GraphExecutionModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -16462,7 +17661,7 @@ export interface GraphModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -16486,7 +17685,7 @@ export interface HierarchyModuleInput { chartEdgesTableName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId: string; getManagersFunction?: string; @@ -16508,7 +17707,7 @@ export interface HierarchyModuleInput { export interface HttpRouteModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -16699,6 +17898,7 @@ export interface LimitsModuleInput { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: Record; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -16731,9 +17931,12 @@ export interface MembershipsModuleInput { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -16756,9 +17959,6 @@ export interface MembershipsModuleInput { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -16771,6 +17971,7 @@ export interface MembershipsModuleInput { /** An input for mutations affecting `MerkleStoreModule` */ export interface MerkleStoreModuleInput { apiName?: string; + capabilityKey?: string; commitTableId?: string; createdAt?: string; databaseId: string; @@ -16778,7 +17979,6 @@ export interface MerkleStoreModuleInput { functionPrefix?: string; id?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -16793,7 +17993,7 @@ export interface MerkleStoreModuleInput { export interface NamespaceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -16816,7 +18016,7 @@ export interface NotificationsModuleInput { apiName?: string; channelsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -16838,6 +18038,21 @@ export interface NotificationsModuleInput { suppressionsTableId?: string; userSettingsTableId?: string; } +/** An input for mutations affecting `OauthRequestsModule` */ +export interface OauthRequestsModuleInput { + databaseId: string; + entityField?: string; + entityTableId?: string; + id?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope: string; +} /** An input for mutations affecting `PagesModule` */ export interface PagesModuleInput { apiName?: string; @@ -16860,31 +18075,6 @@ export interface PagesModuleInput { sitesTableId?: string; storeNamePrefix?: string; } -/** An input for mutations affecting `PermissionsModule` */ -export interface PermissionsModuleInput { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - id?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; -} /** An input for mutations affecting `PhoneNumbersModule` */ export interface PhoneNumbersModuleInput { apiName?: string; @@ -16946,22 +18136,24 @@ export interface PrincipalAuthModuleInput { export interface ProfilesModuleInput { actorTableId?: string; apiName?: string; + capabilitiesTableId?: string; databaseId: string; entityField?: string; entityTableId?: string; id?: string; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; membershipsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; profileDefinitionGrantsTableId?: string; profileDefinitionGrantsTableName?: string; profileGrantsTableId?: string; profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; profileTemplatesTableId?: string; profileTemplatesTableName?: string; publicSchemaName?: string; @@ -16975,7 +18167,7 @@ export interface RateLimitMetersModuleInput { apiName?: string; checkRateLimitFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; id?: string; prefix?: string; privateApiName?: string; @@ -17147,7 +18339,7 @@ export interface RelationProvisionInput { export interface ResourceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -17201,9 +18393,11 @@ export interface RlsModuleInput { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -17225,6 +18419,14 @@ export interface RouteModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** An input for mutations affecting `SecureTableProvision` */ export interface SecureTableProvisionInput { /** The database this provision belongs to. Required. */ @@ -17279,7 +18481,7 @@ export interface SiteSurfaceModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -17342,8 +18544,8 @@ export interface StorageModuleInput { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -17450,6 +18652,16 @@ export interface UserSettingsModuleInput { tableId?: string; tableName?: string; } +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `UserStateModule` */ export interface UserStateModuleInput { databaseId: string; @@ -17507,7 +18719,7 @@ export interface WebauthnCredentialsModuleInput { export interface WebhookModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -17664,6 +18876,39 @@ export interface BlueprintFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface DataCapabilitiesFieldFilter { + /** Checks for all expressions in this list. */ + and?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `capabilitiesModule` relation. */ + capabilitiesModule?: CapabilitiesModuleFilter; + /** Filter by the object’s `capabilitiesModuleId` field. */ + capabilitiesModuleId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `fromFieldId` field. */ + fromFieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `mappingFieldId` field. */ + mappingFieldId?: UUIDFilter; + /** Filter by the object’s `mappingKeyFieldId` field. */ + mappingKeyFieldId?: UUIDFilter; + /** Filter by the object’s `mappingTableId` field. */ + mappingTableId?: UUIDFilter; + /** Filter by the object’s `mode` field. */ + mode?: StringFilter; + /** Negates the expression. */ + not?: DataCapabilitiesFieldFilter; + /** Checks for any expressions in this list. */ + or?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `subsetGuard` field. */ + subsetGuard?: BooleanFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} /** A filter to be used against `ApiSurfaceModule` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSurfaceModuleFilter { /** Checks for all expressions in this list. */ @@ -17694,8 +18939,8 @@ export interface ApiSurfaceModuleFilter { corsSettingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17743,8 +18988,8 @@ export interface AppModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17788,8 +19033,8 @@ export interface DomainModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -17845,6 +19090,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -17853,8 +19100,10 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ domainModule?: DomainModuleFilter; /** A related `domainModule` exists. */ @@ -17918,8 +19167,12 @@ export interface SiteSurfaceModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailSenderModules` relation. */ + emailSenderModules?: SiteSurfaceModuleToManyEmailSenderModuleFilter; + /** `emailSenderModules` exist. */ + emailSenderModulesExist?: boolean; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17993,8 +19246,8 @@ export interface WebhookModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18064,8 +19317,8 @@ export interface FunctionDeploymentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deploymentEventsTableId` field. */ deploymentEventsTableId?: UUIDFilter; /** Filter by the object’s `deploymentEventsTableName` field. */ @@ -18123,8 +19376,8 @@ export interface HttpRouteModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18188,8 +19441,8 @@ export interface GraphExecutionModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18235,6 +19488,51 @@ export interface GraphExecutionModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +/** A filter to be used against `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ContentPresetModuleFilter { + /** Checks for all expressions in this list. */ + and?: ContentPresetModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `contentPresetsTableId` field. */ + contentPresetsTableId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `merkleStoreModule` relation. */ + merkleStoreModule?: MerkleStoreModuleFilter; + /** Filter by the object’s `merkleStoreModuleId` field. */ + merkleStoreModuleId?: UUIDFilter; + /** Negates the expression. */ + not?: ContentPresetModuleFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaId` field. */ + publicSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `storeName` field. */ + storeName?: StringFilter; +} /** A filter to be used against `DbPresetModule` object types. All fields are combined with a logical ‘and.’ */ export interface DbPresetModuleFilter { /** Checks for all expressions in this list. */ @@ -18290,8 +19588,8 @@ export interface GraphModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18392,8 +19690,8 @@ export interface ResourceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18477,6 +19775,88 @@ export interface ResourceModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +/** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSenderModuleFilter { + /** Checks for all expressions in this list. */ + and?: EmailSenderModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailIdentitiesTableId` field. */ + emailIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesTableName` field. */ + emailIdentitiesTableName?: StringFilter; + /** Filter by the object’s `emailProviderAccountsTableId` field. */ + emailProviderAccountsTableId?: UUIDFilter; + /** Filter by the object’s `emailProviderAccountsTableName` field. */ + emailProviderAccountsTableName?: StringFilter; + /** Filter by the object’s `emailSiteIdentitiesTableId` field. */ + emailSiteIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentitiesTableName` field. */ + emailSiteIdentitiesTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSenderModuleFilter; + /** Checks for any expressions in this list. */ + or?: EmailSenderModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `siteSurfaceModule` relation. */ + siteSurfaceModule?: SiteSurfaceModuleFilter; + /** A related `siteSurfaceModule` exists. */ + siteSurfaceModuleExists?: boolean; + /** Filter by the object’s `siteSurfaceModuleId` field. */ + siteSurfaceModuleId?: UUIDFilter; +} +/** A filter to be used against `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface FileRefFieldFilter { + /** Checks for all expressions in this list. */ + and?: FileRefFieldFilter[]; + /** Filter by the object’s `bucketKey` field. */ + bucketKey?: StringFilter; + /** Filter by the object’s `bucketTags` field. */ + bucketTags?: StringListFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `enforceFk` field. */ + enforceFk?: BooleanFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublic` field. */ + isPublic?: BooleanFilter; + /** Negates the expression. */ + not?: FileRefFieldFilter; + /** Checks for any expressions in this list. */ + or?: FileRefFieldFilter[]; + /** Filter by the object’s `storageModule` relation. */ + storageModule?: StorageModuleFilter; + /** Filter by the object’s `storageModuleId` field. */ + storageModuleId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ export interface UUIDFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -18703,6 +20083,88 @@ export interface IntFilter { /** Not included in the specified list. */ notIn?: number[]; } +/** A filter to be used against `CapabilitiesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleFilter { + /** Filter by the object’s `actorTableId` field. */ + actorTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `bitlen` field. */ + bitlen?: IntFilter; + /** Filter by the object’s `dataCapabilitiesFields` relation. */ + dataCapabilitiesFields?: CapabilitiesModuleToManyDataCapabilitiesFieldFilter; + /** `dataCapabilitiesFields` exist. */ + dataCapabilitiesFieldsExist?: boolean; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultTableId` field. */ + defaultTableId?: UUIDFilter; + /** Filter by the object’s `defaultTableName` field. */ + defaultTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `getByMask` field. */ + getByMask?: StringFilter; + /** Filter by the object’s `getMask` field. */ + getMask?: StringFilter; + /** Filter by the object’s `getMaskByName` field. */ + getMaskByName?: StringFilter; + /** Filter by the object’s `getPaddedMask` field. */ + getPaddedMask?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: CapabilitiesModuleFilter; + /** Checks for any expressions in this list. */ + or?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: boolean; + /** Equal to the specified value. */ + equalTo?: boolean; + /** Greater than the specified value. */ + greaterThan?: boolean; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: boolean; + /** Included in the specified list. */ + in?: boolean[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: boolean; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: boolean; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: boolean; + /** Not equal to the specified value. */ + notEqualTo?: boolean; + /** Not included in the specified list. */ + notIn?: boolean[]; +} /** A filter to be used against `CatalogModule` object types. All fields are combined with a logical ‘and.’ */ export interface CatalogModuleFilter { /** Checks for all expressions in this list. */ @@ -18725,14 +20187,18 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ bucketsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModules` relation. */ domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ @@ -18822,8 +20288,8 @@ export interface FunctionInvocationModuleFilter { attemptsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18879,8 +20345,8 @@ export interface FunctionModuleFilter { capabilityBindingsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `definitionsTableId` field. */ definitionsTableId?: UUIDFilter; /** Filter by the object’s `definitionsTableName` field. */ @@ -18983,8 +20449,8 @@ export interface NamespaceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -19054,10 +20520,10 @@ export interface StorageModuleFilter { confirmUploadDelay?: IntervalFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMaxFileSize` field. */ defaultMaxFileSize?: BigIntFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `downloadUrlExpirySeconds` field. */ downloadUrlExpirySeconds?: IntFilter; /** Filter by the object’s `endpoint` field. */ @@ -19068,6 +20534,10 @@ export interface StorageModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `fileEventsTableId` field. */ fileEventsTableId?: UUIDFilter; + /** Filter by the object’s `fileRefFields` relation. */ + fileRefFields?: StorageModuleToManyFileRefFieldFilter; + /** `fileRefFields` exist. */ + fileRefFieldsExist?: boolean; /** Filter by the object’s `filesTableId` field. */ filesTableId?: UUIDFilter; /** Filter by the object’s `filesTableName` field. */ @@ -19135,8 +20605,14 @@ export interface MerkleStoreModuleFilter { and?: MerkleStoreModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilityKey` field. */ + capabilityKey?: StringFilter; /** Filter by the object’s `commitTableId` field. */ commitTableId?: UUIDFilter; + /** Filter by the object’s `contentPresetModules` relation. */ + contentPresetModules?: MerkleStoreModuleToManyContentPresetModuleFilter; + /** `contentPresetModules` exist. */ + contentPresetModulesExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -19165,8 +20641,6 @@ export interface MerkleStoreModuleFilter { pagesModules?: MerkleStoreModuleToManyPagesModuleFilter; /** `pagesModules` exist. */ pagesModulesExist?: boolean; - /** Filter by the object’s `permissionKey` field. */ - permissionKey?: StringFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -19190,31 +20664,6 @@ export interface MerkleStoreModuleFilter { /** Filter by the object’s `storeTableId` field. */ storeTableId?: UUIDFilter; } -/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ -export interface BooleanFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: boolean; - /** Equal to the specified value. */ - equalTo?: boolean; - /** Greater than the specified value. */ - greaterThan?: boolean; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: boolean; - /** Included in the specified list. */ - in?: boolean[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: boolean; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: boolean; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: boolean; - /** Not equal to the specified value. */ - notEqualTo?: boolean; - /** Not included in the specified list. */ - notIn?: boolean[]; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -19251,89 +20700,33 @@ export type ConstructBlueprintPayloadSelect = { }; export interface CopyTemplateToBlueprintPayload { clientMutationId?: string | null; - result?: string | null; -} -export type CopyTemplateToBlueprintPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionBucketPayload { - /** The access type applied */ - accessType: string; - /** The S3 bucket name that was provisioned */ - bucketName: string; - /** The S3 endpoint (null for AWS S3 default) */ - endpoint?: string | null; - /** Error message if provisioning failed */ - error?: string | null; - /** The storage provider used */ - provider: string; - /** Whether provisioning succeeded */ - success: boolean; -} -export type ProvisionBucketPayloadSelect = { - accessType?: boolean; - bucketName?: boolean; - endpoint?: boolean; - error?: boolean; - provider?: boolean; - success?: boolean; -}; -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionCheckConstraintPayloadSelect = { - clientMutationId?: boolean; -}; -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionFullTextSearchPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionIndexPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export type ProvisionRelationPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionRelationRecordSelect; - }; -}; -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionSpatialRelationPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; + result?: string | null; } -export type ProvisionTablePayloadSelect = { +export type CopyTemplateToBlueprintPayloadSelect = { clientMutationId?: boolean; - result?: { - select: ProvisionTableRecordSelect; - }; + result?: boolean; }; -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; +export interface ProvisionBucketPayload { + /** The access type applied */ + accessType: string; + /** The S3 bucket name that was provisioned */ + bucketName: string; + /** The S3 endpoint (null for AWS S3 default) */ + endpoint?: string | null; + /** Error message if provisioning failed */ + error?: string | null; + /** The storage provider used */ + provider: string; + /** Whether provisioning succeeded */ + success: boolean; } -export type ProvisionUniqueConstraintPayloadSelect = { - clientMutationId?: boolean; +export type ProvisionBucketPayloadSelect = { + accessType?: boolean; + bucketName?: boolean; + endpoint?: boolean; + error?: boolean; + provider?: boolean; + success?: boolean; }; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ @@ -19695,6 +21088,51 @@ export type DeleteBlueprintTemplatePayloadSelect = { }; clientMutationId?: boolean; }; +export interface CreateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was created by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type CreateCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was updated by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type UpdateCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was deleted by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type DeleteCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateCatalogModulePayload { /** The `CatalogModule` that was created by this mutation. */ catalogModule?: CatalogModule | null; @@ -19875,6 +21313,51 @@ export type DeleteConnectedAccountsModulePayloadSelect = { select: ConnectedAccountsModuleEdgeSelect; }; }; +export interface CreateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was created by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type CreateContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; +export interface UpdateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was updated by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type UpdateContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; +export interface DeleteContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was deleted by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type DeleteContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; export interface CreateCryptoAddressesModulePayload { clientMutationId?: string | null; /** The `CryptoAddressesModule` that was created by this mutation. */ @@ -19965,6 +21448,51 @@ export type DeleteCryptoAuthModulePayloadSelect = { select: CryptoAuthModuleEdgeSelect; }; }; +export interface CreateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was created by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type CreateDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; +export interface UpdateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was updated by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type UpdateDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; +export interface DeleteDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was deleted by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type DeleteDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -20415,6 +21943,51 @@ export type DeleteDomainModulePayloadSelect = { select: DomainModuleEdgeSelect; }; }; +export interface CreateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was created by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type CreateEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; +export interface UpdateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was updated by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type UpdateEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; +export interface DeleteEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was deleted by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type DeleteEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; export interface CreateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was created by this mutation. */ @@ -20550,6 +22123,51 @@ export type DeleteEventsModulePayloadSelect = { select: EventsModuleEdgeSelect; }; }; +export interface CreateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was created by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type CreateFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; +export interface UpdateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was updated by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type UpdateFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; +export interface DeleteFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was deleted by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type DeleteFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; export interface CreateFunctionDeploymentModulePayload { clientMutationId?: string | null; /** The `FunctionDeploymentModule` that was created by this mutation. */ @@ -21495,6 +23113,51 @@ export type DeleteNotificationsModulePayloadSelect = { select: NotificationsModuleEdgeSelect; }; }; +export interface CreateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was created by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type CreateOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; +export interface UpdateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was updated by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type UpdateOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; +export interface DeleteOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was deleted by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type DeleteOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; export interface CreatePagesModulePayload { clientMutationId?: string | null; /** The `PagesModule` that was created by this mutation. */ @@ -21540,51 +23203,6 @@ export type DeletePagesModulePayloadSelect = { select: PagesModuleEdgeSelect; }; }; -export interface CreatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was created by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type CreatePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; -export interface UpdatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was updated by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type UpdatePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; -export interface DeletePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was deleted by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type DeletePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; export interface CreatePhoneNumbersModulePayload { clientMutationId?: string | null; /** The `PhoneNumbersModule` that was created by this mutation. */ @@ -22080,6 +23698,51 @@ export type DeleteRouteModulePayloadSelect = { select: RouteModuleEdgeSelect; }; }; +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type CreateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type UpdateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type DeleteScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -22530,6 +24193,51 @@ export type DeleteUserSettingsModulePayloadSelect = { select: UserSettingsModuleEdgeSelect; }; }; +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type CreateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type UpdateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type DeleteUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -22755,26 +24463,6 @@ export type DeleteWebhookModulePayloadSelect = { select: WebhookModuleEdgeSelect; }; }; -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export type ProvisionRelationRecordSelect = { - outFieldId?: boolean; - outJunctionTableId?: boolean; - outSourceFieldId?: boolean; - outTargetFieldId?: boolean; -}; -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} -export type ProvisionTableRecordSelect = { - outFields?: boolean; - outTableId?: boolean; -}; /** A `AgentModule` edge in the connection. */ export interface AgentModuleEdge { cursor?: string | null; @@ -22871,6 +24559,18 @@ export type BlueprintTemplateEdgeSelect = { select: BlueprintTemplateSelect; }; }; +/** A `CapabilitiesModule` edge in the connection. */ +export interface CapabilitiesModuleEdge { + cursor?: string | null; + /** The `CapabilitiesModule` at the end of the edge. */ + node?: CapabilitiesModule | null; +} +export type CapabilitiesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: CapabilitiesModuleSelect; + }; +}; /** A `CatalogModule` edge in the connection. */ export interface CatalogModuleEdge { cursor?: string | null; @@ -22919,6 +24619,18 @@ export type ConnectedAccountsModuleEdgeSelect = { select: ConnectedAccountsModuleSelect; }; }; +/** A `ContentPresetModule` edge in the connection. */ +export interface ContentPresetModuleEdge { + cursor?: string | null; + /** The `ContentPresetModule` at the end of the edge. */ + node?: ContentPresetModule | null; +} +export type ContentPresetModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ContentPresetModuleSelect; + }; +}; /** A `CryptoAddressesModule` edge in the connection. */ export interface CryptoAddressesModuleEdge { cursor?: string | null; @@ -22943,6 +24655,18 @@ export type CryptoAuthModuleEdgeSelect = { select: CryptoAuthModuleSelect; }; }; +/** A `DataCapabilitiesField` edge in the connection. */ +export interface DataCapabilitiesFieldEdge { + cursor?: string | null; + /** The `DataCapabilitiesField` at the end of the edge. */ + node?: DataCapabilitiesField | null; +} +export type DataCapabilitiesFieldEdgeSelect = { + cursor?: boolean; + node?: { + select: DataCapabilitiesFieldSelect; + }; +}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -23063,6 +24787,18 @@ export type DomainModuleEdgeSelect = { select: DomainModuleSelect; }; }; +/** A `EmailSenderModule` edge in the connection. */ +export interface EmailSenderModuleEdge { + cursor?: string | null; + /** The `EmailSenderModule` at the end of the edge. */ + node?: EmailSenderModule | null; +} +export type EmailSenderModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailSenderModuleSelect; + }; +}; /** A `EmailsModule` edge in the connection. */ export interface EmailsModuleEdge { cursor?: string | null; @@ -23099,6 +24835,18 @@ export type EventsModuleEdgeSelect = { select: EventsModuleSelect; }; }; +/** A `FileRefField` edge in the connection. */ +export interface FileRefFieldEdge { + cursor?: string | null; + /** The `FileRefField` at the end of the edge. */ + node?: FileRefField | null; +} +export type FileRefFieldEdgeSelect = { + cursor?: boolean; + node?: { + select: FileRefFieldSelect; + }; +}; /** A `FunctionDeploymentModule` edge in the connection. */ export interface FunctionDeploymentModuleEdge { cursor?: string | null; @@ -23351,28 +25099,28 @@ export type NotificationsModuleEdgeSelect = { select: NotificationsModuleSelect; }; }; -/** A `PagesModule` edge in the connection. */ -export interface PagesModuleEdge { +/** A `OauthRequestsModule` edge in the connection. */ +export interface OauthRequestsModuleEdge { cursor?: string | null; - /** The `PagesModule` at the end of the edge. */ - node?: PagesModule | null; + /** The `OauthRequestsModule` at the end of the edge. */ + node?: OauthRequestsModule | null; } -export type PagesModuleEdgeSelect = { +export type OauthRequestsModuleEdgeSelect = { cursor?: boolean; node?: { - select: PagesModuleSelect; + select: OauthRequestsModuleSelect; }; }; -/** A `PermissionsModule` edge in the connection. */ -export interface PermissionsModuleEdge { +/** A `PagesModule` edge in the connection. */ +export interface PagesModuleEdge { cursor?: string | null; - /** The `PermissionsModule` at the end of the edge. */ - node?: PermissionsModule | null; + /** The `PagesModule` at the end of the edge. */ + node?: PagesModule | null; } -export type PermissionsModuleEdgeSelect = { +export type PagesModuleEdgeSelect = { cursor?: boolean; node?: { - select: PermissionsModuleSelect; + select: PagesModuleSelect; }; }; /** A `PhoneNumbersModule` edge in the connection. */ @@ -23507,6 +25255,18 @@ export type RouteModuleEdgeSelect = { select: RouteModuleSelect; }; }; +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} +export type ScopeTypesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ScopeTypesModuleSelect; + }; +}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -23627,6 +25387,18 @@ export type UserSettingsModuleEdgeSelect = { select: UserSettingsModuleSelect; }; }; +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} +export type UserSettingsSecurityModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: UserSettingsSecurityModuleSelect; + }; +}; /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/modules/orm/models/capabilitiesModule.ts b/sdk/constructive-react/src/modules/orm/models/capabilitiesModule.ts new file mode 100644 index 0000000000..60aa4dabf4 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/capabilitiesModule.ts @@ -0,0 +1,245 @@ +/** + * CapabilitiesModule 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 { + CapabilitiesModule, + CapabilitiesModuleWithRelations, + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy, + CreateCapabilitiesModuleInput, + UpdateCapabilitiesModuleInput, + CapabilitiesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class CapabilitiesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + 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, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModule', + document, + variables, + transform: (data: { + capabilitiesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + capabilitiesModule: data.capabilitiesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModule', + document, + variables, + transform: (data: { + capabilitiesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + capabilitiesModule: data.capabilitiesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'CapabilitiesModule', + 'createCapabilitiesModule', + 'capabilitiesModule', + args.select, + args.data, + 'CreateCapabilitiesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'createCapabilitiesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + CapabilitiesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'CapabilitiesModule', + 'updateCapabilitiesModule', + 'capabilitiesModule', + args.select, + args.where.id, + args.data, + 'UpdateCapabilitiesModuleInput', + 'id', + 'capabilitiesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'updateCapabilitiesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'CapabilitiesModule', + 'deleteCapabilitiesModule', + 'capabilitiesModule', + { + id: args.where.id, + }, + 'DeleteCapabilitiesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'deleteCapabilitiesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/contentPresetModule.ts b/sdk/constructive-react/src/modules/orm/models/contentPresetModule.ts new file mode 100644 index 0000000000..b756c7a1b2 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/contentPresetModule.ts @@ -0,0 +1,245 @@ +/** + * ContentPresetModule 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 { + ContentPresetModule, + ContentPresetModuleWithRelations, + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy, + CreateContentPresetModuleInput, + UpdateContentPresetModuleInput, + ContentPresetModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ContentPresetModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ContentPresetModule', + 'contentPresetModules', + 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, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ContentPresetModule', + 'contentPresetModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModule', + document, + variables, + transform: (data: { + contentPresetModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + contentPresetModule: data.contentPresetModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ContentPresetModule', + 'contentPresetModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModule', + document, + variables, + transform: (data: { + contentPresetModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + contentPresetModule: data.contentPresetModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ContentPresetModule', + 'createContentPresetModule', + 'contentPresetModule', + args.select, + args.data, + 'CreateContentPresetModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'createContentPresetModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ContentPresetModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ContentPresetModule', + 'updateContentPresetModule', + 'contentPresetModule', + args.select, + args.where.id, + args.data, + 'UpdateContentPresetModuleInput', + 'id', + 'contentPresetModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'updateContentPresetModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ContentPresetModule', + 'deleteContentPresetModule', + 'contentPresetModule', + { + id: args.where.id, + }, + 'DeleteContentPresetModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'deleteContentPresetModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/dataCapabilitiesField.ts b/sdk/constructive-react/src/modules/orm/models/dataCapabilitiesField.ts new file mode 100644 index 0000000000..f2d9ae971b --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/dataCapabilitiesField.ts @@ -0,0 +1,247 @@ +/** + * DataCapabilitiesField 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 { + DataCapabilitiesField, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy, + CreateDataCapabilitiesFieldInput, + UpdateDataCapabilitiesFieldInput, + DataCapabilitiesFieldPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class DataCapabilitiesFieldModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesFields: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + 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, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesFields', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesField: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesField', + document, + variables, + transform: (data: { + dataCapabilitiesFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + dataCapabilitiesField: data.dataCapabilitiesFields?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesField: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesField', + document, + variables, + transform: (data: { + dataCapabilitiesFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + dataCapabilitiesField: data.dataCapabilitiesFields?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'DataCapabilitiesField', + 'createDataCapabilitiesField', + 'dataCapabilitiesField', + args.select, + args.data, + 'CreateDataCapabilitiesFieldInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'createDataCapabilitiesField', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + DataCapabilitiesFieldPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'DataCapabilitiesField', + 'updateDataCapabilitiesField', + 'dataCapabilitiesField', + args.select, + args.where.id, + args.data, + 'UpdateDataCapabilitiesFieldInput', + 'id', + 'dataCapabilitiesFieldPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'updateDataCapabilitiesField', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'DataCapabilitiesField', + 'deleteDataCapabilitiesField', + 'dataCapabilitiesField', + { + id: args.where.id, + }, + 'DeleteDataCapabilitiesFieldInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'deleteDataCapabilitiesField', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/permissionsModule.ts b/sdk/constructive-react/src/modules/orm/models/emailSenderModule.ts similarity index 51% rename from sdk/constructive-react/src/modules/orm/models/permissionsModule.ts rename to sdk/constructive-react/src/modules/orm/models/emailSenderModule.ts index 2a330457b5..3f5f0f6385 100644 --- a/sdk/constructive-react/src/modules/orm/models/permissionsModule.ts +++ b/sdk/constructive-react/src/modules/orm/models/emailSenderModule.ts @@ -1,5 +1,5 @@ /** - * PermissionsModule model for ORM client + * EmailSenderModule 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 { - PermissionsModule, - PermissionsModuleWithRelations, - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy, - CreatePermissionsModuleInput, - UpdatePermissionsModuleInput, - PermissionsModulePatch, + EmailSenderModule, + EmailSenderModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy, + CreateEmailSenderModuleInput, + UpdateEmailSenderModuleInput, + EmailSenderModulePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PermissionsModuleModel { +export class EmailSenderModuleModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModules: ConnectionResult>; + emailSenderModules: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PermissionsModuleModel { before: args?.before, offset: args?.offset, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModules', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModules', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModule', document, variables, transform: (data: { - permissionsModules?: { - nodes?: InferSelectResult[]; + emailSenderModules?: { + nodes?: InferSelectResult[]; }; }) => ({ - permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + emailSenderModule: data.emailSenderModules?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: { @@ -124,91 +124,91 @@ export class PermissionsModuleModel { }, first: 1, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModule', document, variables, transform: (data: { - permissionsModules?: { - nodes?: InferSelectResult[]; + emailSenderModules?: { + nodes?: InferSelectResult[]; }; }) => ({ - permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + emailSenderModule: data.emailSenderModules?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPermissionsModule: { - permissionsModule: InferSelectResult; + createEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PermissionsModule', - 'createPermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'createEmailSenderModule', + 'emailSenderModule', args.select, args.data, - 'CreatePermissionsModuleInput', + 'CreateEmailSenderModuleInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'createPermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'createEmailSenderModule', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PermissionsModulePatch + EmailSenderModulePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePermissionsModule: { - permissionsModule: InferSelectResult; + updateEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PermissionsModule', - 'updatePermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'updateEmailSenderModule', + 'emailSenderModule', args.select, args.where.id, args.data, - 'UpdatePermissionsModuleInput', + 'UpdateEmailSenderModuleInput', 'id', - 'permissionsModulePatch', + 'emailSenderModulePatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'updatePermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'updateEmailSenderModule', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PermissionsModuleModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePermissionsModule: { - permissionsModule: InferSelectResult; + deleteEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PermissionsModule', - 'deletePermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'deleteEmailSenderModule', + 'emailSenderModule', { id: args.where.id, }, - 'DeletePermissionsModuleInput', + 'DeleteEmailSenderModuleInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'deletePermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'deleteEmailSenderModule', document, variables, }); diff --git a/sdk/constructive-react/src/modules/orm/models/fileRefField.ts b/sdk/constructive-react/src/modules/orm/models/fileRefField.ts new file mode 100644 index 0000000000..130f0d6858 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/fileRefField.ts @@ -0,0 +1,245 @@ +/** + * FileRefField 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 { + FileRefField, + FileRefFieldWithRelations, + FileRefFieldSelect, + FileRefFieldFilter, + FileRefFieldOrderBy, + CreateFileRefFieldInput, + UpdateFileRefFieldInput, + FileRefFieldPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class FileRefFieldModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefFields: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'FileRefField', + 'fileRefFields', + 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, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefFields', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefField: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'FileRefField', + 'fileRefFields', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefField', + document, + variables, + transform: (data: { + fileRefFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fileRefField: data.fileRefFields?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefField: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'FileRefField', + 'fileRefFields', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefField', + document, + variables, + transform: (data: { + fileRefFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fileRefField: data.fileRefFields?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'FileRefField', + 'createFileRefField', + 'fileRefField', + args.select, + args.data, + 'CreateFileRefFieldInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'createFileRefField', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + FileRefFieldPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'FileRefField', + 'updateFileRefField', + 'fileRefField', + args.select, + args.where.id, + args.data, + 'UpdateFileRefFieldInput', + 'id', + 'fileRefFieldPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'updateFileRefField', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'FileRefField', + 'deleteFileRefField', + 'fileRefField', + { + id: args.where.id, + }, + 'DeleteFileRefFieldInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'deleteFileRefField', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/index.ts b/sdk/constructive-react/src/modules/orm/models/index.ts index 55e18104c1..beb1e2e872 100644 --- a/sdk/constructive-react/src/modules/orm/models/index.ts +++ b/sdk/constructive-react/src/modules/orm/models/index.ts @@ -11,12 +11,15 @@ export { BillingProviderModuleModel } from './billingProviderModule'; export { BlueprintModel } from './blueprint'; export { BlueprintConstructionModel } from './blueprintConstruction'; export { BlueprintTemplateModel } from './blueprintTemplate'; +export { CapabilitiesModuleModel } from './capabilitiesModule'; export { CatalogModuleModel } from './catalogModule'; export { ComputeLogModuleModel } from './computeLogModule'; export { ConfigSecretsUserModuleModel } from './configSecretsUserModule'; export { ConnectedAccountsModuleModel } from './connectedAccountsModule'; +export { ContentPresetModuleModel } from './contentPresetModule'; export { CryptoAddressesModuleModel } from './cryptoAddressesModule'; export { CryptoAuthModuleModel } from './cryptoAuthModule'; +export { DataCapabilitiesFieldModel } from './dataCapabilitiesField'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { DatabaseSettingsModuleModel } from './databaseSettingsModule'; export { DbPoolConfigModel } from './dbPoolConfig'; @@ -27,9 +30,11 @@ export { DefaultIdsModuleModel } from './defaultIdsModule'; export { DenormalizedTableFieldModel } from './denormalizedTableField'; export { DevicesModuleModel } from './devicesModule'; export { DomainModuleModel } from './domainModule'; +export { EmailSenderModuleModel } from './emailSenderModule'; export { EmailsModuleModel } from './emailsModule'; export { EntityTypeProvisionModel } from './entityTypeProvision'; export { EventsModuleModel } from './eventsModule'; +export { FileRefFieldModel } from './fileRefField'; export { FunctionDeploymentModuleModel } from './functionDeploymentModule'; export { FunctionInvocationModuleModel } from './functionInvocationModule'; export { FunctionModuleModel } from './functionModule'; @@ -51,8 +56,8 @@ export { MembershipsModuleModel } from './membershipsModule'; export { MerkleStoreModuleModel } from './merkleStoreModule'; export { NamespaceModuleModel } from './namespaceModule'; export { NotificationsModuleModel } from './notificationsModule'; +export { OauthRequestsModuleModel } from './oauthRequestsModule'; export { PagesModuleModel } from './pagesModule'; -export { PermissionsModuleModel } from './permissionsModule'; export { PhoneNumbersModuleModel } from './phoneNumbersModule'; export { PlansModuleModel } from './plansModule'; export { PrincipalAuthModuleModel } from './principalAuthModule'; @@ -64,6 +69,7 @@ export { RelationProvisionModel } from './relationProvision'; export { ResourceModuleModel } from './resourceModule'; export { RlsModuleModel } from './rlsModule'; export { RouteModuleModel } from './routeModule'; +export { ScopeTypesModuleModel } from './scopeTypesModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SessionsModuleModel } from './sessionsModule'; @@ -74,6 +80,7 @@ export { TransferLogModuleModel } from './transferLogModule'; export { UserAuthModuleModel } from './userAuthModule'; export { UserCredentialsModuleModel } from './userCredentialsModule'; export { UserSettingsModuleModel } from './userSettingsModule'; +export { UserSettingsSecurityModuleModel } from './userSettingsSecurityModule'; export { UserStateModuleModel } from './userStateModule'; export { UsersModuleModel } from './usersModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; diff --git a/sdk/constructive-react/src/modules/orm/models/oauthRequestsModule.ts b/sdk/constructive-react/src/modules/orm/models/oauthRequestsModule.ts new file mode 100644 index 0000000000..a874125a9e --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/oauthRequestsModule.ts @@ -0,0 +1,245 @@ +/** + * OauthRequestsModule 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 { + OauthRequestsModule, + OauthRequestsModuleWithRelations, + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy, + CreateOauthRequestsModuleInput, + UpdateOauthRequestsModuleInput, + OauthRequestsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OauthRequestsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + 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, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModule', + document, + variables, + transform: (data: { + oauthRequestsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + oauthRequestsModule: data.oauthRequestsModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModule', + document, + variables, + transform: (data: { + oauthRequestsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + oauthRequestsModule: data.oauthRequestsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OauthRequestsModule', + 'createOauthRequestsModule', + 'oauthRequestsModule', + args.select, + args.data, + 'CreateOauthRequestsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'createOauthRequestsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OauthRequestsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OauthRequestsModule', + 'updateOauthRequestsModule', + 'oauthRequestsModule', + args.select, + args.where.id, + args.data, + 'UpdateOauthRequestsModuleInput', + 'id', + 'oauthRequestsModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'updateOauthRequestsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OauthRequestsModule', + 'deleteOauthRequestsModule', + 'oauthRequestsModule', + { + id: args.where.id, + }, + 'DeleteOauthRequestsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'deleteOauthRequestsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts b/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts new file mode 100644 index 0000000000..1cbd281d05 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts @@ -0,0 +1,245 @@ +/** + * ScopeTypesModule 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 { + ScopeTypesModule, + ScopeTypesModuleWithRelations, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, + CreateScopeTypesModuleInput, + UpdateScopeTypesModuleInput, + ScopeTypesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ScopeTypesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + 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, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ScopeTypesModule', + 'createScopeTypesModule', + 'scopeTypesModule', + args.select, + args.data, + 'CreateScopeTypesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'createScopeTypesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ScopeTypesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ScopeTypesModule', + 'updateScopeTypesModule', + 'scopeTypesModule', + args.select, + args.where.id, + args.data, + 'UpdateScopeTypesModuleInput', + 'id', + 'scopeTypesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'updateScopeTypesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ScopeTypesModule', + 'deleteScopeTypesModule', + 'scopeTypesModule', + { + id: args.where.id, + }, + 'DeleteScopeTypesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'deleteScopeTypesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts b/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts new file mode 100644 index 0000000000..13b7c87010 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts @@ -0,0 +1,253 @@ +/** + * UserSettingsSecurityModule 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 { + UserSettingsSecurityModule, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, + CreateUserSettingsSecurityModuleInput, + UpdateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserSettingsSecurityModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + 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, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserSettingsSecurityModule', + 'createUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.data, + 'CreateUserSettingsSecurityModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'createUserSettingsSecurityModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + UserSettingsSecurityModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'UserSettingsSecurityModule', + 'updateUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.where.id, + args.data, + 'UpdateUserSettingsSecurityModuleInput', + 'id', + 'userSettingsSecurityModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'updateUserSettingsSecurityModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'UserSettingsSecurityModule', + 'deleteUserSettingsSecurityModule', + 'userSettingsSecurityModule', + { + id: args.where.id, + }, + 'DeleteUserSettingsSecurityModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'deleteUserSettingsSecurityModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/mutation/index.ts b/sdk/constructive-react/src/modules/orm/mutation/index.ts index 60041efadb..5450eca294 100644 --- a/sdk/constructive-react/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-react/src/modules/orm/mutation/index.ts @@ -10,33 +10,12 @@ import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, - ProvisionCheckConstraintInput, - ProvisionFullTextSearchInput, - ProvisionIndexInput, - ProvisionRelationInput, - ProvisionSpatialRelationInput, - ProvisionTableInput, - ProvisionUniqueConstraintInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, - ProvisionCheckConstraintPayload, - ProvisionFullTextSearchPayload, - ProvisionIndexPayload, - ProvisionRelationPayload, - ProvisionSpatialRelationPayload, - ProvisionTablePayload, - ProvisionUniqueConstraintPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, - ProvisionCheckConstraintPayloadSelect, - ProvisionFullTextSearchPayloadSelect, - ProvisionIndexPayloadSelect, - ProvisionRelationPayloadSelect, - ProvisionSpatialRelationPayloadSelect, - ProvisionTablePayloadSelect, - ProvisionUniqueConstraintPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** @@ -63,55 +42,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -/** - * Variables for provisionCheckConstraint - * Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - */ -export interface ProvisionCheckConstraintVariables { - input: ProvisionCheckConstraintInput; -} -/** - * Variables for provisionFullTextSearch - * 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. - */ -export interface ProvisionFullTextSearchVariables { - input: ProvisionFullTextSearchInput; -} -/** - * Variables for provisionIndex - * 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. - */ -export interface ProvisionIndexVariables { - input: ProvisionIndexInput; -} -/** - * Variables for provisionRelation - * 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). - */ -export interface ProvisionRelationVariables { - input: ProvisionRelationInput; -} -/** - * 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; -} -/** - * Variables for provisionTable - * 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). - */ -export interface ProvisionTableVariables { - input: ProvisionTableInput; -} -/** - * Variables for provisionUniqueConstraint - * 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. - */ -export interface ProvisionUniqueConstraintVariables { - input: ProvisionUniqueConstraintInput; -} export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( @@ -201,208 +131,5 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - provisionCheckConstraint: ( - args: ProvisionCheckConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionCheckConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionCheckConstraint', - fieldName: 'provisionCheckConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionCheckConstraint', - 'provisionCheckConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionCheckConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionCheckConstraintPayload' - ), - }), - provisionFullTextSearch: ( - args: ProvisionFullTextSearchVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionFullTextSearch: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionFullTextSearch', - fieldName: 'provisionFullTextSearch', - ...buildCustomDocument( - 'mutation', - 'ProvisionFullTextSearch', - 'provisionFullTextSearch', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionFullTextSearchInput!', - }, - ], - connectionFieldsMap, - 'ProvisionFullTextSearchPayload' - ), - }), - provisionIndex: ( - args: ProvisionIndexVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionIndex: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionIndex', - fieldName: 'provisionIndex', - ...buildCustomDocument( - 'mutation', - 'ProvisionIndex', - 'provisionIndex', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionIndexInput!', - }, - ], - connectionFieldsMap, - 'ProvisionIndexPayload' - ), - }), - provisionRelation: ( - args: ProvisionRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionRelation', - fieldName: 'provisionRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionRelation', - 'provisionRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionRelationPayload' - ), - }), - 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' - ), - }), - provisionTable: ( - args: ProvisionTableVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionTable: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionTable', - fieldName: 'provisionTable', - ...buildCustomDocument( - 'mutation', - 'ProvisionTable', - 'provisionTable', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionTableInput!', - }, - ], - connectionFieldsMap, - 'ProvisionTablePayload' - ), - }), - provisionUniqueConstraint: ( - args: ProvisionUniqueConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionUniqueConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionUniqueConstraint', - fieldName: 'provisionUniqueConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionUniqueConstraint', - 'provisionUniqueConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionUniqueConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionUniqueConstraintPayload' - ), - }), }; } diff --git a/sdk/constructive-react/src/modules/orm/query/index.ts b/sdk/constructive-react/src/modules/orm/query/index.ts deleted file mode 100644 index 70496d57ba..0000000000 --- a/sdk/constructive-react/src/modules/orm/query/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Custom query operations - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { QueryBuilder, buildCustomDocument } from '../query-builder'; -import type { InferSelectResult, StrictSelect } from '../select-types'; -import { connectionFieldsMap } from '../input-types'; -/** - * 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; - fieldName?: string; - tableId?: string; -} -/** - * Variables for resolveBlueprintTable - * 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. - */ -export interface ResolveBlueprintTableVariables { - databaseId?: string; - defaultSchemaId?: string; - schemaName?: string; - tableMap?: unknown; - tableName?: string; -} -export function createQueryOperations(client: OrmClient) { - return { - 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: 'fieldName', - type: 'String', - }, - { - name: 'tableId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveBlueprintTable: ( - args: ResolveBlueprintTableVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintTable: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintTable', - fieldName: 'resolveBlueprintTable', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintTable', - 'resolveBlueprintTable', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'defaultSchemaId', - type: 'UUID', - }, - { - name: 'schemaName', - type: 'String', - }, - { - name: 'tableMap', - type: 'JSON', - }, - { - name: 'tableName', - type: 'String', - }, - ], - connectionFieldsMap, - undefined - ), - }), - }; -} diff --git a/sdk/constructive-react/src/modules/schema-types.ts b/sdk/constructive-react/src/modules/schema-types.ts index 4332cbba3f..25ead43ac0 100644 --- a/sdk/constructive-react/src/modules/schema-types.ts +++ b/sdk/constructive-react/src/modules/schema-types.ts @@ -13,12 +13,15 @@ import type { Blueprint, BlueprintConstruction, BlueprintTemplate, + CapabilitiesModule, CatalogModule, ComputeLogModule, ConfigSecretsUserModule, ConnectedAccountsModule, + ContentPresetModule, CryptoAddressesModule, CryptoAuthModule, + DataCapabilitiesField, DatabaseProvisionModule, DatabaseSettingsModule, DbPool, @@ -29,9 +32,11 @@ import type { DenormalizedTableField, DevicesModule, DomainModule, + EmailSenderModule, EmailsModule, EntityTypeProvision, EventsModule, + FileRefField, FunctionDeploymentModule, FunctionInvocationModule, FunctionModule, @@ -53,8 +58,8 @@ import type { MerkleStoreModule, NamespaceModule, NotificationsModule, + OauthRequestsModule, PagesModule, - PermissionsModule, PhoneNumbersModule, PlansModule, PrincipalAuthModule, @@ -66,6 +71,7 @@ import type { ResourceModule, RlsModule, RouteModule, + ScopeTypesModule, SecureTableProvision, SessionSecretsModule, SessionsModule, @@ -76,6 +82,7 @@ import type { UserAuthModule, UserCredentialsModule, UserSettingsModule, + UserSettingsSecurityModule, UserStateModule, UsersModule, WebauthnAuthModule, @@ -109,8 +116,8 @@ export type AgentModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -200,8 +207,8 @@ export type ApiSurfaceModuleOrderBy = | 'CORS_SETTINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -241,8 +248,8 @@ export type AppModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -280,10 +287,10 @@ export type BillingModuleOrderBy = | 'BALANCES_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_METER_CATALOG_ASC' | 'DEFAULT_METER_CATALOG_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'ID_ASC' | 'ID_DESC' | 'LEDGER_TABLE_ID_ASC' @@ -339,6 +346,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -347,6 +358,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -359,6 +374,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -376,10 +395,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; /** Methods to use when ordering `BlueprintConstruction`. */ export type BlueprintConstructionOrderBy = | 'BLUEPRINT_ID_ASC' @@ -481,6 +504,55 @@ export type BlueprintTemplateOrderBy = | 'VERSION_DESC' | 'VISIBILITY_ASC' | 'VISIBILITY_DESC'; +/** Methods to use when ordering `CapabilitiesModule`. */ +export type CapabilitiesModuleOrderBy = + | 'ACTOR_TABLE_ID_ASC' + | 'ACTOR_TABLE_ID_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'BITLEN_ASC' + | 'BITLEN_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_TABLE_ID_ASC' + | 'DEFAULT_TABLE_ID_DESC' + | 'DEFAULT_TABLE_NAME_ASC' + | 'DEFAULT_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'GET_BY_MASK_ASC' + | 'GET_BY_MASK_DESC' + | 'GET_MASK_ASC' + | 'GET_MASK_BY_NAME_ASC' + | 'GET_MASK_BY_NAME_DESC' + | 'GET_MASK_DESC' + | 'GET_PADDED_MASK_ASC' + | 'GET_PADDED_MASK_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; /** Methods to use when ordering `CatalogModule`. */ export type CatalogModuleOrderBy = | 'APIS_TABLE_ID_ASC' @@ -493,14 +565,18 @@ export type CatalogModuleOrderBy = | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -653,6 +729,45 @@ export type ConnectedAccountsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +/** Methods to use when ordering `ContentPresetModule`. */ +export type ContentPresetModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'CONTENT_PRESETS_TABLE_ID_ASC' + | 'CONTENT_PRESETS_TABLE_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MERKLE_STORE_MODULE_ID_ASC' + | 'MERKLE_STORE_MODULE_ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'STORE_NAME_ASC' + | 'STORE_NAME_DESC'; /** Methods to use when ordering `CryptoAddressesModule`. */ export type CryptoAddressesModuleOrderBy = | 'API_NAME_ASC' @@ -711,6 +826,33 @@ export type CryptoAuthModuleOrderBy = | 'USERS_TABLE_ID_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC'; +/** Methods to use when ordering `DataCapabilitiesField`. */ +export type DataCapabilitiesFieldOrderBy = + | 'CAPABILITIES_MODULE_ID_ASC' + | 'CAPABILITIES_MODULE_ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'FROM_FIELD_ID_ASC' + | 'FROM_FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MAPPING_FIELD_ID_ASC' + | 'MAPPING_FIELD_ID_DESC' + | 'MAPPING_KEY_FIELD_ID_ASC' + | 'MAPPING_KEY_FIELD_ID_DESC' + | 'MAPPING_TABLE_ID_ASC' + | 'MAPPING_TABLE_ID_DESC' + | 'MODE_ASC' + | 'MODE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SUBSET_GUARD_ASC' + | 'SUBSET_GUARD_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; /** Methods to use when ordering `DatabaseProvisionModule`. */ export type DatabaseProvisionModuleOrderBy = | 'ASYNC_ASC' @@ -764,8 +906,8 @@ export type DatabaseSettingsModuleOrderBy = | 'DATABASE_SETTINGS_TABLE_ID_DESC' | 'DATABASE_SETTINGS_TABLE_NAME_ASC' | 'DATABASE_SETTINGS_TABLE_NAME_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -906,8 +1048,8 @@ export type DbUsageModuleOrderBy = | 'COLLECT_DB_TABLE_STATS_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ID_ASC' @@ -1020,8 +1162,8 @@ export type DomainModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -1065,6 +1207,51 @@ export type DomainModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +/** Methods to use when ordering `EmailSenderModule`. */ +export type EmailSenderModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' + | 'EMAIL_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_IDENTITIES_TABLE_NAME_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'SITE_SURFACE_MODULE_ID_ASC' + | 'SITE_SURFACE_MODULE_ID_DESC'; /** Methods to use when ordering `EmailsModule`. */ export type EmailsModuleOrderBy = | 'API_NAME_ASC' @@ -1183,8 +1370,8 @@ export type EventsModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1201,6 +1388,8 @@ export type EventsModuleOrderBy = | 'EVENT_TYPES_TABLE_ID_DESC' | 'EVENT_TYPES_TABLE_NAME_ASC' | 'EVENT_TYPES_TABLE_NAME_DESC' + | 'EXPIRE_GRANTS_ASC' + | 'EXPIRE_GRANTS_DESC' | 'GRANT_ACHIEVEMENT_ASC' | 'GRANT_ACHIEVEMENT_DESC' | 'ID_ASC' @@ -1236,12 +1425,16 @@ export type EventsModuleOrderBy = | 'PRIVATE_SCHEMA_NAME_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RECOMPUTE_CAPABILITIES_ASC' + | 'RECOMPUTE_CAPABILITIES_DESC' | 'RECORD_EVENT_ASC' | 'RECORD_EVENT_DESC' | 'REMOVE_EVENT_ASC' | 'REMOVE_EVENT_DESC' | 'RETENTION_ASC' | 'RETENTION_DESC' + | 'REVOKE_ACHIEVEMENT_ASC' + | 'REVOKE_ACHIEVEMENT_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' @@ -1260,18 +1453,45 @@ export type EventsModuleOrderBy = | 'TG_EVENT_TOGGLE_BOOL_ASC' | 'TG_EVENT_TOGGLE_BOOL_DESC' | 'TG_EVENT_TOGGLE_DESC' + | 'TG_LEVEL_GRANT_SYNC_ASC' + | 'TG_LEVEL_GRANT_SYNC_DESC' | 'TG_UPDATE_AGGREGATES_ASC' | 'TG_UPDATE_AGGREGATES_DESC' + | 'TRUST_LADDER_ASC' + | 'TRUST_LADDER_DESC' | 'UPSERT_AGGREGATE_ASC' | 'UPSERT_AGGREGATE_DESC'; +/** Methods to use when ordering `FileRefField`. */ +export type FileRefFieldOrderBy = + | 'BUCKET_KEY_ASC' + | 'BUCKET_KEY_DESC' + | 'BUCKET_TAGS_ASC' + | 'BUCKET_TAGS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENFORCE_FK_ASC' + | 'ENFORCE_FK_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLIC_ASC' + | 'IS_PUBLIC_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STORAGE_MODULE_ID_ASC' + | 'STORAGE_MODULE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; /** Methods to use when ordering `FunctionDeploymentModule`. */ export type FunctionDeploymentModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEPLOYMENTS_TABLE_ID_ASC' | 'DEPLOYMENTS_TABLE_ID_DESC' | 'DEPLOYMENTS_TABLE_NAME_ASC' @@ -1321,8 +1541,8 @@ export type FunctionInvocationModuleOrderBy = | 'ATTEMPTS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1370,8 +1590,8 @@ export type FunctionModuleOrderBy = | 'CAPABILITY_BINDINGS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFINITIONS_TABLE_ID_ASC' | 'DEFINITIONS_TABLE_ID_DESC' | 'DEFINITIONS_TABLE_NAME_ASC' @@ -1415,8 +1635,8 @@ export type GraphExecutionModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1466,8 +1686,8 @@ export type GraphModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1513,8 +1733,8 @@ export type HierarchyModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1556,8 +1776,8 @@ export type HttpRouteModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -1927,6 +2147,8 @@ export type LimitsModuleOrderBy = | 'LIMIT_DECREMENT_FUNCTION_DESC' | 'LIMIT_DECREMENT_TRIGGER_ASC' | 'LIMIT_DECREMENT_TRIGGER_DESC' + | 'LIMIT_DEFAULTS_ASC' + | 'LIMIT_DEFAULTS_DESC' | 'LIMIT_INCREMENT_FUNCTION_ASC' | 'LIMIT_INCREMENT_FUNCTION_DESC' | 'LIMIT_INCREMENT_TRIGGER_ASC' @@ -1989,12 +2211,18 @@ export type MembershipsModuleOrderBy = | 'ADMIN_GRANTS_TABLE_NAME_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_DESC' | 'DEFAULT_LIMITS_TABLE_ID_ASC' | 'DEFAULT_LIMITS_TABLE_ID_DESC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_IDS_BY_MASK_ASC' @@ -2040,12 +2268,6 @@ export type MembershipsModuleOrderBy = | 'OWNER_GRANTS_TABLE_ID_DESC' | 'OWNER_GRANTS_TABLE_NAME_ASC' | 'OWNER_GRANTS_TABLE_NAME_DESC' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -2068,6 +2290,8 @@ export type MembershipsModuleOrderBy = export type MerkleStoreModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITY_KEY_ASC' + | 'CAPABILITY_KEY_DESC' | 'COMMIT_TABLE_ID_ASC' | 'COMMIT_TABLE_ID_DESC' | 'CREATED_AT_ASC' @@ -2083,8 +2307,6 @@ export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'OBJECT_TABLE_ID_ASC' | 'OBJECT_TABLE_ID_DESC' - | 'PERMISSION_KEY_ASC' - | 'PERMISSION_KEY_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -2111,8 +2333,8 @@ export type NamespaceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -2156,8 +2378,8 @@ export type NotificationsModuleOrderBy = | 'CHANNELS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DELIVERY_LOG_TABLE_ID_ASC' | 'DELIVERY_LOG_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -2201,6 +2423,35 @@ export type NotificationsModuleOrderBy = | 'SUPPRESSIONS_TABLE_ID_DESC' | 'USER_SETTINGS_TABLE_ID_ASC' | 'USER_SETTINGS_TABLE_ID_DESC'; +/** Methods to use when ordering `OauthRequestsModule`. */ +export type OauthRequestsModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_DESC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC'; /** Methods to use when ordering `PagesModule`. */ export type PagesModuleOrderBy = | 'API_NAME_ASC' @@ -2244,55 +2495,6 @@ export type PagesModuleOrderBy = | 'SITE_SURFACE_MODULE_ID_DESC' | 'STORE_NAME_PREFIX_ASC' | 'STORE_NAME_PREFIX_DESC'; -/** Methods to use when ordering `PermissionsModule`. */ -export type PermissionsModuleOrderBy = - | 'ACTOR_TABLE_ID_ASC' - | 'ACTOR_TABLE_ID_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'BITLEN_ASC' - | 'BITLEN_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEFAULT_TABLE_ID_ASC' - | 'DEFAULT_TABLE_ID_DESC' - | 'DEFAULT_TABLE_NAME_ASC' - | 'DEFAULT_TABLE_NAME_DESC' - | 'ENTITY_FIELD_ASC' - | 'ENTITY_FIELD_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'GET_BY_MASK_ASC' - | 'GET_BY_MASK_DESC' - | 'GET_MASK_ASC' - | 'GET_MASK_BY_NAME_ASC' - | 'GET_MASK_BY_NAME_DESC' - | 'GET_MASK_DESC' - | 'GET_PADDED_MASK_ASC' - | 'GET_PADDED_MASK_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NATURAL' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC'; /** Methods to use when ordering `PhoneNumbersModule`. */ export type PhoneNumbersModuleOrderBy = | 'API_NAME_ASC' @@ -2410,6 +2612,8 @@ export type ProfilesModuleOrderBy = | 'ACTOR_TABLE_ID_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -2420,9 +2624,11 @@ export type ProfilesModuleOrderBy = | 'ID_DESC' | 'MEMBERSHIPS_TABLE_ID_ASC' | 'MEMBERSHIPS_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_DESC' | 'NATURAL' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -2433,6 +2639,10 @@ export type ProfilesModuleOrderBy = | 'PRIVATE_SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROFILE_CAPABILITIES_TABLE_ID_ASC' + | 'PROFILE_CAPABILITIES_TABLE_ID_DESC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_ASC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_ASC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_NAME_ASC' @@ -2441,10 +2651,6 @@ export type ProfilesModuleOrderBy = | 'PROFILE_GRANTS_TABLE_ID_DESC' | 'PROFILE_GRANTS_TABLE_NAME_ASC' | 'PROFILE_GRANTS_TABLE_NAME_DESC' - | 'PROFILE_PERMISSIONS_TABLE_ID_ASC' - | 'PROFILE_PERMISSIONS_TABLE_ID_DESC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_ASC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_DESC' | 'PROFILE_TEMPLATES_TABLE_ID_ASC' | 'PROFILE_TEMPLATES_TABLE_ID_DESC' | 'PROFILE_TEMPLATES_TABLE_NAME_ASC' @@ -2467,8 +2673,8 @@ export type RateLimitMetersModuleOrderBy = | 'CHECK_RATE_LIMIT_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -2613,8 +2819,8 @@ export type ResourceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -2719,12 +2925,16 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAIN_MODULE_ID_ASC' | 'DOMAIN_MODULE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -2768,6 +2978,21 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +/** Methods to use when ordering `ScopeTypesModule`. */ +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; /** Methods to use when ordering `SecureTableProvision`. */ export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' @@ -2847,8 +3072,8 @@ export type SiteSurfaceModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -2971,10 +3196,10 @@ export type StorageModuleOrderBy = | 'CONFIRM_UPLOAD_DELAY_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'ENDPOINT_ASC' @@ -3184,6 +3409,25 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +/** Methods to use when ordering `UserSettingsSecurityModule`. */ +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; /** Methods to use when ordering `UserStateModule`. */ export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' @@ -3290,8 +3534,8 @@ export type WebhookModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -3347,8 +3591,8 @@ export interface AgentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -3422,7 +3666,7 @@ export interface AgentModuleInput { agentTableName?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -3461,7 +3705,7 @@ export interface AgentModulePatch { agentTableName?: string; apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -3524,8 +3768,8 @@ export interface ApiSurfaceModuleFilter { corsSettingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -3564,7 +3808,7 @@ export interface ApiSurfaceModuleInput { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -3589,7 +3833,7 @@ export interface ApiSurfaceModulePatch { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -3623,8 +3867,8 @@ export interface AppModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -3663,7 +3907,7 @@ export interface AppModuleInput { appsTableName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -3686,7 +3930,7 @@ export interface AppModulePatch { appsTableName?: string; catalogModuleId?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -3712,10 +3956,10 @@ export interface BillingModuleFilter { balancesTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMeterCatalog` field. */ defaultMeterCatalog?: JSONFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `ledgerTableId` field. */ @@ -3771,8 +4015,8 @@ export interface BillingModuleInput { balancesTableId?: string; balancesTableName?: string; databaseId: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: unknown; - defaultPermissions?: string[]; id?: string; ledgerTableId?: string; ledgerTableName?: string; @@ -3802,8 +4046,8 @@ export interface BillingModulePatch { balancesTableId?: string; balancesTableName?: string; databaseId?: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: unknown; - defaultPermissions?: string[]; id?: string; ledgerTableId?: string; ledgerTableName?: string; @@ -3837,6 +4081,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -3845,6 +4093,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -3857,6 +4109,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -3875,26 +4131,36 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } /** An input for mutations affecting `BillingProviderModule` */ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -3902,24 +4168,32 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** Represents an update to a `BillingProviderModule`. Fields that are set will be updated. */ export interface BillingProviderModulePatch { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId?: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -3927,8 +4201,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** A filter to be used against `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintConstructionFilter { @@ -4282,36 +4558,156 @@ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where at least one related entity matches. */ some?: BlueprintConstructionFilter; } -/** A filter to be used against `CatalogModule` object types. All fields are combined with a logical ‘and.’ */ -export interface CatalogModuleFilter { +/** A filter to be used against `CapabilitiesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleFilter { + /** Filter by the object’s `actorTableId` field. */ + actorTableId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: CatalogModuleFilter[]; + and?: CapabilitiesModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; - /** Filter by the object’s `apiSurfaceModules` relation. */ - apiSurfaceModules?: CatalogModuleToManyApiSurfaceModuleFilter; - /** `apiSurfaceModules` exist. */ - apiSurfaceModulesExist?: boolean; - /** Filter by the object’s `apisTableId` field. */ - apisTableId?: UUIDFilter; - /** Filter by the object’s `apisTableName` field. */ - apisTableName?: StringFilter; - /** Filter by the object’s `appModules` relation. */ - appModules?: CatalogModuleToManyAppModuleFilter; - /** `appModules` exist. */ - appModulesExist?: boolean; - /** Filter by the object’s `appsTableId` field. */ - appsTableId?: UUIDFilter; - /** Filter by the object’s `appsTableName` field. */ - appsTableName?: StringFilter; - /** Filter by the object’s `bucketsTableId` field. */ - bucketsTableId?: UUIDFilter; - /** Filter by the object’s `bucketsTableName` field. */ - bucketsTableName?: StringFilter; + /** Filter by the object’s `bitlen` field. */ + bitlen?: IntFilter; + /** Filter by the object’s `dataCapabilitiesFields` relation. */ + dataCapabilitiesFields?: CapabilitiesModuleToManyDataCapabilitiesFieldFilter; + /** `dataCapabilitiesFields` exist. */ + dataCapabilitiesFieldsExist?: boolean; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultTableId` field. */ + defaultTableId?: UUIDFilter; + /** Filter by the object’s `defaultTableName` field. */ + defaultTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `getByMask` field. */ + getByMask?: StringFilter; + /** Filter by the object’s `getMask` field. */ + getMask?: StringFilter; + /** Filter by the object’s `getMaskByName` field. */ + getMaskByName?: StringFilter; + /** Filter by the object’s `getPaddedMask` field. */ + getPaddedMask?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: CapabilitiesModuleFilter; + /** Checks for any expressions in this list. */ + or?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +/** An input for mutations affecting `CapabilitiesModule` */ +export interface CapabilitiesModuleInput { + actorTableId?: string; + apiName?: string; + bitlen?: number; + databaseId: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; + entityTableId?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + id?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope: string; + tableId?: string; + tableName?: string; +} +/** Represents an update to a `CapabilitiesModule`. Fields that are set will be updated. */ +export interface CapabilitiesModulePatch { + actorTableId?: string; + apiName?: string; + bitlen?: number; + databaseId?: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; + entityTableId?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + id?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope?: string; + tableId?: string; + tableName?: string; +} +/** A filter to be used against many `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleToManyDataCapabilitiesFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: DataCapabilitiesFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: DataCapabilitiesFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: DataCapabilitiesFieldFilter; +} +/** A filter to be used against `CatalogModule` object types. All fields are combined with a logical ‘and.’ */ +export interface CatalogModuleFilter { + /** Checks for all expressions in this list. */ + and?: CatalogModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `apiSurfaceModules` relation. */ + apiSurfaceModules?: CatalogModuleToManyApiSurfaceModuleFilter; + /** `apiSurfaceModules` exist. */ + apiSurfaceModulesExist?: boolean; + /** Filter by the object’s `apisTableId` field. */ + apisTableId?: UUIDFilter; + /** Filter by the object’s `apisTableName` field. */ + apisTableName?: StringFilter; + /** Filter by the object’s `appModules` relation. */ + appModules?: CatalogModuleToManyAppModuleFilter; + /** `appModules` exist. */ + appModulesExist?: boolean; + /** Filter by the object’s `appsTableId` field. */ + appsTableId?: UUIDFilter; + /** Filter by the object’s `appsTableName` field. */ + appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; + /** Filter by the object’s `bucketsTableId` field. */ + bucketsTableId?: UUIDFilter; + /** Filter by the object’s `bucketsTableName` field. */ + bucketsTableName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModules` relation. */ domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ @@ -4396,10 +4792,12 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -4438,10 +4836,12 @@ export interface CatalogModulePatch { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -4716,6 +5116,91 @@ export interface ConstructBlueprintInput { clientMutationId?: string; schemaId?: string; } +/** A filter to be used against `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ContentPresetModuleFilter { + /** Checks for all expressions in this list. */ + and?: ContentPresetModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `contentPresetsTableId` field. */ + contentPresetsTableId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `merkleStoreModule` relation. */ + merkleStoreModule?: MerkleStoreModuleFilter; + /** Filter by the object’s `merkleStoreModuleId` field. */ + merkleStoreModuleId?: UUIDFilter; + /** Negates the expression. */ + not?: ContentPresetModuleFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaId` field. */ + publicSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `storeName` field. */ + storeName?: StringFilter; +} +/** An input for mutations affecting `ContentPresetModule` */ +export interface ContentPresetModuleInput { + apiName?: string; + contentPresetsTableId?: string; + createdAt?: string; + databaseId: string; + entityTableId?: string; + id?: string; + merkleStoreModuleId: string; + policies?: unknown; + prefix: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: unknown; + publicSchemaId?: string; + publicSchemaName?: string; + scope: string; + storeName: string; +} +/** Represents an update to a `ContentPresetModule`. Fields that are set will be updated. */ +export interface ContentPresetModulePatch { + apiName?: string; + contentPresetsTableId?: string; + createdAt?: string; + databaseId?: string; + entityTableId?: string; + id?: string; + merkleStoreModuleId?: string; + policies?: unknown; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: unknown; + publicSchemaId?: string; + publicSchemaName?: string; + scope?: string; + storeName?: string; +} export interface CopyTemplateToBlueprintInput { clientMutationId?: string; databaseId?: string; @@ -4764,6 +5249,11 @@ export interface CreateBlueprintTemplateInput { blueprintTemplate: BlueprintTemplateInput; clientMutationId?: string; } +export interface CreateCapabilitiesModuleInput { + /** The `CapabilitiesModule` to be created by this mutation. */ + capabilitiesModule: CapabilitiesModuleInput; + clientMutationId?: string; +} export interface CreateCatalogModuleInput { /** The `CatalogModule` to be created by this mutation. */ catalogModule: CatalogModuleInput; @@ -4784,6 +5274,11 @@ export interface CreateConnectedAccountsModuleInput { /** The `ConnectedAccountsModule` to be created by this mutation. */ connectedAccountsModule: ConnectedAccountsModuleInput; } +export interface CreateContentPresetModuleInput { + clientMutationId?: string; + /** The `ContentPresetModule` to be created by this mutation. */ + contentPresetModule: ContentPresetModuleInput; +} export interface CreateCryptoAddressesModuleInput { clientMutationId?: string; /** The `CryptoAddressesModule` to be created by this mutation. */ @@ -4794,6 +5289,11 @@ export interface CreateCryptoAuthModuleInput { /** The `CryptoAuthModule` to be created by this mutation. */ cryptoAuthModule: CryptoAuthModuleInput; } +export interface CreateDataCapabilitiesFieldInput { + clientMutationId?: string; + /** The `DataCapabilitiesField` to be created by this mutation. */ + dataCapabilitiesField: DataCapabilitiesFieldInput; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; /** The `DatabaseProvisionModule` to be created by this mutation. */ @@ -4844,6 +5344,11 @@ export interface CreateDomainModuleInput { /** The `DomainModule` to be created by this mutation. */ domainModule: DomainModuleInput; } +export interface CreateEmailSenderModuleInput { + clientMutationId?: string; + /** The `EmailSenderModule` to be created by this mutation. */ + emailSenderModule: EmailSenderModuleInput; +} export interface CreateEmailsModuleInput { clientMutationId?: string; /** The `EmailsModule` to be created by this mutation. */ @@ -4859,6 +5364,11 @@ export interface CreateEventsModuleInput { /** The `EventsModule` to be created by this mutation. */ eventsModule: EventsModuleInput; } +export interface CreateFileRefFieldInput { + clientMutationId?: string; + /** The `FileRefField` to be created by this mutation. */ + fileRefField: FileRefFieldInput; +} export interface CreateFunctionDeploymentModuleInput { clientMutationId?: string; /** The `FunctionDeploymentModule` to be created by this mutation. */ @@ -4964,16 +5474,16 @@ export interface CreateNotificationsModuleInput { /** The `NotificationsModule` to be created by this mutation. */ notificationsModule: NotificationsModuleInput; } +export interface CreateOauthRequestsModuleInput { + clientMutationId?: string; + /** The `OauthRequestsModule` to be created by this mutation. */ + oauthRequestsModule: OauthRequestsModuleInput; +} export interface CreatePagesModuleInput { clientMutationId?: string; /** The `PagesModule` to be created by this mutation. */ pagesModule: PagesModuleInput; } -export interface CreatePermissionsModuleInput { - clientMutationId?: string; - /** The `PermissionsModule` to be created by this mutation. */ - permissionsModule: PermissionsModuleInput; -} export interface CreatePhoneNumbersModuleInput { clientMutationId?: string; /** The `PhoneNumbersModule` to be created by this mutation. */ @@ -5029,6 +5539,11 @@ export interface CreateRouteModuleInput { /** The `RouteModule` to be created by this mutation. */ routeModule: RouteModuleInput; } +export interface CreateScopeTypesModuleInput { + clientMutationId?: string; + /** The `ScopeTypesModule` to be created by this mutation. */ + scopeTypesModule: ScopeTypesModuleInput; +} export interface CreateSecureTableProvisionInput { clientMutationId?: string; /** The `SecureTableProvision` to be created by this mutation. */ @@ -5079,6 +5594,11 @@ export interface CreateUserSettingsModuleInput { /** The `UserSettingsModule` to be created by this mutation. */ userSettingsModule: UserSettingsModuleInput; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + /** The `UserSettingsSecurityModule` to be created by this mutation. */ + userSettingsSecurityModule: UserSettingsSecurityModuleInput; +} export interface CreateUserStateModuleInput { clientMutationId?: string; /** The `UserStateModule` to be created by this mutation. */ @@ -5230,6 +5750,67 @@ export interface CryptoAuthModulePatch { userField?: string; usersTableId?: string; } +/** A filter to be used against `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface DataCapabilitiesFieldFilter { + /** Checks for all expressions in this list. */ + and?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `capabilitiesModule` relation. */ + capabilitiesModule?: CapabilitiesModuleFilter; + /** Filter by the object’s `capabilitiesModuleId` field. */ + capabilitiesModuleId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `fromFieldId` field. */ + fromFieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `mappingFieldId` field. */ + mappingFieldId?: UUIDFilter; + /** Filter by the object’s `mappingKeyFieldId` field. */ + mappingKeyFieldId?: UUIDFilter; + /** Filter by the object’s `mappingTableId` field. */ + mappingTableId?: UUIDFilter; + /** Filter by the object’s `mode` field. */ + mode?: StringFilter; + /** Negates the expression. */ + not?: DataCapabilitiesFieldFilter; + /** Checks for any expressions in this list. */ + or?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `subsetGuard` field. */ + subsetGuard?: BooleanFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} +/** An input for mutations affecting `DataCapabilitiesField` */ +export interface DataCapabilitiesFieldInput { + capabilitiesModuleId: string; + databaseId: string; + fieldId: string; + fromFieldId?: string; + id?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId: string; +} +/** Represents an update to a `DataCapabilitiesField`. Fields that are set will be updated. */ +export interface DataCapabilitiesFieldPatch { + capabilitiesModuleId?: string; + databaseId?: string; + fieldId?: string; + fromFieldId?: string; + id?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId?: string; +} /** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseProvisionModuleFilter { /** Checks for all expressions in this list. */ @@ -5299,7 +5880,7 @@ export interface DatabaseProvisionModuleInput { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string; id?: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: unknown; /** Additional configuration options for provisioning */ options?: unknown; @@ -5335,7 +5916,7 @@ export interface DatabaseProvisionModulePatch { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string; id?: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: unknown; /** Additional configuration options for provisioning */ options?: unknown; @@ -5361,8 +5942,8 @@ export interface DatabaseSettingsModuleFilter { databaseSettingsTableId?: UUIDFilter; /** Filter by the object’s `databaseSettingsTableName` field. */ databaseSettingsTableName?: StringFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5406,7 +5987,7 @@ export interface DatabaseSettingsModuleInput { databaseId: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -5430,7 +6011,7 @@ export interface DatabaseSettingsModulePatch { databaseId?: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -5693,8 +6274,8 @@ export interface DbUsageModuleFilter { collectDbTableStatsFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `id` field. */ @@ -5750,7 +6331,7 @@ export interface DbUsageModuleInput { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; id?: string; interval?: string; @@ -5780,7 +6361,7 @@ export interface DbUsageModulePatch { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; id?: string; interval?: string; @@ -5862,6 +6443,10 @@ export interface DeleteBlueprintTemplateInput { /** Unique identifier for this template. */ id: string; } +export interface DeleteCapabilitiesModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteCatalogModuleInput { clientMutationId?: string; id: string; @@ -5878,6 +6463,10 @@ export interface DeleteConnectedAccountsModuleInput { clientMutationId?: string; id: string; } +export interface DeleteContentPresetModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteCryptoAddressesModuleInput { clientMutationId?: string; id: string; @@ -5886,6 +6475,10 @@ export interface DeleteCryptoAuthModuleInput { clientMutationId?: string; id: string; } +export interface DeleteDataCapabilitiesFieldInput { + clientMutationId?: string; + id: string; +} export interface DeleteDatabaseProvisionModuleInput { clientMutationId?: string; id: string; @@ -5926,6 +6519,10 @@ export interface DeleteDomainModuleInput { clientMutationId?: string; id: string; } +export interface DeleteEmailSenderModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteEmailsModuleInput { clientMutationId?: string; id: string; @@ -5939,6 +6536,10 @@ export interface DeleteEventsModuleInput { clientMutationId?: string; id: string; } +export interface DeleteFileRefFieldInput { + clientMutationId?: string; + id: string; +} export interface DeleteFunctionDeploymentModuleInput { clientMutationId?: string; id: string; @@ -6023,11 +6624,11 @@ export interface DeleteNotificationsModuleInput { clientMutationId?: string; id: string; } -export interface DeletePagesModuleInput { +export interface DeleteOauthRequestsModuleInput { clientMutationId?: string; id: string; } -export interface DeletePermissionsModuleInput { +export interface DeletePagesModuleInput { clientMutationId?: string; id: string; } @@ -6076,6 +6677,10 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteSecureTableProvisionInput { clientMutationId?: string; /** Unique identifier for this provision row. */ @@ -6117,6 +6722,10 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteUserStateModuleInput { clientMutationId?: string; id: string; @@ -6257,8 +6866,8 @@ export interface DomainModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -6313,7 +6922,7 @@ export interface DomainModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -6340,7 +6949,7 @@ export interface DomainModulePatch { apiName?: string; catalogModuleId?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -6371,6 +6980,105 @@ export interface DomainModuleToManyRouteModuleFilter { /** Filters to entities where at least one related entity matches. */ some?: RouteModuleFilter; } +/** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSenderModuleFilter { + /** Checks for all expressions in this list. */ + and?: EmailSenderModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailIdentitiesTableId` field. */ + emailIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesTableName` field. */ + emailIdentitiesTableName?: StringFilter; + /** Filter by the object’s `emailProviderAccountsTableId` field. */ + emailProviderAccountsTableId?: UUIDFilter; + /** Filter by the object’s `emailProviderAccountsTableName` field. */ + emailProviderAccountsTableName?: StringFilter; + /** Filter by the object’s `emailSiteIdentitiesTableId` field. */ + emailSiteIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentitiesTableName` field. */ + emailSiteIdentitiesTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSenderModuleFilter; + /** Checks for any expressions in this list. */ + or?: EmailSenderModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `siteSurfaceModule` relation. */ + siteSurfaceModule?: SiteSurfaceModuleFilter; + /** A related `siteSurfaceModule` exists. */ + siteSurfaceModuleExists?: boolean; + /** Filter by the object’s `siteSurfaceModuleId` field. */ + siteSurfaceModuleId?: UUIDFilter; +} +/** An input for mutations affecting `EmailSenderModule` */ +export interface EmailSenderModuleInput { + apiName?: string; + databaseId: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + id?: string; + policies?: unknown; + prefix?: string; + privateApiName?: string; + provisions?: unknown; + publicSchemaName?: string; + schemaId?: string; + scope: string; + siteSurfaceModuleId?: string; +} +/** Represents an update to a `EmailSenderModule`. Fields that are set will be updated. */ +export interface EmailSenderModulePatch { + apiName?: string; + databaseId?: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + id?: string; + policies?: unknown; + prefix?: string; + privateApiName?: string; + provisions?: unknown; + publicSchemaName?: string; + schemaId?: string; + scope?: string; + siteSurfaceModuleId?: string; +} /** A filter to be used against `EmailsModule` object types. All fields are combined with a logical ‘and.’ */ export interface EmailsModuleFilter { /** Checks for all expressions in this list. */ @@ -6524,7 +7232,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: unknown; @@ -6534,9 +7242,9 @@ export interface EntityTypeProvisionInput { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -6576,8 +7284,11 @@ export interface EntityTypeProvisionInput { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean; /** Unique identifier for this provision row. */ @@ -6604,7 +7315,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: unknown; @@ -6626,7 +7337,7 @@ export interface EntityTypeProvisionInput { outGraphModuleId?: string; outGraphsTableId?: string; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). * Populated by the trigger. Useful for verifying which modules were provisioned. */ outInstalledModules?: string[]; @@ -6670,7 +7381,7 @@ export interface EntityTypeProvisionInput { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -6684,8 +7395,8 @@ export interface EntityTypeProvisionInput { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean; @@ -6704,7 +7415,7 @@ export interface EntityTypeProvisionInput { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -6730,7 +7441,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -6776,7 +7487,7 @@ export interface EntityTypeProvisionPatch { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: unknown; @@ -6786,9 +7497,9 @@ export interface EntityTypeProvisionPatch { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -6828,8 +7539,11 @@ export interface EntityTypeProvisionPatch { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean; /** Unique identifier for this provision row. */ @@ -6856,7 +7570,7 @@ export interface EntityTypeProvisionPatch { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: unknown; @@ -6878,7 +7592,7 @@ export interface EntityTypeProvisionPatch { outGraphModuleId?: string; outGraphsTableId?: string; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). * Populated by the trigger. Useful for verifying which modules were provisioned. */ outInstalledModules?: string[]; @@ -6922,7 +7636,7 @@ export interface EntityTypeProvisionPatch { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -6936,8 +7650,8 @@ export interface EntityTypeProvisionPatch { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean; @@ -6956,7 +7670,7 @@ export interface EntityTypeProvisionPatch { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -6982,7 +7696,7 @@ export interface EntityTypeProvisionPatch { tableName?: string; /** * 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -7027,8 +7741,8 @@ export interface EventsModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7045,6 +7759,8 @@ export interface EventsModuleFilter { eventsTableId?: UUIDFilter; /** Filter by the object’s `eventsTableName` field. */ eventsTableName?: StringFilter; + /** Filter by the object’s `expireGrants` field. */ + expireGrants?: StringFilter; /** Filter by the object’s `grantAchievement` field. */ grantAchievement?: StringFilter; /** Filter by the object’s `id` field. */ @@ -7081,12 +7797,16 @@ export interface EventsModuleFilter { privateSchemaName?: StringFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `recomputeCapabilities` field. */ + recomputeCapabilities?: StringFilter; /** Filter by the object’s `recordEvent` field. */ recordEvent?: StringFilter; /** Filter by the object’s `removeEvent` field. */ removeEvent?: StringFilter; /** Filter by the object’s `retention` field. */ retention?: StringFilter; + /** Filter by the object’s `revokeAchievement` field. */ + revokeAchievement?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ @@ -7105,8 +7825,12 @@ export interface EventsModuleFilter { tgEventToggle?: StringFilter; /** Filter by the object’s `tgEventToggleBool` field. */ tgEventToggleBool?: StringFilter; + /** Filter by the object’s `tgLevelGrantSync` field. */ + tgLevelGrantSync?: StringFilter; /** Filter by the object’s `tgUpdateAggregates` field. */ tgUpdateAggregates?: StringFilter; + /** Filter by the object’s `trustLadder` field. */ + trustLadder?: JSONFilter; /** Filter by the object’s `upsertAggregate` field. */ upsertAggregate?: StringFilter; } @@ -7117,7 +7841,7 @@ export interface EventsModuleInput { actorTableId?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -7126,6 +7850,7 @@ export interface EventsModuleInput { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; id?: string; interval?: string; @@ -7142,9 +7867,11 @@ export interface EventsModuleInput { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope: string; stepsRequired?: string; @@ -7154,7 +7881,9 @@ export interface EventsModuleInput { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: unknown; upsertAggregate?: string; } /** Represents an update to a `EventsModule`. Fields that are set will be updated. */ @@ -7164,7 +7893,7 @@ export interface EventsModulePatch { actorTableId?: string; apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -7173,6 +7902,7 @@ export interface EventsModulePatch { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; id?: string; interval?: string; @@ -7189,9 +7919,11 @@ export interface EventsModulePatch { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope?: string; stepsRequired?: string; @@ -7201,9 +7933,64 @@ export interface EventsModulePatch { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: unknown; upsertAggregate?: string; } +/** A filter to be used against `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface FileRefFieldFilter { + /** Checks for all expressions in this list. */ + and?: FileRefFieldFilter[]; + /** Filter by the object’s `bucketKey` field. */ + bucketKey?: StringFilter; + /** Filter by the object’s `bucketTags` field. */ + bucketTags?: StringListFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `enforceFk` field. */ + enforceFk?: BooleanFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublic` field. */ + isPublic?: BooleanFilter; + /** Negates the expression. */ + not?: FileRefFieldFilter; + /** Checks for any expressions in this list. */ + or?: FileRefFieldFilter[]; + /** Filter by the object’s `storageModule` relation. */ + storageModule?: StorageModuleFilter; + /** Filter by the object’s `storageModuleId` field. */ + storageModuleId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} +/** An input for mutations affecting `FileRefField` */ +export interface FileRefFieldInput { + bucketKey?: string; + bucketTags?: string[]; + databaseId: string; + enforceFk?: boolean; + fieldId: string; + id?: string; + isPublic?: boolean; + storageModuleId: string; + tableId: string; +} +/** Represents an update to a `FileRefField`. Fields that are set will be updated. */ +export interface FileRefFieldPatch { + bucketKey?: string; + bucketTags?: string[]; + databaseId?: string; + enforceFk?: boolean; + fieldId?: string; + id?: string; + isPublic?: boolean; + storageModuleId?: string; + tableId?: string; +} /** A filter to be used against `FunctionDeploymentModule` object types. All fields are combined with a logical ‘and.’ */ export interface FunctionDeploymentModuleFilter { /** Checks for all expressions in this list. */ @@ -7212,8 +7999,8 @@ export interface FunctionDeploymentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deploymentEventsTableId` field. */ deploymentEventsTableId?: UUIDFilter; /** Filter by the object’s `deploymentEventsTableName` field. */ @@ -7267,7 +8054,7 @@ export interface FunctionDeploymentModuleFilter { export interface FunctionDeploymentModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -7291,7 +8078,7 @@ export interface FunctionDeploymentModuleInput { export interface FunctionDeploymentModulePatch { apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -7323,8 +8110,8 @@ export interface FunctionInvocationModuleFilter { attemptsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7372,7 +8159,7 @@ export interface FunctionInvocationModuleInput { attemptsTableId?: string; attemptsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -7396,7 +8183,7 @@ export interface FunctionInvocationModulePatch { attemptsTableId?: string; attemptsTableName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -7437,8 +8224,8 @@ export interface FunctionModuleFilter { capabilityBindingsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `definitionsTableId` field. */ definitionsTableId?: UUIDFilter; /** Filter by the object’s `definitionsTableName` field. */ @@ -7495,7 +8282,7 @@ export interface FunctionModuleInput { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -7520,7 +8307,7 @@ export interface FunctionModulePatch { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -7575,8 +8362,8 @@ export interface GraphExecutionModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7627,7 +8414,7 @@ export interface GraphExecutionModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -7653,7 +8440,7 @@ export interface GraphExecutionModulePatch { apiName?: string; createdAt?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -7684,8 +8471,8 @@ export interface GraphModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7730,7 +8517,7 @@ export interface GraphModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -7751,7 +8538,7 @@ export interface GraphModulePatch { apiName?: string; createdAt?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -7792,8 +8579,8 @@ export interface HierarchyModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7839,7 +8626,7 @@ export interface HierarchyModuleInput { chartEdgesTableName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId: string; getManagersFunction?: string; @@ -7865,7 +8652,7 @@ export interface HierarchyModulePatch { chartEdgesTableName?: string; createdAt?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; getManagersFunction?: string; @@ -7891,8 +8678,8 @@ export interface HttpRouteModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7950,7 +8737,7 @@ export interface HttpRouteModuleFilter { export interface HttpRouteModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -7974,7 +8761,7 @@ export interface HttpRouteModuleInput { export interface HttpRouteModulePatch { apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -8748,6 +9535,8 @@ export interface LimitsModuleFilter { limitDecrementFunction?: StringFilter; /** Filter by the object’s `limitDecrementTrigger` field. */ limitDecrementTrigger?: StringFilter; + /** Filter by the object’s `limitDefaults` field. */ + limitDefaults?: JSONFilter; /** Filter by the object’s `limitIncrementFunction` field. */ limitIncrementFunction?: StringFilter; /** Filter by the object’s `limitIncrementTrigger` field. */ @@ -8807,6 +9596,7 @@ export interface LimitsModuleInput { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: unknown; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -8847,6 +9637,7 @@ export interface LimitsModulePatch { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: unknown; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -8914,12 +9705,18 @@ export interface MembershipsModuleFilter { and?: MembershipsModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultCapabilitiesTableId` field. */ + capabilityDefaultCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultGrantsTableId` field. */ + capabilityDefaultGrantsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilitiesTableId` field. */ + defaultCapabilitiesTableId?: UUIDFilter; /** Filter by the object’s `defaultLimitsTableId` field. */ defaultLimitsTableId?: UUIDFilter; - /** Filter by the object’s `defaultPermissionsTableId` field. */ - defaultPermissionsTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityIdsByMask` field. */ @@ -8968,12 +9765,6 @@ export interface MembershipsModuleFilter { ownerGrantsTableId?: UUIDFilter; /** Filter by the object’s `ownerGrantsTableName` field. */ ownerGrantsTableName?: StringFilter; - /** Filter by the object’s `permissionDefaultGrantsTableId` field. */ - permissionDefaultGrantsTableId?: UUIDFilter; - /** Filter by the object’s `permissionDefaultPermissionsTableId` field. */ - permissionDefaultPermissionsTableId?: UUIDFilter; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -8999,9 +9790,12 @@ export interface MembershipsModuleInput { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -9024,9 +9818,6 @@ export interface MembershipsModuleInput { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -9044,9 +9835,12 @@ export interface MembershipsModulePatch { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId?: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -9069,9 +9863,6 @@ export interface MembershipsModulePatch { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -9087,8 +9878,14 @@ export interface MerkleStoreModuleFilter { and?: MerkleStoreModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilityKey` field. */ + capabilityKey?: StringFilter; /** Filter by the object’s `commitTableId` field. */ commitTableId?: UUIDFilter; + /** Filter by the object’s `contentPresetModules` relation. */ + contentPresetModules?: MerkleStoreModuleToManyContentPresetModuleFilter; + /** `contentPresetModules` exist. */ + contentPresetModulesExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -9117,8 +9914,6 @@ export interface MerkleStoreModuleFilter { pagesModules?: MerkleStoreModuleToManyPagesModuleFilter; /** `pagesModules` exist. */ pagesModulesExist?: boolean; - /** Filter by the object’s `permissionKey` field. */ - permissionKey?: StringFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -9145,6 +9940,7 @@ export interface MerkleStoreModuleFilter { /** An input for mutations affecting `MerkleStoreModule` */ export interface MerkleStoreModuleInput { apiName?: string; + capabilityKey?: string; commitTableId?: string; createdAt?: string; databaseId: string; @@ -9152,7 +9948,6 @@ export interface MerkleStoreModuleInput { functionPrefix?: string; id?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -9166,6 +9961,7 @@ export interface MerkleStoreModuleInput { /** Represents an update to a `MerkleStoreModule`. Fields that are set will be updated. */ export interface MerkleStoreModulePatch { apiName?: string; + capabilityKey?: string; commitTableId?: string; createdAt?: string; databaseId?: string; @@ -9173,7 +9969,6 @@ export interface MerkleStoreModulePatch { functionPrefix?: string; id?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -9184,6 +9979,15 @@ export interface MerkleStoreModulePatch { scope?: string; storeTableId?: string; } +/** A filter to be used against many `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface MerkleStoreModuleToManyContentPresetModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: ContentPresetModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: ContentPresetModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ContentPresetModuleFilter; +} /** A filter to be used against many `DbPresetModule` object types. All fields are combined with a logical ‘and.’ */ export interface MerkleStoreModuleToManyDbPresetModuleFilter { /** Filters to entities where every related entity matches. */ @@ -9228,8 +10032,8 @@ export interface NamespaceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -9283,7 +10087,7 @@ export interface NamespaceModuleFilter { export interface NamespaceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -9305,7 +10109,7 @@ export interface NamespaceModuleInput { export interface NamespaceModulePatch { apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -9360,8 +10164,8 @@ export interface NotificationsModuleFilter { channelsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deliveryLogTableId` field. */ deliveryLogTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -9412,7 +10216,7 @@ export interface NotificationsModuleInput { apiName?: string; channelsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -9439,7 +10243,7 @@ export interface NotificationsModulePatch { apiName?: string; channelsTableId?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -9461,6 +10265,69 @@ export interface NotificationsModulePatch { suppressionsTableId?: string; userSettingsTableId?: string; } +/** A filter to be used against `OauthRequestsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface OauthRequestsModuleFilter { + /** Checks for all expressions in this list. */ + and?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OauthRequestsModuleFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableId` field. */ + oauthAuthorizationRequestsTableId?: UUIDFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableName` field. */ + oauthAuthorizationRequestsTableName?: StringFilter; + /** Checks for any expressions in this list. */ + or?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `pendingIdentityLinksTableId` field. */ + pendingIdentityLinksTableId?: UUIDFilter; + /** Filter by the object’s `pendingIdentityLinksTableName` field. */ + pendingIdentityLinksTableName?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; +} +/** An input for mutations affecting `OauthRequestsModule` */ +export interface OauthRequestsModuleInput { + databaseId: string; + entityField?: string; + entityTableId?: string; + id?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope: string; +} +/** Represents an update to a `OauthRequestsModule`. Fields that are set will be updated. */ +export interface OauthRequestsModulePatch { + databaseId?: string; + entityField?: string; + entityTableId?: string; + id?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope?: string; +} /** A filter to be used against `PagesModule` object types. All fields are combined with a logical ‘and.’ */ export interface PagesModuleFilter { /** Checks for all expressions in this list. */ @@ -9558,109 +10425,6 @@ export interface PagesModulePatch { sitesTableId?: string; storeNamePrefix?: string; } -/** A filter to be used against `PermissionsModule` object types. All fields are combined with a logical ‘and.’ */ -export interface PermissionsModuleFilter { - /** Filter by the object’s `actorTableId` field. */ - actorTableId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: PermissionsModuleFilter[]; - /** Filter by the object’s `apiName` field. */ - apiName?: StringFilter; - /** Filter by the object’s `bitlen` field. */ - bitlen?: IntFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `defaultTableId` field. */ - defaultTableId?: UUIDFilter; - /** Filter by the object’s `defaultTableName` field. */ - defaultTableName?: StringFilter; - /** Filter by the object’s `entityField` field. */ - entityField?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `getByMask` field. */ - getByMask?: StringFilter; - /** Filter by the object’s `getMask` field. */ - getMask?: StringFilter; - /** Filter by the object’s `getMaskByName` field. */ - getMaskByName?: StringFilter; - /** Filter by the object’s `getPaddedMask` field. */ - getPaddedMask?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Negates the expression. */ - not?: PermissionsModuleFilter; - /** Checks for any expressions in this list. */ - or?: PermissionsModuleFilter[]; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `privateApiName` field. */ - privateApiName?: StringFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `scope` field. */ - scope?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; -} -/** An input for mutations affecting `PermissionsModule` */ -export interface PermissionsModuleInput { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - id?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; -} -/** Represents an update to a `PermissionsModule`. Fields that are set will be updated. */ -export interface PermissionsModulePatch { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId?: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - id?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope?: string; - tableId?: string; - tableName?: string; -} /** A filter to be used against `PhoneNumbersModule` object types. All fields are combined with a logical ‘and.’ */ export interface PhoneNumbersModuleFilter { /** Checks for all expressions in this list. */ @@ -9906,6 +10670,8 @@ export interface ProfilesModuleFilter { and?: ProfilesModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -9914,14 +10680,16 @@ export interface ProfilesModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableId` field. */ + membershipProfilesTableId?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableName` field. */ + membershipProfilesTableName?: StringFilter; /** Filter by the object’s `membershipsTableId` field. */ membershipsTableId?: UUIDFilter; /** Negates the expression. */ not?: ProfilesModuleFilter; /** Checks for any expressions in this list. */ or?: ProfilesModuleFilter[]; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -9930,6 +10698,10 @@ export interface ProfilesModuleFilter { privateSchemaId?: UUIDFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; + /** Filter by the object’s `profileCapabilitiesTableId` field. */ + profileCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `profileCapabilitiesTableName` field. */ + profileCapabilitiesTableName?: StringFilter; /** Filter by the object’s `profileDefinitionGrantsTableId` field. */ profileDefinitionGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileDefinitionGrantsTableName` field. */ @@ -9938,10 +10710,6 @@ export interface ProfilesModuleFilter { profileGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileGrantsTableName` field. */ profileGrantsTableName?: StringFilter; - /** Filter by the object’s `profilePermissionsTableId` field. */ - profilePermissionsTableId?: UUIDFilter; - /** Filter by the object’s `profilePermissionsTableName` field. */ - profilePermissionsTableName?: StringFilter; /** Filter by the object’s `profileTemplatesTableId` field. */ profileTemplatesTableId?: UUIDFilter; /** Filter by the object’s `profileTemplatesTableName` field. */ @@ -9961,139 +10729,70 @@ export interface ProfilesModuleFilter { export interface ProfilesModuleInput { actorTableId?: string; apiName?: string; + capabilitiesTableId?: string; databaseId: string; entityField?: string; entityTableId?: string; id?: string; - membershipsTableId?: string; - permissionsTableId?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - profileDefinitionGrantsTableId?: string; - profileDefinitionGrantsTableName?: string; - profileGrantsTableId?: string; - profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; - profileTemplatesTableId?: string; - profileTemplatesTableName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; -} -/** Represents an update to a `ProfilesModule`. Fields that are set will be updated. */ -export interface ProfilesModulePatch { - actorTableId?: string; - apiName?: string; - databaseId?: string; - entityField?: string; - entityTableId?: string; - id?: string; - membershipsTableId?: string; - permissionsTableId?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - profileDefinitionGrantsTableId?: string; - profileDefinitionGrantsTableName?: string; - profileGrantsTableId?: string; - profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; - profileTemplatesTableId?: string; - profileTemplatesTableName?: string; - publicSchemaName?: string; - schemaId?: string; - scope?: string; - tableId?: string; - tableName?: string; -} -export interface ProvisionBucketInput { - /** The logical bucket key (e.g., "public", "private") */ - bucketKey: string; - /** - * Owner entity ID for entity-scoped bucket provisioning. - * Omit for app-level (database-wide) storage. - */ - ownerId?: string; -} -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: unknown; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: unknown; - policies?: unknown; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: unknown; - fullTextSearches?: unknown; - grants?: unknown; - indexes?: unknown; - nodes?: unknown; - policies?: unknown; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; + membershipsTableId?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; + profileDefinitionGrantsTableId?: string; + profileDefinitionGrantsTableName?: string; + profileGrantsTableId?: string; + profileGrantsTableName?: string; + profileTemplatesTableId?: string; + profileTemplatesTableName?: string; + publicSchemaName?: string; schemaId?: string; + scope: string; tableId?: string; tableName?: string; - uniqueConstraints?: unknown; - useRls?: boolean; } -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; +/** Represents an update to a `ProfilesModule`. Fields that are set will be updated. */ +export interface ProfilesModulePatch { + actorTableId?: string; + apiName?: string; + capabilitiesTableId?: string; databaseId?: string; - definition?: unknown; + entityField?: string; + entityTableId?: string; + id?: string; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; + membershipsTableId?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; + profileDefinitionGrantsTableId?: string; + profileDefinitionGrantsTableName?: string; + profileGrantsTableId?: string; + profileGrantsTableName?: string; + profileTemplatesTableId?: string; + profileTemplatesTableName?: string; + publicSchemaName?: string; + schemaId?: string; + scope?: string; tableId?: string; + tableName?: string; +} +export interface ProvisionBucketInput { + /** The logical bucket key (e.g., "public", "private") */ + bucketKey: string; + /** + * Owner entity ID for entity-scoped bucket provisioning. + * Omit for app-level (database-wide) storage. + */ + ownerId?: string; } /** A filter to be used against `RateLimitMetersModule` object types. All fields are combined with a logical ‘and.’ */ export interface RateLimitMetersModuleFilter { @@ -10105,8 +10804,8 @@ export interface RateLimitMetersModuleFilter { checkRateLimitFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -10143,7 +10842,7 @@ export interface RateLimitMetersModuleInput { apiName?: string; checkRateLimitFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; id?: string; prefix?: string; privateApiName?: string; @@ -10163,7 +10862,7 @@ export interface RateLimitMetersModulePatch { apiName?: string; checkRateLimitFunction?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; id?: string; prefix?: string; privateApiName?: string; @@ -10613,8 +11312,8 @@ export interface ResourceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -10702,7 +11401,7 @@ export interface ResourceModuleFilter { export interface ResourceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -10741,7 +11440,7 @@ export interface ResourceModuleInput { export interface ResourceModulePatch { apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -10858,6 +11557,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -10866,8 +11567,10 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ domainModule?: DomainModuleFilter; /** A related `domainModule` exists. */ @@ -10920,9 +11623,11 @@ export interface RouteModuleFilter { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -10947,9 +11652,11 @@ export interface RouteModuleInput { /** Represents an update to a `RouteModule`. Fields that are set will be updated. */ export interface RouteModulePatch { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId?: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -10971,6 +11678,41 @@ export interface RouteModulePatch { schemaId?: string; scope?: string; } +/** A filter to be used against `ScopeTypesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} +/** Represents an update to a `ScopeTypesModule`. Fields that are set will be updated. */ +export interface ScopeTypesModulePatch { + databaseId?: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** A filter to be used against `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ @@ -11166,8 +11908,12 @@ export interface SiteSurfaceModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailSenderModules` relation. */ + emailSenderModules?: SiteSurfaceModuleToManyEmailSenderModuleFilter; + /** `emailSenderModules` exist. */ + emailSenderModulesExist?: boolean; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -11238,7 +11984,7 @@ export interface SiteSurfaceModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -11273,7 +12019,7 @@ export interface SiteSurfaceModulePatch { apiName?: string; catalogModuleId?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -11303,6 +12049,15 @@ export interface SiteSurfaceModulePatch { sitesTableId?: string; sitesTableName?: string; } +/** A filter to be used against many `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteSurfaceModuleToManyEmailSenderModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSenderModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSenderModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSenderModuleFilter; +} /** A filter to be used against many `PagesModule` object types. All fields are combined with a logical ‘and.’ */ export interface SiteSurfaceModuleToManyPagesModuleFilter { /** Filters to entities where every related entity matches. */ @@ -11427,10 +12182,10 @@ export interface StorageModuleFilter { confirmUploadDelay?: IntervalFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMaxFileSize` field. */ defaultMaxFileSize?: BigIntFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `downloadUrlExpirySeconds` field. */ downloadUrlExpirySeconds?: IntFilter; /** Filter by the object’s `endpoint` field. */ @@ -11441,6 +12196,10 @@ export interface StorageModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `fileEventsTableId` field. */ fileEventsTableId?: UUIDFilter; + /** Filter by the object’s `fileRefFields` relation. */ + fileRefFields?: StorageModuleToManyFileRefFieldFilter; + /** `fileRefFields` exist. */ + fileRefFieldsExist?: boolean; /** Filter by the object’s `filesTableId` field. */ filesTableId?: UUIDFilter; /** Filter by the object’s `filesTableName` field. */ @@ -11512,8 +12271,8 @@ export interface StorageModuleInput { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -11556,8 +12315,8 @@ export interface StorageModulePatch { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId?: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -11590,6 +12349,15 @@ export interface StorageModulePatch { scope?: string; uploadUrlExpirySeconds?: number; } +/** A filter to be used against many `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface StorageModuleToManyFileRefFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: FileRefFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: FileRefFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: FileRefFieldFilter; +} /** A filter to be used against many `HttpRouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface StorageModuleToManyHttpRouteModuleFilter { /** Filters to entities where every related entity matches. */ @@ -11745,6 +12513,12 @@ export interface UpdateBlueprintTemplateInput { /** Unique identifier for this template. */ id: string; } +export interface UpdateCapabilitiesModuleInput { + /** An object where the defined keys will be set on the `CapabilitiesModule` being updated. */ + capabilitiesModulePatch: CapabilitiesModulePatch; + clientMutationId?: string; + id: string; +} export interface UpdateCatalogModuleInput { /** An object where the defined keys will be set on the `CatalogModule` being updated. */ catalogModulePatch: CatalogModulePatch; @@ -11769,6 +12543,12 @@ export interface UpdateConnectedAccountsModuleInput { connectedAccountsModulePatch: ConnectedAccountsModulePatch; id: string; } +export interface UpdateContentPresetModuleInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `ContentPresetModule` being updated. */ + contentPresetModulePatch: ContentPresetModulePatch; + id: string; +} export interface UpdateCryptoAddressesModuleInput { clientMutationId?: string; /** An object where the defined keys will be set on the `CryptoAddressesModule` being updated. */ @@ -11781,6 +12561,12 @@ export interface UpdateCryptoAuthModuleInput { cryptoAuthModulePatch: CryptoAuthModulePatch; id: string; } +export interface UpdateDataCapabilitiesFieldInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `DataCapabilitiesField` being updated. */ + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; + id: string; +} export interface UpdateDatabaseProvisionModuleInput { clientMutationId?: string; /** An object where the defined keys will be set on the `DatabaseProvisionModule` being updated. */ @@ -11841,6 +12627,12 @@ export interface UpdateDomainModuleInput { domainModulePatch: DomainModulePatch; id: string; } +export interface UpdateEmailSenderModuleInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `EmailSenderModule` being updated. */ + emailSenderModulePatch: EmailSenderModulePatch; + id: string; +} export interface UpdateEmailsModuleInput { clientMutationId?: string; /** An object where the defined keys will be set on the `EmailsModule` being updated. */ @@ -11860,6 +12652,12 @@ export interface UpdateEventsModuleInput { eventsModulePatch: EventsModulePatch; id: string; } +export interface UpdateFileRefFieldInput { + clientMutationId?: string; + /** An object where the defined keys will be set on the `FileRefField` being updated. */ + fileRefFieldPatch: FileRefFieldPatch; + id: string; +} export interface UpdateFunctionDeploymentModuleInput { clientMutationId?: string; /** An object where the defined keys will be set on the `FunctionDeploymentModule` being updated. */ @@ -11986,17 +12784,17 @@ export interface UpdateNotificationsModuleInput { /** An object where the defined keys will be set on the `NotificationsModule` being updated. */ notificationsModulePatch: NotificationsModulePatch; } -export interface UpdatePagesModuleInput { +export interface UpdateOauthRequestsModuleInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `PagesModule` being updated. */ - pagesModulePatch: PagesModulePatch; + /** An object where the defined keys will be set on the `OauthRequestsModule` being updated. */ + oauthRequestsModulePatch: OauthRequestsModulePatch; } -export interface UpdatePermissionsModuleInput { +export interface UpdatePagesModuleInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `PermissionsModule` being updated. */ - permissionsModulePatch: PermissionsModulePatch; + /** An object where the defined keys will be set on the `PagesModule` being updated. */ + pagesModulePatch: PagesModulePatch; } export interface UpdatePhoneNumbersModuleInput { clientMutationId?: string; @@ -12065,6 +12863,12 @@ export interface UpdateRouteModuleInput { /** An object where the defined keys will be set on the `RouteModule` being updated. */ routeModulePatch: RouteModulePatch; } +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `ScopeTypesModule` being updated. */ + scopeTypesModulePatch: ScopeTypesModulePatch; +} export interface UpdateSecureTableProvisionInput { clientMutationId?: string; /** Unique identifier for this provision row. */ @@ -12126,6 +12930,12 @@ export interface UpdateUserSettingsModuleInput { /** An object where the defined keys will be set on the `UserSettingsModule` being updated. */ userSettingsModulePatch: UserSettingsModulePatch; } +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `UserSettingsSecurityModule` being updated. */ + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} export interface UpdateUserStateModuleInput { clientMutationId?: string; id: string; @@ -12369,6 +13179,49 @@ export interface UserSettingsModulePatch { tableId?: string; tableName?: string; } +/** A filter to be used against `UserSettingsSecurityModule` object types. All fields are combined with a logical ‘and.’ */ +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: 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; +} +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} +/** Represents an update to a `UserSettingsSecurityModule`. Fields that are set will be updated. */ +export interface UserSettingsSecurityModulePatch { + apiName?: string; + databaseId?: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** A filter to be used against `UserStateModule` object types. All fields are combined with a logical ‘and.’ */ export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ @@ -12599,8 +13452,8 @@ export interface WebhookModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -12666,7 +13519,7 @@ export interface WebhookModuleFilter { export interface WebhookModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -12692,7 +13545,7 @@ export interface WebhookModuleInput { export interface WebhookModulePatch { apiName?: string; databaseId?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -12774,6 +13627,13 @@ export interface BlueprintConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `CapabilitiesModule` values. */ +export interface CapabilitiesModuleConnection { + edges: CapabilitiesModuleEdge[]; + nodes: CapabilitiesModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `CatalogModule` values. */ export interface CatalogModuleConnection { edges: CatalogModuleEdge[]; @@ -12802,6 +13662,13 @@ export interface ConnectedAccountsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ContentPresetModule` values. */ +export interface ContentPresetModuleConnection { + edges: ContentPresetModuleEdge[]; + nodes: ContentPresetModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `CryptoAddressesModule` values. */ export interface CryptoAddressesModuleConnection { edges: CryptoAddressesModuleEdge[]; @@ -12816,6 +13683,13 @@ export interface CryptoAuthModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `DataCapabilitiesField` values. */ +export interface DataCapabilitiesFieldConnection { + edges: DataCapabilitiesFieldEdge[]; + nodes: DataCapabilitiesField[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `DatabaseProvisionModule` values. */ export interface DatabaseProvisionModuleConnection { edges: DatabaseProvisionModuleEdge[]; @@ -12886,6 +13760,13 @@ export interface DomainModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `EmailSenderModule` values. */ +export interface EmailSenderModuleConnection { + edges: EmailSenderModuleEdge[]; + nodes: EmailSenderModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `EmailsModule` values. */ export interface EmailsModuleConnection { edges: EmailsModuleEdge[]; @@ -12907,6 +13788,13 @@ export interface EventsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `FileRefField` values. */ +export interface FileRefFieldConnection { + edges: FileRefFieldEdge[]; + nodes: FileRefField[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `FunctionDeploymentModule` values. */ export interface FunctionDeploymentModuleConnection { edges: FunctionDeploymentModuleEdge[]; @@ -13054,6 +13942,13 @@ export interface NotificationsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OauthRequestsModule` values. */ +export interface OauthRequestsModuleConnection { + edges: OauthRequestsModuleEdge[]; + nodes: OauthRequestsModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PagesModule` values. */ export interface PagesModuleConnection { edges: PagesModuleEdge[]; @@ -13061,13 +13956,6 @@ export interface PagesModuleConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `PermissionsModule` values. */ -export interface PermissionsModuleConnection { - edges: PermissionsModuleEdge[]; - nodes: PermissionsModule[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `PhoneNumbersModule` values. */ export interface PhoneNumbersModuleConnection { edges: PhoneNumbersModuleEdge[]; @@ -13145,6 +14033,13 @@ export interface RouteModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ScopeTypesModule` values. */ +export interface ScopeTypesModuleConnection { + edges: ScopeTypesModuleEdge[]; + nodes: ScopeTypesModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `SecureTableProvision` values. */ export interface SecureTableProvisionConnection { edges: SecureTableProvisionEdge[]; @@ -13215,6 +14110,13 @@ export interface UserSettingsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `UserSettingsSecurityModule` values. */ +export interface UserSettingsSecurityModuleConnection { + edges: UserSettingsSecurityModuleEdge[]; + nodes: UserSettingsSecurityModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `UserStateModule` values. */ export interface UserStateModuleConnection { edges: UserStateModuleEdge[]; @@ -13306,6 +14208,12 @@ export interface CreateBlueprintTemplatePayload { blueprintTemplateEdge?: BlueprintTemplateEdge | null; clientMutationId?: string | null; } +export interface CreateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was created by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} export interface CreateCatalogModulePayload { /** The `CatalogModule` that was created by this mutation. */ catalogModule?: CatalogModule | null; @@ -13330,6 +14238,12 @@ export interface CreateConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface CreateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was created by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} export interface CreateCryptoAddressesModulePayload { clientMutationId?: string | null; /** The `CryptoAddressesModule` that was created by this mutation. */ @@ -13342,6 +14256,12 @@ export interface CreateCryptoAuthModulePayload { cryptoAuthModule?: CryptoAuthModule | null; cryptoAuthModuleEdge?: CryptoAuthModuleEdge | null; } +export interface CreateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was created by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -13402,6 +14322,12 @@ export interface CreateDomainModulePayload { domainModule?: DomainModule | null; domainModuleEdge?: DomainModuleEdge | null; } +export interface CreateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was created by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} export interface CreateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was created by this mutation. */ @@ -13420,6 +14346,12 @@ export interface CreateEventsModulePayload { eventsModule?: EventsModule | null; eventsModuleEdge?: EventsModuleEdge | null; } +export interface CreateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was created by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} export interface CreateFunctionDeploymentModulePayload { clientMutationId?: string | null; /** The `FunctionDeploymentModule` that was created by this mutation. */ @@ -13546,18 +14478,18 @@ export interface CreateNotificationsModulePayload { notificationsModule?: NotificationsModule | null; notificationsModuleEdge?: NotificationsModuleEdge | null; } +export interface CreateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was created by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} export interface CreatePagesModulePayload { clientMutationId?: string | null; /** The `PagesModule` that was created by this mutation. */ pagesModule?: PagesModule | null; pagesModuleEdge?: PagesModuleEdge | null; } -export interface CreatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was created by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} export interface CreatePhoneNumbersModulePayload { clientMutationId?: string | null; /** The `PhoneNumbersModule` that was created by this mutation. */ @@ -13624,6 +14556,12 @@ export interface CreateRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -13684,6 +14622,12 @@ export interface CreateUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -13762,6 +14706,12 @@ export interface DeleteBlueprintTemplatePayload { blueprintTemplateEdge?: BlueprintTemplateEdge | null; clientMutationId?: string | null; } +export interface DeleteCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was deleted by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} export interface DeleteCatalogModulePayload { /** The `CatalogModule` that was deleted by this mutation. */ catalogModule?: CatalogModule | null; @@ -13786,6 +14736,12 @@ export interface DeleteConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface DeleteContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was deleted by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} export interface DeleteCryptoAddressesModulePayload { clientMutationId?: string | null; /** The `CryptoAddressesModule` that was deleted by this mutation. */ @@ -13798,6 +14754,12 @@ export interface DeleteCryptoAuthModulePayload { cryptoAuthModule?: CryptoAuthModule | null; cryptoAuthModuleEdge?: CryptoAuthModuleEdge | null; } +export interface DeleteDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was deleted by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} export interface DeleteDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was deleted by this mutation. */ @@ -13858,6 +14820,12 @@ export interface DeleteDomainModulePayload { domainModule?: DomainModule | null; domainModuleEdge?: DomainModuleEdge | null; } +export interface DeleteEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was deleted by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} export interface DeleteEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was deleted by this mutation. */ @@ -13876,6 +14844,12 @@ export interface DeleteEventsModulePayload { eventsModule?: EventsModule | null; eventsModuleEdge?: EventsModuleEdge | null; } +export interface DeleteFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was deleted by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} export interface DeleteFunctionDeploymentModulePayload { clientMutationId?: string | null; /** The `FunctionDeploymentModule` that was deleted by this mutation. */ @@ -14002,18 +14976,18 @@ export interface DeleteNotificationsModulePayload { notificationsModule?: NotificationsModule | null; notificationsModuleEdge?: NotificationsModuleEdge | null; } +export interface DeleteOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was deleted by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} export interface DeletePagesModulePayload { clientMutationId?: string | null; /** The `PagesModule` that was deleted by this mutation. */ pagesModule?: PagesModule | null; pagesModuleEdge?: PagesModuleEdge | null; } -export interface DeletePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was deleted by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} export interface DeletePhoneNumbersModulePayload { clientMutationId?: string | null; /** The `PhoneNumbersModule` that was deleted by this mutation. */ @@ -14080,6 +15054,12 @@ export interface DeleteRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface DeleteSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was deleted by this mutation. */ @@ -14140,6 +15120,12 @@ export interface DeleteUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface DeleteUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was deleted by this mutation. */ @@ -14184,32 +15170,6 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; -} -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; -} export interface UpdateAgentModulePayload { /** The `AgentModule` that was updated by this mutation. */ agentModule?: AgentModule | null; @@ -14258,6 +15218,12 @@ export interface UpdateBlueprintTemplatePayload { blueprintTemplateEdge?: BlueprintTemplateEdge | null; clientMutationId?: string | null; } +export interface UpdateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was updated by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} export interface UpdateCatalogModulePayload { /** The `CatalogModule` that was updated by this mutation. */ catalogModule?: CatalogModule | null; @@ -14282,6 +15248,12 @@ export interface UpdateConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface UpdateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was updated by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} export interface UpdateCryptoAddressesModulePayload { clientMutationId?: string | null; /** The `CryptoAddressesModule` that was updated by this mutation. */ @@ -14294,6 +15266,12 @@ export interface UpdateCryptoAuthModulePayload { cryptoAuthModule?: CryptoAuthModule | null; cryptoAuthModuleEdge?: CryptoAuthModuleEdge | null; } +export interface UpdateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was updated by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} export interface UpdateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was updated by this mutation. */ @@ -14354,6 +15332,12 @@ export interface UpdateDomainModulePayload { domainModule?: DomainModule | null; domainModuleEdge?: DomainModuleEdge | null; } +export interface UpdateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was updated by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} export interface UpdateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was updated by this mutation. */ @@ -14372,6 +15356,12 @@ export interface UpdateEventsModulePayload { eventsModule?: EventsModule | null; eventsModuleEdge?: EventsModuleEdge | null; } +export interface UpdateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was updated by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} export interface UpdateFunctionDeploymentModulePayload { clientMutationId?: string | null; /** The `FunctionDeploymentModule` that was updated by this mutation. */ @@ -14498,18 +15488,18 @@ export interface UpdateNotificationsModulePayload { notificationsModule?: NotificationsModule | null; notificationsModuleEdge?: NotificationsModuleEdge | null; } +export interface UpdateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was updated by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} export interface UpdatePagesModulePayload { clientMutationId?: string | null; /** The `PagesModule` that was updated by this mutation. */ pagesModule?: PagesModule | null; pagesModuleEdge?: PagesModuleEdge | null; } -export interface UpdatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was updated by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} export interface UpdatePhoneNumbersModulePayload { clientMutationId?: string | null; /** The `PhoneNumbersModule` that was updated by this mutation. */ @@ -14576,6 +15566,12 @@ export interface UpdateRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface UpdateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was updated by this mutation. */ @@ -14636,6 +15632,12 @@ export interface UpdateUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface UpdateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was updated by this mutation. */ @@ -14752,6 +15754,12 @@ export interface BlueprintEdge { /** The `Blueprint` at the end of the edge. */ node?: Blueprint | null; } +/** A `CapabilitiesModule` edge in the connection. */ +export interface CapabilitiesModuleEdge { + cursor?: string | null; + /** The `CapabilitiesModule` at the end of the edge. */ + node?: CapabilitiesModule | null; +} /** A `CatalogModule` edge in the connection. */ export interface CatalogModuleEdge { cursor?: string | null; @@ -14776,6 +15784,12 @@ export interface ConnectedAccountsModuleEdge { /** The `ConnectedAccountsModule` at the end of the edge. */ node?: ConnectedAccountsModule | null; } +/** A `ContentPresetModule` edge in the connection. */ +export interface ContentPresetModuleEdge { + cursor?: string | null; + /** The `ContentPresetModule` at the end of the edge. */ + node?: ContentPresetModule | null; +} /** A `CryptoAddressesModule` edge in the connection. */ export interface CryptoAddressesModuleEdge { cursor?: string | null; @@ -14788,6 +15802,12 @@ export interface CryptoAuthModuleEdge { /** The `CryptoAuthModule` at the end of the edge. */ node?: CryptoAuthModule | null; } +/** A `DataCapabilitiesField` edge in the connection. */ +export interface DataCapabilitiesFieldEdge { + cursor?: string | null; + /** The `DataCapabilitiesField` at the end of the edge. */ + node?: DataCapabilitiesField | null; +} /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -14848,6 +15868,12 @@ export interface DomainModuleEdge { /** The `DomainModule` at the end of the edge. */ node?: DomainModule | null; } +/** A `EmailSenderModule` edge in the connection. */ +export interface EmailSenderModuleEdge { + cursor?: string | null; + /** The `EmailSenderModule` at the end of the edge. */ + node?: EmailSenderModule | null; +} /** A `EmailsModule` edge in the connection. */ export interface EmailsModuleEdge { cursor?: string | null; @@ -14866,6 +15892,12 @@ export interface EventsModuleEdge { /** The `EventsModule` at the end of the edge. */ node?: EventsModule | null; } +/** A `FileRefField` edge in the connection. */ +export interface FileRefFieldEdge { + cursor?: string | null; + /** The `FileRefField` at the end of the edge. */ + node?: FileRefField | null; +} /** A `FunctionDeploymentModule` edge in the connection. */ export interface FunctionDeploymentModuleEdge { cursor?: string | null; @@ -14992,18 +16024,18 @@ export interface NotificationsModuleEdge { /** The `NotificationsModule` at the end of the edge. */ node?: NotificationsModule | null; } +/** A `OauthRequestsModule` edge in the connection. */ +export interface OauthRequestsModuleEdge { + cursor?: string | null; + /** The `OauthRequestsModule` at the end of the edge. */ + node?: OauthRequestsModule | null; +} /** A `PagesModule` edge in the connection. */ export interface PagesModuleEdge { cursor?: string | null; /** The `PagesModule` at the end of the edge. */ node?: PagesModule | null; } -/** A `PermissionsModule` edge in the connection. */ -export interface PermissionsModuleEdge { - cursor?: string | null; - /** The `PermissionsModule` at the end of the edge. */ - node?: PermissionsModule | null; -} /** A `PhoneNumbersModule` edge in the connection. */ export interface PhoneNumbersModuleEdge { cursor?: string | null; @@ -15070,6 +16102,12 @@ export interface RouteModuleEdge { /** The `RouteModule` at the end of the edge. */ node?: RouteModule | null; } +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -15130,6 +16168,12 @@ export interface UserSettingsModuleEdge { /** The `UserSettingsModule` at the end of the edge. */ node?: UserSettingsModule | null; } +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; @@ -15160,16 +16204,6 @@ export interface WebhookModuleEdge { /** The `WebhookModule` at the end of the edge. */ node?: WebhookModule | null; } -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} /** Table constraints */ export interface MetaConstraints { foreignKey: MetaForeignKeyConstraint[]; diff --git a/sdk/constructive-react/src/modules/types.ts b/sdk/constructive-react/src/modules/types.ts index 48928cdb88..eea5320eec 100644 --- a/sdk/constructive-react/src/modules/types.ts +++ b/sdk/constructive-react/src/modules/types.ts @@ -8,7 +8,7 @@ export interface AgentModule { agentTableName: string | null; apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; hasAgents: boolean | null; @@ -53,7 +53,7 @@ export interface ApiSurfaceModule { corsSettingsTableId: string | null; corsSettingsTableName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -73,7 +73,7 @@ export interface AppModule { appsTableName: string | null; catalogModuleId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -92,8 +92,8 @@ export interface BillingModule { balancesTableId: string | null; balancesTableName: string | null; databaseId: string | null; + defaultCapabilities: string[] | null; defaultMeterCatalog: unknown | null; - defaultPermissions: string[] | null; id: string | null; ledgerTableId: string | null; ledgerTableName: string | null; @@ -121,16 +121,22 @@ export interface BillingProviderModule { apiName: string | null; billingCustomersTableId: string | null; billingCustomersTableName: string | null; + billingInvoicesTableId: string | null; + billingInvoicesTableName: string | null; billingPricesTableId: string | null; billingPricesTableName: string | null; billingProductsTableId: string | null; billingProductsTableName: string | null; + billingRefundsTableId: string | null; + billingRefundsTableName: string | null; billingSubscriptionsTableId: string | null; billingSubscriptionsTableName: string | null; billingWebhookEventsTableId: string | null; billingWebhookEventsTableName: string | null; databaseId: string | null; id: string | null; + listPendingUsageSyncFunction: string | null; + markUsageSyncedFunction: string | null; prefix: string | null; pricesTableId: string | null; privateApiName: string | null; @@ -138,8 +144,10 @@ export interface BillingProviderModule { processBillingEventFunction: string | null; productsTableId: string | null; provider: string | null; + recordRefundFunction: string | null; schemaId: string | null; subscriptionsTableId: string | null; + upsertInvoiceFunction: string | null; } export interface Blueprint { createdAt: string | null; @@ -190,16 +198,42 @@ export interface BlueprintTemplate { version: string | null; visibility: string | null; } +export interface CapabilitiesModule { + actorTableId: string | null; + apiName: string | null; + bitlen: number | null; + databaseId: string | null; + defaultTableId: string | null; + defaultTableName: string | null; + entityField: string | null; + entityTableId: string | null; + getByMask: string | null; + getMask: string | null; + getMaskByName: string | null; + getPaddedMask: string | null; + id: string | null; + prefix: string | null; + privateApiName: string | null; + privateSchemaId: string | null; + privateSchemaName: string | null; + publicSchemaName: string | null; + schemaId: string | null; + scope: string | null; + tableId: string | null; + tableName: string | null; +} export interface CatalogModule { apiName: string | null; apisTableId: string | null; apisTableName: string | null; appsTableId: string | null; appsTableName: string | null; + bindingsTableId: string | null; + bindingsTableName: string | null; bucketsTableId: string | null; bucketsTableName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; domainsTableId: string | null; domainsTableName: string | null; entityTableId: string | null; @@ -274,6 +308,25 @@ export interface ConnectedAccountsModule { tableId: string | null; tableName: string | null; } +export interface ContentPresetModule { + apiName: string | null; + contentPresetsTableId: string | null; + createdAt: string | null; + databaseId: string | null; + entityTableId: string | null; + id: string | null; + merkleStoreModuleId: string | null; + policies: unknown | null; + prefix: string | null; + privateApiName: string | null; + privateSchemaId: string | null; + privateSchemaName: string | null; + provisions: unknown | null; + publicSchemaId: string | null; + publicSchemaName: string | null; + scope: string | null; + storeName: string | null; +} export interface CryptoAddressesModule { apiName: string | null; cryptoNetwork: string | null; @@ -302,6 +355,19 @@ export interface CryptoAuthModule { userField: string | null; usersTableId: string | null; } +export interface DataCapabilitiesField { + capabilitiesModuleId: string | null; + databaseId: string | null; + fieldId: string | null; + fromFieldId: string | null; + id: string | null; + mappingFieldId: string | null; + mappingKeyFieldId: string | null; + mappingTableId: string | null; + mode: string | null; + subsetGuard: boolean | null; + tableId: string | null; +} export interface DatabaseProvisionModule { async: boolean | null; bootstrapError: string | null; @@ -328,7 +394,7 @@ export interface DatabaseSettingsModule { databaseId: string | null; databaseSettingsTableId: string | null; databaseSettingsTableName: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -397,7 +463,7 @@ export interface DbUsageModule { collectDbQueryStatsFunction: string | null; collectDbTableStatsFunction: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; id: string | null; interval: string | null; @@ -452,7 +518,7 @@ export interface DomainModule { apiName: string | null; catalogModuleId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; domainEventsTableId: string | null; domainEventsTableName: string | null; domainVerificationsTableId: string | null; @@ -474,6 +540,28 @@ export interface DomainModule { schemaId: string | null; scope: string | null; } +export interface EmailSenderModule { + apiName: string | null; + databaseId: string | null; + defaultCapabilities: string[] | null; + emailIdentitiesTableId: string | null; + emailIdentitiesTableName: string | null; + emailProviderAccountsTableId: string | null; + emailProviderAccountsTableName: string | null; + emailSiteIdentitiesTableId: string | null; + emailSiteIdentitiesTableName: string | null; + entityField: string | null; + entityTableId: string | null; + id: string | null; + policies: unknown | null; + prefix: string | null; + privateApiName: string | null; + provisions: unknown | null; + publicSchemaName: string | null; + schemaId: string | null; + scope: string | null; + siteSurfaceModuleId: string | null; +} export interface EmailsModule { apiName: string | null; databaseId: string | null; @@ -532,7 +620,7 @@ export interface EventsModule { actorTableId: string | null; apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; eventAggregatesTableId: string | null; @@ -541,6 +629,7 @@ export interface EventsModule { eventTypesTableName: string | null; eventsTableId: string | null; eventsTableName: string | null; + expireGrants: string | null; grantAchievement: string | null; id: string | null; interval: string | null; @@ -557,9 +646,11 @@ export interface EventsModule { privateSchemaId: string | null; privateSchemaName: string | null; publicSchemaName: string | null; + recomputeCapabilities: string | null; recordEvent: string | null; removeEvent: string | null; retention: string | null; + revokeAchievement: string | null; schemaId: string | null; scope: string | null; stepsRequired: string | null; @@ -569,13 +660,26 @@ export interface EventsModule { tgEventBool: string | null; tgEventToggle: string | null; tgEventToggleBool: string | null; + tgLevelGrantSync: string | null; tgUpdateAggregates: string | null; + trustLadder: unknown | null; upsertAggregate: string | null; } +export interface FileRefField { + bucketKey: string | null; + bucketTags: string[] | null; + databaseId: string | null; + enforceFk: boolean | null; + fieldId: string | null; + id: string | null; + isPublic: boolean | null; + storageModuleId: string | null; + tableId: string | null; +} export interface FunctionDeploymentModule { apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; deploymentEventsTableId: string | null; deploymentEventsTableName: string | null; deploymentsTableId: string | null; @@ -600,7 +704,7 @@ export interface FunctionInvocationModule { attemptsTableId: string | null; attemptsTableName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; executionLogsTableId: string | null; @@ -624,7 +728,7 @@ export interface FunctionModule { bindingsTableName: string | null; capabilityBindingsTableId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; definitionsTableId: string | null; definitionsTableName: string | null; entityField: string | null; @@ -646,7 +750,7 @@ export interface GraphExecutionModule { apiName: string | null; createdAt: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; executionsTableId: string | null; @@ -671,7 +775,7 @@ export interface GraphModule { apiName: string | null; createdAt: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; graphsTableId: string | null; @@ -694,7 +798,7 @@ export interface HierarchyModule { chartEdgesTableName: string | null; createdAt: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; getManagersFunction: string | null; @@ -715,7 +819,7 @@ export interface HierarchyModule { export interface HttpRouteModule { apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; functionModuleId: string | null; @@ -896,6 +1000,7 @@ export interface LimitsModule { limitCreditsTableId: string | null; limitDecrementFunction: string | null; limitDecrementTrigger: string | null; + limitDefaults: unknown | null; limitIncrementFunction: string | null; limitIncrementTrigger: string | null; limitUpdateTrigger: string | null; @@ -926,9 +1031,12 @@ export interface MembershipsModule { adminGrantsTableId: string | null; adminGrantsTableName: string | null; apiName: string | null; + capabilitiesTableId: string | null; + capabilityDefaultCapabilitiesTableId: string | null; + capabilityDefaultGrantsTableId: string | null; databaseId: string | null; + defaultCapabilitiesTableId: string | null; defaultLimitsTableId: string | null; - defaultPermissionsTableId: string | null; entityField: string | null; entityIdsByMask: string | null; entityIdsByPerm: string | null; @@ -951,9 +1059,6 @@ export interface MembershipsModule { membershipsTableName: string | null; ownerGrantsTableId: string | null; ownerGrantsTableName: string | null; - permissionDefaultGrantsTableId: string | null; - permissionDefaultPermissionsTableId: string | null; - permissionsTableId: string | null; prefix: string | null; privateApiName: string | null; privateSchemaId: string | null; @@ -965,6 +1070,7 @@ export interface MembershipsModule { } export interface MerkleStoreModule { apiName: string | null; + capabilityKey: string | null; commitTableId: string | null; createdAt: string | null; databaseId: string | null; @@ -972,7 +1078,6 @@ export interface MerkleStoreModule { functionPrefix: string | null; id: string | null; objectTableId: string | null; - permissionKey: string | null; prefix: string | null; privateApiName: string | null; privateSchemaId: string | null; @@ -986,7 +1091,7 @@ export interface MerkleStoreModule { export interface NamespaceModule { apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -1008,7 +1113,7 @@ export interface NotificationsModule { apiName: string | null; channelsTableId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; deliveryLogTableId: string | null; entityField: string | null; hasChannels: boolean | null; @@ -1030,6 +1135,20 @@ export interface NotificationsModule { suppressionsTableId: string | null; userSettingsTableId: string | null; } +export interface OauthRequestsModule { + databaseId: string | null; + entityField: string | null; + entityTableId: string | null; + id: string | null; + oauthAuthorizationRequestsTableId: string | null; + oauthAuthorizationRequestsTableName: string | null; + pendingIdentityLinksTableId: string | null; + pendingIdentityLinksTableName: string | null; + prefix: string | null; + privateSchemaId: string | null; + privateSchemaName: string | null; + scope: string | null; +} export interface PagesModule { apiName: string | null; createdAt: string | null; @@ -1051,30 +1170,6 @@ export interface PagesModule { sitesTableId: string | null; storeNamePrefix: string | null; } -export interface PermissionsModule { - actorTableId: string | null; - apiName: string | null; - bitlen: number | null; - databaseId: string | null; - defaultTableId: string | null; - defaultTableName: string | null; - entityField: string | null; - entityTableId: string | null; - getByMask: string | null; - getMask: string | null; - getMaskByName: string | null; - getPaddedMask: string | null; - id: string | null; - prefix: string | null; - privateApiName: string | null; - privateSchemaId: string | null; - privateSchemaName: string | null; - publicSchemaName: string | null; - schemaId: string | null; - scope: string | null; - tableId: string | null; - tableName: string | null; -} export interface PhoneNumbersModule { apiName: string | null; databaseId: string | null; @@ -1132,22 +1227,24 @@ export interface PrincipalAuthModule { export interface ProfilesModule { actorTableId: string | null; apiName: string | null; + capabilitiesTableId: string | null; databaseId: string | null; entityField: string | null; entityTableId: string | null; id: string | null; + membershipProfilesTableId: string | null; + membershipProfilesTableName: string | null; membershipsTableId: string | null; - permissionsTableId: string | null; prefix: string | null; privateApiName: string | null; privateSchemaId: string | null; privateSchemaName: string | null; + profileCapabilitiesTableId: string | null; + profileCapabilitiesTableName: string | null; profileDefinitionGrantsTableId: string | null; profileDefinitionGrantsTableName: string | null; profileGrantsTableId: string | null; profileGrantsTableName: string | null; - profilePermissionsTableId: string | null; - profilePermissionsTableName: string | null; profileTemplatesTableId: string | null; profileTemplatesTableName: string | null; publicSchemaName: string | null; @@ -1160,7 +1257,7 @@ export interface RateLimitMetersModule { apiName: string | null; checkRateLimitFunction: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; id: string | null; prefix: string | null; privateApiName: string | null; @@ -1231,7 +1328,7 @@ export interface RelationProvision { export interface ResourceModule { apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -1283,9 +1380,11 @@ export interface RlsModule { } export interface RouteModule { apiName: string | null; + appLinksFunctionName: string | null; catalogModuleId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + deepLinkFunctionName: string | null; + defaultCapabilities: string[] | null; domainModuleId: string | null; entityField: string | null; entityTableId: string | null; @@ -1307,6 +1406,13 @@ export interface RouteModule { schemaId: string | null; scope: string | null; } +export interface ScopeTypesModule { + databaseId: string | null; + id: string | null; + privateSchemaName: string | null; + schemaId: string | null; + scopeTypesTableId: string | null; +} export interface SecureTableProvision { databaseId: string | null; fields: unknown[] | null; @@ -1345,7 +1451,7 @@ export interface SiteSurfaceModule { apiName: string | null; catalogModuleId: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; id: string | null; @@ -1406,8 +1512,8 @@ export interface StorageModule { catalogModuleId: string | null; confirmUploadDelay: string | null; databaseId: string | null; + defaultCapabilities: string[] | null; defaultMaxFileSize: string | null; - defaultPermissions: string[] | null; downloadUrlExpirySeconds: number | null; endpoint: string | null; entityField: string | null; @@ -1510,6 +1616,15 @@ export interface UserSettingsModule { tableId: string | null; tableName: string | null; } +export interface UserSettingsSecurityModule { + apiName: string | null; + databaseId: string | null; + id: string | null; + ownerTableId: string | null; + schemaId: string | null; + tableId: string | null; + tableName: string | null; +} export interface UserStateModule { databaseId: string | null; entityField: string | null; @@ -1561,7 +1676,7 @@ export interface WebauthnCredentialsModule { export interface WebhookModule { apiName: string | null; databaseId: string | null; - defaultPermissions: string[] | null; + defaultCapabilities: string[] | null; entityField: string | null; entityTableId: string | null; functionInvocationModuleId: string | null; diff --git a/sdk/constructive-react/src/objects/README.md b/sdk/constructive-react/src/objects/README.md index e83f78ee5e..98706faac9 100644 --- a/sdk/constructive-react/src/objects/README.md +++ b/sdk/constructive-react/src/objects/README.md @@ -10,7 +10,7 @@ - **Tables:** 5 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/objects/hooks/README.md b/sdk/constructive-react/src/objects/hooks/README.md index a8cc8a0744..ed5348a544 100644 --- a/sdk/constructive-react/src/objects/hooks/README.md +++ b/sdk/constructive-react/src/objects/hooks/README.md @@ -56,11 +56,14 @@ function App() { | `useDeleteStoreMutation` | Mutation | Named stores — one per version-controlled tree (e.g. one graph, one definition set) | | `useInitEmptyRepoMutation` | Mutation | initEmptyRepo | | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | +| `useInsertNodesAtPathsMutation` | Mutation | insertNodesAtPaths | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | +| `useSetAndCommitMutation` | Mutation | setAndCommit | | `useSetDataAtPathMutation` | Mutation | setDataAtPath | +| `useSetManyAndCommitMutation` | Mutation | setManyAndCommit | ## Table Hooks @@ -187,6 +190,17 @@ insertNodeAtPath |----------|------| | `input` | InsertNodeAtPathInput (required) | +### `useInsertNodesAtPathsMutation` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + ### `useProvisionBucketMutation` Provision an S3 bucket for a logical bucket in the database. @@ -201,6 +215,17 @@ and lifecycle settings. |----------|------| | `input` | ProvisionBucketInput (required) | +### `useSetAndCommitMutation` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + ### `useSetDataAtPathMutation` setDataAtPath @@ -212,6 +237,17 @@ setDataAtPath |----------|------| | `input` | SetDataAtPathInput (required) | +### `useSetManyAndCommitMutation` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/objects/hooks/mutation-keys.ts b/sdk/constructive-react/src/objects/hooks/mutation-keys.ts index 5d6f35ef0d..5842fc3219 100644 --- a/sdk/constructive-react/src/objects/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/objects/hooks/mutation-keys.ts @@ -76,14 +76,26 @@ export const customMutationKeys = { identifier ? (['mutation', 'insertNodeAtPath', identifier] as const) : (['mutation', 'insertNodeAtPath'] as const), + /** Mutation key for insertNodesAtPaths */ insertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'insertNodesAtPaths', identifier] as const) + : (['mutation', 'insertNodesAtPaths'] as const), /** Mutation key for provisionBucket */ provisionBucket: (identifier?: string) => identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), + /** Mutation key for setAndCommit */ setAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setAndCommit', identifier] as const) + : (['mutation', 'setAndCommit'] as const), /** Mutation key for setDataAtPath */ setDataAtPath: (identifier?: string) => identifier ? (['mutation', 'setDataAtPath', identifier] as const) : (['mutation', 'setDataAtPath'] as const), + /** Mutation key for setManyAndCommit */ setManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setManyAndCommit', identifier] as const) + : (['mutation', 'setManyAndCommit'] as const), } as const; /** diff --git a/sdk/constructive-react/src/objects/hooks/mutations/index.ts b/sdk/constructive-react/src/objects/hooks/mutations/index.ts index b1f8e735fc..6f5d50802d 100644 --- a/sdk/constructive-react/src/objects/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/objects/hooks/mutations/index.ts @@ -18,5 +18,8 @@ export * from './useUpdateStoreMutation'; export * from './useDeleteStoreMutation'; export * from './useInitEmptyRepoMutation'; export * from './useInsertNodeAtPathMutation'; +export * from './useInsertNodesAtPathsMutation'; export * from './useProvisionBucketMutation'; +export * from './useSetAndCommitMutation'; export * from './useSetDataAtPathMutation'; +export * from './useSetManyAndCommitMutation'; diff --git a/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..70612f27eb --- /dev/null +++ b/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for insertNodesAtPaths + * @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 { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + InsertNodesAtPathsPayloadSelect, + InsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInsertNodesAtPathsMutation( + params: { + selection: { + fields: S & InsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.insertNodesAtPaths(), + mutationFn: (variables: InsertNodesAtPathsVariables) => + getClient() + .mutation.insertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts new file mode 100644 index 0000000000..efbed76921 --- /dev/null +++ b/sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setAndCommit + * @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 { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect, SetAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetAndCommitVariables } from '../../orm/mutation'; +export type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetAndCommitMutation( + params: { + selection: { + fields: S & SetAndCommitPayloadSelect; + } & HookStrictSelect, SetAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setAndCommit: InferSelectResult | null; + }, + Error, + SetAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setAndCommit: InferSelectResult | null; + }, + Error, + SetAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setAndCommit(), + mutationFn: (variables: SetAndCommitVariables) => + getClient() + .mutation.setAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..91ead94fd0 --- /dev/null +++ b/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setManyAndCommit + * @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 { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect, SetManyAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetManyAndCommitVariables } from '../../orm/mutation'; +export type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetManyAndCommitMutation( + params: { + selection: { + fields: S & SetManyAndCommitPayloadSelect; + } & HookStrictSelect, SetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setManyAndCommit(), + mutationFn: (variables: SetManyAndCommitVariables) => + getClient() + .mutation.setManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/objects/orm/README.md b/sdk/constructive-react/src/objects/orm/README.md index 2a09348ad0..e112c19ae0 100644 --- a/sdk/constructive-react/src/objects/orm/README.md +++ b/sdk/constructive-react/src/objects/orm/README.md @@ -228,6 +228,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -246,6 +261,21 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -261,6 +291,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/objects/orm/input-types.ts b/sdk/constructive-react/src/objects/orm/input-types.ts index bab07456e0..1ca44bc9d7 100644 --- a/sdk/constructive-react/src/objects/orm/input-types.ts +++ b/sdk/constructive-react/src/objects/orm/input-types.ts @@ -665,6 +665,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -674,6 +683,17 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -681,6 +701,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** An input for mutations affecting `Commit` */ export interface CommitInput { /** User who authored the changes */ @@ -758,6 +786,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -780,6 +816,20 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -788,6 +838,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface CreateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was created by this mutation. */ diff --git a/sdk/constructive-react/src/objects/orm/mutation/index.ts b/sdk/constructive-react/src/objects/orm/mutation/index.ts index a0c21cb2bd..7d08bdc42e 100644 --- a/sdk/constructive-react/src/objects/orm/mutation/index.ts +++ b/sdk/constructive-react/src/objects/orm/mutation/index.ts @@ -9,16 +9,25 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, ProvisionBucketInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, ProvisionBucketPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, ProvisionBucketPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface InitEmptyRepoVariables { @@ -27,6 +36,9 @@ export interface InitEmptyRepoVariables { export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -37,9 +49,15 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export function createMutationOperations(client: OrmClient) { return { initEmptyRepo: ( @@ -100,6 +118,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -129,6 +176,35 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -158,5 +234,34 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), }; } diff --git a/sdk/constructive-react/src/objects/schema-types.ts b/sdk/constructive-react/src/objects/schema-types.ts index 09a500c22e..6da9e09bff 100644 --- a/sdk/constructive-react/src/objects/schema-types.ts +++ b/sdk/constructive-react/src/objects/schema-types.ts @@ -227,6 +227,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `Object` object types. All fields are combined with a logical ‘and.’ */ export interface ObjectFilter { /** Checks for all expressions in this list. */ @@ -332,6 +341,17 @@ export interface RefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -339,6 +359,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `Store` object types. All fields are combined with a logical ‘and.’ */ export interface StoreFilter { /** Checks for all expressions in this list. */ @@ -512,6 +540,10 @@ export interface InsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -526,10 +558,20 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} export interface UpdateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was updated by this mutation. */ diff --git a/sdk/constructive-react/src/usage/README.md b/sdk/constructive-react/src/usage/README.md index e3bdc45b68..0c6467b8ee 100644 --- a/sdk/constructive-react/src/usage/README.md +++ b/sdk/constructive-react/src/usage/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 18 -- **Custom queries:** 0 -- **Custom mutations:** 5 +- **Tables:** 38 +- **Custom queries:** 5 +- **Custom mutations:** 11 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/usage/hooks/README.md b/sdk/constructive-react/src/usage/hooks/README.md index dd100f4c54..04e1899933 100644 --- a/sdk/constructive-react/src/usage/hooks/README.md +++ b/sdk/constructive-react/src/usage/hooks/README.md @@ -32,6 +32,41 @@ function App() { | Hook | Type | Description | |------|------|-------------| +| `useAppAchievementRewardsQuery` | Query | Defines rewards granted when a level is achieved; supports limit_credits and meter_credits | +| `useAppAchievementRewardQuery` | Query | Defines rewards granted when a level is achieved; supports limit_credits and meter_credits | +| `useCreateAppAchievementRewardMutation` | Mutation | Defines rewards granted when a level is achieved; supports limit_credits and meter_credits | +| `useUpdateAppAchievementRewardMutation` | Mutation | Defines rewards granted when a level is achieved; supports limit_credits and meter_credits | +| `useDeleteAppAchievementRewardMutation` | Mutation | Defines rewards granted when a level is achieved; supports limit_credits and meter_credits | +| `useAppEventAggregatesQuery` | Query | Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually | +| `useAppEventAggregateQuery` | Query | Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually | +| `useCreateAppEventAggregateMutation` | Mutation | Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually | +| `useUpdateAppEventAggregateMutation` | Mutation | Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually | +| `useDeleteAppEventAggregateMutation` | Mutation | Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually | +| `useAppEventsQuery` | Query | Partitioned append-only log of individual user actions; every single event ever recorded | +| `useAppEventQuery` | Query | Partitioned append-only log of individual user actions; every single event ever recorded | +| `useCreateAppEventMutation` | Mutation | Partitioned append-only log of individual user actions; every single event ever recorded | +| `useUpdateAppEventMutation` | Mutation | Partitioned append-only log of individual user actions; every single event ever recorded | +| `useDeleteAppEventMutation` | Mutation | Partitioned append-only log of individual user actions; every single event ever recorded | +| `useAppEventTypesQuery` | Query | Catalog of known event types with per-type configuration for aggregation, retention, and level participation | +| `useAppEventTypeQuery` | Query | Catalog of known event types with per-type configuration for aggregation, retention, and level participation | +| `useCreateAppEventTypeMutation` | Mutation | Catalog of known event types with per-type configuration for aggregation, retention, and level participation | +| `useUpdateAppEventTypeMutation` | Mutation | Catalog of known event types with per-type configuration for aggregation, retention, and level participation | +| `useDeleteAppEventTypeMutation` | Mutation | Catalog of known event types with per-type configuration for aggregation, retention, and level participation | +| `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 | +| `useUpdateAppLevelMutation` | Mutation | Defines available levels that users can achieve by completing requirements | +| `useDeleteAppLevelMutation` | Mutation | Defines available levels that users can achieve by completing requirements | +| `useAppLevelGrantsQuery` | Query | Records when a user achieves a level; prevents duplicate reward grants | +| `useAppLevelGrantQuery` | Query | Records when a user achieves a level; prevents duplicate reward grants | +| `useCreateAppLevelGrantMutation` | Mutation | Records when a user achieves a level; prevents duplicate reward grants | +| `useUpdateAppLevelGrantMutation` | Mutation | Records when a user achieves a level; prevents duplicate reward grants | +| `useDeleteAppLevelGrantMutation` | Mutation | Records when a user achieves a level; prevents duplicate reward grants | +| `useAppLevelRequirementsQuery` | Query | Defines the specific requirements that must be met to achieve a level | +| `useAppLevelRequirementQuery` | Query | Defines the specific requirements that must be met to achieve a level | +| `useCreateAppLevelRequirementMutation` | Mutation | Defines the specific requirements that must be met to achieve a level | +| `useUpdateAppLevelRequirementMutation` | Mutation | Defines the specific requirements that must be met to achieve a level | +| `useDeleteAppLevelRequirementMutation` | Mutation | Defines the specific requirements that must be met to achieve a level | | `useAppLimitCapsQuery` | Query | Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. | | `useAppLimitCapQuery` | Query | Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. | | `useCreateAppLimitCapMutation` | Mutation | Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. | @@ -47,11 +82,11 @@ function App() { | `useCreateAppLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | | `useUpdateAppLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | | `useDeleteAppLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | -| `useAppLimitCreditCodesQuery` | Query | Redeemable credit codes managed by admins with the add_credits permission | -| `useAppLimitCreditCodeQuery` | Query | Redeemable credit codes managed by admins with the add_credits permission | -| `useCreateAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits permission | -| `useUpdateAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits permission | -| `useDeleteAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits permission | +| `useAppLimitCreditCodesQuery` | Query | Redeemable credit codes managed by admins with the add_credits capability | +| `useAppLimitCreditCodeQuery` | Query | Redeemable credit codes managed by admins with the add_credits capability | +| `useCreateAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits capability | +| `useUpdateAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits capability | +| `useDeleteAppLimitCreditCodeMutation` | Mutation | Redeemable credit codes managed by admins with the add_credits capability | | `useAppLimitCreditCodeItemsQuery` | Query | Items within a credit code — each row grants credits for a specific limit definition | | `useAppLimitCreditCodeItemQuery` | Query | Items within a credit code — each row grants credits for a specific limit definition | | `useCreateAppLimitCreditCodeItemMutation` | Mutation | Items within a credit code — each row grants credits for a specific limit definition | @@ -82,6 +117,36 @@ function App() { | `useCreateAppLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | | `useUpdateAppLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | | `useDeleteAppLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | +| `useBillingUsageSummariesQuery` | Query | Permanent monthly usage summary per entity per meter (user-facing billing dashboard) | +| `useBillingUsageSummaryQuery` | Query | Permanent monthly usage summary per entity per meter (user-facing billing dashboard) | +| `useCreateBillingUsageSummaryMutation` | Mutation | Permanent monthly usage summary per entity per meter (user-facing billing dashboard) | +| `useUpdateBillingUsageSummaryMutation` | Mutation | Permanent monthly usage summary per entity per meter (user-facing billing dashboard) | +| `useDeleteBillingUsageSummaryMutation` | Mutation | Permanent monthly usage summary per entity per meter (user-facing billing dashboard) | +| `useLedgersQuery` | Query | Append-only event log for all billing events (usage, grants, adjustments) | +| `useLedgerQuery` | Query | Append-only event log for all billing events (usage, grants, adjustments) | +| `useCreateLedgerMutation` | Mutation | Append-only event log for all billing events (usage, grants, adjustments) | +| `useUpdateLedgerMutation` | Mutation | Append-only event log for all billing events (usage, grants, adjustments) | +| `useDeleteLedgerMutation` | Mutation | Append-only event log for all billing events (usage, grants, adjustments) | +| `useMetersQuery` | Query | Defines billable meters (what to track: quotas, feature flags, credit pools) | +| `useMeterQuery` | Query | Defines billable meters (what to track: quotas, feature flags, credit pools) | +| `useCreateMeterMutation` | Mutation | Defines billable meters (what to track: quotas, feature flags, credit pools) | +| `useUpdateMeterMutation` | Mutation | Defines billable meters (what to track: quotas, feature flags, credit pools) | +| `useDeleteMeterMutation` | Mutation | Defines billable meters (what to track: quotas, feature flags, credit pools) | +| `useMeterCreditsQuery` | Query | Append-only ledger of credit grants for billing meters that automatically update balances | +| `useMeterCreditQuery` | Query | Append-only ledger of credit grants for billing meters that automatically update balances | +| `useCreateMeterCreditMutation` | Mutation | Append-only ledger of credit grants for billing meters that automatically update balances | +| `useUpdateMeterCreditMutation` | Mutation | Append-only ledger of credit grants for billing meters that automatically update balances | +| `useDeleteMeterCreditMutation` | Mutation | Append-only ledger of credit grants for billing meters that automatically update balances | +| `useMeterDefaultsQuery` | Query | Default meter catalog: defines which meters are available and their default plan_limit values for new entities | +| `useMeterDefaultQuery` | Query | Default meter catalog: defines which meters are available and their default plan_limit values for new entities | +| `useCreateMeterDefaultMutation` | Mutation | Default meter catalog: defines which meters are available and their default plan_limit values for new entities | +| `useUpdateMeterDefaultMutation` | Mutation | Default meter catalog: defines which meters are available and their default plan_limit values for new entities | +| `useDeleteMeterDefaultMutation` | Mutation | Default meter catalog: defines which meters are available and their default plan_limit values for new entities | +| `useMeterSourcesQuery` | Query | Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. | +| `useMeterSourceQuery` | Query | Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. | +| `useCreateMeterSourceMutation` | Mutation | Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. | +| `useUpdateMeterSourceMutation` | Mutation | Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. | +| `useDeleteMeterSourceMutation` | Mutation | Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. | | `useOrgLimitAggregatesQuery` | Query | Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) | | `useOrgLimitAggregateQuery` | Query | Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) | | `useCreateOrgLimitAggregateMutation` | Mutation | Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) | @@ -122,17 +187,210 @@ function App() { | `useCreateOrgLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | | `useUpdateOrgLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | | `useDeleteOrgLimitWarningMutation` | Mutation | Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. | +| `usePlanCapsQuery` | Query | Maps each plan to feature flag cap values (written to limit_caps when plan is applied) | +| `usePlanCapQuery` | Query | Maps each plan to feature flag cap values (written to limit_caps when plan is applied) | +| `useCreatePlanCapMutation` | Mutation | Maps each plan to feature flag cap values (written to limit_caps when plan is applied) | +| `useUpdatePlanCapMutation` | Mutation | Maps each plan to feature flag cap values (written to limit_caps when plan is applied) | +| `useDeletePlanCapMutation` | Mutation | Maps each plan to feature flag cap values (written to limit_caps when plan is applied) | +| `usePlansQuery` | Query | Defines plan tiers with named limit configurations | +| `usePlanQuery` | Query | Defines plan tiers with named limit configurations | +| `useCreatePlanMutation` | Mutation | Defines plan tiers with named limit configurations | +| `useUpdatePlanMutation` | Mutation | Defines plan tiers with named limit configurations | +| `useDeletePlanMutation` | Mutation | Defines plan tiers with named limit configurations | +| `usePlanLimitsQuery` | Query | Maps each plan to specific limit names and their maximum allowed values | +| `usePlanLimitQuery` | Query | Maps each plan to specific limit names and their maximum allowed values | +| `useCreatePlanLimitMutation` | Mutation | Maps each plan to specific limit names and their maximum allowed values | +| `useUpdatePlanLimitMutation` | Mutation | Maps each plan to specific limit names and their maximum allowed values | +| `useDeletePlanLimitMutation` | Mutation | Maps each plan to specific limit names and their maximum allowed values | +| `usePlanMeterLimitsQuery` | Query | Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) | +| `usePlanMeterLimitQuery` | Query | Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) | +| `useCreatePlanMeterLimitMutation` | Mutation | Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) | +| `useUpdatePlanMeterLimitMutation` | Mutation | Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) | +| `useDeletePlanMeterLimitMutation` | Mutation | Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) | +| `usePlanOverridesQuery` | Query | Per-entity limit overrides that take precedence over plan defaults | +| `usePlanOverrideQuery` | Query | Per-entity limit overrides that take precedence over plan defaults | +| `useCreatePlanOverrideMutation` | Mutation | Per-entity limit overrides that take precedence over plan defaults | +| `useUpdatePlanOverrideMutation` | Mutation | Per-entity limit overrides that take precedence over plan defaults | +| `useDeletePlanOverrideMutation` | Mutation | Per-entity limit overrides that take precedence over plan defaults | +| `usePlanPricingsQuery` | Query | Billing intervals and pricing for each plan tier | +| `usePlanPricingQuery` | Query | Billing intervals and pricing for each plan tier | +| `useCreatePlanPricingMutation` | Mutation | Billing intervals and pricing for each plan tier | +| `useUpdatePlanPricingMutation` | Mutation | Billing intervals and pricing for each plan tier | +| `useDeletePlanPricingMutation` | Mutation | Billing intervals and pricing for each plan tier | +| `usePlanSubscriptionsQuery` | Query | Assigns a plan to an entity with subscription lifecycle (start, end, active state) | +| `usePlanSubscriptionQuery` | Query | Assigns a plan to an entity with subscription lifecycle (start, end, active state) | +| `useCreatePlanSubscriptionMutation` | Mutation | Assigns a plan to an entity with subscription lifecycle (start, end, active state) | +| `useUpdatePlanSubscriptionMutation` | Mutation | Assigns a plan to an entity with subscription lifecycle (start, end, active state) | +| `useDeletePlanSubscriptionMutation` | Mutation | Assigns a plan to an entity with subscription lifecycle (start, end, active state) | +| `useCaptureAppLimitDefaultsQuery` | Query | captureAppLimitDefaults | +| `useCaptureOrgLimitDefaultsQuery` | Query | captureOrgLimitDefaults | +| `useCaptureTrustLadderQuery` | Query | captureTrustLadder | +| `useEventsAchievedQuery` | Query | eventsAchieved | +| `useEventsRequiredQuery` | Query | Reads and enables pagination through a set of `AppLevelRequirement`. | +| `useGrantAchievementMutation` | Mutation | grantAchievement | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | +| `useRecomputeCapabilitiesMutation` | Mutation | recomputeCapabilities | +| `useRevokeAchievementMutation` | Mutation | revokeAchievement | | `useSeedAppLimitCapsDefaultsMutation` | Mutation | seedAppLimitCapsDefaults | | `useSeedAppLimitDefaultsMutation` | Mutation | seedAppLimitDefaults | +| `useSeedMeterDefaultsMutation` | Mutation | seedMeterDefaults | | `useSeedOrgLimitCapsDefaultsMutation` | Mutation | seedOrgLimitCapsDefaults | | `useSeedOrgLimitDefaultsMutation` | Mutation | seedOrgLimitDefaults | +| `useSeedPlanMutation` | Mutation | seedPlan | +| `useSeedTrustLadderMutation` | Mutation | seedTrustLadder | ## Table Hooks +### AppAchievementReward + +```typescript +// List all appAchievementRewards +const { data, isLoading } = useAppAchievementRewardsQuery({ + selection: { fields: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }, +}); + +// Get one appAchievementReward +const { data: item } = useAppAchievementRewardQuery({ + id: '', + selection: { fields: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }, +}); + +// Create a appAchievementReward +const { mutate: create } = useCreateAppAchievementRewardMutation({ + selection: { fields: { id: true } }, +}); +create({ amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }); +``` + +### AppEventAggregate + +```typescript +// List all appEventAggregates +const { data, isLoading } = useAppEventAggregatesQuery({ + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }, +}); + +// Get one appEventAggregate +const { data: item } = useAppEventAggregateQuery({ + id: '', + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }, +}); + +// Create a appEventAggregate +const { mutate: create } = useCreateAppEventAggregateMutation({ + selection: { fields: { id: true } }, +}); +create({ actorId: '', count: '', name: '', periodStart: '' }); +``` + +### AppEvent + +```typescript +// List all appEvents +const { data, isLoading } = useAppEventsQuery({ + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true } }, +}); + +// Get one appEvent +const { data: item } = useAppEventQuery({ + id: '', + selection: { fields: { actorId: true, count: true, createdAt: true, id: true, name: true } }, +}); + +// Create a appEvent +const { mutate: create } = useCreateAppEventMutation({ + selection: { fields: { id: true } }, +}); +create({ actorId: '', count: '', name: '' }); +``` + +### AppEventType + +```typescript +// List all appEventTypes +const { data, isLoading } = useAppEventTypesQuery({ + selection: { fields: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }, +}); + +// Get one appEventType +const { data: item } = useAppEventTypeQuery({ + id: '', + selection: { fields: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }, +}); + +// Create a appEventType +const { mutate: create } = useCreateAppEventTypeMutation({ + selection: { fields: { id: true } }, +}); +create({ aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }); +``` + +### AppLevel + +```typescript +// List all appLevels +const { data, isLoading } = useAppLevelsQuery({ + selection: { fields: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }, +}); + +// Get one appLevel +const { data: item } = useAppLevelQuery({ + id: '', + selection: { fields: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }, +}); + +// Create a appLevel +const { mutate: create } = useCreateAppLevelMutation({ + selection: { fields: { id: true } }, +}); +create({ description: '', image: '', name: '', ownerId: '' }); +``` + +### AppLevelGrant + +```typescript +// List all appLevelGrants +const { data, isLoading } = useAppLevelGrantsQuery({ + selection: { fields: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }, +}); + +// Get one appLevelGrant +const { data: item } = useAppLevelGrantQuery({ + id: '', + selection: { fields: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }, +}); + +// Create a appLevelGrant +const { mutate: create } = useCreateAppLevelGrantMutation({ + selection: { fields: { id: true } }, +}); +create({ actorId: '', expiresAt: '', levelName: '', periodStart: '' }); +``` + +### AppLevelRequirement + +```typescript +// List all appLevelRequirements +const { data, isLoading } = useAppLevelRequirementsQuery({ + selection: { fields: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }, +}); + +// Get one appLevelRequirement +const { data: item } = useAppLevelRequirementQuery({ + id: '', + selection: { fields: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }, +}); + +// Create a appLevelRequirement +const { mutate: create } = useCreateAppLevelRequirementMutation({ + selection: { fields: { id: true } }, +}); +create({ description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }); +``` + ### AppLimitCap ```typescript @@ -343,6 +601,132 @@ const { mutate: create } = useCreateAppLimitWarningMutation({ create({ name: '', taskIdentifier: '', thresholdValue: '', warningType: '' }); ``` +### BillingUsageSummary + +```typescript +// List all billingUsageSummaries +const { data, isLoading } = useBillingUsageSummariesQuery({ + selection: { fields: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }, +}); + +// Get one billingUsageSummary +const { data: item } = useBillingUsageSummaryQuery({ + id: '', + selection: { fields: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }, +}); + +// Create a billingUsageSummary +const { mutate: create } = useCreateBillingUsageSummaryMutation({ + selection: { fields: { id: true } }, +}); +create({ creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }); +``` + +### Ledger + +```typescript +// List all ledgers +const { data, isLoading } = useLedgersQuery({ + selection: { fields: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }, +}); + +// Get one ledger +const { data: item } = useLedgerQuery({ + id: '', + selection: { fields: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }, +}); + +// Create a ledger +const { mutate: create } = useCreateLedgerMutation({ + selection: { fields: { id: true } }, +}); +create({ delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }); +``` + +### Meter + +```typescript +// List all meters +const { data, isLoading } = useMetersQuery({ + selection: { fields: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }, +}); + +// Get one meter +const { data: item } = useMeterQuery({ + id: '', + selection: { fields: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }, +}); + +// Create a meter +const { mutate: create } = useCreateMeterMutation({ + selection: { fields: { id: true } }, +}); +create({ aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }); +``` + +### MeterCredit + +```typescript +// List all meterCredits +const { data, isLoading } = useMeterCreditsQuery({ + selection: { fields: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }, +}); + +// Get one meterCredit +const { data: item } = useMeterCreditQuery({ + id: '', + selection: { fields: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }, +}); + +// Create a meterCredit +const { mutate: create } = useCreateMeterCreditMutation({ + selection: { fields: { id: true } }, +}); +create({ amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }); +``` + +### MeterDefault + +```typescript +// List all meterDefaults +const { data, isLoading } = useMeterDefaultsQuery({ + selection: { fields: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }, +}); + +// Get one meterDefault +const { data: item } = useMeterDefaultQuery({ + id: '', + selection: { fields: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }, +}); + +// Create a meterDefault +const { mutate: create } = useCreateMeterDefaultMutation({ + selection: { fields: { id: true } }, +}); +create({ categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }); +``` + +### MeterSource + +```typescript +// List all meterSources +const { data, isLoading } = useMeterSourcesQuery({ + selection: { fields: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }, +}); + +// Get one meterSource +const { data: item } = useMeterSourceQuery({ + id: '', + selection: { fields: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }, +}); + +// Create a meterSource +const { mutate: create } = useCreateMeterSourceMutation({ + selection: { fields: { id: true } }, +}); +create({ aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }); +``` + ### OrgLimitAggregate ```typescript @@ -511,8 +895,214 @@ const { mutate: create } = useCreateOrgLimitWarningMutation({ create({ entityId: '', name: '', taskIdentifier: '', thresholdValue: '', warningType: '' }); ``` +### PlanCap + +```typescript +// List all planCaps +const { data, isLoading } = usePlanCapsQuery({ + selection: { fields: { capName: true, capValue: true, id: true, planId: true } }, +}); + +// Get one planCap +const { data: item } = usePlanCapQuery({ + id: '', + selection: { fields: { capName: true, capValue: true, id: true, planId: true } }, +}); + +// Create a planCap +const { mutate: create } = useCreatePlanCapMutation({ + selection: { fields: { id: true } }, +}); +create({ capName: '', capValue: '', planId: '' }); +``` + +### Plan + +```typescript +// List all plans +const { data, isLoading } = usePlansQuery({ + selection: { fields: { description: true, id: true, isActive: true, name: true } }, +}); + +// Get one plan +const { data: item } = usePlanQuery({ + id: '', + selection: { fields: { description: true, id: true, isActive: true, name: true } }, +}); + +// Create a plan +const { mutate: create } = useCreatePlanMutation({ + selection: { fields: { id: true } }, +}); +create({ description: '', isActive: '', name: '' }); +``` + +### PlanLimit + +```typescript +// List all planLimits +const { data, isLoading } = usePlanLimitsQuery({ + selection: { fields: { id: true, limitName: true, maxValue: true, planId: true } }, +}); + +// Get one planLimit +const { data: item } = usePlanLimitQuery({ + id: '', + selection: { fields: { id: true, limitName: true, maxValue: true, planId: true } }, +}); + +// Create a planLimit +const { mutate: create } = useCreatePlanLimitMutation({ + selection: { fields: { id: true } }, +}); +create({ limitName: '', maxValue: '', planId: '' }); +``` + +### PlanMeterLimit + +```typescript +// List all planMeterLimits +const { data, isLoading } = usePlanMeterLimitsQuery({ + selection: { fields: { id: true, meterSlug: true, planId: true, planLimit: true } }, +}); + +// Get one planMeterLimit +const { data: item } = usePlanMeterLimitQuery({ + id: '', + selection: { fields: { id: true, meterSlug: true, planId: true, planLimit: true } }, +}); + +// Create a planMeterLimit +const { mutate: create } = useCreatePlanMeterLimitMutation({ + selection: { fields: { id: true } }, +}); +create({ meterSlug: '', planId: '', planLimit: '' }); +``` + +### PlanOverride + +```typescript +// List all planOverrides +const { data, isLoading } = usePlanOverridesQuery({ + selection: { fields: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }, +}); + +// Get one planOverride +const { data: item } = usePlanOverrideQuery({ + id: '', + selection: { fields: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }, +}); + +// Create a planOverride +const { mutate: create } = useCreatePlanOverrideMutation({ + selection: { fields: { id: true } }, +}); +create({ entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }); +``` + +### PlanPricing + +```typescript +// List all planPricings +const { data, isLoading } = usePlanPricingsQuery({ + selection: { fields: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }, +}); + +// Get one planPricing +const { data: item } = usePlanPricingQuery({ + id: '', + selection: { fields: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }, +}); + +// Create a planPricing +const { mutate: create } = useCreatePlanPricingMutation({ + selection: { fields: { id: true } }, +}); +create({ billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }); +``` + +### PlanSubscription + +```typescript +// List all planSubscriptions +const { data, isLoading } = usePlanSubscriptionsQuery({ + selection: { fields: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }, +}); + +// Get one planSubscription +const { data: item } = usePlanSubscriptionQuery({ + id: '', + selection: { fields: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }, +}); + +// Create a planSubscription +const { mutate: create } = useCreatePlanSubscriptionMutation({ + selection: { fields: { id: true } }, +}); +create({ endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }); +``` + ## Custom Operation Hooks +### `useCaptureAppLimitDefaultsQuery` + +captureAppLimitDefaults + +- **Type:** query +- **Arguments:** none + +### `useCaptureOrgLimitDefaultsQuery` + +captureOrgLimitDefaults + +- **Type:** query +- **Arguments:** none + +### `useCaptureTrustLadderQuery` + +captureTrustLadder + +- **Type:** query +- **Arguments:** none + +### `useEventsAchievedQuery` + +eventsAchieved + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `level` | String | + | `roleId` | UUID | + +### `useEventsRequiredQuery` + +Reads and enables pagination through a set of `AppLevelRequirement`. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `after` | Cursor | + | `first` | Int | + | `level` | String | + | `offset` | Int | + | `roleId` | UUID | + +### `useGrantAchievementMutation` + +grantAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | GrantAchievementInput (required) | + ### `useProvisionBucketMutation` Provision an S3 bucket for a logical bucket in the database. @@ -527,6 +1117,28 @@ and lifecycle settings. |----------|------| | `input` | ProvisionBucketInput (required) | +### `useRecomputeCapabilitiesMutation` + +recomputeCapabilities + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RecomputeCapabilitiesInput (required) | + +### `useRevokeAchievementMutation` + +revokeAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeAchievementInput (required) | + ### `useSeedAppLimitCapsDefaultsMutation` seedAppLimitCapsDefaults @@ -549,6 +1161,17 @@ seedAppLimitDefaults |----------|------| | `input` | SeedAppLimitDefaultsInput (required) | +### `useSeedMeterDefaultsMutation` + +seedMeterDefaults + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedMeterDefaultsInput (required) | + ### `useSeedOrgLimitCapsDefaultsMutation` seedOrgLimitCapsDefaults @@ -571,6 +1194,28 @@ seedOrgLimitDefaults |----------|------| | `input` | SeedOrgLimitDefaultsInput (required) | +### `useSeedPlanMutation` + +seedPlan + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedPlanInput (required) | + +### `useSeedTrustLadderMutation` + +seedTrustLadder + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedTrustLadderInput (required) | + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/usage/hooks/index.ts b/sdk/constructive-react/src/usage/hooks/index.ts index aa601adfa6..9c1c42ed85 100644 --- a/sdk/constructive-react/src/usage/hooks/index.ts +++ b/sdk/constructive-react/src/usage/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: AppLimitCap, AppLimitCapsDefault, AppLimit, AppLimitCreditCode, AppLimitCreditCodeItem, AppLimitCredit, AppLimitCreditRedemption, AppLimitDefault, AppLimitEvent, AppLimitWarning, OrgLimitAggregate, OrgLimitCap, OrgLimitCapsDefault, OrgLimit, OrgLimitCredit, OrgLimitDefault, OrgLimitEvent, OrgLimitWarning + * Tables: AppAchievementReward, AppEventAggregate, AppEvent, AppEventType, AppLevel, AppLevelGrant, AppLevelRequirement, AppLimitCap, AppLimitCapsDefault, AppLimit, AppLimitCreditCode, AppLimitCreditCodeItem, AppLimitCredit, AppLimitCreditRedemption, AppLimitDefault, AppLimitEvent, AppLimitWarning, BillingUsageSummary, Ledger, Meter, MeterCredit, MeterDefault, MeterSource, OrgLimitAggregate, OrgLimitCap, OrgLimitCapsDefault, OrgLimit, OrgLimitCredit, OrgLimitDefault, OrgLimitEvent, OrgLimitWarning, PlanCap, Plan, PlanLimit, PlanMeterLimit, PlanOverride, PlanPricing, PlanSubscription * * Usage: * diff --git a/sdk/constructive-react/src/usage/hooks/invalidation.ts b/sdk/constructive-react/src/usage/hooks/invalidation.ts index 937299cf0f..d06f211131 100644 --- a/sdk/constructive-react/src/usage/hooks/invalidation.ts +++ b/sdk/constructive-react/src/usage/hooks/invalidation.ts @@ -15,6 +15,13 @@ import type { QueryClient } from '@tanstack/react-query'; import { + appAchievementRewardKeys, + appEventAggregateKeys, + appEventKeys, + appEventTypeKeys, + appLevelKeys, + appLevelGrantKeys, + appLevelRequirementKeys, appLimitCapKeys, appLimitCapsDefaultKeys, appLimitKeys, @@ -25,6 +32,12 @@ import { appLimitDefaultKeys, appLimitEventKeys, appLimitWarningKeys, + billingUsageSummaryKeys, + ledgerKeys, + meterKeys, + meterCreditKeys, + meterDefaultKeys, + meterSourceKeys, orgLimitAggregateKeys, orgLimitCapKeys, orgLimitCapsDefaultKeys, @@ -33,6 +46,13 @@ import { orgLimitDefaultKeys, orgLimitEventKeys, orgLimitWarningKeys, + planCapKeys, + planKeys, + planLimitKeys, + planMeterLimitKeys, + planOverrideKeys, + planPricingKeys, + planSubscriptionKeys, } from './query-keys'; /** // ============================================================================ @@ -54,6 +74,119 @@ import { * ``` */ export const invalidate = { + /** Invalidate appAchievementReward queries */ appAchievementReward: { + /** Invalidate all appAchievementReward queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.all, + }), + /** Invalidate appAchievementReward list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.lists(), + }), + /** Invalidate a specific appAchievementReward */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.detail(id), + }), + }, + /** Invalidate appEventAggregate queries */ appEventAggregate: { + /** Invalidate all appEventAggregate queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.all, + }), + /** Invalidate appEventAggregate list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.lists(), + }), + /** Invalidate a specific appEventAggregate */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.detail(id), + }), + }, + /** Invalidate appEvent queries */ appEvent: { + /** Invalidate all appEvent queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventKeys.all, + }), + /** Invalidate appEvent list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventKeys.lists(), + }), + /** Invalidate a specific appEvent */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: appEventKeys.detail(id), + }), + }, + /** Invalidate appEventType queries */ appEventType: { + /** Invalidate all appEventType queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.all, + }), + /** Invalidate appEventType list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.lists(), + }), + /** Invalidate a specific appEventType */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.detail(id), + }), + }, + /** Invalidate appLevel queries */ appLevel: { + /** Invalidate all appLevel queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelKeys.all, + }), + /** Invalidate appLevel list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelKeys.lists(), + }), + /** Invalidate a specific appLevel */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: appLevelKeys.detail(id), + }), + }, + /** Invalidate appLevelGrant queries */ appLevelGrant: { + /** Invalidate all appLevelGrant queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelGrantKeys.all, + }), + /** Invalidate appLevelGrant list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelGrantKeys.lists(), + }), + /** Invalidate a specific appLevelGrant */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appLevelGrantKeys.detail(id), + }), + }, + /** Invalidate appLevelRequirement queries */ appLevelRequirement: { + /** Invalidate all appLevelRequirement queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.all, + }), + /** Invalidate appLevelRequirement list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.lists(), + }), + /** Invalidate a specific appLevelRequirement */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.detail(id), + }), + }, /** Invalidate appLimitCap queries */ appLimitCap: { /** Invalidate all appLimitCap queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -221,6 +354,102 @@ export const invalidate = { queryKey: appLimitWarningKeys.detail(id), }), }, + /** Invalidate billingUsageSummary queries */ billingUsageSummary: { + /** Invalidate all billingUsageSummary queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.all, + }), + /** Invalidate billingUsageSummary list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.lists(), + }), + /** Invalidate a specific billingUsageSummary */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.detail(id), + }), + }, + /** Invalidate ledger queries */ ledger: { + /** Invalidate all ledger queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: ledgerKeys.all, + }), + /** Invalidate ledger list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: ledgerKeys.lists(), + }), + /** Invalidate a specific ledger */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: ledgerKeys.detail(id), + }), + }, + /** Invalidate meter queries */ meter: { + /** Invalidate all meter queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterKeys.all, + }), + /** Invalidate meter list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterKeys.lists(), + }), + /** Invalidate a specific meter */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: meterKeys.detail(id), + }), + }, + /** Invalidate meterCredit queries */ meterCredit: { + /** Invalidate all meterCredit queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.all, + }), + /** Invalidate meterCredit list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.lists(), + }), + /** Invalidate a specific meterCredit */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.detail(id), + }), + }, + /** Invalidate meterDefault queries */ meterDefault: { + /** Invalidate all meterDefault queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.all, + }), + /** Invalidate meterDefault list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.lists(), + }), + /** Invalidate a specific meterDefault */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.detail(id), + }), + }, + /** Invalidate meterSource queries */ meterSource: { + /** Invalidate all meterSource queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.all, + }), + /** Invalidate meterSource list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.lists(), + }), + /** Invalidate a specific meterSource */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.detail(id), + }), + }, /** Invalidate orgLimitAggregate queries */ orgLimitAggregate: { /** Invalidate all orgLimitAggregate queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -354,6 +583,119 @@ export const invalidate = { queryKey: orgLimitWarningKeys.detail(id), }), }, + /** Invalidate planCap queries */ planCap: { + /** Invalidate all planCap queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planCapKeys.all, + }), + /** Invalidate planCap list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planCapKeys.lists(), + }), + /** Invalidate a specific planCap */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: planCapKeys.detail(id), + }), + }, + /** Invalidate plan queries */ plan: { + /** Invalidate all plan queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planKeys.all, + }), + /** Invalidate plan list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planKeys.lists(), + }), + /** Invalidate a specific plan */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: planKeys.detail(id), + }), + }, + /** Invalidate planLimit queries */ planLimit: { + /** Invalidate all planLimit queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planLimitKeys.all, + }), + /** Invalidate planLimit list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planLimitKeys.lists(), + }), + /** Invalidate a specific planLimit */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: planLimitKeys.detail(id), + }), + }, + /** Invalidate planMeterLimit queries */ planMeterLimit: { + /** Invalidate all planMeterLimit queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.all, + }), + /** Invalidate planMeterLimit list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.lists(), + }), + /** Invalidate a specific planMeterLimit */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.detail(id), + }), + }, + /** Invalidate planOverride queries */ planOverride: { + /** Invalidate all planOverride queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.all, + }), + /** Invalidate planOverride list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.lists(), + }), + /** Invalidate a specific planOverride */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.detail(id), + }), + }, + /** Invalidate planPricing queries */ planPricing: { + /** Invalidate all planPricing queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planPricingKeys.all, + }), + /** Invalidate planPricing list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planPricingKeys.lists(), + }), + /** Invalidate a specific planPricing */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: planPricingKeys.detail(id), + }), + }, + /** Invalidate planSubscription queries */ planSubscription: { + /** Invalidate all planSubscription queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.all, + }), + /** Invalidate planSubscription list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.lists(), + }), + /** Invalidate a specific planSubscription */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.detail(id), + }), + }, } as const; /** @@ -367,6 +709,56 @@ export const invalidate = { * instead of just invalidating (which would trigger a refetch). */ export const remove = { + /** Remove appAchievementReward from cache */ appAchievementReward: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appAchievementRewardKeys.detail(id), + }); + }, + /** Remove appEventAggregate from cache */ appEventAggregate: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appEventAggregateKeys.detail(id), + }); + }, + /** Remove appEvent from cache */ appEvent: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: appEventKeys.detail(id), + }); + }, + /** Remove appEventType from cache */ appEventType: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appEventTypeKeys.detail(id), + }); + }, + /** Remove appLevel from cache */ appLevel: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: appLevelKeys.detail(id), + }); + }, + /** Remove appLevelGrant from cache */ appLevelGrant: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appLevelGrantKeys.detail(id), + }); + }, + /** Remove appLevelRequirement from cache */ appLevelRequirement: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: appLevelRequirementKeys.detail(id), + }); + }, /** Remove appLimitCap from cache */ appLimitCap: ( queryClient: QueryClient, id: string | number @@ -444,6 +836,48 @@ export const remove = { queryKey: appLimitWarningKeys.detail(id), }); }, + /** Remove billingUsageSummary from cache */ billingUsageSummary: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: billingUsageSummaryKeys.detail(id), + }); + }, + /** Remove ledger from cache */ ledger: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: ledgerKeys.detail(id), + }); + }, + /** Remove meter from cache */ meter: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: meterKeys.detail(id), + }); + }, + /** Remove meterCredit from cache */ meterCredit: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: meterCreditKeys.detail(id), + }); + }, + /** Remove meterDefault from cache */ meterDefault: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: meterDefaultKeys.detail(id), + }); + }, + /** Remove meterSource from cache */ meterSource: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: meterSourceKeys.detail(id), + }); + }, /** Remove orgLimitAggregate from cache */ orgLimitAggregate: ( queryClient: QueryClient, id: string | number @@ -505,4 +939,51 @@ export const remove = { queryKey: orgLimitWarningKeys.detail(id), }); }, + /** Remove planCap from cache */ planCap: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: planCapKeys.detail(id), + }); + }, + /** Remove plan from cache */ plan: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: planKeys.detail(id), + }); + }, + /** Remove planLimit from cache */ planLimit: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: planLimitKeys.detail(id), + }); + }, + /** Remove planMeterLimit from cache */ planMeterLimit: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: planMeterLimitKeys.detail(id), + }); + }, + /** Remove planOverride from cache */ planOverride: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: planOverrideKeys.detail(id), + }); + }, + /** Remove planPricing from cache */ planPricing: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: planPricingKeys.detail(id), + }); + }, + /** Remove planSubscription from cache */ planSubscription: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: planSubscriptionKeys.detail(id), + }); + }, } as const; diff --git a/sdk/constructive-react/src/usage/hooks/mutation-keys.ts b/sdk/constructive-react/src/usage/hooks/mutation-keys.ts index 0e0bf6621b..9ded561c8e 100644 --- a/sdk/constructive-react/src/usage/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/usage/hooks/mutation-keys.ts @@ -18,6 +18,67 @@ // Entity Mutation Keys // ============================================================================ +export const appAchievementRewardMutationKeys = { + /** All appAchievementReward mutation keys */ all: ['mutation', 'appachievementreward'] as const, + /** Create appAchievementReward mutation key */ create: () => + ['mutation', 'appachievementreward', 'create'] as const, + /** Update appAchievementReward mutation key */ update: (id: string | number) => + ['mutation', 'appachievementreward', 'update', id] as const, + /** Delete appAchievementReward mutation key */ delete: (id: string | number) => + ['mutation', 'appachievementreward', 'delete', id] as const, +} as const; +export const appEventAggregateMutationKeys = { + /** All appEventAggregate mutation keys */ all: ['mutation', 'appeventaggregate'] as const, + /** Create appEventAggregate mutation key */ create: () => + ['mutation', 'appeventaggregate', 'create'] as const, + /** Update appEventAggregate mutation key */ update: (id: string | number) => + ['mutation', 'appeventaggregate', 'update', id] as const, + /** Delete appEventAggregate mutation key */ delete: (id: string | number) => + ['mutation', 'appeventaggregate', 'delete', id] as const, +} as const; +export const appEventMutationKeys = { + /** All appEvent mutation keys */ all: ['mutation', 'appevent'] as const, + /** Create appEvent mutation key */ create: () => ['mutation', 'appevent', 'create'] as const, + /** Update appEvent mutation key */ update: (id: string | number) => + ['mutation', 'appevent', 'update', id] as const, + /** Delete appEvent mutation key */ delete: (id: string | number) => + ['mutation', 'appevent', 'delete', id] as const, +} as const; +export const appEventTypeMutationKeys = { + /** All appEventType mutation keys */ all: ['mutation', 'appeventtype'] as const, + /** Create appEventType mutation key */ create: () => + ['mutation', 'appeventtype', 'create'] as const, + /** Update appEventType mutation key */ update: (id: string | number) => + ['mutation', 'appeventtype', 'update', id] as const, + /** Delete appEventType mutation key */ delete: (id: string | number) => + ['mutation', 'appeventtype', '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, + /** Update appLevel mutation key */ update: (id: string | number) => + ['mutation', 'applevel', 'update', id] as const, + /** Delete appLevel mutation key */ delete: (id: string | number) => + ['mutation', 'applevel', 'delete', id] as const, +} as const; +export const appLevelGrantMutationKeys = { + /** All appLevelGrant mutation keys */ all: ['mutation', 'applevelgrant'] as const, + /** Create appLevelGrant mutation key */ create: () => + ['mutation', 'applevelgrant', 'create'] as const, + /** Update appLevelGrant mutation key */ update: (id: string | number) => + ['mutation', 'applevelgrant', 'update', id] as const, + /** Delete appLevelGrant mutation key */ delete: (id: string | number) => + ['mutation', 'applevelgrant', 'delete', id] as const, +} as const; +export const appLevelRequirementMutationKeys = { + /** All appLevelRequirement mutation keys */ all: ['mutation', 'applevelrequirement'] as const, + /** Create appLevelRequirement mutation key */ create: () => + ['mutation', 'applevelrequirement', 'create'] as const, + /** Update appLevelRequirement mutation key */ update: (id: string | number) => + ['mutation', 'applevelrequirement', 'update', id] as const, + /** Delete appLevelRequirement mutation key */ delete: (id: string | number) => + ['mutation', 'applevelrequirement', 'delete', id] as const, +} as const; export const appLimitCapMutationKeys = { /** All appLimitCap mutation keys */ all: ['mutation', 'applimitcap'] as const, /** Create appLimitCap mutation key */ create: () => @@ -113,6 +174,58 @@ export const appLimitWarningMutationKeys = { /** Delete appLimitWarning mutation key */ delete: (id: string | number) => ['mutation', 'applimitwarning', 'delete', id] as const, } as const; +export const billingUsageSummaryMutationKeys = { + /** All billingUsageSummary mutation keys */ all: ['mutation', 'billingusagesummary'] as const, + /** Create billingUsageSummary mutation key */ create: () => + ['mutation', 'billingusagesummary', 'create'] as const, + /** Update billingUsageSummary mutation key */ update: (id: string | number) => + ['mutation', 'billingusagesummary', 'update', id] as const, + /** Delete billingUsageSummary mutation key */ delete: (id: string | number) => + ['mutation', 'billingusagesummary', 'delete', id] as const, +} as const; +export const ledgerMutationKeys = { + /** All ledger mutation keys */ all: ['mutation', 'ledger'] as const, + /** Create ledger mutation key */ create: () => ['mutation', 'ledger', 'create'] as const, + /** Update ledger mutation key */ update: (id: string | number) => + ['mutation', 'ledger', 'update', id] as const, + /** Delete ledger mutation key */ delete: (id: string | number) => + ['mutation', 'ledger', 'delete', id] as const, +} as const; +export const meterMutationKeys = { + /** All meter mutation keys */ all: ['mutation', 'meter'] as const, + /** Create meter mutation key */ create: () => ['mutation', 'meter', 'create'] as const, + /** Update meter mutation key */ update: (id: string | number) => + ['mutation', 'meter', 'update', id] as const, + /** Delete meter mutation key */ delete: (id: string | number) => + ['mutation', 'meter', 'delete', id] as const, +} as const; +export const meterCreditMutationKeys = { + /** All meterCredit mutation keys */ all: ['mutation', 'metercredit'] as const, + /** Create meterCredit mutation key */ create: () => + ['mutation', 'metercredit', 'create'] as const, + /** Update meterCredit mutation key */ update: (id: string | number) => + ['mutation', 'metercredit', 'update', id] as const, + /** Delete meterCredit mutation key */ delete: (id: string | number) => + ['mutation', 'metercredit', 'delete', id] as const, +} as const; +export const meterDefaultMutationKeys = { + /** All meterDefault mutation keys */ all: ['mutation', 'meterdefault'] as const, + /** Create meterDefault mutation key */ create: () => + ['mutation', 'meterdefault', 'create'] as const, + /** Update meterDefault mutation key */ update: (id: string | number) => + ['mutation', 'meterdefault', 'update', id] as const, + /** Delete meterDefault mutation key */ delete: (id: string | number) => + ['mutation', 'meterdefault', 'delete', id] as const, +} as const; +export const meterSourceMutationKeys = { + /** All meterSource mutation keys */ all: ['mutation', 'metersource'] as const, + /** Create meterSource mutation key */ create: () => + ['mutation', 'metersource', 'create'] as const, + /** Update meterSource mutation key */ update: (id: string | number) => + ['mutation', 'metersource', 'update', id] as const, + /** Delete meterSource mutation key */ delete: (id: string | number) => + ['mutation', 'metersource', 'delete', id] as const, +} as const; export const orgLimitAggregateMutationKeys = { /** All orgLimitAggregate mutation keys */ all: ['mutation', 'orglimitaggregate'] as const, /** Create orgLimitAggregate mutation key */ create: () => @@ -184,16 +297,88 @@ export const orgLimitWarningMutationKeys = { /** Delete orgLimitWarning mutation key */ delete: (id: string | number) => ['mutation', 'orglimitwarning', 'delete', id] as const, } as const; +export const planCapMutationKeys = { + /** All planCap mutation keys */ all: ['mutation', 'plancap'] as const, + /** Create planCap mutation key */ create: () => ['mutation', 'plancap', 'create'] as const, + /** Update planCap mutation key */ update: (id: string | number) => + ['mutation', 'plancap', 'update', id] as const, + /** Delete planCap mutation key */ delete: (id: string | number) => + ['mutation', 'plancap', 'delete', id] as const, +} as const; +export const planMutationKeys = { + /** All plan mutation keys */ all: ['mutation', 'plan'] as const, + /** Create plan mutation key */ create: () => ['mutation', 'plan', 'create'] as const, + /** Update plan mutation key */ update: (id: string | number) => + ['mutation', 'plan', 'update', id] as const, + /** Delete plan mutation key */ delete: (id: string | number) => + ['mutation', 'plan', 'delete', id] as const, +} as const; +export const planLimitMutationKeys = { + /** All planLimit mutation keys */ all: ['mutation', 'planlimit'] as const, + /** Create planLimit mutation key */ create: () => ['mutation', 'planlimit', 'create'] as const, + /** Update planLimit mutation key */ update: (id: string | number) => + ['mutation', 'planlimit', 'update', id] as const, + /** Delete planLimit mutation key */ delete: (id: string | number) => + ['mutation', 'planlimit', 'delete', id] as const, +} as const; +export const planMeterLimitMutationKeys = { + /** All planMeterLimit mutation keys */ all: ['mutation', 'planmeterlimit'] as const, + /** Create planMeterLimit mutation key */ create: () => + ['mutation', 'planmeterlimit', 'create'] as const, + /** Update planMeterLimit mutation key */ update: (id: string | number) => + ['mutation', 'planmeterlimit', 'update', id] as const, + /** Delete planMeterLimit mutation key */ delete: (id: string | number) => + ['mutation', 'planmeterlimit', 'delete', id] as const, +} as const; +export const planOverrideMutationKeys = { + /** All planOverride mutation keys */ all: ['mutation', 'planoverride'] as const, + /** Create planOverride mutation key */ create: () => + ['mutation', 'planoverride', 'create'] as const, + /** Update planOverride mutation key */ update: (id: string | number) => + ['mutation', 'planoverride', 'update', id] as const, + /** Delete planOverride mutation key */ delete: (id: string | number) => + ['mutation', 'planoverride', 'delete', id] as const, +} as const; +export const planPricingMutationKeys = { + /** All planPricing mutation keys */ all: ['mutation', 'planpricing'] as const, + /** Create planPricing mutation key */ create: () => + ['mutation', 'planpricing', 'create'] as const, + /** Update planPricing mutation key */ update: (id: string | number) => + ['mutation', 'planpricing', 'update', id] as const, + /** Delete planPricing mutation key */ delete: (id: string | number) => + ['mutation', 'planpricing', 'delete', id] as const, +} as const; +export const planSubscriptionMutationKeys = { + /** All planSubscription mutation keys */ all: ['mutation', 'plansubscription'] as const, + /** Create planSubscription mutation key */ create: () => + ['mutation', 'plansubscription', 'create'] as const, + /** Update planSubscription mutation key */ update: (id: string | number) => + ['mutation', 'plansubscription', 'update', id] as const, + /** Delete planSubscription mutation key */ delete: (id: string | number) => + ['mutation', 'plansubscription', 'delete', id] as const, +} as const; // ============================================================================ // Custom Mutation Keys // ============================================================================ export const customMutationKeys = { + /** Mutation key for grantAchievement */ grantAchievement: (identifier?: string) => + identifier + ? (['mutation', 'grantAchievement', identifier] as const) + : (['mutation', 'grantAchievement'] as const), /** Mutation key for provisionBucket */ provisionBucket: (identifier?: string) => identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), + /** Mutation key for recomputeCapabilities */ recomputeCapabilities: (identifier?: string) => + identifier + ? (['mutation', 'recomputeCapabilities', identifier] as const) + : (['mutation', 'recomputeCapabilities'] as const), + /** Mutation key for revokeAchievement */ revokeAchievement: (identifier?: string) => + identifier + ? (['mutation', 'revokeAchievement', identifier] as const) + : (['mutation', 'revokeAchievement'] as const), /** Mutation key for seedAppLimitCapsDefaults */ seedAppLimitCapsDefaults: ( identifier?: string ) => @@ -204,6 +389,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'seedAppLimitDefaults', identifier] as const) : (['mutation', 'seedAppLimitDefaults'] as const), + /** Mutation key for seedMeterDefaults */ seedMeterDefaults: (identifier?: string) => + identifier + ? (['mutation', 'seedMeterDefaults', identifier] as const) + : (['mutation', 'seedMeterDefaults'] as const), /** Mutation key for seedOrgLimitCapsDefaults */ seedOrgLimitCapsDefaults: ( identifier?: string ) => @@ -214,6 +403,14 @@ export const customMutationKeys = { identifier ? (['mutation', 'seedOrgLimitDefaults', identifier] as const) : (['mutation', 'seedOrgLimitDefaults'] as const), + /** Mutation key for seedPlan */ seedPlan: (identifier?: string) => + identifier + ? (['mutation', 'seedPlan', identifier] as const) + : (['mutation', 'seedPlan'] as const), + /** Mutation key for seedTrustLadder */ seedTrustLadder: (identifier?: string) => + identifier + ? (['mutation', 'seedTrustLadder', identifier] as const) + : (['mutation', 'seedTrustLadder'] as const), } as const; /** @@ -238,6 +435,13 @@ export const customMutationKeys = { * ``` */ export const mutationKeys = { + appAchievementReward: appAchievementRewardMutationKeys, + appEventAggregate: appEventAggregateMutationKeys, + appEvent: appEventMutationKeys, + appEventType: appEventTypeMutationKeys, + appLevel: appLevelMutationKeys, + appLevelGrant: appLevelGrantMutationKeys, + appLevelRequirement: appLevelRequirementMutationKeys, appLimitCap: appLimitCapMutationKeys, appLimitCapsDefault: appLimitCapsDefaultMutationKeys, appLimit: appLimitMutationKeys, @@ -248,6 +452,12 @@ export const mutationKeys = { appLimitDefault: appLimitDefaultMutationKeys, appLimitEvent: appLimitEventMutationKeys, appLimitWarning: appLimitWarningMutationKeys, + billingUsageSummary: billingUsageSummaryMutationKeys, + ledger: ledgerMutationKeys, + meter: meterMutationKeys, + meterCredit: meterCreditMutationKeys, + meterDefault: meterDefaultMutationKeys, + meterSource: meterSourceMutationKeys, orgLimitAggregate: orgLimitAggregateMutationKeys, orgLimitCap: orgLimitCapMutationKeys, orgLimitCapsDefault: orgLimitCapsDefaultMutationKeys, @@ -256,5 +466,12 @@ export const mutationKeys = { orgLimitDefault: orgLimitDefaultMutationKeys, orgLimitEvent: orgLimitEventMutationKeys, orgLimitWarning: orgLimitWarningMutationKeys, + planCap: planCapMutationKeys, + plan: planMutationKeys, + planLimit: planLimitMutationKeys, + planMeterLimit: planMeterLimitMutationKeys, + planOverride: planOverrideMutationKeys, + planPricing: planPricingMutationKeys, + planSubscription: planSubscriptionMutationKeys, custom: customMutationKeys, } as const; diff --git a/sdk/constructive-react/src/usage/hooks/mutations/index.ts b/sdk/constructive-react/src/usage/hooks/mutations/index.ts index 4c5fa142b4..2bb6147407 100644 --- a/sdk/constructive-react/src/usage/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/index.ts @@ -3,6 +3,27 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useCreateAppAchievementRewardMutation'; +export * from './useUpdateAppAchievementRewardMutation'; +export * from './useDeleteAppAchievementRewardMutation'; +export * from './useCreateAppEventAggregateMutation'; +export * from './useUpdateAppEventAggregateMutation'; +export * from './useDeleteAppEventAggregateMutation'; +export * from './useCreateAppEventMutation'; +export * from './useUpdateAppEventMutation'; +export * from './useDeleteAppEventMutation'; +export * from './useCreateAppEventTypeMutation'; +export * from './useUpdateAppEventTypeMutation'; +export * from './useDeleteAppEventTypeMutation'; +export * from './useCreateAppLevelMutation'; +export * from './useUpdateAppLevelMutation'; +export * from './useDeleteAppLevelMutation'; +export * from './useCreateAppLevelGrantMutation'; +export * from './useUpdateAppLevelGrantMutation'; +export * from './useDeleteAppLevelGrantMutation'; +export * from './useCreateAppLevelRequirementMutation'; +export * from './useUpdateAppLevelRequirementMutation'; +export * from './useDeleteAppLevelRequirementMutation'; export * from './useCreateAppLimitCapMutation'; export * from './useUpdateAppLimitCapMutation'; export * from './useDeleteAppLimitCapMutation'; @@ -33,6 +54,24 @@ export * from './useDeleteAppLimitEventMutation'; export * from './useCreateAppLimitWarningMutation'; export * from './useUpdateAppLimitWarningMutation'; export * from './useDeleteAppLimitWarningMutation'; +export * from './useCreateBillingUsageSummaryMutation'; +export * from './useUpdateBillingUsageSummaryMutation'; +export * from './useDeleteBillingUsageSummaryMutation'; +export * from './useCreateLedgerMutation'; +export * from './useUpdateLedgerMutation'; +export * from './useDeleteLedgerMutation'; +export * from './useCreateMeterMutation'; +export * from './useUpdateMeterMutation'; +export * from './useDeleteMeterMutation'; +export * from './useCreateMeterCreditMutation'; +export * from './useUpdateMeterCreditMutation'; +export * from './useDeleteMeterCreditMutation'; +export * from './useCreateMeterDefaultMutation'; +export * from './useUpdateMeterDefaultMutation'; +export * from './useDeleteMeterDefaultMutation'; +export * from './useCreateMeterSourceMutation'; +export * from './useUpdateMeterSourceMutation'; +export * from './useDeleteMeterSourceMutation'; export * from './useCreateOrgLimitAggregateMutation'; export * from './useUpdateOrgLimitAggregateMutation'; export * from './useDeleteOrgLimitAggregateMutation'; @@ -57,8 +96,35 @@ export * from './useDeleteOrgLimitEventMutation'; export * from './useCreateOrgLimitWarningMutation'; export * from './useUpdateOrgLimitWarningMutation'; export * from './useDeleteOrgLimitWarningMutation'; +export * from './useCreatePlanCapMutation'; +export * from './useUpdatePlanCapMutation'; +export * from './useDeletePlanCapMutation'; +export * from './useCreatePlanMutation'; +export * from './useUpdatePlanMutation'; +export * from './useDeletePlanMutation'; +export * from './useCreatePlanLimitMutation'; +export * from './useUpdatePlanLimitMutation'; +export * from './useDeletePlanLimitMutation'; +export * from './useCreatePlanMeterLimitMutation'; +export * from './useUpdatePlanMeterLimitMutation'; +export * from './useDeletePlanMeterLimitMutation'; +export * from './useCreatePlanOverrideMutation'; +export * from './useUpdatePlanOverrideMutation'; +export * from './useDeletePlanOverrideMutation'; +export * from './useCreatePlanPricingMutation'; +export * from './useUpdatePlanPricingMutation'; +export * from './useDeletePlanPricingMutation'; +export * from './useCreatePlanSubscriptionMutation'; +export * from './useUpdatePlanSubscriptionMutation'; +export * from './useDeletePlanSubscriptionMutation'; +export * from './useGrantAchievementMutation'; export * from './useProvisionBucketMutation'; +export * from './useRecomputeCapabilitiesMutation'; +export * from './useRevokeAchievementMutation'; export * from './useSeedAppLimitCapsDefaultsMutation'; export * from './useSeedAppLimitDefaultsMutation'; +export * from './useSeedMeterDefaultsMutation'; export * from './useSeedOrgLimitCapsDefaultsMutation'; export * from './useSeedOrgLimitDefaultsMutation'; +export * from './useSeedPlanMutation'; +export * from './useSeedTrustLadderMutation'; diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppAchievementRewardMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppAchievementRewardMutation.ts new file mode 100644 index 0000000000..b435023152 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppAchievementRewardMutation.ts @@ -0,0 +1,91 @@ +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * @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 { appAchievementRewardKeys } from '../query-keys'; +import { appAchievementRewardMutationKeys } from '../mutation-keys'; +import type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + CreateAppAchievementRewardInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + CreateAppAchievementRewardInput, +} from '../../orm/input-types'; +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppAchievementRewardMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppAchievementRewardMutation( + params: { + selection: { + fields: S & AppAchievementRewardSelect; + } & HookStrictSelect, AppAchievementRewardSelect>; + } & Omit< + UseMutationOptions< + { + createAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + CreateAppAchievementRewardInput['appAchievementReward'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + CreateAppAchievementRewardInput['appAchievementReward'] +>; +export function useCreateAppAchievementRewardMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appAchievementRewardMutationKeys.create(), + mutationFn: (data: CreateAppAchievementRewardInput['appAchievementReward']) => + getClient() + .appAchievementReward.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventAggregateMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventAggregateMutation.ts new file mode 100644 index 0000000000..910536d4e3 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventAggregateMutation.ts @@ -0,0 +1,91 @@ +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * @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 { appEventAggregateKeys } from '../query-keys'; +import { appEventAggregateMutationKeys } from '../mutation-keys'; +import type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + CreateAppEventAggregateInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + CreateAppEventAggregateInput, +} from '../../orm/input-types'; +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppEventAggregateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppEventAggregateMutation( + params: { + selection: { + fields: S & AppEventAggregateSelect; + } & HookStrictSelect, AppEventAggregateSelect>; + } & Omit< + UseMutationOptions< + { + createAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + CreateAppEventAggregateInput['appEventAggregate'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + CreateAppEventAggregateInput['appEventAggregate'] +>; +export function useCreateAppEventAggregateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventAggregateMutationKeys.create(), + mutationFn: (data: CreateAppEventAggregateInput['appEventAggregate']) => + getClient() + .appEventAggregate.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventMutation.ts new file mode 100644 index 0000000000..c6b7110e26 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventMutation.ts @@ -0,0 +1,88 @@ +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * @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 { appEventKeys } from '../query-keys'; +import { appEventMutationKeys } from '../mutation-keys'; +import type { + AppEventSelect, + AppEventWithRelations, + CreateAppEventInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventSelect, + AppEventWithRelations, + CreateAppEventInput, +} from '../../orm/input-types'; +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppEventMutation( + params: { + selection: { + fields: S & AppEventSelect; + } & HookStrictSelect, AppEventSelect>; + } & Omit< + UseMutationOptions< + { + createAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + CreateAppEventInput['appEvent'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + CreateAppEventInput['appEvent'] +>; +export function useCreateAppEventMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventMutationKeys.create(), + mutationFn: (data: CreateAppEventInput['appEvent']) => + getClient() + .appEvent.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventTypeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventTypeMutation.ts new file mode 100644 index 0000000000..7255df66d1 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppEventTypeMutation.ts @@ -0,0 +1,88 @@ +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * @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 { appEventTypeKeys } from '../query-keys'; +import { appEventTypeMutationKeys } from '../mutation-keys'; +import type { + AppEventTypeSelect, + AppEventTypeWithRelations, + CreateAppEventTypeInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventTypeSelect, + AppEventTypeWithRelations, + CreateAppEventTypeInput, +} from '../../orm/input-types'; +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppEventTypeMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppEventTypeMutation( + params: { + selection: { + fields: S & AppEventTypeSelect; + } & HookStrictSelect, AppEventTypeSelect>; + } & Omit< + UseMutationOptions< + { + createAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + CreateAppEventTypeInput['appEventType'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + CreateAppEventTypeInput['appEventType'] +>; +export function useCreateAppEventTypeMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventTypeMutationKeys.create(), + mutationFn: (data: CreateAppEventTypeInput['appEventType']) => + getClient() + .appEventType.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelGrantMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelGrantMutation.ts new file mode 100644 index 0000000000..2cff5e857e --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelGrantMutation.ts @@ -0,0 +1,88 @@ +/** + * Records when a user achieves a level; prevents duplicate reward grants + * @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 { appLevelGrantKeys } from '../query-keys'; +import { appLevelGrantMutationKeys } from '../mutation-keys'; +import type { + AppLevelGrantSelect, + AppLevelGrantWithRelations, + CreateAppLevelGrantInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelGrantSelect, + AppLevelGrantWithRelations, + CreateAppLevelGrantInput, +} from '../../orm/input-types'; +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppLevelGrantMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppLevelGrantMutation( + params: { + selection: { + fields: S & AppLevelGrantSelect; + } & HookStrictSelect, AppLevelGrantSelect>; + } & Omit< + UseMutationOptions< + { + createAppLevelGrant: { + appLevelGrant: InferSelectResult; + }; + }, + Error, + CreateAppLevelGrantInput['appLevelGrant'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppLevelGrant: { + appLevelGrant: InferSelectResult; + }; + }, + Error, + CreateAppLevelGrantInput['appLevelGrant'] +>; +export function useCreateAppLevelGrantMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appLevelGrantMutationKeys.create(), + mutationFn: (data: CreateAppLevelGrantInput['appLevelGrant']) => + getClient() + .appLevelGrant.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appLevelGrantKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelMutation.ts new file mode 100644 index 0000000000..fe81072d0d --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelMutation.ts @@ -0,0 +1,88 @@ +/** + * Defines available levels that users can achieve by completing requirements + * @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 { appLevelKeys } from '../query-keys'; +import { appLevelMutationKeys } from '../mutation-keys'; +import type { + AppLevelSelect, + AppLevelWithRelations, + CreateAppLevelInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelSelect, + AppLevelWithRelations, + CreateAppLevelInput, +} from '../../orm/input-types'; +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppLevelMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppLevelMutation( + params: { + selection: { + fields: S & AppLevelSelect; + } & HookStrictSelect, AppLevelSelect>; + } & Omit< + UseMutationOptions< + { + createAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + CreateAppLevelInput['appLevel'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + CreateAppLevelInput['appLevel'] +>; +export function useCreateAppLevelMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appLevelMutationKeys.create(), + mutationFn: (data: CreateAppLevelInput['appLevel']) => + getClient() + .appLevel.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appLevelKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelRequirementMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelRequirementMutation.ts new file mode 100644 index 0000000000..792b9fc9fc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLevelRequirementMutation.ts @@ -0,0 +1,91 @@ +/** + * Defines the specific requirements that must be met to achieve a level + * @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 { appLevelRequirementKeys } from '../query-keys'; +import { appLevelRequirementMutationKeys } from '../mutation-keys'; +import type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + CreateAppLevelRequirementInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + CreateAppLevelRequirementInput, +} from '../../orm/input-types'; +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateAppLevelRequirementMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateAppLevelRequirementMutation( + params: { + selection: { + fields: S & AppLevelRequirementSelect; + } & HookStrictSelect, AppLevelRequirementSelect>; + } & Omit< + UseMutationOptions< + { + createAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + CreateAppLevelRequirementInput['appLevelRequirement'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + CreateAppLevelRequirementInput['appLevelRequirement'] +>; +export function useCreateAppLevelRequirementMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appLevelRequirementMutationKeys.create(), + mutationFn: (data: CreateAppLevelRequirementInput['appLevelRequirement']) => + getClient() + .appLevelRequirement.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLimitCreditCodeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLimitCreditCodeMutation.ts index 0fd950f9a0..2c79c0840c 100644 --- a/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLimitCreditCodeMutation.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateAppLimitCreditCodeMutation.ts @@ -1,5 +1,5 @@ /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { CreateAppLimitCreditCodeInput, } from '../../orm/input-types'; /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```tsx diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateBillingUsageSummaryMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateBillingUsageSummaryMutation.ts new file mode 100644 index 0000000000..b42e67c792 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateBillingUsageSummaryMutation.ts @@ -0,0 +1,91 @@ +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * @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 { billingUsageSummaryKeys } from '../query-keys'; +import { billingUsageSummaryMutationKeys } from '../mutation-keys'; +import type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + CreateBillingUsageSummaryInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + CreateBillingUsageSummaryInput, +} from '../../orm/input-types'; +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateBillingUsageSummaryMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateBillingUsageSummaryMutation( + params: { + selection: { + fields: S & BillingUsageSummarySelect; + } & HookStrictSelect, BillingUsageSummarySelect>; + } & Omit< + UseMutationOptions< + { + createBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + CreateBillingUsageSummaryInput['billingUsageSummary'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + CreateBillingUsageSummaryInput['billingUsageSummary'] +>; +export function useCreateBillingUsageSummaryMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: billingUsageSummaryMutationKeys.create(), + mutationFn: (data: CreateBillingUsageSummaryInput['billingUsageSummary']) => + getClient() + .billingUsageSummary.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateLedgerMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateLedgerMutation.ts new file mode 100644 index 0000000000..95ef87a216 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateLedgerMutation.ts @@ -0,0 +1,80 @@ +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * @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 { ledgerKeys } from '../query-keys'; +import { ledgerMutationKeys } from '../mutation-keys'; +import type { LedgerSelect, LedgerWithRelations, CreateLedgerInput } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { LedgerSelect, LedgerWithRelations, CreateLedgerInput } from '../../orm/input-types'; +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateLedgerMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateLedgerMutation( + params: { + selection: { + fields: S & LedgerSelect; + } & HookStrictSelect, LedgerSelect>; + } & Omit< + UseMutationOptions< + { + createLedger: { + ledger: InferSelectResult; + }; + }, + Error, + CreateLedgerInput['ledger'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createLedger: { + ledger: InferSelectResult; + }; + }, + Error, + CreateLedgerInput['ledger'] +>; +export function useCreateLedgerMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: ledgerMutationKeys.create(), + mutationFn: (data: CreateLedgerInput['ledger']) => + getClient() + .ledger.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: ledgerKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterCreditMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterCreditMutation.ts new file mode 100644 index 0000000000..7de3f1bbb3 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterCreditMutation.ts @@ -0,0 +1,88 @@ +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * @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 { meterCreditKeys } from '../query-keys'; +import { meterCreditMutationKeys } from '../mutation-keys'; +import type { + MeterCreditSelect, + MeterCreditWithRelations, + CreateMeterCreditInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterCreditSelect, + MeterCreditWithRelations, + CreateMeterCreditInput, +} from '../../orm/input-types'; +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateMeterCreditMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateMeterCreditMutation( + params: { + selection: { + fields: S & MeterCreditSelect; + } & HookStrictSelect, MeterCreditSelect>; + } & Omit< + UseMutationOptions< + { + createMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + CreateMeterCreditInput['meterCredit'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + CreateMeterCreditInput['meterCredit'] +>; +export function useCreateMeterCreditMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterCreditMutationKeys.create(), + mutationFn: (data: CreateMeterCreditInput['meterCredit']) => + getClient() + .meterCredit.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterDefaultMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterDefaultMutation.ts new file mode 100644 index 0000000000..f2706dec22 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterDefaultMutation.ts @@ -0,0 +1,88 @@ +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * @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 { meterDefaultKeys } from '../query-keys'; +import { meterDefaultMutationKeys } from '../mutation-keys'; +import type { + MeterDefaultSelect, + MeterDefaultWithRelations, + CreateMeterDefaultInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterDefaultSelect, + MeterDefaultWithRelations, + CreateMeterDefaultInput, +} from '../../orm/input-types'; +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateMeterDefaultMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateMeterDefaultMutation( + params: { + selection: { + fields: S & MeterDefaultSelect; + } & HookStrictSelect, MeterDefaultSelect>; + } & Omit< + UseMutationOptions< + { + createMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + CreateMeterDefaultInput['meterDefault'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + CreateMeterDefaultInput['meterDefault'] +>; +export function useCreateMeterDefaultMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterDefaultMutationKeys.create(), + mutationFn: (data: CreateMeterDefaultInput['meterDefault']) => + getClient() + .meterDefault.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterMutation.ts new file mode 100644 index 0000000000..67e70f46c5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterMutation.ts @@ -0,0 +1,80 @@ +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * @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 { meterKeys } from '../query-keys'; +import { meterMutationKeys } from '../mutation-keys'; +import type { MeterSelect, MeterWithRelations, CreateMeterInput } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSelect, MeterWithRelations, CreateMeterInput } from '../../orm/input-types'; +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateMeterMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateMeterMutation( + params: { + selection: { + fields: S & MeterSelect; + } & HookStrictSelect, MeterSelect>; + } & Omit< + UseMutationOptions< + { + createMeter: { + meter: InferSelectResult; + }; + }, + Error, + CreateMeterInput['meter'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createMeter: { + meter: InferSelectResult; + }; + }, + Error, + CreateMeterInput['meter'] +>; +export function useCreateMeterMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterMutationKeys.create(), + mutationFn: (data: CreateMeterInput['meter']) => + getClient() + .meter.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: meterKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterSourceMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterSourceMutation.ts new file mode 100644 index 0000000000..faf9c9d6fc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreateMeterSourceMutation.ts @@ -0,0 +1,88 @@ +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * @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 { meterSourceKeys } from '../query-keys'; +import { meterSourceMutationKeys } from '../mutation-keys'; +import type { + MeterSourceSelect, + MeterSourceWithRelations, + CreateMeterSourceInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterSourceSelect, + MeterSourceWithRelations, + CreateMeterSourceInput, +} from '../../orm/input-types'; +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateMeterSourceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateMeterSourceMutation( + params: { + selection: { + fields: S & MeterSourceSelect; + } & HookStrictSelect, MeterSourceSelect>; + } & Omit< + UseMutationOptions< + { + createMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + CreateMeterSourceInput['meterSource'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + CreateMeterSourceInput['meterSource'] +>; +export function useCreateMeterSourceMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterSourceMutationKeys.create(), + mutationFn: (data: CreateMeterSourceInput['meterSource']) => + getClient() + .meterSource.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanCapMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanCapMutation.ts new file mode 100644 index 0000000000..0d1b22c216 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanCapMutation.ts @@ -0,0 +1,88 @@ +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * @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 { planCapKeys } from '../query-keys'; +import { planCapMutationKeys } from '../mutation-keys'; +import type { + PlanCapSelect, + PlanCapWithRelations, + CreatePlanCapInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanCapSelect, + PlanCapWithRelations, + CreatePlanCapInput, +} from '../../orm/input-types'; +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanCapMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanCapMutation( + params: { + selection: { + fields: S & PlanCapSelect; + } & HookStrictSelect, PlanCapSelect>; + } & Omit< + UseMutationOptions< + { + createPlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + CreatePlanCapInput['planCap'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + CreatePlanCapInput['planCap'] +>; +export function useCreatePlanCapMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planCapMutationKeys.create(), + mutationFn: (data: CreatePlanCapInput['planCap']) => + getClient() + .planCap.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planCapKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanLimitMutation.ts new file mode 100644 index 0000000000..509bd7dc70 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanLimitMutation.ts @@ -0,0 +1,88 @@ +/** + * Maps each plan to specific limit names and their maximum allowed values + * @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 { planLimitKeys } from '../query-keys'; +import { planLimitMutationKeys } from '../mutation-keys'; +import type { + PlanLimitSelect, + PlanLimitWithRelations, + CreatePlanLimitInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanLimitSelect, + PlanLimitWithRelations, + CreatePlanLimitInput, +} from '../../orm/input-types'; +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanLimitMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanLimitMutation( + params: { + selection: { + fields: S & PlanLimitSelect; + } & HookStrictSelect, PlanLimitSelect>; + } & Omit< + UseMutationOptions< + { + createPlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + CreatePlanLimitInput['planLimit'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + CreatePlanLimitInput['planLimit'] +>; +export function useCreatePlanLimitMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planLimitMutationKeys.create(), + mutationFn: (data: CreatePlanLimitInput['planLimit']) => + getClient() + .planLimit.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMeterLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMeterLimitMutation.ts new file mode 100644 index 0000000000..ba1c27ce25 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMeterLimitMutation.ts @@ -0,0 +1,91 @@ +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * @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 { planMeterLimitKeys } from '../query-keys'; +import { planMeterLimitMutationKeys } from '../mutation-keys'; +import type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + CreatePlanMeterLimitInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + CreatePlanMeterLimitInput, +} from '../../orm/input-types'; +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanMeterLimitMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanMeterLimitMutation( + params: { + selection: { + fields: S & PlanMeterLimitSelect; + } & HookStrictSelect, PlanMeterLimitSelect>; + } & Omit< + UseMutationOptions< + { + createPlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + CreatePlanMeterLimitInput['planMeterLimit'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + CreatePlanMeterLimitInput['planMeterLimit'] +>; +export function useCreatePlanMeterLimitMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planMeterLimitMutationKeys.create(), + mutationFn: (data: CreatePlanMeterLimitInput['planMeterLimit']) => + getClient() + .planMeterLimit.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMutation.ts new file mode 100644 index 0000000000..2d7879b3dc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanMutation.ts @@ -0,0 +1,80 @@ +/** + * Defines plan tiers with named limit configurations + * @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 { planKeys } from '../query-keys'; +import { planMutationKeys } from '../mutation-keys'; +import type { PlanSelect, PlanWithRelations, CreatePlanInput } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSelect, PlanWithRelations, CreatePlanInput } from '../../orm/input-types'; +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanMutation( + params: { + selection: { + fields: S & PlanSelect; + } & HookStrictSelect, PlanSelect>; + } & Omit< + UseMutationOptions< + { + createPlan: { + plan: InferSelectResult; + }; + }, + Error, + CreatePlanInput['plan'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlan: { + plan: InferSelectResult; + }; + }, + Error, + CreatePlanInput['plan'] +>; +export function useCreatePlanMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planMutationKeys.create(), + mutationFn: (data: CreatePlanInput['plan']) => + getClient() + .plan.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanOverrideMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanOverrideMutation.ts new file mode 100644 index 0000000000..b53dd8ebfc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanOverrideMutation.ts @@ -0,0 +1,88 @@ +/** + * Per-entity limit overrides that take precedence over plan defaults + * @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 { planOverrideKeys } from '../query-keys'; +import { planOverrideMutationKeys } from '../mutation-keys'; +import type { + PlanOverrideSelect, + PlanOverrideWithRelations, + CreatePlanOverrideInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanOverrideSelect, + PlanOverrideWithRelations, + CreatePlanOverrideInput, +} from '../../orm/input-types'; +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanOverrideMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanOverrideMutation( + params: { + selection: { + fields: S & PlanOverrideSelect; + } & HookStrictSelect, PlanOverrideSelect>; + } & Omit< + UseMutationOptions< + { + createPlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + CreatePlanOverrideInput['planOverride'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + CreatePlanOverrideInput['planOverride'] +>; +export function useCreatePlanOverrideMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planOverrideMutationKeys.create(), + mutationFn: (data: CreatePlanOverrideInput['planOverride']) => + getClient() + .planOverride.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanPricingMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanPricingMutation.ts new file mode 100644 index 0000000000..dbfb206f92 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanPricingMutation.ts @@ -0,0 +1,88 @@ +/** + * Billing intervals and pricing for each plan tier + * @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 { planPricingKeys } from '../query-keys'; +import { planPricingMutationKeys } from '../mutation-keys'; +import type { + PlanPricingSelect, + PlanPricingWithRelations, + CreatePlanPricingInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanPricingSelect, + PlanPricingWithRelations, + CreatePlanPricingInput, +} from '../../orm/input-types'; +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanPricingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanPricingMutation( + params: { + selection: { + fields: S & PlanPricingSelect; + } & HookStrictSelect, PlanPricingSelect>; + } & Omit< + UseMutationOptions< + { + createPlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + CreatePlanPricingInput['planPricing'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + CreatePlanPricingInput['planPricing'] +>; +export function useCreatePlanPricingMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planPricingMutationKeys.create(), + mutationFn: (data: CreatePlanPricingInput['planPricing']) => + getClient() + .planPricing.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planPricingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanSubscriptionMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanSubscriptionMutation.ts new file mode 100644 index 0000000000..befbd3a1dd --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useCreatePlanSubscriptionMutation.ts @@ -0,0 +1,91 @@ +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * @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 { planSubscriptionKeys } from '../query-keys'; +import { planSubscriptionMutationKeys } from '../mutation-keys'; +import type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + CreatePlanSubscriptionInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + CreatePlanSubscriptionInput, +} from '../../orm/input-types'; +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreatePlanSubscriptionMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreatePlanSubscriptionMutation( + params: { + selection: { + fields: S & PlanSubscriptionSelect; + } & HookStrictSelect, PlanSubscriptionSelect>; + } & Omit< + UseMutationOptions< + { + createPlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + CreatePlanSubscriptionInput['planSubscription'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createPlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + CreatePlanSubscriptionInput['planSubscription'] +>; +export function useCreatePlanSubscriptionMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planSubscriptionMutationKeys.create(), + mutationFn: (data: CreatePlanSubscriptionInput['planSubscription']) => + getClient() + .planSubscription.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppAchievementRewardMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppAchievementRewardMutation.ts new file mode 100644 index 0000000000..80dbd7e990 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppAchievementRewardMutation.ts @@ -0,0 +1,104 @@ +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * @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 { appAchievementRewardKeys } from '../query-keys'; +import { appAchievementRewardMutationKeys } from '../mutation-keys'; +import type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, +} from '../../orm/input-types'; +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppAchievementRewardMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppAchievementRewardMutation( + params: { + selection: { + fields: S & AppAchievementRewardSelect; + } & HookStrictSelect, AppAchievementRewardSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppAchievementRewardMutation( + 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: appAchievementRewardMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appAchievementReward.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appAchievementRewardKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventAggregateMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventAggregateMutation.ts new file mode 100644 index 0000000000..6af7ab50c4 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventAggregateMutation.ts @@ -0,0 +1,104 @@ +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * @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 { appEventAggregateKeys } from '../query-keys'; +import { appEventAggregateMutationKeys } from '../mutation-keys'; +import type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, +} from '../../orm/input-types'; +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppEventAggregateMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppEventAggregateMutation( + params: { + selection: { + fields: S & AppEventAggregateSelect; + } & HookStrictSelect, AppEventAggregateSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppEventAggregateMutation( + 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: appEventAggregateMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appEventAggregate.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appEventAggregateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventMutation.ts new file mode 100644 index 0000000000..f539c1aedb --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventMutation.ts @@ -0,0 +1,102 @@ +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * @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 { appEventKeys } from '../query-keys'; +import { appEventMutationKeys } from '../mutation-keys'; +import type { AppEventSelect, AppEventWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppEventSelect, AppEventWithRelations } from '../../orm/input-types'; +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppEventMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppEventMutation( + params: { + selection: { + fields: S & AppEventSelect; + } & HookStrictSelect, AppEventSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } +>; +export function useDeleteAppEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventMutationKeys.all, + mutationFn: ({ id, createdAt }: { id: string; createdAt: string }) => + getClient() + .appEvent.delete({ + where: { + id, + createdAt, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventTypeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventTypeMutation.ts new file mode 100644 index 0000000000..9e0fcc380e --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppEventTypeMutation.ts @@ -0,0 +1,98 @@ +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * @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 { appEventTypeKeys } from '../query-keys'; +import { appEventTypeMutationKeys } from '../mutation-keys'; +import type { AppEventTypeSelect, AppEventTypeWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppEventTypeSelect, AppEventTypeWithRelations } from '../../orm/input-types'; +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppEventTypeMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppEventTypeMutation( + params: { + selection: { + fields: S & AppEventTypeSelect; + } & HookStrictSelect, AppEventTypeSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppEventTypeMutation( + 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: appEventTypeMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appEventType.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appEventTypeKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelGrantMutation.ts similarity index 56% rename from sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionMutation.ts rename to sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelGrantMutation.ts index 1c02a813ab..a0df4a7cc1 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgPermissionMutation.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Records when a user achieves a level; prevents duplicate reward grants * @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 { orgPermissionKeys } from '../query-keys'; -import { orgPermissionMutationKeys } from '../mutation-keys'; -import type { OrgPermissionSelect, OrgPermissionWithRelations } from '../../orm/input-types'; +import { appLevelGrantKeys } from '../query-keys'; +import { appLevelGrantMutationKeys } from '../mutation-keys'; +import type { AppLevelGrantSelect, AppLevelGrantWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { OrgPermissionSelect, OrgPermissionWithRelations } from '../../orm/input-types'; +export type { AppLevelGrantSelect, AppLevelGrantWithRelations } from '../../orm/input-types'; /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Records when a user achieves a level; prevents duplicate reward grants * * @example * ```tsx - * const { mutate, isPending } = useDeleteOrgPermissionMutation({ + * const { mutate, isPending } = useDeleteAppLevelGrantMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteOrgPermissionMutation( +export function useDeleteAppLevelGrantMutation( params: { selection: { - fields: S & OrgPermissionSelect; - } & HookStrictSelect, OrgPermissionSelect>; + fields: S & AppLevelGrantSelect; + } & HookStrictSelect, AppLevelGrantSelect>; } & Omit< UseMutationOptions< { - deleteOrgPermission: { - orgPermission: InferSelectResult; + deleteAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteOrgPermissionMutation( > ): UseMutationResult< { - deleteOrgPermission: { - orgPermission: InferSelectResult; + deleteAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteOrgPermissionMutation( id: string; } >; -export function useDeleteOrgPermissionMutation( +export function useDeleteAppLevelGrantMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteOrgPermissionMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionMutationKeys.all, + mutationKey: appLevelGrantMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .orgPermission.delete({ + .appLevelGrant.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteOrgPermissionMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: orgPermissionKeys.detail(variables.id), + queryKey: appLevelGrantKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.lists(), + queryKey: appLevelGrantKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelMutation.ts new file mode 100644 index 0000000000..cbef84ab86 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelMutation.ts @@ -0,0 +1,98 @@ +/** + * Defines available levels that users can achieve by completing requirements + * @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 { appLevelKeys } from '../query-keys'; +import { appLevelMutationKeys } from '../mutation-keys'; +import type { AppLevelSelect, AppLevelWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppLevelSelect, AppLevelWithRelations } from '../../orm/input-types'; +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppLevelMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppLevelMutation( + params: { + selection: { + fields: S & AppLevelSelect; + } & HookStrictSelect, AppLevelSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppLevelMutation( + 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: appLevelMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appLevel.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appLevelKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appLevelKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelRequirementMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelRequirementMutation.ts new file mode 100644 index 0000000000..6784e56dcc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLevelRequirementMutation.ts @@ -0,0 +1,104 @@ +/** + * Defines the specific requirements that must be met to achieve a level + * @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 { appLevelRequirementKeys } from '../query-keys'; +import { appLevelRequirementMutationKeys } from '../mutation-keys'; +import type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, +} from '../../orm/input-types'; +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteAppLevelRequirementMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteAppLevelRequirementMutation( + params: { + selection: { + fields: S & AppLevelRequirementSelect; + } & HookStrictSelect, AppLevelRequirementSelect>; + } & Omit< + UseMutationOptions< + { + deleteAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteAppLevelRequirementMutation( + 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: appLevelRequirementMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .appLevelRequirement.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: appLevelRequirementKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLimitCreditCodeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLimitCreditCodeMutation.ts index 0d9e7d8351..5fe810e9e8 100644 --- a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLimitCreditCodeMutation.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteAppLimitCreditCodeMutation.ts @@ -1,5 +1,5 @@ /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -21,7 +21,7 @@ export type { AppLimitCreditCodeWithRelations, } from '../../orm/input-types'; /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```tsx diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteBillingUsageSummaryMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteBillingUsageSummaryMutation.ts new file mode 100644 index 0000000000..2f6fb87775 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteBillingUsageSummaryMutation.ts @@ -0,0 +1,104 @@ +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * @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 { billingUsageSummaryKeys } from '../query-keys'; +import { billingUsageSummaryMutationKeys } from '../mutation-keys'; +import type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, +} from '../../orm/input-types'; +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteBillingUsageSummaryMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteBillingUsageSummaryMutation( + params: { + selection: { + fields: S & BillingUsageSummarySelect; + } & HookStrictSelect, BillingUsageSummarySelect>; + } & Omit< + UseMutationOptions< + { + deleteBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteBillingUsageSummaryMutation( + 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: billingUsageSummaryMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .billingUsageSummary.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: billingUsageSummaryKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteLedgerMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteLedgerMutation.ts new file mode 100644 index 0000000000..e31fc2bf6f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteLedgerMutation.ts @@ -0,0 +1,102 @@ +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * @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 { ledgerKeys } from '../query-keys'; +import { ledgerMutationKeys } from '../mutation-keys'; +import type { LedgerSelect, LedgerWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { LedgerSelect, LedgerWithRelations } from '../../orm/input-types'; +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteLedgerMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteLedgerMutation( + params: { + selection: { + fields: S & LedgerSelect; + } & HookStrictSelect, LedgerSelect>; + } & Omit< + UseMutationOptions< + { + deleteLedger: { + ledger: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteLedger: { + ledger: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + } +>; +export function useDeleteLedgerMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: ledgerMutationKeys.all, + mutationFn: ({ id, createdAt }: { id: string; createdAt: string }) => + getClient() + .ledger.delete({ + where: { + id, + createdAt, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: ledgerKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: ledgerKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterCreditMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterCreditMutation.ts new file mode 100644 index 0000000000..637a775d1a --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterCreditMutation.ts @@ -0,0 +1,98 @@ +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * @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 { meterCreditKeys } from '../query-keys'; +import { meterCreditMutationKeys } from '../mutation-keys'; +import type { MeterCreditSelect, MeterCreditWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterCreditSelect, MeterCreditWithRelations } from '../../orm/input-types'; +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteMeterCreditMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteMeterCreditMutation( + params: { + selection: { + fields: S & MeterCreditSelect; + } & HookStrictSelect, MeterCreditSelect>; + } & Omit< + UseMutationOptions< + { + deleteMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteMeterCreditMutation( + 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: meterCreditMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .meterCredit.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: meterCreditKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterDefaultMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterDefaultMutation.ts new file mode 100644 index 0000000000..3fa63ac44a --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterDefaultMutation.ts @@ -0,0 +1,98 @@ +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * @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 { meterDefaultKeys } from '../query-keys'; +import { meterDefaultMutationKeys } from '../mutation-keys'; +import type { MeterDefaultSelect, MeterDefaultWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterDefaultSelect, MeterDefaultWithRelations } from '../../orm/input-types'; +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteMeterDefaultMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteMeterDefaultMutation( + params: { + selection: { + fields: S & MeterDefaultSelect; + } & HookStrictSelect, MeterDefaultSelect>; + } & Omit< + UseMutationOptions< + { + deleteMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteMeterDefaultMutation( + 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: meterDefaultMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .meterDefault.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: meterDefaultKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterMutation.ts new file mode 100644 index 0000000000..b8790671fa --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterMutation.ts @@ -0,0 +1,98 @@ +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * @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 { meterKeys } from '../query-keys'; +import { meterMutationKeys } from '../mutation-keys'; +import type { MeterSelect, MeterWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSelect, MeterWithRelations } from '../../orm/input-types'; +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteMeterMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteMeterMutation( + params: { + selection: { + fields: S & MeterSelect; + } & HookStrictSelect, MeterSelect>; + } & Omit< + UseMutationOptions< + { + deleteMeter: { + meter: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteMeter: { + meter: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteMeterMutation( + 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: meterMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .meter.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: meterKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterSourceMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterSourceMutation.ts new file mode 100644 index 0000000000..eca0d7d05d --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeleteMeterSourceMutation.ts @@ -0,0 +1,98 @@ +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * @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 { meterSourceKeys } from '../query-keys'; +import { meterSourceMutationKeys } from '../mutation-keys'; +import type { MeterSourceSelect, MeterSourceWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSourceSelect, MeterSourceWithRelations } from '../../orm/input-types'; +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteMeterSourceMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteMeterSourceMutation( + params: { + selection: { + fields: S & MeterSourceSelect; + } & HookStrictSelect, MeterSourceSelect>; + } & Omit< + UseMutationOptions< + { + deleteMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteMeterSourceMutation( + 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: meterSourceMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .meterSource.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: meterSourceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanCapMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanCapMutation.ts new file mode 100644 index 0000000000..75d6b6f324 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanCapMutation.ts @@ -0,0 +1,98 @@ +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * @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 { planCapKeys } from '../query-keys'; +import { planCapMutationKeys } from '../mutation-keys'; +import type { PlanCapSelect, PlanCapWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanCapSelect, PlanCapWithRelations } from '../../orm/input-types'; +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanCapMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanCapMutation( + params: { + selection: { + fields: S & PlanCapSelect; + } & HookStrictSelect, PlanCapSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanCapMutation( + 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: planCapMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planCap.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planCapKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planCapKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanLimitMutation.ts new file mode 100644 index 0000000000..a4fa0a3ab4 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanLimitMutation.ts @@ -0,0 +1,98 @@ +/** + * Maps each plan to specific limit names and their maximum allowed values + * @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 { planLimitKeys } from '../query-keys'; +import { planLimitMutationKeys } from '../mutation-keys'; +import type { PlanLimitSelect, PlanLimitWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanLimitSelect, PlanLimitWithRelations } from '../../orm/input-types'; +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanLimitMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanLimitMutation( + params: { + selection: { + fields: S & PlanLimitSelect; + } & HookStrictSelect, PlanLimitSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanLimitMutation( + 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: planLimitMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planLimit.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planLimitKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMeterLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMeterLimitMutation.ts new file mode 100644 index 0000000000..8f140c1670 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMeterLimitMutation.ts @@ -0,0 +1,98 @@ +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * @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 { planMeterLimitKeys } from '../query-keys'; +import { planMeterLimitMutationKeys } from '../mutation-keys'; +import type { PlanMeterLimitSelect, PlanMeterLimitWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanMeterLimitSelect, PlanMeterLimitWithRelations } from '../../orm/input-types'; +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanMeterLimitMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanMeterLimitMutation( + params: { + selection: { + fields: S & PlanMeterLimitSelect; + } & HookStrictSelect, PlanMeterLimitSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanMeterLimitMutation( + 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: planMeterLimitMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planMeterLimit.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planMeterLimitKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMutation.ts new file mode 100644 index 0000000000..f90b0d1b07 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanMutation.ts @@ -0,0 +1,98 @@ +/** + * Defines plan tiers with named limit configurations + * @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 { planKeys } from '../query-keys'; +import { planMutationKeys } from '../mutation-keys'; +import type { PlanSelect, PlanWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSelect, PlanWithRelations } from '../../orm/input-types'; +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanMutation( + params: { + selection: { + fields: S & PlanSelect; + } & HookStrictSelect, PlanSelect>; + } & Omit< + UseMutationOptions< + { + deletePlan: { + plan: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlan: { + plan: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanMutation( + 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: planMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .plan.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanOverrideMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanOverrideMutation.ts new file mode 100644 index 0000000000..17a80a5bf5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanOverrideMutation.ts @@ -0,0 +1,98 @@ +/** + * Per-entity limit overrides that take precedence over plan defaults + * @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 { planOverrideKeys } from '../query-keys'; +import { planOverrideMutationKeys } from '../mutation-keys'; +import type { PlanOverrideSelect, PlanOverrideWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanOverrideSelect, PlanOverrideWithRelations } from '../../orm/input-types'; +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanOverrideMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanOverrideMutation( + params: { + selection: { + fields: S & PlanOverrideSelect; + } & HookStrictSelect, PlanOverrideSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanOverrideMutation( + 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: planOverrideMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planOverride.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planOverrideKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanPricingMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanPricingMutation.ts new file mode 100644 index 0000000000..11d6d66c62 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanPricingMutation.ts @@ -0,0 +1,98 @@ +/** + * Billing intervals and pricing for each plan tier + * @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 { planPricingKeys } from '../query-keys'; +import { planPricingMutationKeys } from '../mutation-keys'; +import type { PlanPricingSelect, PlanPricingWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanPricingSelect, PlanPricingWithRelations } from '../../orm/input-types'; +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanPricingMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanPricingMutation( + params: { + selection: { + fields: S & PlanPricingSelect; + } & HookStrictSelect, PlanPricingSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanPricingMutation( + 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: planPricingMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planPricing.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planPricingKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planPricingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanSubscriptionMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanSubscriptionMutation.ts new file mode 100644 index 0000000000..14ef56ac40 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useDeletePlanSubscriptionMutation.ts @@ -0,0 +1,98 @@ +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * @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 { planSubscriptionKeys } from '../query-keys'; +import { planSubscriptionMutationKeys } from '../mutation-keys'; +import type { PlanSubscriptionSelect, PlanSubscriptionWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSubscriptionSelect, PlanSubscriptionWithRelations } from '../../orm/input-types'; +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```tsx + * const { mutate, isPending } = useDeletePlanSubscriptionMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeletePlanSubscriptionMutation( + params: { + selection: { + fields: S & PlanSubscriptionSelect; + } & HookStrictSelect, PlanSubscriptionSelect>; + } & Omit< + UseMutationOptions< + { + deletePlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deletePlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeletePlanSubscriptionMutation( + 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: planSubscriptionMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .planSubscription.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: planSubscriptionKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useGrantAchievementMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useGrantAchievementMutation.ts new file mode 100644 index 0000000000..6228982629 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useGrantAchievementMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for grantAchievement + * @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 { GrantAchievementVariables } from '../../orm/mutation'; +import type { GrantAchievementPayloadSelect, GrantAchievementPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { GrantAchievementVariables } from '../../orm/mutation'; +export type { GrantAchievementPayloadSelect } from '../../orm/input-types'; +export function useGrantAchievementMutation( + params: { + selection: { + fields: S & GrantAchievementPayloadSelect; + } & HookStrictSelect, GrantAchievementPayloadSelect>; + } & Omit< + UseMutationOptions< + { + grantAchievement: InferSelectResult | null; + }, + Error, + GrantAchievementVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + grantAchievement: InferSelectResult | null; + }, + Error, + GrantAchievementVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.grantAchievement(), + mutationFn: (variables: GrantAchievementVariables) => + getClient() + .mutation.grantAchievement(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useRecomputeCapabilitiesMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useRecomputeCapabilitiesMutation.ts new file mode 100644 index 0000000000..bca18d3bfb --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useRecomputeCapabilitiesMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for recomputeCapabilities + * @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 { RecomputeCapabilitiesVariables } from '../../orm/mutation'; +import type { + RecomputeCapabilitiesPayloadSelect, + RecomputeCapabilitiesPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RecomputeCapabilitiesVariables } from '../../orm/mutation'; +export type { RecomputeCapabilitiesPayloadSelect } from '../../orm/input-types'; +export function useRecomputeCapabilitiesMutation( + params: { + selection: { + fields: S & RecomputeCapabilitiesPayloadSelect; + } & HookStrictSelect, RecomputeCapabilitiesPayloadSelect>; + } & Omit< + UseMutationOptions< + { + recomputeCapabilities: InferSelectResult | null; + }, + Error, + RecomputeCapabilitiesVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + recomputeCapabilities: InferSelectResult | null; + }, + Error, + RecomputeCapabilitiesVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.recomputeCapabilities(), + mutationFn: (variables: RecomputeCapabilitiesVariables) => + getClient() + .mutation.recomputeCapabilities(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useRevokeAchievementMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useRevokeAchievementMutation.ts new file mode 100644 index 0000000000..72b3076b55 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useRevokeAchievementMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for revokeAchievement + * @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 { RevokeAchievementVariables } from '../../orm/mutation'; +import type { + RevokeAchievementPayloadSelect, + RevokeAchievementPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RevokeAchievementVariables } from '../../orm/mutation'; +export type { RevokeAchievementPayloadSelect } from '../../orm/input-types'; +export function useRevokeAchievementMutation( + params: { + selection: { + fields: S & RevokeAchievementPayloadSelect; + } & HookStrictSelect, RevokeAchievementPayloadSelect>; + } & Omit< + UseMutationOptions< + { + revokeAchievement: InferSelectResult | null; + }, + Error, + RevokeAchievementVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + revokeAchievement: InferSelectResult | null; + }, + Error, + RevokeAchievementVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.revokeAchievement(), + mutationFn: (variables: RevokeAchievementVariables) => + getClient() + .mutation.revokeAchievement(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useSeedMeterDefaultsMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useSeedMeterDefaultsMutation.ts new file mode 100644 index 0000000000..d586b896c4 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useSeedMeterDefaultsMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for seedMeterDefaults + * @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 { SeedMeterDefaultsVariables } from '../../orm/mutation'; +import type { + SeedMeterDefaultsPayloadSelect, + SeedMeterDefaultsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SeedMeterDefaultsVariables } from '../../orm/mutation'; +export type { SeedMeterDefaultsPayloadSelect } from '../../orm/input-types'; +export function useSeedMeterDefaultsMutation( + params: { + selection: { + fields: S & SeedMeterDefaultsPayloadSelect; + } & HookStrictSelect, SeedMeterDefaultsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + seedMeterDefaults: InferSelectResult | null; + }, + Error, + SeedMeterDefaultsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + seedMeterDefaults: InferSelectResult | null; + }, + Error, + SeedMeterDefaultsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.seedMeterDefaults(), + mutationFn: (variables: SeedMeterDefaultsVariables) => + getClient() + .mutation.seedMeterDefaults(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useSeedPlanMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useSeedPlanMutation.ts new file mode 100644 index 0000000000..456940bced --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useSeedPlanMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for seedPlan + * @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 { SeedPlanVariables } from '../../orm/mutation'; +import type { SeedPlanPayloadSelect, SeedPlanPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SeedPlanVariables } from '../../orm/mutation'; +export type { SeedPlanPayloadSelect } from '../../orm/input-types'; +export function useSeedPlanMutation( + params: { + selection: { + fields: S & SeedPlanPayloadSelect; + } & HookStrictSelect, SeedPlanPayloadSelect>; + } & Omit< + UseMutationOptions< + { + seedPlan: InferSelectResult | null; + }, + Error, + SeedPlanVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + seedPlan: InferSelectResult | null; + }, + Error, + SeedPlanVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.seedPlan(), + mutationFn: (variables: SeedPlanVariables) => + getClient() + .mutation.seedPlan(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useSeedTrustLadderMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useSeedTrustLadderMutation.ts new file mode 100644 index 0000000000..210a7816d9 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useSeedTrustLadderMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for seedTrustLadder + * @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 { SeedTrustLadderVariables } from '../../orm/mutation'; +import type { SeedTrustLadderPayloadSelect, SeedTrustLadderPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SeedTrustLadderVariables } from '../../orm/mutation'; +export type { SeedTrustLadderPayloadSelect } from '../../orm/input-types'; +export function useSeedTrustLadderMutation( + params: { + selection: { + fields: S & SeedTrustLadderPayloadSelect; + } & HookStrictSelect, SeedTrustLadderPayloadSelect>; + } & Omit< + UseMutationOptions< + { + seedTrustLadder: InferSelectResult | null; + }, + Error, + SeedTrustLadderVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + seedTrustLadder: InferSelectResult | null; + }, + Error, + SeedTrustLadderVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.seedTrustLadder(), + mutationFn: (variables: SeedTrustLadderVariables) => + getClient() + .mutation.seedTrustLadder(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppAchievementRewardMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppAchievementRewardMutation.ts new file mode 100644 index 0000000000..4d2d5418cc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppAchievementRewardMutation.ts @@ -0,0 +1,116 @@ +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * @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 { appAchievementRewardKeys } from '../query-keys'; +import { appAchievementRewardMutationKeys } from '../mutation-keys'; +import type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + AppAchievementRewardPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + AppAchievementRewardPatch, +} from '../../orm/input-types'; +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppAchievementRewardMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appAchievementRewardPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppAchievementRewardMutation( + params: { + selection: { + fields: S & AppAchievementRewardSelect; + } & HookStrictSelect, AppAchievementRewardSelect>; + } & Omit< + UseMutationOptions< + { + updateAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + { + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }, + Error, + { + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; + } +>; +export function useUpdateAppAchievementRewardMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appAchievementRewardMutationKeys.all, + mutationFn: ({ + id, + appAchievementRewardPatch, + }: { + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; + }) => + getClient() + .appAchievementReward.update({ + where: { + id, + }, + data: appAchievementRewardPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appAchievementRewardKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventAggregateMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventAggregateMutation.ts new file mode 100644 index 0000000000..8d386ff482 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventAggregateMutation.ts @@ -0,0 +1,116 @@ +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * @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 { appEventAggregateKeys } from '../query-keys'; +import { appEventAggregateMutationKeys } from '../mutation-keys'; +import type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + AppEventAggregatePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + AppEventAggregatePatch, +} from '../../orm/input-types'; +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppEventAggregateMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appEventAggregatePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppEventAggregateMutation( + params: { + selection: { + fields: S & AppEventAggregateSelect; + } & HookStrictSelect, AppEventAggregateSelect>; + } & Omit< + UseMutationOptions< + { + updateAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + { + id: string; + appEventAggregatePatch: AppEventAggregatePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }, + Error, + { + id: string; + appEventAggregatePatch: AppEventAggregatePatch; + } +>; +export function useUpdateAppEventAggregateMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appEventAggregatePatch: AppEventAggregatePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventAggregateMutationKeys.all, + mutationFn: ({ + id, + appEventAggregatePatch, + }: { + id: string; + appEventAggregatePatch: AppEventAggregatePatch; + }) => + getClient() + .appEventAggregate.update({ + where: { + id, + }, + data: appEventAggregatePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventAggregateKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventMutation.ts new file mode 100644 index 0000000000..d6c34cb7f6 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventMutation.ts @@ -0,0 +1,114 @@ +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * @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 { appEventKeys } from '../query-keys'; +import { appEventMutationKeys } from '../mutation-keys'; +import type { AppEventSelect, AppEventWithRelations, AppEventPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppEventSelect, AppEventWithRelations, AppEventPatch } from '../../orm/input-types'; +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppEventMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appEventPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppEventMutation( + params: { + selection: { + fields: S & AppEventSelect; + } & HookStrictSelect, AppEventSelect>; + } & Omit< + UseMutationOptions< + { + updateAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + appEventPatch: AppEventPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppEvent: { + appEvent: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + appEventPatch: AppEventPatch; + } +>; +export function useUpdateAppEventMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + appEventPatch: AppEventPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventMutationKeys.all, + mutationFn: ({ + id, + createdAt, + appEventPatch, + }: { + id: string; + createdAt: string; + appEventPatch: AppEventPatch; + }) => + getClient() + .appEvent.update({ + where: { + id, + createdAt, + }, + data: appEventPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appEventKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventTypeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventTypeMutation.ts new file mode 100644 index 0000000000..72aaa76e81 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppEventTypeMutation.ts @@ -0,0 +1,110 @@ +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * @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 { appEventTypeKeys } from '../query-keys'; +import { appEventTypeMutationKeys } from '../mutation-keys'; +import type { + AppEventTypeSelect, + AppEventTypeWithRelations, + AppEventTypePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventTypeSelect, + AppEventTypeWithRelations, + AppEventTypePatch, +} from '../../orm/input-types'; +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppEventTypeMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appEventTypePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppEventTypeMutation( + params: { + selection: { + fields: S & AppEventTypeSelect; + } & HookStrictSelect, AppEventTypeSelect>; + } & Omit< + UseMutationOptions< + { + updateAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + { + id: string; + appEventTypePatch: AppEventTypePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppEventType: { + appEventType: InferSelectResult; + }; + }, + Error, + { + id: string; + appEventTypePatch: AppEventTypePatch; + } +>; +export function useUpdateAppEventTypeMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appEventTypePatch: AppEventTypePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appEventTypeMutationKeys.all, + mutationFn: ({ id, appEventTypePatch }: { id: string; appEventTypePatch: AppEventTypePatch }) => + getClient() + .appEventType.update({ + where: { + id, + }, + data: appEventTypePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appEventTypeKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelGrantMutation.ts similarity index 50% rename from sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionMutation.ts rename to sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelGrantMutation.ts index 2704a2545e..12e6bf9cad 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgPermissionMutation.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelGrantMutation.ts @@ -1,5 +1,5 @@ /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Records when a user achieves a level; prevents duplicate reward grants * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,106 +9,106 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { orgPermissionKeys } from '../query-keys'; -import { orgPermissionMutationKeys } from '../mutation-keys'; +import { appLevelGrantKeys } from '../query-keys'; +import { appLevelGrantMutationKeys } from '../mutation-keys'; import type { - OrgPermissionSelect, - OrgPermissionWithRelations, - OrgPermissionPatch, + AppLevelGrantSelect, + AppLevelGrantWithRelations, + AppLevelGrantPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - OrgPermissionSelect, - OrgPermissionWithRelations, - OrgPermissionPatch, + AppLevelGrantSelect, + AppLevelGrantWithRelations, + AppLevelGrantPatch, } from '../../orm/input-types'; /** - * Defines available permissions as named bits within a bitmask, used by the RBAC system for access control + * Records when a user achieves a level; prevents duplicate reward grants * * @example * ```tsx - * const { mutate, isPending } = useUpdateOrgPermissionMutation({ + * const { mutate, isPending } = useUpdateAppLevelGrantMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', orgPermissionPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', appLevelGrantPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateOrgPermissionMutation( +export function useUpdateAppLevelGrantMutation( params: { selection: { - fields: S & OrgPermissionSelect; - } & HookStrictSelect, OrgPermissionSelect>; + fields: S & AppLevelGrantSelect; + } & HookStrictSelect, AppLevelGrantSelect>; } & Omit< UseMutationOptions< { - updateOrgPermission: { - orgPermission: InferSelectResult; + updateAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }, Error, { id: string; - orgPermissionPatch: OrgPermissionPatch; + appLevelGrantPatch: AppLevelGrantPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateOrgPermission: { - orgPermission: InferSelectResult; + updateAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }, Error, { id: string; - orgPermissionPatch: OrgPermissionPatch; + appLevelGrantPatch: AppLevelGrantPatch; } >; -export function useUpdateOrgPermissionMutation( +export function useUpdateAppLevelGrantMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - orgPermissionPatch: OrgPermissionPatch; + appLevelGrantPatch: AppLevelGrantPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: orgPermissionMutationKeys.all, + mutationKey: appLevelGrantMutationKeys.all, mutationFn: ({ id, - orgPermissionPatch, + appLevelGrantPatch, }: { id: string; - orgPermissionPatch: OrgPermissionPatch; + appLevelGrantPatch: AppLevelGrantPatch; }) => getClient() - .orgPermission.update({ + .appLevelGrant.update({ where: { id, }, - data: orgPermissionPatch, + data: appLevelGrantPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.detail(variables.id), + queryKey: appLevelGrantKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: orgPermissionKeys.lists(), + queryKey: appLevelGrantKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelMutation.ts new file mode 100644 index 0000000000..726bcffe8f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelMutation.ts @@ -0,0 +1,102 @@ +/** + * Defines available levels that users can achieve by completing requirements + * @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 { appLevelKeys } from '../query-keys'; +import { appLevelMutationKeys } from '../mutation-keys'; +import type { AppLevelSelect, AppLevelWithRelations, AppLevelPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppLevelSelect, AppLevelWithRelations, AppLevelPatch } from '../../orm/input-types'; +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppLevelMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appLevelPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppLevelMutation( + params: { + selection: { + fields: S & AppLevelSelect; + } & HookStrictSelect, AppLevelSelect>; + } & Omit< + UseMutationOptions< + { + updateAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + { + id: string; + appLevelPatch: AppLevelPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppLevel: { + appLevel: InferSelectResult; + }; + }, + Error, + { + id: string; + appLevelPatch: AppLevelPatch; + } +>; +export function useUpdateAppLevelMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appLevelPatch: AppLevelPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appLevelMutationKeys.all, + mutationFn: ({ id, appLevelPatch }: { id: string; appLevelPatch: AppLevelPatch }) => + getClient() + .appLevel.update({ + where: { + id, + }, + data: appLevelPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appLevelKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appLevelKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelRequirementMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelRequirementMutation.ts new file mode 100644 index 0000000000..01e6132c3d --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLevelRequirementMutation.ts @@ -0,0 +1,116 @@ +/** + * Defines the specific requirements that must be met to achieve a level + * @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 { appLevelRequirementKeys } from '../query-keys'; +import { appLevelRequirementMutationKeys } from '../mutation-keys'; +import type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + AppLevelRequirementPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + AppLevelRequirementPatch, +} from '../../orm/input-types'; +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateAppLevelRequirementMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', appLevelRequirementPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateAppLevelRequirementMutation( + params: { + selection: { + fields: S & AppLevelRequirementSelect; + } & HookStrictSelect, AppLevelRequirementSelect>; + } & Omit< + UseMutationOptions< + { + updateAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + { + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }, + Error, + { + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; + } +>; +export function useUpdateAppLevelRequirementMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: appLevelRequirementMutationKeys.all, + mutationFn: ({ + id, + appLevelRequirementPatch, + }: { + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; + }) => + getClient() + .appLevelRequirement.update({ + where: { + id, + }, + data: appLevelRequirementPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: appLevelRequirementKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLimitCreditCodeMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLimitCreditCodeMutation.ts index 2fcf15adf6..5ebe580f69 100644 --- a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLimitCreditCodeMutation.ts +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateAppLimitCreditCodeMutation.ts @@ -1,5 +1,5 @@ /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -23,7 +23,7 @@ export type { AppLimitCreditCodePatch, } from '../../orm/input-types'; /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```tsx diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateBillingUsageSummaryMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateBillingUsageSummaryMutation.ts new file mode 100644 index 0000000000..303554d067 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateBillingUsageSummaryMutation.ts @@ -0,0 +1,116 @@ +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * @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 { billingUsageSummaryKeys } from '../query-keys'; +import { billingUsageSummaryMutationKeys } from '../mutation-keys'; +import type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + BillingUsageSummaryPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + BillingUsageSummaryPatch, +} from '../../orm/input-types'; +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateBillingUsageSummaryMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', billingUsageSummaryPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateBillingUsageSummaryMutation( + params: { + selection: { + fields: S & BillingUsageSummarySelect; + } & HookStrictSelect, BillingUsageSummarySelect>; + } & Omit< + UseMutationOptions< + { + updateBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + { + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }, + Error, + { + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; + } +>; +export function useUpdateBillingUsageSummaryMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: billingUsageSummaryMutationKeys.all, + mutationFn: ({ + id, + billingUsageSummaryPatch, + }: { + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; + }) => + getClient() + .billingUsageSummary.update({ + where: { + id, + }, + data: billingUsageSummaryPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: billingUsageSummaryKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateLedgerMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateLedgerMutation.ts new file mode 100644 index 0000000000..6c7125590b --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateLedgerMutation.ts @@ -0,0 +1,114 @@ +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * @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 { ledgerKeys } from '../query-keys'; +import { ledgerMutationKeys } from '../mutation-keys'; +import type { LedgerSelect, LedgerWithRelations, LedgerPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { LedgerSelect, LedgerWithRelations, LedgerPatch } from '../../orm/input-types'; +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateLedgerMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', ledgerPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateLedgerMutation( + params: { + selection: { + fields: S & LedgerSelect; + } & HookStrictSelect, LedgerSelect>; + } & Omit< + UseMutationOptions< + { + updateLedger: { + ledger: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + ledgerPatch: LedgerPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateLedger: { + ledger: InferSelectResult; + }; + }, + Error, + { + id: string; + createdAt: string; + ledgerPatch: LedgerPatch; + } +>; +export function useUpdateLedgerMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + createdAt: string; + ledgerPatch: LedgerPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: ledgerMutationKeys.all, + mutationFn: ({ + id, + createdAt, + ledgerPatch, + }: { + id: string; + createdAt: string; + ledgerPatch: LedgerPatch; + }) => + getClient() + .ledger.update({ + where: { + id, + createdAt, + }, + data: ledgerPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: ledgerKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: ledgerKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterCreditMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterCreditMutation.ts new file mode 100644 index 0000000000..7346835c6b --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterCreditMutation.ts @@ -0,0 +1,110 @@ +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * @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 { meterCreditKeys } from '../query-keys'; +import { meterCreditMutationKeys } from '../mutation-keys'; +import type { + MeterCreditSelect, + MeterCreditWithRelations, + MeterCreditPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterCreditSelect, + MeterCreditWithRelations, + MeterCreditPatch, +} from '../../orm/input-types'; +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateMeterCreditMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', meterCreditPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateMeterCreditMutation( + params: { + selection: { + fields: S & MeterCreditSelect; + } & HookStrictSelect, MeterCreditSelect>; + } & Omit< + UseMutationOptions< + { + updateMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + { + id: string; + meterCreditPatch: MeterCreditPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateMeterCredit: { + meterCredit: InferSelectResult; + }; + }, + Error, + { + id: string; + meterCreditPatch: MeterCreditPatch; + } +>; +export function useUpdateMeterCreditMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + meterCreditPatch: MeterCreditPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterCreditMutationKeys.all, + mutationFn: ({ id, meterCreditPatch }: { id: string; meterCreditPatch: MeterCreditPatch }) => + getClient() + .meterCredit.update({ + where: { + id, + }, + data: meterCreditPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterCreditKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterDefaultMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterDefaultMutation.ts new file mode 100644 index 0000000000..16cde1458b --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterDefaultMutation.ts @@ -0,0 +1,110 @@ +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * @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 { meterDefaultKeys } from '../query-keys'; +import { meterDefaultMutationKeys } from '../mutation-keys'; +import type { + MeterDefaultSelect, + MeterDefaultWithRelations, + MeterDefaultPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterDefaultSelect, + MeterDefaultWithRelations, + MeterDefaultPatch, +} from '../../orm/input-types'; +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateMeterDefaultMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', meterDefaultPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateMeterDefaultMutation( + params: { + selection: { + fields: S & MeterDefaultSelect; + } & HookStrictSelect, MeterDefaultSelect>; + } & Omit< + UseMutationOptions< + { + updateMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + { + id: string; + meterDefaultPatch: MeterDefaultPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateMeterDefault: { + meterDefault: InferSelectResult; + }; + }, + Error, + { + id: string; + meterDefaultPatch: MeterDefaultPatch; + } +>; +export function useUpdateMeterDefaultMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + meterDefaultPatch: MeterDefaultPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterDefaultMutationKeys.all, + mutationFn: ({ id, meterDefaultPatch }: { id: string; meterDefaultPatch: MeterDefaultPatch }) => + getClient() + .meterDefault.update({ + where: { + id, + }, + data: meterDefaultPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterDefaultKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterMutation.ts new file mode 100644 index 0000000000..cf98538ebf --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterMutation.ts @@ -0,0 +1,102 @@ +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * @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 { meterKeys } from '../query-keys'; +import { meterMutationKeys } from '../mutation-keys'; +import type { MeterSelect, MeterWithRelations, MeterPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSelect, MeterWithRelations, MeterPatch } from '../../orm/input-types'; +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateMeterMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', meterPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateMeterMutation( + params: { + selection: { + fields: S & MeterSelect; + } & HookStrictSelect, MeterSelect>; + } & Omit< + UseMutationOptions< + { + updateMeter: { + meter: InferSelectResult; + }; + }, + Error, + { + id: string; + meterPatch: MeterPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateMeter: { + meter: InferSelectResult; + }; + }, + Error, + { + id: string; + meterPatch: MeterPatch; + } +>; +export function useUpdateMeterMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + meterPatch: MeterPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterMutationKeys.all, + mutationFn: ({ id, meterPatch }: { id: string; meterPatch: MeterPatch }) => + getClient() + .meter.update({ + where: { + id, + }, + data: meterPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: meterKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterSourceMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterSourceMutation.ts new file mode 100644 index 0000000000..0709bd85a5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdateMeterSourceMutation.ts @@ -0,0 +1,110 @@ +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * @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 { meterSourceKeys } from '../query-keys'; +import { meterSourceMutationKeys } from '../mutation-keys'; +import type { + MeterSourceSelect, + MeterSourceWithRelations, + MeterSourcePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + MeterSourceSelect, + MeterSourceWithRelations, + MeterSourcePatch, +} from '../../orm/input-types'; +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateMeterSourceMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', meterSourcePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateMeterSourceMutation( + params: { + selection: { + fields: S & MeterSourceSelect; + } & HookStrictSelect, MeterSourceSelect>; + } & Omit< + UseMutationOptions< + { + updateMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + { + id: string; + meterSourcePatch: MeterSourcePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateMeterSource: { + meterSource: InferSelectResult; + }; + }, + Error, + { + id: string; + meterSourcePatch: MeterSourcePatch; + } +>; +export function useUpdateMeterSourceMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + meterSourcePatch: MeterSourcePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: meterSourceMutationKeys.all, + mutationFn: ({ id, meterSourcePatch }: { id: string; meterSourcePatch: MeterSourcePatch }) => + getClient() + .meterSource.update({ + where: { + id, + }, + data: meterSourcePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: meterSourceKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanCapMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanCapMutation.ts new file mode 100644 index 0000000000..8dc754b755 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanCapMutation.ts @@ -0,0 +1,102 @@ +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * @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 { planCapKeys } from '../query-keys'; +import { planCapMutationKeys } from '../mutation-keys'; +import type { PlanCapSelect, PlanCapWithRelations, PlanCapPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanCapSelect, PlanCapWithRelations, PlanCapPatch } from '../../orm/input-types'; +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanCapMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planCapPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanCapMutation( + params: { + selection: { + fields: S & PlanCapSelect; + } & HookStrictSelect, PlanCapSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + { + id: string; + planCapPatch: PlanCapPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanCap: { + planCap: InferSelectResult; + }; + }, + Error, + { + id: string; + planCapPatch: PlanCapPatch; + } +>; +export function useUpdatePlanCapMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planCapPatch: PlanCapPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planCapMutationKeys.all, + mutationFn: ({ id, planCapPatch }: { id: string; planCapPatch: PlanCapPatch }) => + getClient() + .planCap.update({ + where: { + id, + }, + data: planCapPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planCapKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planCapKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanLimitMutation.ts new file mode 100644 index 0000000000..dcb4ce914c --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanLimitMutation.ts @@ -0,0 +1,110 @@ +/** + * Maps each plan to specific limit names and their maximum allowed values + * @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 { planLimitKeys } from '../query-keys'; +import { planLimitMutationKeys } from '../mutation-keys'; +import type { + PlanLimitSelect, + PlanLimitWithRelations, + PlanLimitPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanLimitSelect, + PlanLimitWithRelations, + PlanLimitPatch, +} from '../../orm/input-types'; +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanLimitMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planLimitPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanLimitMutation( + params: { + selection: { + fields: S & PlanLimitSelect; + } & HookStrictSelect, PlanLimitSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + planLimitPatch: PlanLimitPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanLimit: { + planLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + planLimitPatch: PlanLimitPatch; + } +>; +export function useUpdatePlanLimitMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planLimitPatch: PlanLimitPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planLimitMutationKeys.all, + mutationFn: ({ id, planLimitPatch }: { id: string; planLimitPatch: PlanLimitPatch }) => + getClient() + .planLimit.update({ + where: { + id, + }, + data: planLimitPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planLimitKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMeterLimitMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMeterLimitMutation.ts new file mode 100644 index 0000000000..5e661fc7bd --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMeterLimitMutation.ts @@ -0,0 +1,116 @@ +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * @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 { planMeterLimitKeys } from '../query-keys'; +import { planMeterLimitMutationKeys } from '../mutation-keys'; +import type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + PlanMeterLimitPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + PlanMeterLimitPatch, +} from '../../orm/input-types'; +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanMeterLimitMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planMeterLimitPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanMeterLimitMutation( + params: { + selection: { + fields: S & PlanMeterLimitSelect; + } & HookStrictSelect, PlanMeterLimitSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }, + Error, + { + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; + } +>; +export function useUpdatePlanMeterLimitMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planMeterLimitMutationKeys.all, + mutationFn: ({ + id, + planMeterLimitPatch, + }: { + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; + }) => + getClient() + .planMeterLimit.update({ + where: { + id, + }, + data: planMeterLimitPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planMeterLimitKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMutation.ts new file mode 100644 index 0000000000..ef0def3a11 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanMutation.ts @@ -0,0 +1,102 @@ +/** + * Defines plan tiers with named limit configurations + * @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 { planKeys } from '../query-keys'; +import { planMutationKeys } from '../mutation-keys'; +import type { PlanSelect, PlanWithRelations, PlanPatch } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSelect, PlanWithRelations, PlanPatch } from '../../orm/input-types'; +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanMutation( + params: { + selection: { + fields: S & PlanSelect; + } & HookStrictSelect, PlanSelect>; + } & Omit< + UseMutationOptions< + { + updatePlan: { + plan: InferSelectResult; + }; + }, + Error, + { + id: string; + planPatch: PlanPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlan: { + plan: InferSelectResult; + }; + }, + Error, + { + id: string; + planPatch: PlanPatch; + } +>; +export function useUpdatePlanMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planPatch: PlanPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planMutationKeys.all, + mutationFn: ({ id, planPatch }: { id: string; planPatch: PlanPatch }) => + getClient() + .plan.update({ + where: { + id, + }, + data: planPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanOverrideMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanOverrideMutation.ts new file mode 100644 index 0000000000..c9dfd89f5c --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanOverrideMutation.ts @@ -0,0 +1,110 @@ +/** + * Per-entity limit overrides that take precedence over plan defaults + * @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 { planOverrideKeys } from '../query-keys'; +import { planOverrideMutationKeys } from '../mutation-keys'; +import type { + PlanOverrideSelect, + PlanOverrideWithRelations, + PlanOverridePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanOverrideSelect, + PlanOverrideWithRelations, + PlanOverridePatch, +} from '../../orm/input-types'; +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanOverrideMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planOverridePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanOverrideMutation( + params: { + selection: { + fields: S & PlanOverrideSelect; + } & HookStrictSelect, PlanOverrideSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + { + id: string; + planOverridePatch: PlanOverridePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanOverride: { + planOverride: InferSelectResult; + }; + }, + Error, + { + id: string; + planOverridePatch: PlanOverridePatch; + } +>; +export function useUpdatePlanOverrideMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planOverridePatch: PlanOverridePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planOverrideMutationKeys.all, + mutationFn: ({ id, planOverridePatch }: { id: string; planOverridePatch: PlanOverridePatch }) => + getClient() + .planOverride.update({ + where: { + id, + }, + data: planOverridePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planOverrideKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanPricingMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanPricingMutation.ts new file mode 100644 index 0000000000..b6263f2d3b --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanPricingMutation.ts @@ -0,0 +1,110 @@ +/** + * Billing intervals and pricing for each plan tier + * @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 { planPricingKeys } from '../query-keys'; +import { planPricingMutationKeys } from '../mutation-keys'; +import type { + PlanPricingSelect, + PlanPricingWithRelations, + PlanPricingPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanPricingSelect, + PlanPricingWithRelations, + PlanPricingPatch, +} from '../../orm/input-types'; +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanPricingMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planPricingPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanPricingMutation( + params: { + selection: { + fields: S & PlanPricingSelect; + } & HookStrictSelect, PlanPricingSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + { + id: string; + planPricingPatch: PlanPricingPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanPricing: { + planPricing: InferSelectResult; + }; + }, + Error, + { + id: string; + planPricingPatch: PlanPricingPatch; + } +>; +export function useUpdatePlanPricingMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planPricingPatch: PlanPricingPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planPricingMutationKeys.all, + mutationFn: ({ id, planPricingPatch }: { id: string; planPricingPatch: PlanPricingPatch }) => + getClient() + .planPricing.update({ + where: { + id, + }, + data: planPricingPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planPricingKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planPricingKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanSubscriptionMutation.ts b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanSubscriptionMutation.ts new file mode 100644 index 0000000000..02ca42d017 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/mutations/useUpdatePlanSubscriptionMutation.ts @@ -0,0 +1,116 @@ +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * @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 { planSubscriptionKeys } from '../query-keys'; +import { planSubscriptionMutationKeys } from '../mutation-keys'; +import type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + PlanSubscriptionPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + PlanSubscriptionPatch, +} from '../../orm/input-types'; +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdatePlanSubscriptionMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', planSubscriptionPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdatePlanSubscriptionMutation( + params: { + selection: { + fields: S & PlanSubscriptionSelect; + } & HookStrictSelect, PlanSubscriptionSelect>; + } & Omit< + UseMutationOptions< + { + updatePlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + { + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updatePlanSubscription: { + planSubscription: InferSelectResult; + }; + }, + Error, + { + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; + } +>; +export function useUpdatePlanSubscriptionMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: planSubscriptionMutationKeys.all, + mutationFn: ({ + id, + planSubscriptionPatch, + }: { + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; + }) => + getClient() + .planSubscription.update({ + where: { + id, + }, + data: planSubscriptionPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: planSubscriptionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/index.ts b/sdk/constructive-react/src/usage/hooks/queries/index.ts index a5a28bcfc0..c46706db5e 100644 --- a/sdk/constructive-react/src/usage/hooks/queries/index.ts +++ b/sdk/constructive-react/src/usage/hooks/queries/index.ts @@ -3,6 +3,20 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useAppAchievementRewardsQuery'; +export * from './useAppAchievementRewardQuery'; +export * from './useAppEventAggregatesQuery'; +export * from './useAppEventAggregateQuery'; +export * from './useAppEventsQuery'; +export * from './useAppEventQuery'; +export * from './useAppEventTypesQuery'; +export * from './useAppEventTypeQuery'; +export * from './useAppLevelsQuery'; +export * from './useAppLevelQuery'; +export * from './useAppLevelGrantsQuery'; +export * from './useAppLevelGrantQuery'; +export * from './useAppLevelRequirementsQuery'; +export * from './useAppLevelRequirementQuery'; export * from './useAppLimitCapsQuery'; export * from './useAppLimitCapQuery'; export * from './useAppLimitCapsDefaultsQuery'; @@ -23,6 +37,18 @@ export * from './useAppLimitEventsQuery'; export * from './useAppLimitEventQuery'; export * from './useAppLimitWarningsQuery'; export * from './useAppLimitWarningQuery'; +export * from './useBillingUsageSummariesQuery'; +export * from './useBillingUsageSummaryQuery'; +export * from './useLedgersQuery'; +export * from './useLedgerQuery'; +export * from './useMetersQuery'; +export * from './useMeterQuery'; +export * from './useMeterCreditsQuery'; +export * from './useMeterCreditQuery'; +export * from './useMeterDefaultsQuery'; +export * from './useMeterDefaultQuery'; +export * from './useMeterSourcesQuery'; +export * from './useMeterSourceQuery'; export * from './useOrgLimitAggregatesQuery'; export * from './useOrgLimitAggregateQuery'; export * from './useOrgLimitCapsQuery'; @@ -39,3 +65,22 @@ export * from './useOrgLimitEventsQuery'; export * from './useOrgLimitEventQuery'; export * from './useOrgLimitWarningsQuery'; export * from './useOrgLimitWarningQuery'; +export * from './usePlanCapsQuery'; +export * from './usePlanCapQuery'; +export * from './usePlansQuery'; +export * from './usePlanQuery'; +export * from './usePlanLimitsQuery'; +export * from './usePlanLimitQuery'; +export * from './usePlanMeterLimitsQuery'; +export * from './usePlanMeterLimitQuery'; +export * from './usePlanOverridesQuery'; +export * from './usePlanOverrideQuery'; +export * from './usePlanPricingsQuery'; +export * from './usePlanPricingQuery'; +export * from './usePlanSubscriptionsQuery'; +export * from './usePlanSubscriptionQuery'; +export * from './useCaptureAppLimitDefaultsQuery'; +export * from './useCaptureOrgLimitDefaultsQuery'; +export * from './useCaptureTrustLadderQuery'; +export * from './useEventsAchievedQuery'; +export * from './useEventsRequiredQuery'; diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardQuery.ts new file mode 100644 index 0000000000..115e7d29e8 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardQuery.ts @@ -0,0 +1,144 @@ +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * @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 { appAchievementRewardKeys } from '../query-keys'; +import type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appAchievementRewardQueryKey = appAchievementRewardKeys.detail; +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```tsx + * const { data, isLoading } = useAppAchievementRewardQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppAchievementRewardQuery< + S extends AppAchievementRewardSelect, + TData = { + appAchievementReward: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppAchievementRewardSelect>; + } & Omit< + UseQueryOptions< + { + appAchievementReward: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppAchievementRewardQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appAchievementRewardKeys.detail(params.id), + queryFn: () => + getClient() + .appAchievementReward.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```ts + * const data = await fetchAppAchievementRewardQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppAchievementRewardQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppAchievementRewardSelect>; +}): Promise<{ + appAchievementReward: InferSelectResult | null; +}>; +export async function fetchAppAchievementRewardQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appAchievementReward.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```ts + * await prefetchAppAchievementRewardQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppAchievementRewardQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppAchievementRewardSelect>; + } +): Promise; +export async function prefetchAppAchievementRewardQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appAchievementRewardKeys.detail(params.id), + queryFn: () => + getClient() + .appAchievementReward.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardsQuery.ts new file mode 100644 index 0000000000..fe76d0f47f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppAchievementRewardsQuery.ts @@ -0,0 +1,178 @@ +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * @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 { appAchievementRewardKeys } from '../query-keys'; +import type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppAchievementRewardSelect, + AppAchievementRewardWithRelations, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appAchievementRewardsQueryKey = appAchievementRewardKeys.list; +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```tsx + * const { data, isLoading } = useAppAchievementRewardsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppAchievementRewardsQuery< + S extends AppAchievementRewardSelect, + TData = { + appAchievementRewards: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppAchievementRewardSelect>; + } & Omit< + UseQueryOptions< + { + appAchievementRewards: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppAchievementRewardsQuery( + params: { + selection: ListSelectionConfig< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appAchievementRewardKeys.list(args), + queryFn: () => getClient().appAchievementReward.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```ts + * const data = await fetchAppAchievementRewardsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppAchievementRewardsQuery< + S extends AppAchievementRewardSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppAchievementRewardSelect>; +}): Promise<{ + appAchievementRewards: ConnectionResult>; +}>; +export async function fetchAppAchievementRewardsQuery(params: { + selection: ListSelectionConfig< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >(params.selection); + return getClient().appAchievementReward.findMany(args).unwrap(); +} +/** + * Defines rewards granted when a level is achieved; supports limit_credits and meter_credits + * + * @example + * ```ts + * await prefetchAppAchievementRewardsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppAchievementRewardsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppAchievementRewardSelect>; + } +): Promise; +export async function prefetchAppAchievementRewardsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appAchievementRewardKeys.list(args), + queryFn: () => getClient().appAchievementReward.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregateQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregateQuery.ts new file mode 100644 index 0000000000..cea225f4ec --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregateQuery.ts @@ -0,0 +1,144 @@ +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * @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 { appEventAggregateKeys } from '../query-keys'; +import type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventAggregateQueryKey = appEventAggregateKeys.detail; +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventAggregateQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppEventAggregateQuery< + S extends AppEventAggregateSelect, + TData = { + appEventAggregate: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventAggregateSelect>; + } & Omit< + UseQueryOptions< + { + appEventAggregate: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventAggregateQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventAggregateKeys.detail(params.id), + queryFn: () => + getClient() + .appEventAggregate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```ts + * const data = await fetchAppEventAggregateQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppEventAggregateQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventAggregateSelect>; +}): Promise<{ + appEventAggregate: InferSelectResult | null; +}>; +export async function fetchAppEventAggregateQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appEventAggregate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```ts + * await prefetchAppEventAggregateQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppEventAggregateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventAggregateSelect>; + } +): Promise; +export async function prefetchAppEventAggregateQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appEventAggregateKeys.detail(params.id), + queryFn: () => + getClient() + .appEventAggregate.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregatesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregatesQuery.ts new file mode 100644 index 0000000000..e5b349fb8d --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventAggregatesQuery.ts @@ -0,0 +1,163 @@ +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * @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 { appEventAggregateKeys } from '../query-keys'; +import type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + AppEventAggregateFilter, + AppEventAggregateOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppEventAggregateSelect, + AppEventAggregateWithRelations, + AppEventAggregateFilter, + AppEventAggregateOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventAggregatesQueryKey = appEventAggregateKeys.list; +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventAggregatesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppEventAggregatesQuery< + S extends AppEventAggregateSelect, + TData = { + appEventAggregates: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventAggregateSelect>; + } & Omit< + UseQueryOptions< + { + appEventAggregates: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventAggregatesQuery( + params: { + selection: ListSelectionConfig< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventAggregateKeys.list(args), + queryFn: () => getClient().appEventAggregate.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```ts + * const data = await fetchAppEventAggregatesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppEventAggregatesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventAggregateSelect>; +}): Promise<{ + appEventAggregates: ConnectionResult>; +}>; +export async function fetchAppEventAggregatesQuery(params: { + selection: ListSelectionConfig< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >(params.selection); + return getClient().appEventAggregate.findMany(args).unwrap(); +} +/** + * Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually + * + * @example + * ```ts + * await prefetchAppEventAggregatesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppEventAggregatesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventAggregateSelect>; + } +): Promise; +export async function prefetchAppEventAggregatesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appEventAggregateKeys.list(args), + queryFn: () => getClient().appEventAggregate.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventQuery.ts new file mode 100644 index 0000000000..6dcd03b95e --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventQuery.ts @@ -0,0 +1,138 @@ +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * @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 { appEventKeys } from '../query-keys'; +import type { AppEventSelect, AppEventWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppEventSelect, AppEventWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventQueryKey = appEventKeys.detail; +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppEventQuery< + S extends AppEventSelect, + TData = { + appEvent: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventSelect>; + } & Omit< + UseQueryOptions< + { + appEvent: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventKeys.detail(params.id), + queryFn: () => + getClient() + .appEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```ts + * const data = await fetchAppEventQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppEventQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventSelect>; +}): Promise<{ + appEvent: InferSelectResult | null; +}>; +export async function fetchAppEventQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```ts + * await prefetchAppEventQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventSelect>; + } +): Promise; +export async function prefetchAppEventQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appEventKeys.detail(params.id), + queryFn: () => + getClient() + .appEvent.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypeQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypeQuery.ts new file mode 100644 index 0000000000..b6edaae951 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypeQuery.ts @@ -0,0 +1,138 @@ +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * @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 { appEventTypeKeys } from '../query-keys'; +import type { AppEventTypeSelect, AppEventTypeWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppEventTypeSelect, AppEventTypeWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventTypeQueryKey = appEventTypeKeys.detail; +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventTypeQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppEventTypeQuery< + S extends AppEventTypeSelect, + TData = { + appEventType: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventTypeSelect>; + } & Omit< + UseQueryOptions< + { + appEventType: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventTypeQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventTypeKeys.detail(params.id), + queryFn: () => + getClient() + .appEventType.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```ts + * const data = await fetchAppEventTypeQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppEventTypeQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventTypeSelect>; +}): Promise<{ + appEventType: InferSelectResult | null; +}>; +export async function fetchAppEventTypeQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appEventType.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```ts + * await prefetchAppEventTypeQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppEventTypeQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppEventTypeSelect>; + } +): Promise; +export async function prefetchAppEventTypeQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appEventTypeKeys.detail(params.id), + queryFn: () => + getClient() + .appEventType.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypesQuery.ts new file mode 100644 index 0000000000..f61369ae33 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventTypesQuery.ts @@ -0,0 +1,145 @@ +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * @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 { appEventTypeKeys } from '../query-keys'; +import type { + AppEventTypeSelect, + AppEventTypeWithRelations, + AppEventTypeFilter, + AppEventTypeOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppEventTypeSelect, + AppEventTypeWithRelations, + AppEventTypeFilter, + AppEventTypeOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventTypesQueryKey = appEventTypeKeys.list; +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventTypesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppEventTypesQuery< + S extends AppEventTypeSelect, + TData = { + appEventTypes: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventTypeSelect>; + } & Omit< + UseQueryOptions< + { + appEventTypes: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventTypesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventTypeKeys.list(args), + queryFn: () => getClient().appEventType.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```ts + * const data = await fetchAppEventTypesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppEventTypesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventTypeSelect>; +}): Promise<{ + appEventTypes: ConnectionResult>; +}>; +export async function fetchAppEventTypesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().appEventType.findMany(args).unwrap(); +} +/** + * Catalog of known event types with per-type configuration for aggregation, retention, and level participation + * + * @example + * ```ts + * await prefetchAppEventTypesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppEventTypesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventTypeSelect>; + } +): Promise; +export async function prefetchAppEventTypesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: appEventTypeKeys.list(args), + queryFn: () => getClient().appEventType.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppEventsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppEventsQuery.ts new file mode 100644 index 0000000000..a6bbefe1ce --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppEventsQuery.ts @@ -0,0 +1,145 @@ +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * @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 { appEventKeys } from '../query-keys'; +import type { + AppEventSelect, + AppEventWithRelations, + AppEventFilter, + AppEventOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppEventSelect, + AppEventWithRelations, + AppEventFilter, + AppEventOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appEventsQueryKey = appEventKeys.list; +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```tsx + * const { data, isLoading } = useAppEventsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppEventsQuery< + S extends AppEventSelect, + TData = { + appEvents: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventSelect>; + } & Omit< + UseQueryOptions< + { + appEvents: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppEventsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appEventKeys.list(args), + queryFn: () => getClient().appEvent.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```ts + * const data = await fetchAppEventsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppEventsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventSelect>; +}): Promise<{ + appEvents: ConnectionResult>; +}>; +export async function fetchAppEventsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().appEvent.findMany(args).unwrap(); +} +/** + * Partitioned append-only log of individual user actions; every single event ever recorded + * + * @example + * ```ts + * await prefetchAppEventsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppEventsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppEventSelect>; + } +): Promise; +export async function prefetchAppEventsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: appEventKeys.list(args), + queryFn: () => getClient().appEvent.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantQuery.ts new file mode 100644 index 0000000000..419f79f205 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantQuery.ts @@ -0,0 +1,138 @@ +/** + * Records when a user achieves a level; prevents duplicate reward grants + * @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 { appLevelGrantKeys } from '../query-keys'; +import type { AppLevelGrantSelect, AppLevelGrantWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppLevelGrantSelect, AppLevelGrantWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelGrantQueryKey = appLevelGrantKeys.detail; +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppLevelGrantQuery< + S extends AppLevelGrantSelect, + TData = { + appLevelGrant: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelGrantSelect>; + } & Omit< + UseQueryOptions< + { + appLevelGrant: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelGrantQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appLevelGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```ts + * const data = await fetchAppLevelGrantQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppLevelGrantQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelGrantSelect>; +}): Promise<{ + appLevelGrant: InferSelectResult | null; +}>; +export async function fetchAppLevelGrantQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appLevelGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```ts + * await prefetchAppLevelGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppLevelGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelGrantSelect>; + } +): Promise; +export async function prefetchAppLevelGrantQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appLevelGrantKeys.detail(params.id), + queryFn: () => + getClient() + .appLevelGrant.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantsQuery.ts new file mode 100644 index 0000000000..09308964b4 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelGrantsQuery.ts @@ -0,0 +1,151 @@ +/** + * Records when a user achieves a level; prevents duplicate reward grants + * @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 { appLevelGrantKeys } from '../query-keys'; +import type { + AppLevelGrantSelect, + AppLevelGrantWithRelations, + AppLevelGrantFilter, + AppLevelGrantOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppLevelGrantSelect, + AppLevelGrantWithRelations, + AppLevelGrantFilter, + AppLevelGrantOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelGrantsQueryKey = appLevelGrantKeys.list; +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelGrantsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppLevelGrantsQuery< + S extends AppLevelGrantSelect, + TData = { + appLevelGrants: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelGrantSelect>; + } & Omit< + UseQueryOptions< + { + appLevelGrants: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelGrantsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppLevelGrantSelect, + AppLevelGrantFilter, + AppLevelGrantOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelGrantKeys.list(args), + queryFn: () => getClient().appLevelGrant.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```ts + * const data = await fetchAppLevelGrantsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppLevelGrantsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelGrantSelect>; +}): Promise<{ + appLevelGrants: ConnectionResult>; +}>; +export async function fetchAppLevelGrantsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + AppLevelGrantSelect, + AppLevelGrantFilter, + AppLevelGrantOrderBy + >(params.selection); + return getClient().appLevelGrant.findMany(args).unwrap(); +} +/** + * Records when a user achieves a level; prevents duplicate reward grants + * + * @example + * ```ts + * await prefetchAppLevelGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppLevelGrantsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelGrantSelect>; + } +): Promise; +export async function prefetchAppLevelGrantsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + AppLevelGrantSelect, + AppLevelGrantFilter, + AppLevelGrantOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appLevelGrantKeys.list(args), + queryFn: () => getClient().appLevelGrant.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelQuery.ts new file mode 100644 index 0000000000..7458afb091 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelQuery.ts @@ -0,0 +1,138 @@ +/** + * Defines available levels that users can achieve by completing requirements + * @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 { appLevelKeys } from '../query-keys'; +import type { AppLevelSelect, AppLevelWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { AppLevelSelect, AppLevelWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelQueryKey = appLevelKeys.detail; +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppLevelQuery< + S extends AppLevelSelect, + TData = { + appLevel: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelSelect>; + } & Omit< + UseQueryOptions< + { + appLevel: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelKeys.detail(params.id), + queryFn: () => + getClient() + .appLevel.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```ts + * const data = await fetchAppLevelQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppLevelQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelSelect>; +}): Promise<{ + appLevel: InferSelectResult | null; +}>; +export async function fetchAppLevelQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appLevel.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```ts + * await prefetchAppLevelQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppLevelQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelSelect>; + } +): Promise; +export async function prefetchAppLevelQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appLevelKeys.detail(params.id), + queryFn: () => + getClient() + .appLevel.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementQuery.ts new file mode 100644 index 0000000000..1ff58327f2 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementQuery.ts @@ -0,0 +1,144 @@ +/** + * Defines the specific requirements that must be met to achieve a level + * @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 { appLevelRequirementKeys } from '../query-keys'; +import type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelRequirementQueryKey = appLevelRequirementKeys.detail; +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelRequirementQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useAppLevelRequirementQuery< + S extends AppLevelRequirementSelect, + TData = { + appLevelRequirement: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelRequirementSelect>; + } & Omit< + UseQueryOptions< + { + appLevelRequirement: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelRequirementQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelRequirementKeys.detail(params.id), + queryFn: () => + getClient() + .appLevelRequirement.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```ts + * const data = await fetchAppLevelRequirementQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchAppLevelRequirementQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelRequirementSelect>; +}): Promise<{ + appLevelRequirement: InferSelectResult | null; +}>; +export async function fetchAppLevelRequirementQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .appLevelRequirement.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```ts + * await prefetchAppLevelRequirementQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchAppLevelRequirementQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, AppLevelRequirementSelect>; + } +): Promise; +export async function prefetchAppLevelRequirementQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: appLevelRequirementKeys.detail(params.id), + queryFn: () => + getClient() + .appLevelRequirement.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementsQuery.ts new file mode 100644 index 0000000000..7dd162330a --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelRequirementsQuery.ts @@ -0,0 +1,174 @@ +/** + * Defines the specific requirements that must be met to achieve a level + * @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 { appLevelRequirementKeys } from '../query-keys'; +import type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppLevelRequirementSelect, + AppLevelRequirementWithRelations, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelRequirementsQueryKey = appLevelRequirementKeys.list; +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelRequirementsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppLevelRequirementsQuery< + S extends AppLevelRequirementSelect, + TData = { + appLevelRequirements: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppLevelRequirementSelect>; + } & Omit< + UseQueryOptions< + { + appLevelRequirements: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelRequirementsQuery( + params: { + selection: ListSelectionConfig< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelRequirementKeys.list(args), + queryFn: () => getClient().appLevelRequirement.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```ts + * const data = await fetchAppLevelRequirementsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppLevelRequirementsQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppLevelRequirementSelect>; +}): Promise<{ + appLevelRequirements: ConnectionResult>; +}>; +export async function fetchAppLevelRequirementsQuery(params: { + selection: ListSelectionConfig< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >; +}) { + const args = buildListSelectionArgs< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >(params.selection); + return getClient().appLevelRequirement.findMany(args).unwrap(); +} +/** + * Defines the specific requirements that must be met to achieve a level + * + * @example + * ```ts + * await prefetchAppLevelRequirementsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppLevelRequirementsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, AppLevelRequirementSelect>; + } +): Promise; +export async function prefetchAppLevelRequirementsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: appLevelRequirementKeys.list(args), + queryFn: () => getClient().appLevelRequirement.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLevelsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelsQuery.ts new file mode 100644 index 0000000000..4e237d953e --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLevelsQuery.ts @@ -0,0 +1,145 @@ +/** + * Defines available levels that users can achieve by completing requirements + * @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 { appLevelKeys } from '../query-keys'; +import type { + AppLevelSelect, + AppLevelWithRelations, + AppLevelFilter, + AppLevelOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + AppLevelSelect, + AppLevelWithRelations, + AppLevelFilter, + AppLevelOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const appLevelsQueryKey = appLevelKeys.list; +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```tsx + * const { data, isLoading } = useAppLevelsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useAppLevelsQuery< + S extends AppLevelSelect, + TData = { + appLevels: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelSelect>; + } & Omit< + UseQueryOptions< + { + appLevels: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useAppLevelsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: appLevelKeys.list(args), + queryFn: () => getClient().appLevel.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```ts + * const data = await fetchAppLevelsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchAppLevelsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelSelect>; +}): Promise<{ + appLevels: ConnectionResult>; +}>; +export async function fetchAppLevelsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().appLevel.findMany(args).unwrap(); +} +/** + * Defines available levels that users can achieve by completing requirements + * + * @example + * ```ts + * await prefetchAppLevelsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchAppLevelsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, AppLevelSelect>; + } +): Promise; +export async function prefetchAppLevelsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: appLevelKeys.list(args), + queryFn: () => getClient().appLevel.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodeQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodeQuery.ts index dcf2a2b52b..c0510bf49c 100644 --- a/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodeQuery.ts +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodeQuery.ts @@ -1,5 +1,5 @@ /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -22,7 +22,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const appLimitCreditCodeQueryKey = appLimitCreditCodeKeys.detail; /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```tsx @@ -76,7 +76,7 @@ export function useAppLimitCreditCodeQuery( }); } /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```ts @@ -107,7 +107,7 @@ export async function fetchAppLimitCreditCodeQuery(params: { .unwrap(); } /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```ts diff --git a/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodesQuery.ts index c69d74cd1a..34c59b6b28 100644 --- a/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodesQuery.ts +++ b/sdk/constructive-react/src/usage/hooks/queries/useAppLimitCreditCodesQuery.ts @@ -1,5 +1,5 @@ /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -31,7 +31,7 @@ export type { /** Query key factory - re-exported from query-keys.ts */ export const appLimitCreditCodesQueryKey = appLimitCreditCodeKeys.list; /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```tsx @@ -95,7 +95,7 @@ export function useAppLimitCreditCodesQuery( }); } /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```ts @@ -130,7 +130,7 @@ export async function fetchAppLimitCreditCodesQuery(params: { return getClient().appLimitCreditCode.findMany(args).unwrap(); } /** - * Redeemable credit codes managed by admins with the add_credits permission + * Redeemable credit codes managed by admins with the add_credits capability * * @example * ```ts diff --git a/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummariesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummariesQuery.ts new file mode 100644 index 0000000000..a3c7bcdc9d --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummariesQuery.ts @@ -0,0 +1,174 @@ +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * @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 { billingUsageSummaryKeys } from '../query-keys'; +import type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const billingUsageSummariesQueryKey = billingUsageSummaryKeys.list; +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```tsx + * const { data, isLoading } = useBillingUsageSummariesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useBillingUsageSummariesQuery< + S extends BillingUsageSummarySelect, + TData = { + billingUsageSummaries: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, BillingUsageSummarySelect>; + } & Omit< + UseQueryOptions< + { + billingUsageSummaries: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useBillingUsageSummariesQuery( + params: { + selection: ListSelectionConfig< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: billingUsageSummaryKeys.list(args), + queryFn: () => getClient().billingUsageSummary.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```ts + * const data = await fetchBillingUsageSummariesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchBillingUsageSummariesQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, BillingUsageSummarySelect>; +}): Promise<{ + billingUsageSummaries: ConnectionResult>; +}>; +export async function fetchBillingUsageSummariesQuery(params: { + selection: ListSelectionConfig< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >; +}) { + const args = buildListSelectionArgs< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >(params.selection); + return getClient().billingUsageSummary.findMany(args).unwrap(); +} +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```ts + * await prefetchBillingUsageSummariesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchBillingUsageSummariesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, BillingUsageSummarySelect>; + } +): Promise; +export async function prefetchBillingUsageSummariesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: billingUsageSummaryKeys.list(args), + queryFn: () => getClient().billingUsageSummary.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummaryQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummaryQuery.ts new file mode 100644 index 0000000000..7b5c789627 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useBillingUsageSummaryQuery.ts @@ -0,0 +1,144 @@ +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * @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 { billingUsageSummaryKeys } from '../query-keys'; +import type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + BillingUsageSummarySelect, + BillingUsageSummaryWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const billingUsageSummaryQueryKey = billingUsageSummaryKeys.detail; +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```tsx + * const { data, isLoading } = useBillingUsageSummaryQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useBillingUsageSummaryQuery< + S extends BillingUsageSummarySelect, + TData = { + billingUsageSummary: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, BillingUsageSummarySelect>; + } & Omit< + UseQueryOptions< + { + billingUsageSummary: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useBillingUsageSummaryQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: billingUsageSummaryKeys.detail(params.id), + queryFn: () => + getClient() + .billingUsageSummary.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```ts + * const data = await fetchBillingUsageSummaryQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchBillingUsageSummaryQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, BillingUsageSummarySelect>; +}): Promise<{ + billingUsageSummary: InferSelectResult | null; +}>; +export async function fetchBillingUsageSummaryQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .billingUsageSummary.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Permanent monthly usage summary per entity per meter (user-facing billing dashboard) + * + * @example + * ```ts + * await prefetchBillingUsageSummaryQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchBillingUsageSummaryQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, BillingUsageSummarySelect>; + } +): Promise; +export async function prefetchBillingUsageSummaryQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: billingUsageSummaryKeys.detail(params.id), + queryFn: () => + getClient() + .billingUsageSummary.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useCaptureAppLimitDefaultsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useCaptureAppLimitDefaultsQuery.ts new file mode 100644 index 0000000000..091975a505 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useCaptureAppLimitDefaultsQuery.ts @@ -0,0 +1,92 @@ +/** + * Custom query hook for captureAppLimitDefaults + * @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'; +/** Query key factory - re-exported from query-keys.ts */ +export const captureAppLimitDefaultsQueryKey = customQueryKeys.captureAppLimitDefaults; +/** + * Query hook for captureAppLimitDefaults + * + * @example + * ```tsx + * const { data, isLoading } = useCaptureAppLimitDefaultsQuery(); + * + * if (data?.captureAppLimitDefaults) { + * console.log(data.captureAppLimitDefaults); + * } + * ``` + */ +export function useCaptureAppLimitDefaultsQuery< + TData = { + captureAppLimitDefaults: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureAppLimitDefaults: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCaptureAppLimitDefaultsQuery< + TData = { + captureAppLimitDefaults: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureAppLimitDefaults: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const queryOptions = params ?? {}; + return useQuery({ + queryKey: captureAppLimitDefaultsQueryKey(), + queryFn: () => getClient().query.captureAppLimitDefaults().unwrap(), + ...queryOptions, + }); +} +/** + * Fetch captureAppLimitDefaults without React hooks + * + * @example + * ```ts + * const data = await fetchCaptureAppLimitDefaultsQuery(); + * ``` + */ +export async function fetchCaptureAppLimitDefaultsQuery() { + return getClient().query.captureAppLimitDefaults().unwrap(); +} +/** + * Prefetch captureAppLimitDefaults for SSR or cache warming + * + * @example + * ```ts + * await prefetchCaptureAppLimitDefaultsQuery(queryClient); + * ``` + */ +export async function prefetchCaptureAppLimitDefaultsQuery( + queryClient: QueryClient +): Promise { + await queryClient.prefetchQuery({ + queryKey: captureAppLimitDefaultsQueryKey(), + queryFn: () => getClient().query.captureAppLimitDefaults().unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useCaptureOrgLimitDefaultsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useCaptureOrgLimitDefaultsQuery.ts new file mode 100644 index 0000000000..fac59994a7 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useCaptureOrgLimitDefaultsQuery.ts @@ -0,0 +1,92 @@ +/** + * Custom query hook for captureOrgLimitDefaults + * @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'; +/** Query key factory - re-exported from query-keys.ts */ +export const captureOrgLimitDefaultsQueryKey = customQueryKeys.captureOrgLimitDefaults; +/** + * Query hook for captureOrgLimitDefaults + * + * @example + * ```tsx + * const { data, isLoading } = useCaptureOrgLimitDefaultsQuery(); + * + * if (data?.captureOrgLimitDefaults) { + * console.log(data.captureOrgLimitDefaults); + * } + * ``` + */ +export function useCaptureOrgLimitDefaultsQuery< + TData = { + captureOrgLimitDefaults: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureOrgLimitDefaults: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCaptureOrgLimitDefaultsQuery< + TData = { + captureOrgLimitDefaults: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureOrgLimitDefaults: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const queryOptions = params ?? {}; + return useQuery({ + queryKey: captureOrgLimitDefaultsQueryKey(), + queryFn: () => getClient().query.captureOrgLimitDefaults().unwrap(), + ...queryOptions, + }); +} +/** + * Fetch captureOrgLimitDefaults without React hooks + * + * @example + * ```ts + * const data = await fetchCaptureOrgLimitDefaultsQuery(); + * ``` + */ +export async function fetchCaptureOrgLimitDefaultsQuery() { + return getClient().query.captureOrgLimitDefaults().unwrap(); +} +/** + * Prefetch captureOrgLimitDefaults for SSR or cache warming + * + * @example + * ```ts + * await prefetchCaptureOrgLimitDefaultsQuery(queryClient); + * ``` + */ +export async function prefetchCaptureOrgLimitDefaultsQuery( + queryClient: QueryClient +): Promise { + await queryClient.prefetchQuery({ + queryKey: captureOrgLimitDefaultsQueryKey(), + queryFn: () => getClient().query.captureOrgLimitDefaults().unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useCaptureTrustLadderQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useCaptureTrustLadderQuery.ts new file mode 100644 index 0000000000..66ce525d75 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useCaptureTrustLadderQuery.ts @@ -0,0 +1,90 @@ +/** + * Custom query hook for captureTrustLadder + * @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'; +/** Query key factory - re-exported from query-keys.ts */ +export const captureTrustLadderQueryKey = customQueryKeys.captureTrustLadder; +/** + * Query hook for captureTrustLadder + * + * @example + * ```tsx + * const { data, isLoading } = useCaptureTrustLadderQuery(); + * + * if (data?.captureTrustLadder) { + * console.log(data.captureTrustLadder); + * } + * ``` + */ +export function useCaptureTrustLadderQuery< + TData = { + captureTrustLadder: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureTrustLadder: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useCaptureTrustLadderQuery< + TData = { + captureTrustLadder: unknown | null; + }, +>( + params?: Omit< + UseQueryOptions< + { + captureTrustLadder: unknown | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const queryOptions = params ?? {}; + return useQuery({ + queryKey: captureTrustLadderQueryKey(), + queryFn: () => getClient().query.captureTrustLadder().unwrap(), + ...queryOptions, + }); +} +/** + * Fetch captureTrustLadder without React hooks + * + * @example + * ```ts + * const data = await fetchCaptureTrustLadderQuery(); + * ``` + */ +export async function fetchCaptureTrustLadderQuery() { + return getClient().query.captureTrustLadder().unwrap(); +} +/** + * Prefetch captureTrustLadder for SSR or cache warming + * + * @example + * ```ts + * await prefetchCaptureTrustLadderQuery(queryClient); + * ``` + */ +export async function prefetchCaptureTrustLadderQuery(queryClient: QueryClient): Promise { + await queryClient.prefetchQuery({ + queryKey: captureTrustLadderQueryKey(), + queryFn: () => getClient().query.captureTrustLadder().unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useEventsAchievedQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useEventsAchievedQuery.ts new file mode 100644 index 0000000000..d5fb5fc4fc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useEventsAchievedQuery.ts @@ -0,0 +1,105 @@ +/** + * Custom query hook for eventsAchieved + * @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 { EventsAchievedVariables } from '../../orm/query'; +export type { EventsAchievedVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const eventsAchievedQueryKey = customQueryKeys.eventsAchieved; +/** + * Query hook for eventsAchieved + * + * @example + * ```tsx + * const { data, isLoading } = useEventsAchievedQuery({ variables: { level, roleId } }); + * + * if (data?.eventsAchieved) { + * console.log(data.eventsAchieved); + * } + * ``` + */ +export function useEventsAchievedQuery< + TData = { + eventsAchieved: boolean | null; + }, +>( + params?: { + variables?: EventsAchievedVariables; + } & Omit< + UseQueryOptions< + { + eventsAchieved: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEventsAchievedQuery< + TData = { + eventsAchieved: boolean | null; + }, +>( + params?: { + variables?: EventsAchievedVariables; + } & Omit< + UseQueryOptions< + { + eventsAchieved: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: eventsAchievedQueryKey(variables), + queryFn: () => getClient().query.eventsAchieved(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch eventsAchieved without React hooks + * + * @example + * ```ts + * const data = await fetchEventsAchievedQuery({ variables: { level, roleId } }); + * ``` + */ +export async function fetchEventsAchievedQuery(params?: { variables?: EventsAchievedVariables }) { + const variables = params?.variables ?? {}; + return getClient().query.eventsAchieved(variables).unwrap(); +} +/** + * Prefetch eventsAchieved for SSR or cache warming + * + * @example + * ```ts + * await prefetchEventsAchievedQuery(queryClient, { variables: { level, roleId } }); + * ``` + */ +export async function prefetchEventsAchievedQuery( + queryClient: QueryClient, + params?: { + variables?: EventsAchievedVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: eventsAchievedQueryKey(variables), + queryFn: () => getClient().query.eventsAchieved(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useEventsRequiredQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useEventsRequiredQuery.ts new file mode 100644 index 0000000000..b5be490d3f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useEventsRequiredQuery.ts @@ -0,0 +1,106 @@ +/** + * Custom query hook for eventsRequired + * @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 { EventsRequiredVariables } from '../../orm/query'; +import type { AppLevelRequirementConnection } from '../../orm/input-types'; +export type { EventsRequiredVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const eventsRequiredQueryKey = customQueryKeys.eventsRequired; +/** + * Reads and enables pagination through a set of `AppLevelRequirement`. + * + * @example + * ```tsx + * const { data, isLoading } = useEventsRequiredQuery({ variables: { after, first, level, offset, roleId } }); + * + * if (data?.eventsRequired) { + * console.log(data.eventsRequired); + * } + * ``` + */ +export function useEventsRequiredQuery< + TData = { + eventsRequired: AppLevelRequirementConnection | null; + }, +>( + params?: { + variables?: EventsRequiredVariables; + } & Omit< + UseQueryOptions< + { + eventsRequired: AppLevelRequirementConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEventsRequiredQuery< + TData = { + eventsRequired: AppLevelRequirementConnection | null; + }, +>( + params?: { + variables?: EventsRequiredVariables; + } & Omit< + UseQueryOptions< + { + eventsRequired: AppLevelRequirementConnection | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: eventsRequiredQueryKey(variables), + queryFn: () => getClient().query.eventsRequired(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch eventsRequired without React hooks + * + * @example + * ```ts + * const data = await fetchEventsRequiredQuery({ variables: { after, first, level, offset, roleId } }); + * ``` + */ +export async function fetchEventsRequiredQuery(params?: { variables?: EventsRequiredVariables }) { + const variables = params?.variables ?? {}; + return getClient().query.eventsRequired(variables).unwrap(); +} +/** + * Prefetch eventsRequired for SSR or cache warming + * + * @example + * ```ts + * await prefetchEventsRequiredQuery(queryClient, { variables: { after, first, level, offset, roleId } }); + * ``` + */ +export async function prefetchEventsRequiredQuery( + queryClient: QueryClient, + params?: { + variables?: EventsRequiredVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: eventsRequiredQueryKey(variables), + queryFn: () => getClient().query.eventsRequired(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useLedgerQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useLedgerQuery.ts new file mode 100644 index 0000000000..a412eaa1bd --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useLedgerQuery.ts @@ -0,0 +1,138 @@ +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * @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 { ledgerKeys } from '../query-keys'; +import type { LedgerSelect, LedgerWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { LedgerSelect, LedgerWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const ledgerQueryKey = ledgerKeys.detail; +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```tsx + * const { data, isLoading } = useLedgerQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useLedgerQuery< + S extends LedgerSelect, + TData = { + ledger: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, LedgerSelect>; + } & Omit< + UseQueryOptions< + { + ledger: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useLedgerQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: ledgerKeys.detail(params.id), + queryFn: () => + getClient() + .ledger.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```ts + * const data = await fetchLedgerQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchLedgerQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, LedgerSelect>; +}): Promise<{ + ledger: InferSelectResult | null; +}>; +export async function fetchLedgerQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .ledger.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```ts + * await prefetchLedgerQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchLedgerQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, LedgerSelect>; + } +): Promise; +export async function prefetchLedgerQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: ledgerKeys.detail(params.id), + queryFn: () => + getClient() + .ledger.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useLedgersQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useLedgersQuery.ts new file mode 100644 index 0000000000..58fd8826dc --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useLedgersQuery.ts @@ -0,0 +1,139 @@ +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * @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 { ledgerKeys } from '../query-keys'; +import type { + LedgerSelect, + LedgerWithRelations, + LedgerFilter, + LedgerOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + LedgerSelect, + LedgerWithRelations, + LedgerFilter, + LedgerOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const ledgersQueryKey = ledgerKeys.list; +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```tsx + * const { data, isLoading } = useLedgersQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useLedgersQuery< + S extends LedgerSelect, + TData = { + ledgers: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, LedgerSelect>; + } & Omit< + UseQueryOptions< + { + ledgers: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useLedgersQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: ledgerKeys.list(args), + queryFn: () => getClient().ledger.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```ts + * const data = await fetchLedgersQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchLedgersQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, LedgerSelect>; +}): Promise<{ + ledgers: ConnectionResult>; +}>; +export async function fetchLedgersQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().ledger.findMany(args).unwrap(); +} +/** + * Append-only event log for all billing events (usage, grants, adjustments) + * + * @example + * ```ts + * await prefetchLedgersQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchLedgersQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, LedgerSelect>; + } +): Promise; +export async function prefetchLedgersQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: ledgerKeys.list(args), + queryFn: () => getClient().ledger.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditQuery.ts new file mode 100644 index 0000000000..da0b362faa --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditQuery.ts @@ -0,0 +1,138 @@ +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * @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 { meterCreditKeys } from '../query-keys'; +import type { MeterCreditSelect, MeterCreditWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterCreditSelect, MeterCreditWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterCreditQueryKey = meterCreditKeys.detail; +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```tsx + * const { data, isLoading } = useMeterCreditQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useMeterCreditQuery< + S extends MeterCreditSelect, + TData = { + meterCredit: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterCreditSelect>; + } & Omit< + UseQueryOptions< + { + meterCredit: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterCreditQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterCreditKeys.detail(params.id), + queryFn: () => + getClient() + .meterCredit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```ts + * const data = await fetchMeterCreditQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchMeterCreditQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterCreditSelect>; +}): Promise<{ + meterCredit: InferSelectResult | null; +}>; +export async function fetchMeterCreditQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .meterCredit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```ts + * await prefetchMeterCreditQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchMeterCreditQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterCreditSelect>; + } +): Promise; +export async function prefetchMeterCreditQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: meterCreditKeys.detail(params.id), + queryFn: () => + getClient() + .meterCredit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditsQuery.ts new file mode 100644 index 0000000000..70245536ec --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterCreditsQuery.ts @@ -0,0 +1,145 @@ +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * @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 { meterCreditKeys } from '../query-keys'; +import type { + MeterCreditSelect, + MeterCreditWithRelations, + MeterCreditFilter, + MeterCreditOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + MeterCreditSelect, + MeterCreditWithRelations, + MeterCreditFilter, + MeterCreditOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterCreditsQueryKey = meterCreditKeys.list; +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```tsx + * const { data, isLoading } = useMeterCreditsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useMeterCreditsQuery< + S extends MeterCreditSelect, + TData = { + meterCredits: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterCreditSelect>; + } & Omit< + UseQueryOptions< + { + meterCredits: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterCreditsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterCreditKeys.list(args), + queryFn: () => getClient().meterCredit.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```ts + * const data = await fetchMeterCreditsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchMeterCreditsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterCreditSelect>; +}): Promise<{ + meterCredits: ConnectionResult>; +}>; +export async function fetchMeterCreditsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().meterCredit.findMany(args).unwrap(); +} +/** + * Append-only ledger of credit grants for billing meters that automatically update balances + * + * @example + * ```ts + * await prefetchMeterCreditsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchMeterCreditsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterCreditSelect>; + } +): Promise; +export async function prefetchMeterCreditsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: meterCreditKeys.list(args), + queryFn: () => getClient().meterCredit.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultQuery.ts new file mode 100644 index 0000000000..bf8127124c --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultQuery.ts @@ -0,0 +1,138 @@ +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * @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 { meterDefaultKeys } from '../query-keys'; +import type { MeterDefaultSelect, MeterDefaultWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterDefaultSelect, MeterDefaultWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterDefaultQueryKey = meterDefaultKeys.detail; +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```tsx + * const { data, isLoading } = useMeterDefaultQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useMeterDefaultQuery< + S extends MeterDefaultSelect, + TData = { + meterDefault: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterDefaultSelect>; + } & Omit< + UseQueryOptions< + { + meterDefault: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterDefaultQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterDefaultKeys.detail(params.id), + queryFn: () => + getClient() + .meterDefault.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```ts + * const data = await fetchMeterDefaultQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchMeterDefaultQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterDefaultSelect>; +}): Promise<{ + meterDefault: InferSelectResult | null; +}>; +export async function fetchMeterDefaultQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .meterDefault.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```ts + * await prefetchMeterDefaultQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchMeterDefaultQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterDefaultSelect>; + } +): Promise; +export async function prefetchMeterDefaultQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: meterDefaultKeys.detail(params.id), + queryFn: () => + getClient() + .meterDefault.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultsQuery.ts new file mode 100644 index 0000000000..39a6018d8c --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterDefaultsQuery.ts @@ -0,0 +1,145 @@ +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * @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 { meterDefaultKeys } from '../query-keys'; +import type { + MeterDefaultSelect, + MeterDefaultWithRelations, + MeterDefaultFilter, + MeterDefaultOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + MeterDefaultSelect, + MeterDefaultWithRelations, + MeterDefaultFilter, + MeterDefaultOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterDefaultsQueryKey = meterDefaultKeys.list; +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```tsx + * const { data, isLoading } = useMeterDefaultsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useMeterDefaultsQuery< + S extends MeterDefaultSelect, + TData = { + meterDefaults: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterDefaultSelect>; + } & Omit< + UseQueryOptions< + { + meterDefaults: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterDefaultsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterDefaultKeys.list(args), + queryFn: () => getClient().meterDefault.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```ts + * const data = await fetchMeterDefaultsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchMeterDefaultsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterDefaultSelect>; +}): Promise<{ + meterDefaults: ConnectionResult>; +}>; +export async function fetchMeterDefaultsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().meterDefault.findMany(args).unwrap(); +} +/** + * Default meter catalog: defines which meters are available and their default plan_limit values for new entities + * + * @example + * ```ts + * await prefetchMeterDefaultsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchMeterDefaultsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterDefaultSelect>; + } +): Promise; +export async function prefetchMeterDefaultsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: meterDefaultKeys.list(args), + queryFn: () => getClient().meterDefault.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterQuery.ts new file mode 100644 index 0000000000..ce4957ac60 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterQuery.ts @@ -0,0 +1,138 @@ +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * @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 { meterKeys } from '../query-keys'; +import type { MeterSelect, MeterWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSelect, MeterWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterQueryKey = meterKeys.detail; +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```tsx + * const { data, isLoading } = useMeterQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useMeterQuery< + S extends MeterSelect, + TData = { + meter: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSelect>; + } & Omit< + UseQueryOptions< + { + meter: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterKeys.detail(params.id), + queryFn: () => + getClient() + .meter.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```ts + * const data = await fetchMeterQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchMeterQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSelect>; +}): Promise<{ + meter: InferSelectResult | null; +}>; +export async function fetchMeterQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .meter.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```ts + * await prefetchMeterQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchMeterQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSelect>; + } +): Promise; +export async function prefetchMeterQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: meterKeys.detail(params.id), + queryFn: () => + getClient() + .meter.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterSourceQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterSourceQuery.ts new file mode 100644 index 0000000000..a99a6f3706 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterSourceQuery.ts @@ -0,0 +1,138 @@ +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * @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 { meterSourceKeys } from '../query-keys'; +import type { MeterSourceSelect, MeterSourceWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { MeterSourceSelect, MeterSourceWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterSourceQueryKey = meterSourceKeys.detail; +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```tsx + * const { data, isLoading } = useMeterSourceQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useMeterSourceQuery< + S extends MeterSourceSelect, + TData = { + meterSource: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSourceSelect>; + } & Omit< + UseQueryOptions< + { + meterSource: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterSourceQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterSourceKeys.detail(params.id), + queryFn: () => + getClient() + .meterSource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```ts + * const data = await fetchMeterSourceQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchMeterSourceQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSourceSelect>; +}): Promise<{ + meterSource: InferSelectResult | null; +}>; +export async function fetchMeterSourceQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .meterSource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```ts + * await prefetchMeterSourceQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchMeterSourceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, MeterSourceSelect>; + } +): Promise; +export async function prefetchMeterSourceQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: meterSourceKeys.detail(params.id), + queryFn: () => + getClient() + .meterSource.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMeterSourcesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMeterSourcesQuery.ts new file mode 100644 index 0000000000..c82a2efea4 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMeterSourcesQuery.ts @@ -0,0 +1,145 @@ +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * @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 { meterSourceKeys } from '../query-keys'; +import type { + MeterSourceSelect, + MeterSourceWithRelations, + MeterSourceFilter, + MeterSourceOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + MeterSourceSelect, + MeterSourceWithRelations, + MeterSourceFilter, + MeterSourceOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const meterSourcesQueryKey = meterSourceKeys.list; +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```tsx + * const { data, isLoading } = useMeterSourcesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useMeterSourcesQuery< + S extends MeterSourceSelect, + TData = { + meterSources: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSourceSelect>; + } & Omit< + UseQueryOptions< + { + meterSources: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMeterSourcesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterSourceKeys.list(args), + queryFn: () => getClient().meterSource.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```ts + * const data = await fetchMeterSourcesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchMeterSourcesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSourceSelect>; +}): Promise<{ + meterSources: ConnectionResult>; +}>; +export async function fetchMeterSourcesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().meterSource.findMany(args).unwrap(); +} +/** + * Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. + * + * @example + * ```ts + * await prefetchMeterSourcesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchMeterSourcesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSourceSelect>; + } +): Promise; +export async function prefetchMeterSourcesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: meterSourceKeys.list(args), + queryFn: () => getClient().meterSource.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/useMetersQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/useMetersQuery.ts new file mode 100644 index 0000000000..766d819901 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/useMetersQuery.ts @@ -0,0 +1,139 @@ +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * @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 { meterKeys } from '../query-keys'; +import type { + MeterSelect, + MeterWithRelations, + MeterFilter, + MeterOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + MeterSelect, + MeterWithRelations, + MeterFilter, + MeterOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const metersQueryKey = meterKeys.list; +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```tsx + * const { data, isLoading } = useMetersQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useMetersQuery< + S extends MeterSelect, + TData = { + meters: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSelect>; + } & Omit< + UseQueryOptions< + { + meters: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useMetersQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: meterKeys.list(args), + queryFn: () => getClient().meter.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```ts + * const data = await fetchMetersQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchMetersQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSelect>; +}): Promise<{ + meters: ConnectionResult>; +}>; +export async function fetchMetersQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().meter.findMany(args).unwrap(); +} +/** + * Defines billable meters (what to track: quotas, feature flags, credit pools) + * + * @example + * ```ts + * await prefetchMetersQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchMetersQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, MeterSelect>; + } +): Promise; +export async function prefetchMetersQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: meterKeys.list(args), + queryFn: () => getClient().meter.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanCapQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanCapQuery.ts new file mode 100644 index 0000000000..3264a76f8f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanCapQuery.ts @@ -0,0 +1,138 @@ +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * @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 { planCapKeys } from '../query-keys'; +import type { PlanCapSelect, PlanCapWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanCapSelect, PlanCapWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planCapQueryKey = planCapKeys.detail; +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanCapQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanCapQuery< + S extends PlanCapSelect, + TData = { + planCap: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanCapSelect>; + } & Omit< + UseQueryOptions< + { + planCap: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanCapQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planCapKeys.detail(params.id), + queryFn: () => + getClient() + .planCap.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```ts + * const data = await fetchPlanCapQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanCapQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanCapSelect>; +}): Promise<{ + planCap: InferSelectResult | null; +}>; +export async function fetchPlanCapQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planCap.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```ts + * await prefetchPlanCapQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanCapQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanCapSelect>; + } +): Promise; +export async function prefetchPlanCapQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planCapKeys.detail(params.id), + queryFn: () => + getClient() + .planCap.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanCapsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanCapsQuery.ts new file mode 100644 index 0000000000..d4e15ad5b3 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanCapsQuery.ts @@ -0,0 +1,145 @@ +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * @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 { planCapKeys } from '../query-keys'; +import type { + PlanCapSelect, + PlanCapWithRelations, + PlanCapFilter, + PlanCapOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanCapSelect, + PlanCapWithRelations, + PlanCapFilter, + PlanCapOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planCapsQueryKey = planCapKeys.list; +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanCapsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanCapsQuery< + S extends PlanCapSelect, + TData = { + planCaps: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanCapSelect>; + } & Omit< + UseQueryOptions< + { + planCaps: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanCapsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planCapKeys.list(args), + queryFn: () => getClient().planCap.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```ts + * const data = await fetchPlanCapsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanCapsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanCapSelect>; +}): Promise<{ + planCaps: ConnectionResult>; +}>; +export async function fetchPlanCapsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().planCap.findMany(args).unwrap(); +} +/** + * Maps each plan to feature flag cap values (written to limit_caps when plan is applied) + * + * @example + * ```ts + * await prefetchPlanCapsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanCapsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanCapSelect>; + } +): Promise; +export async function prefetchPlanCapsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: planCapKeys.list(args), + queryFn: () => getClient().planCap.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitQuery.ts new file mode 100644 index 0000000000..ef1055e1a5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitQuery.ts @@ -0,0 +1,138 @@ +/** + * Maps each plan to specific limit names and their maximum allowed values + * @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 { planLimitKeys } from '../query-keys'; +import type { PlanLimitSelect, PlanLimitWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanLimitSelect, PlanLimitWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planLimitQueryKey = planLimitKeys.detail; +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```tsx + * const { data, isLoading } = usePlanLimitQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanLimitQuery< + S extends PlanLimitSelect, + TData = { + planLimit: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanLimitSelect>; + } & Omit< + UseQueryOptions< + { + planLimit: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanLimitQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planLimitKeys.detail(params.id), + queryFn: () => + getClient() + .planLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```ts + * const data = await fetchPlanLimitQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanLimitQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanLimitSelect>; +}): Promise<{ + planLimit: InferSelectResult | null; +}>; +export async function fetchPlanLimitQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```ts + * await prefetchPlanLimitQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanLimitQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanLimitSelect>; + } +): Promise; +export async function prefetchPlanLimitQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planLimitKeys.detail(params.id), + queryFn: () => + getClient() + .planLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitsQuery.ts new file mode 100644 index 0000000000..1e8362c71a --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanLimitsQuery.ts @@ -0,0 +1,145 @@ +/** + * Maps each plan to specific limit names and their maximum allowed values + * @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 { planLimitKeys } from '../query-keys'; +import type { + PlanLimitSelect, + PlanLimitWithRelations, + PlanLimitFilter, + PlanLimitOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanLimitSelect, + PlanLimitWithRelations, + PlanLimitFilter, + PlanLimitOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planLimitsQueryKey = planLimitKeys.list; +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```tsx + * const { data, isLoading } = usePlanLimitsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanLimitsQuery< + S extends PlanLimitSelect, + TData = { + planLimits: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanLimitSelect>; + } & Omit< + UseQueryOptions< + { + planLimits: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanLimitsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planLimitKeys.list(args), + queryFn: () => getClient().planLimit.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```ts + * const data = await fetchPlanLimitsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanLimitsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanLimitSelect>; +}): Promise<{ + planLimits: ConnectionResult>; +}>; +export async function fetchPlanLimitsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().planLimit.findMany(args).unwrap(); +} +/** + * Maps each plan to specific limit names and their maximum allowed values + * + * @example + * ```ts + * await prefetchPlanLimitsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanLimitsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanLimitSelect>; + } +): Promise; +export async function prefetchPlanLimitsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: planLimitKeys.list(args), + queryFn: () => getClient().planLimit.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitQuery.ts new file mode 100644 index 0000000000..ec12d8b94b --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitQuery.ts @@ -0,0 +1,138 @@ +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * @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 { planMeterLimitKeys } from '../query-keys'; +import type { PlanMeterLimitSelect, PlanMeterLimitWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanMeterLimitSelect, PlanMeterLimitWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planMeterLimitQueryKey = planMeterLimitKeys.detail; +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanMeterLimitQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanMeterLimitQuery< + S extends PlanMeterLimitSelect, + TData = { + planMeterLimit: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanMeterLimitSelect>; + } & Omit< + UseQueryOptions< + { + planMeterLimit: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanMeterLimitQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planMeterLimitKeys.detail(params.id), + queryFn: () => + getClient() + .planMeterLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```ts + * const data = await fetchPlanMeterLimitQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanMeterLimitQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanMeterLimitSelect>; +}): Promise<{ + planMeterLimit: InferSelectResult | null; +}>; +export async function fetchPlanMeterLimitQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planMeterLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```ts + * await prefetchPlanMeterLimitQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanMeterLimitQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanMeterLimitSelect>; + } +): Promise; +export async function prefetchPlanMeterLimitQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planMeterLimitKeys.detail(params.id), + queryFn: () => + getClient() + .planMeterLimit.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitsQuery.ts new file mode 100644 index 0000000000..37b739c56a --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanMeterLimitsQuery.ts @@ -0,0 +1,159 @@ +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * @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 { planMeterLimitKeys } from '../query-keys'; +import type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanMeterLimitSelect, + PlanMeterLimitWithRelations, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planMeterLimitsQueryKey = planMeterLimitKeys.list; +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanMeterLimitsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanMeterLimitsQuery< + S extends PlanMeterLimitSelect, + TData = { + planMeterLimits: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanMeterLimitSelect>; + } & Omit< + UseQueryOptions< + { + planMeterLimits: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanMeterLimitsQuery( + params: { + selection: ListSelectionConfig< + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planMeterLimitKeys.list(args), + queryFn: () => getClient().planMeterLimit.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```ts + * const data = await fetchPlanMeterLimitsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanMeterLimitsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanMeterLimitSelect>; +}): Promise<{ + planMeterLimits: ConnectionResult>; +}>; +export async function fetchPlanMeterLimitsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy + >(params.selection); + return getClient().planMeterLimit.findMany(args).unwrap(); +} +/** + * Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) + * + * @example + * ```ts + * await prefetchPlanMeterLimitsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanMeterLimitsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanMeterLimitSelect>; + } +): Promise; +export async function prefetchPlanMeterLimitsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: planMeterLimitKeys.list(args), + queryFn: () => getClient().planMeterLimit.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanOverrideQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanOverrideQuery.ts new file mode 100644 index 0000000000..baf21466b3 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanOverrideQuery.ts @@ -0,0 +1,138 @@ +/** + * Per-entity limit overrides that take precedence over plan defaults + * @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 { planOverrideKeys } from '../query-keys'; +import type { PlanOverrideSelect, PlanOverrideWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanOverrideSelect, PlanOverrideWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planOverrideQueryKey = planOverrideKeys.detail; +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```tsx + * const { data, isLoading } = usePlanOverrideQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanOverrideQuery< + S extends PlanOverrideSelect, + TData = { + planOverride: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanOverrideSelect>; + } & Omit< + UseQueryOptions< + { + planOverride: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanOverrideQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planOverrideKeys.detail(params.id), + queryFn: () => + getClient() + .planOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```ts + * const data = await fetchPlanOverrideQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanOverrideQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanOverrideSelect>; +}): Promise<{ + planOverride: InferSelectResult | null; +}>; +export async function fetchPlanOverrideQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```ts + * await prefetchPlanOverrideQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanOverrideQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanOverrideSelect>; + } +): Promise; +export async function prefetchPlanOverrideQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planOverrideKeys.detail(params.id), + queryFn: () => + getClient() + .planOverride.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanOverridesQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanOverridesQuery.ts new file mode 100644 index 0000000000..456bcaabb5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanOverridesQuery.ts @@ -0,0 +1,145 @@ +/** + * Per-entity limit overrides that take precedence over plan defaults + * @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 { planOverrideKeys } from '../query-keys'; +import type { + PlanOverrideSelect, + PlanOverrideWithRelations, + PlanOverrideFilter, + PlanOverrideOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanOverrideSelect, + PlanOverrideWithRelations, + PlanOverrideFilter, + PlanOverrideOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planOverridesQueryKey = planOverrideKeys.list; +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```tsx + * const { data, isLoading } = usePlanOverridesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanOverridesQuery< + S extends PlanOverrideSelect, + TData = { + planOverrides: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanOverrideSelect>; + } & Omit< + UseQueryOptions< + { + planOverrides: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanOverridesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planOverrideKeys.list(args), + queryFn: () => getClient().planOverride.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```ts + * const data = await fetchPlanOverridesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanOverridesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanOverrideSelect>; +}): Promise<{ + planOverrides: ConnectionResult>; +}>; +export async function fetchPlanOverridesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().planOverride.findMany(args).unwrap(); +} +/** + * Per-entity limit overrides that take precedence over plan defaults + * + * @example + * ```ts + * await prefetchPlanOverridesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanOverridesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanOverrideSelect>; + } +): Promise; +export async function prefetchPlanOverridesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: planOverrideKeys.list(args), + queryFn: () => getClient().planOverride.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingQuery.ts new file mode 100644 index 0000000000..b25022ace3 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingQuery.ts @@ -0,0 +1,138 @@ +/** + * Billing intervals and pricing for each plan tier + * @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 { planPricingKeys } from '../query-keys'; +import type { PlanPricingSelect, PlanPricingWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanPricingSelect, PlanPricingWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planPricingQueryKey = planPricingKeys.detail; +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```tsx + * const { data, isLoading } = usePlanPricingQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanPricingQuery< + S extends PlanPricingSelect, + TData = { + planPricing: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanPricingSelect>; + } & Omit< + UseQueryOptions< + { + planPricing: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanPricingQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planPricingKeys.detail(params.id), + queryFn: () => + getClient() + .planPricing.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```ts + * const data = await fetchPlanPricingQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanPricingQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanPricingSelect>; +}): Promise<{ + planPricing: InferSelectResult | null; +}>; +export async function fetchPlanPricingQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planPricing.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```ts + * await prefetchPlanPricingQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanPricingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanPricingSelect>; + } +): Promise; +export async function prefetchPlanPricingQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planPricingKeys.detail(params.id), + queryFn: () => + getClient() + .planPricing.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingsQuery.ts new file mode 100644 index 0000000000..2297e9cc15 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanPricingsQuery.ts @@ -0,0 +1,145 @@ +/** + * Billing intervals and pricing for each plan tier + * @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 { planPricingKeys } from '../query-keys'; +import type { + PlanPricingSelect, + PlanPricingWithRelations, + PlanPricingFilter, + PlanPricingOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanPricingSelect, + PlanPricingWithRelations, + PlanPricingFilter, + PlanPricingOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planPricingsQueryKey = planPricingKeys.list; +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```tsx + * const { data, isLoading } = usePlanPricingsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanPricingsQuery< + S extends PlanPricingSelect, + TData = { + planPricings: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanPricingSelect>; + } & Omit< + UseQueryOptions< + { + planPricings: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanPricingsQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs( + params.selection + ); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planPricingKeys.list(args), + queryFn: () => getClient().planPricing.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```ts + * const data = await fetchPlanPricingsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanPricingsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanPricingSelect>; +}): Promise<{ + planPricings: ConnectionResult>; +}>; +export async function fetchPlanPricingsQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().planPricing.findMany(args).unwrap(); +} +/** + * Billing intervals and pricing for each plan tier + * + * @example + * ```ts + * await prefetchPlanPricingsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanPricingsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanPricingSelect>; + } +): Promise; +export async function prefetchPlanPricingsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs( + params.selection + ); + await queryClient.prefetchQuery({ + queryKey: planPricingKeys.list(args), + queryFn: () => getClient().planPricing.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanQuery.ts new file mode 100644 index 0000000000..0f2cb62441 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanQuery.ts @@ -0,0 +1,138 @@ +/** + * Defines plan tiers with named limit configurations + * @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 { planKeys } from '../query-keys'; +import type { PlanSelect, PlanWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSelect, PlanWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planQueryKey = planKeys.detail; +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```tsx + * const { data, isLoading } = usePlanQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanQuery< + S extends PlanSelect, + TData = { + plan: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSelect>; + } & Omit< + UseQueryOptions< + { + plan: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planKeys.detail(params.id), + queryFn: () => + getClient() + .plan.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```ts + * const data = await fetchPlanQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSelect>; +}): Promise<{ + plan: InferSelectResult | null; +}>; +export async function fetchPlanQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .plan.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```ts + * await prefetchPlanQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSelect>; + } +): Promise; +export async function prefetchPlanQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planKeys.detail(params.id), + queryFn: () => + getClient() + .plan.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionQuery.ts new file mode 100644 index 0000000000..64ef7f5c53 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionQuery.ts @@ -0,0 +1,138 @@ +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * @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 { planSubscriptionKeys } from '../query-keys'; +import type { PlanSubscriptionSelect, PlanSubscriptionWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlanSubscriptionSelect, PlanSubscriptionWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planSubscriptionQueryKey = planSubscriptionKeys.detail; +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanSubscriptionQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlanSubscriptionQuery< + S extends PlanSubscriptionSelect, + TData = { + planSubscription: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSubscriptionSelect>; + } & Omit< + UseQueryOptions< + { + planSubscription: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanSubscriptionQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planSubscriptionKeys.detail(params.id), + queryFn: () => + getClient() + .planSubscription.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```ts + * const data = await fetchPlanSubscriptionQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlanSubscriptionQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSubscriptionSelect>; +}): Promise<{ + planSubscription: InferSelectResult | null; +}>; +export async function fetchPlanSubscriptionQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .planSubscription.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```ts + * await prefetchPlanSubscriptionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlanSubscriptionQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlanSubscriptionSelect>; + } +): Promise; +export async function prefetchPlanSubscriptionQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planSubscriptionKeys.detail(params.id), + queryFn: () => + getClient() + .planSubscription.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionsQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionsQuery.ts new file mode 100644 index 0000000000..502bb5c22f --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlanSubscriptionsQuery.ts @@ -0,0 +1,163 @@ +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * @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 { planSubscriptionKeys } from '../query-keys'; +import type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlanSubscriptionSelect, + PlanSubscriptionWithRelations, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const planSubscriptionsQueryKey = planSubscriptionKeys.list; +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```tsx + * const { data, isLoading } = usePlanSubscriptionsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlanSubscriptionsQuery< + S extends PlanSubscriptionSelect, + TData = { + planSubscriptions: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSubscriptionSelect>; + } & Omit< + UseQueryOptions< + { + planSubscriptions: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlanSubscriptionsQuery( + params: { + selection: ListSelectionConfig< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planSubscriptionKeys.list(args), + queryFn: () => getClient().planSubscription.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```ts + * const data = await fetchPlanSubscriptionsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlanSubscriptionsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSubscriptionSelect>; +}): Promise<{ + planSubscriptions: ConnectionResult>; +}>; +export async function fetchPlanSubscriptionsQuery(params: { + selection: ListSelectionConfig< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >; +}) { + const args = buildListSelectionArgs< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >(params.selection); + return getClient().planSubscription.findMany(args).unwrap(); +} +/** + * Assigns a plan to an entity with subscription lifecycle (start, end, active state) + * + * @example + * ```ts + * await prefetchPlanSubscriptionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlanSubscriptionsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSubscriptionSelect>; + } +): Promise; +export async function prefetchPlanSubscriptionsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: planSubscriptionKeys.list(args), + queryFn: () => getClient().planSubscription.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/queries/usePlansQuery.ts b/sdk/constructive-react/src/usage/hooks/queries/usePlansQuery.ts new file mode 100644 index 0000000000..81820ab1e5 --- /dev/null +++ b/sdk/constructive-react/src/usage/hooks/queries/usePlansQuery.ts @@ -0,0 +1,129 @@ +/** + * Defines plan tiers with named limit configurations + * @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 { planKeys } from '../query-keys'; +import type { PlanSelect, PlanWithRelations, PlanFilter, PlanOrderBy } from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { PlanSelect, PlanWithRelations, PlanFilter, PlanOrderBy } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const plansQueryKey = planKeys.list; +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```tsx + * const { data, isLoading } = usePlansQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function usePlansQuery< + S extends PlanSelect, + TData = { + plans: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSelect>; + } & Omit< + UseQueryOptions< + { + plans: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlansQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: planKeys.list(args), + queryFn: () => getClient().plan.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```ts + * const data = await fetchPlansQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchPlansQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSelect>; +}): Promise<{ + plans: ConnectionResult>; +}>; +export async function fetchPlansQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().plan.findMany(args).unwrap(); +} +/** + * Defines plan tiers with named limit configurations + * + * @example + * ```ts + * await prefetchPlansQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchPlansQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, PlanSelect>; + } +): Promise; +export async function prefetchPlansQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: planKeys.list(args), + queryFn: () => getClient().plan.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/usage/hooks/query-keys.ts b/sdk/constructive-react/src/usage/hooks/query-keys.ts index 3f330e7f19..38a27c11db 100644 --- a/sdk/constructive-react/src/usage/hooks/query-keys.ts +++ b/sdk/constructive-react/src/usage/hooks/query-keys.ts @@ -19,6 +19,69 @@ // Entity Query Keys // ============================================================================ +export const appAchievementRewardKeys = { + /** All appAchievementReward queries */ all: ['appachievementreward'] as const, + /** List query keys */ lists: () => [...appAchievementRewardKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appAchievementRewardKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appAchievementRewardKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appAchievementRewardKeys.details(), id] as const, +} as const; +export const appEventAggregateKeys = { + /** All appEventAggregate queries */ all: ['appeventaggregate'] as const, + /** List query keys */ lists: () => [...appEventAggregateKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appEventAggregateKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appEventAggregateKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appEventAggregateKeys.details(), id] as const, +} as const; +export const appEventKeys = { + /** All appEvent queries */ all: ['appevent'] as const, + /** List query keys */ lists: () => [...appEventKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appEventKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appEventKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appEventKeys.details(), id] as const, +} as const; +export const appEventTypeKeys = { + /** All appEventType queries */ all: ['appeventtype'] as const, + /** List query keys */ lists: () => [...appEventTypeKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appEventTypeKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appEventTypeKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appEventTypeKeys.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, + /** List query key with variables */ list: (variables?: object) => + [...appLevelKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appLevelKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appLevelKeys.details(), id] as const, +} as const; +export const appLevelGrantKeys = { + /** All appLevelGrant queries */ all: ['applevelgrant'] as const, + /** List query keys */ lists: () => [...appLevelGrantKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appLevelGrantKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appLevelGrantKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appLevelGrantKeys.details(), id] as const, +} as const; +export const appLevelRequirementKeys = { + /** All appLevelRequirement queries */ all: ['applevelrequirement'] as const, + /** List query keys */ lists: () => [...appLevelRequirementKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...appLevelRequirementKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...appLevelRequirementKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...appLevelRequirementKeys.details(), id] as const, +} as const; export const appLimitCapKeys = { /** All appLimitCap queries */ all: ['applimitcap'] as const, /** List query keys */ lists: () => [...appLimitCapKeys.all, 'list'] as const, @@ -109,6 +172,60 @@ export const appLimitWarningKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...appLimitWarningKeys.details(), id] as const, } as const; +export const billingUsageSummaryKeys = { + /** All billingUsageSummary queries */ all: ['billingusagesummary'] as const, + /** List query keys */ lists: () => [...billingUsageSummaryKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...billingUsageSummaryKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...billingUsageSummaryKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...billingUsageSummaryKeys.details(), id] as const, +} as const; +export const ledgerKeys = { + /** All ledger queries */ all: ['ledger'] as const, + /** List query keys */ lists: () => [...ledgerKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...ledgerKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...ledgerKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...ledgerKeys.details(), id] as const, +} as const; +export const meterKeys = { + /** All meter queries */ all: ['meter'] as const, + /** List query keys */ lists: () => [...meterKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...meterKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...meterKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...meterKeys.details(), id] as const, +} as const; +export const meterCreditKeys = { + /** All meterCredit queries */ all: ['metercredit'] as const, + /** List query keys */ lists: () => [...meterCreditKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...meterCreditKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...meterCreditKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...meterCreditKeys.details(), id] as const, +} as const; +export const meterDefaultKeys = { + /** All meterDefault queries */ all: ['meterdefault'] as const, + /** List query keys */ lists: () => [...meterDefaultKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...meterDefaultKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...meterDefaultKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...meterDefaultKeys.details(), id] as const, +} as const; +export const meterSourceKeys = { + /** All meterSource queries */ all: ['metersource'] as const, + /** List query keys */ lists: () => [...meterSourceKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...meterSourceKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...meterSourceKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...meterSourceKeys.details(), id] as const, +} as const; export const orgLimitAggregateKeys = { /** All orgLimitAggregate queries */ all: ['orglimitaggregate'] as const, /** List query keys */ lists: () => [...orgLimitAggregateKeys.all, 'list'] as const, @@ -181,6 +298,85 @@ export const orgLimitWarningKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgLimitWarningKeys.details(), id] as const, } as const; +export const planCapKeys = { + /** All planCap queries */ all: ['plancap'] as const, + /** List query keys */ lists: () => [...planCapKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planCapKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planCapKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planCapKeys.details(), id] as const, +} as const; +export const planKeys = { + /** All plan queries */ all: ['plan'] as const, + /** List query keys */ lists: () => [...planKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planKeys.details(), id] as const, +} as const; +export const planLimitKeys = { + /** All planLimit queries */ all: ['planlimit'] as const, + /** List query keys */ lists: () => [...planLimitKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planLimitKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planLimitKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planLimitKeys.details(), id] as const, +} as const; +export const planMeterLimitKeys = { + /** All planMeterLimit queries */ all: ['planmeterlimit'] as const, + /** List query keys */ lists: () => [...planMeterLimitKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planMeterLimitKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planMeterLimitKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planMeterLimitKeys.details(), id] as const, +} as const; +export const planOverrideKeys = { + /** All planOverride queries */ all: ['planoverride'] as const, + /** List query keys */ lists: () => [...planOverrideKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planOverrideKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planOverrideKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planOverrideKeys.details(), id] as const, +} as const; +export const planPricingKeys = { + /** All planPricing queries */ all: ['planpricing'] as const, + /** List query keys */ lists: () => [...planPricingKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planPricingKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planPricingKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planPricingKeys.details(), id] as const, +} as const; +export const planSubscriptionKeys = { + /** All planSubscription queries */ all: ['plansubscription'] as const, + /** List query keys */ lists: () => [...planSubscriptionKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...planSubscriptionKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...planSubscriptionKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...planSubscriptionKeys.details(), id] as const, +} as const; + +// ============================================================================ +// Custom Query Keys +// ============================================================================ + +export const customQueryKeys = { + /** Query key for captureAppLimitDefaults */ captureAppLimitDefaults: () => + ['captureAppLimitDefaults'] as const, + /** Query key for captureOrgLimitDefaults */ captureOrgLimitDefaults: () => + ['captureOrgLimitDefaults'] as const, + /** Query key for captureTrustLadder */ captureTrustLadder: () => ['captureTrustLadder'] as const, + /** Query key for eventsAchieved */ eventsAchieved: (variables?: object) => + ['eventsAchieved', variables] as const, + /** Query key for eventsRequired */ eventsRequired: (variables?: object) => + ['eventsRequired', variables] as const, +} as const; /** // ============================================================================ @@ -204,6 +400,13 @@ export const orgLimitWarningKeys = { * ``` */ export const queryKeys = { + appAchievementReward: appAchievementRewardKeys, + appEventAggregate: appEventAggregateKeys, + appEvent: appEventKeys, + appEventType: appEventTypeKeys, + appLevel: appLevelKeys, + appLevelGrant: appLevelGrantKeys, + appLevelRequirement: appLevelRequirementKeys, appLimitCap: appLimitCapKeys, appLimitCapsDefault: appLimitCapsDefaultKeys, appLimit: appLimitKeys, @@ -214,6 +417,12 @@ export const queryKeys = { appLimitDefault: appLimitDefaultKeys, appLimitEvent: appLimitEventKeys, appLimitWarning: appLimitWarningKeys, + billingUsageSummary: billingUsageSummaryKeys, + ledger: ledgerKeys, + meter: meterKeys, + meterCredit: meterCreditKeys, + meterDefault: meterDefaultKeys, + meterSource: meterSourceKeys, orgLimitAggregate: orgLimitAggregateKeys, orgLimitCap: orgLimitCapKeys, orgLimitCapsDefault: orgLimitCapsDefaultKeys, @@ -222,6 +431,14 @@ export const queryKeys = { orgLimitDefault: orgLimitDefaultKeys, orgLimitEvent: orgLimitEventKeys, orgLimitWarning: orgLimitWarningKeys, + planCap: planCapKeys, + plan: planKeys, + planLimit: planLimitKeys, + planMeterLimit: planMeterLimitKeys, + planOverride: planOverrideKeys, + planPricing: planPricingKeys, + planSubscription: planSubscriptionKeys, + custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ export type QueryKeyScope = keyof typeof queryKeys; diff --git a/sdk/constructive-react/src/usage/orm/README.md b/sdk/constructive-react/src/usage/orm/README.md index dfcec601ac..9fde0f403e 100644 --- a/sdk/constructive-react/src/usage/orm/README.md +++ b/sdk/constructive-react/src/usage/orm/README.md @@ -21,6 +21,13 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `appAchievementReward` | findMany, findOne, create, update, delete | +| `appEventAggregate` | findMany, findOne, create, update, delete | +| `appEvent` | findMany, findOne, create, update, delete | +| `appEventType` | findMany, findOne, create, update, delete | +| `appLevel` | findMany, findOne, create, update, delete | +| `appLevelGrant` | findMany, findOne, create, update, delete | +| `appLevelRequirement` | findMany, findOne, create, update, delete | | `appLimitCap` | findMany, findOne, create, update, delete | | `appLimitCapsDefault` | findMany, findOne, create, update, delete | | `appLimit` | findMany, findOne, create, update, delete | @@ -31,6 +38,12 @@ const db = createClient({ | `appLimitDefault` | findMany, findOne, create, update, delete | | `appLimitEvent` | findMany, findOne, create, update, delete | | `appLimitWarning` | findMany, findOne, create, update, delete | +| `billingUsageSummary` | findMany, findOne, create, update, delete | +| `ledger` | findMany, findOne, create, update, delete | +| `meter` | findMany, findOne, create, update, delete | +| `meterCredit` | findMany, findOne, create, update, delete | +| `meterDefault` | findMany, findOne, create, update, delete | +| `meterSource` | findMany, findOne, create, update, delete | | `orgLimitAggregate` | findMany, findOne, create, update, delete | | `orgLimitCap` | findMany, findOne, create, update, delete | | `orgLimitCapsDefault` | findMany, findOne, create, update, delete | @@ -39,9 +52,267 @@ const db = createClient({ | `orgLimitDefault` | findMany, findOne, create, update, delete | | `orgLimitEvent` | findMany, findOne, create, update, delete | | `orgLimitWarning` | findMany, findOne, create, update, delete | +| `planCap` | findMany, findOne, create, update, delete | +| `plan` | findMany, findOne, create, update, delete | +| `planLimit` | findMany, findOne, create, update, delete | +| `planMeterLimit` | findMany, findOne, create, update, delete | +| `planOverride` | findMany, findOne, create, update, delete | +| `planPricing` | findMany, findOne, create, update, delete | +| `planSubscription` | findMany, findOne, create, update, delete | ## Table Operations +### `db.appAchievementReward` + +CRUD operations for AppAchievementReward records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `amount` | Int | Yes | +| `createdAt` | Datetime | No | +| `creditType` | String | Yes | +| `expiresInterval` | Interval | Yes | +| `id` | UUID | No | +| `levelName` | String | Yes | +| `rewardType` | String | Yes | +| `targetName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appAchievementReward records +const items = await db.appAchievementReward.findMany({ select: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appAchievementReward.findOne({ id: '', select: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appAchievementReward.create({ data: { amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appAchievementReward.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appAchievementReward.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEventAggregate` + +CRUD operations for AppEventAggregate records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `count` | Int | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `name` | String | Yes | +| `periodStart` | Datetime | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appEventAggregate records +const items = await db.appEventAggregate.findMany({ select: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appEventAggregate.findOne({ id: '', select: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appEventAggregate.create({ data: { actorId: '', count: '', name: '', periodStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEventAggregate.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEventAggregate.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEvent` + +CRUD operations for AppEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `count` | Int | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all appEvent records +const items = await db.appEvent.findMany({ select: { actorId: true, count: true, createdAt: true, id: true, name: true } }).execute(); + +// Get one by id +const item = await db.appEvent.findOne({ id: '', select: { actorId: true, count: true, createdAt: true, id: true, name: true } }).execute(); + +// Create +const created = await db.appEvent.create({ data: { actorId: '', count: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEvent.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEvent.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEventType` + +CRUD operations for AppEventType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `aggregation` | String | Yes | +| `category` | String | Yes | +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `feedsLevels` | Boolean | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `periodInterval` | Interval | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appEventType records +const items = await db.appEventType.findMany({ select: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appEventType.findOne({ id: '', select: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appEventType.create({ data: { aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEventType.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEventType.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevel` + +CRUD operations for AppLevel records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `id` | UUID | No | +| `image` | ConstructiveInternalTypeImage | Yes | +| `name` | String | Yes | +| `ownerId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevel records +const items = await db.appLevel.findMany({ select: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevel.findOne({ id: '', select: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevel.create({ data: { description: '', image: '', name: '', ownerId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevel.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevel.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevelGrant` + +CRUD operations for AppLevelGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `expiresAt` | Datetime | Yes | +| `id` | UUID | No | +| `levelName` | String | Yes | +| `periodStart` | Datetime | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevelGrant records +const items = await db.appLevelGrant.findMany({ select: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevelGrant.findOne({ id: '', select: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevelGrant.create({ data: { actorId: '', expiresAt: '', levelName: '', periodStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevelGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevelGrant.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevelRequirement` + +CRUD operations for AppLevelRequirement records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `groupKey` | String | Yes | +| `id` | UUID | No | +| `level` | String | Yes | +| `metric` | String | Yes | +| `name` | String | Yes | +| `priority` | Int | Yes | +| `requiredCount` | Int | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevelRequirement records +const items = await db.appLevelRequirement.findMany({ select: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevelRequirement.findOne({ id: '', select: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevelRequirement.create({ data: { description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevelRequirement.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevelRequirement.delete({ where: { id: '' } }).execute(); +``` + ### `db.appLimitCap` CRUD operations for AppLimitCap records. @@ -385,220 +656,446 @@ const updated = await db.appLimitWarning.update({ where: { id: '' }, data: const deleted = await db.appLimitWarning.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitAggregate` +### `db.billingUsageSummary` -CRUD operations for OrgLimitAggregate records. +CRUD operations for BillingUsageSummary records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `creditsConsumed` | BigInt | Yes | | `entityId` | UUID | Yes | | `entityType` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `num` | BigInt | Yes | +| `meterSlug` | String | Yes | | `organizationId` | UUID | Yes | -| `periodCredits` | BigInt | Yes | -| `planMax` | BigInt | Yes | -| `purchasedCredits` | BigInt | Yes | -| `reserved` | BigInt | Yes | -| `softMax` | BigInt | Yes | -| `windowDuration` | Interval | Yes | -| `windowStart` | Datetime | Yes | +| `overageUnits` | BigInt | Yes | +| `periodEnd` | Datetime | Yes | +| `periodStart` | Datetime | Yes | +| `planLimit` | BigInt | Yes | +| `quantityUsed` | BigInt | Yes | **Operations:** ```typescript -// List all orgLimitAggregate records -const items = await db.orgLimitAggregate.findMany({ select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +// List all billingUsageSummary records +const items = await db.billingUsageSummary.findMany({ select: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }).execute(); // Get one by id -const item = await db.orgLimitAggregate.findOne({ id: '', select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +const item = await db.billingUsageSummary.findOne({ id: '', select: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }).execute(); // Create -const created = await db.orgLimitAggregate.create({ data: { entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', reserved: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); +const created = await db.billingUsageSummary.create({ data: { creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitAggregate.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.billingUsageSummary.update({ where: { id: '' }, data: { creditsConsumed: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitAggregate.delete({ where: { id: '' } }).execute(); +const deleted = await db.billingUsageSummary.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCap` +### `db.ledger` -CRUD operations for OrgLimitCap records. +CRUD operations for Ledger records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `createdAt` | Datetime | No | +| `delta` | BigInt | Yes | | `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `entryType` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | +| `ledgerClass` | String | Yes | +| `metadata` | JSON | Yes | +| `meterSlug` | String | Yes | +| `organizationId` | UUID | Yes | +| `usageAfter` | BigInt | Yes | **Operations:** ```typescript -// List all orgLimitCap records -const items = await db.orgLimitCap.findMany({ select: { entityId: true, id: true, max: true, name: true } }).execute(); +// List all ledger records +const items = await db.ledger.findMany({ select: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }).execute(); // Get one by id -const item = await db.orgLimitCap.findOne({ id: '', select: { entityId: true, id: true, max: true, name: true } }).execute(); +const item = await db.ledger.findOne({ id: '', select: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }).execute(); // Create -const created = await db.orgLimitCap.create({ data: { entityId: '', max: '', name: '' }, select: { id: true } }).execute(); +const created = await db.ledger.create({ data: { delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCap.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.ledger.update({ where: { id: '' }, data: { delta: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCap.delete({ where: { id: '' } }).execute(); +const deleted = await db.ledger.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCapsDefault` +### `db.meter` -CRUD operations for OrgLimitCapsDefault records. +CRUD operations for Meter records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `aggregation` | String | Yes | +| `categoryMeter` | String | Yes | +| `creditCost` | Int | Yes | +| `displayName` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | +| `isActive` | Boolean | Yes | +| `meterType` | String | Yes | +| `periodInterval` | Interval | Yes | +| `rolloverCap` | BigInt | Yes | +| `slug` | String | Yes | +| `unit` | String | Yes | **Operations:** ```typescript -// List all orgLimitCapsDefault records -const items = await db.orgLimitCapsDefault.findMany({ select: { id: true, max: true, name: true } }).execute(); +// List all meter records +const items = await db.meter.findMany({ select: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }).execute(); // Get one by id -const item = await db.orgLimitCapsDefault.findOne({ id: '', select: { id: true, max: true, name: true } }).execute(); +const item = await db.meter.findOne({ id: '', select: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }).execute(); // Create -const created = await db.orgLimitCapsDefault.create({ data: { max: '', name: '' }, select: { id: true } }).execute(); +const created = await db.meter.create({ data: { aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCapsDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); +const updated = await db.meter.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCapsDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.meter.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimit` +### `db.meterCredit` -CRUD operations for OrgLimit records. +CRUD operations for MeterCredit records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorId` | UUID | Yes | +| `amount` | BigInt | Yes | +| `createdAt` | Datetime | No | +| `creditType` | String | Yes | | `entityId` | UUID | Yes | | `entityType` | String | Yes | +| `expiresAt` | Datetime | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `num` | BigInt | Yes | +| `meterId` | UUID | Yes | | `organizationId` | UUID | Yes | -| `periodCredits` | BigInt | Yes | -| `planMax` | BigInt | Yes | -| `purchasedCredits` | BigInt | Yes | -| `softMax` | BigInt | Yes | -| `windowDuration` | Interval | Yes | -| `windowStart` | Datetime | Yes | +| `reason` | String | Yes | **Operations:** ```typescript -// List all orgLimit records -const items = await db.orgLimit.findMany({ select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +// List all meterCredit records +const items = await db.meterCredit.findMany({ select: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }).execute(); // Get one by id -const item = await db.orgLimit.findOne({ id: '', select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +const item = await db.meterCredit.findOne({ id: '', select: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }).execute(); // Create -const created = await db.orgLimit.create({ data: { actorId: '', entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); +const created = await db.meterCredit.create({ data: { amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); +const updated = await db.meterCredit.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterCredit.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCredit` +### `db.meterDefault` -CRUD operations for OrgLimitCredit records. +CRUD operations for MeterDefault records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorId` | UUID | Yes | -| `amount` | BigInt | Yes | -| `creditType` | String | Yes | -| `defaultLimitId` | UUID | Yes | -| `entityId` | UUID | Yes | -| `entityType` | String | Yes | +| `categoryMeter` | String | Yes | +| `creditCost` | BigFloat | Yes | +| `defaultPlanLimit` | BigInt | Yes | +| `displayName` | String | Yes | | `id` | UUID | No | -| `organizationId` | UUID | Yes | -| `reason` | String | Yes | +| `isActive` | Boolean | Yes | +| `meterType` | String | Yes | +| `slug` | String | Yes | +| `unit` | String | Yes | **Operations:** ```typescript -// List all orgLimitCredit records -const items = await db.orgLimitCredit.findMany({ select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); +// List all meterDefault records +const items = await db.meterDefault.findMany({ select: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }).execute(); // Get one by id -const item = await db.orgLimitCredit.findOne({ id: '', select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); +const item = await db.meterDefault.findOne({ id: '', select: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }).execute(); // Create -const created = await db.orgLimitCredit.create({ data: { actorId: '', amount: '', creditType: '', defaultLimitId: '', entityId: '', entityType: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); +const created = await db.meterDefault.create({ data: { categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCredit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); +const updated = await db.meterDefault.update({ where: { id: '' }, data: { categoryMeter: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCredit.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterDefault.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitDefault` +### `db.meterSource` -CRUD operations for OrgLimitDefault records. +CRUD operations for MeterSource records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `aggregationType` | String | Yes | +| `dimensionPath` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `softMax` | BigInt | Yes | +| `isActive` | Boolean | Yes | +| `meterSlug` | String | Yes | +| `sourceMetric` | String | Yes | **Operations:** ```typescript -// List all orgLimitDefault records -const items = await db.orgLimitDefault.findMany({ select: { id: true, max: true, name: true, softMax: true } }).execute(); +// List all meterSource records +const items = await db.meterSource.findMany({ select: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }).execute(); // Get one by id -const item = await db.orgLimitDefault.findOne({ id: '', select: { id: true, max: true, name: true, softMax: true } }).execute(); +const item = await db.meterSource.findOne({ id: '', select: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }).execute(); // Create -const created = await db.orgLimitDefault.create({ data: { max: '', name: '', softMax: '' }, select: { id: true } }).execute(); +const created = await db.meterSource.create({ data: { aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); +const updated = await db.meterSource.update({ where: { id: '' }, data: { aggregationType: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterSource.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitAggregate` + +CRUD operations for OrgLimitAggregate records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `num` | BigInt | Yes | +| `organizationId` | UUID | Yes | +| `periodCredits` | BigInt | Yes | +| `planMax` | BigInt | Yes | +| `purchasedCredits` | BigInt | Yes | +| `reserved` | BigInt | Yes | +| `softMax` | BigInt | Yes | +| `windowDuration` | Interval | Yes | +| `windowStart` | Datetime | Yes | + +**Operations:** + +```typescript +// List all orgLimitAggregate records +const items = await db.orgLimitAggregate.findMany({ select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Get one by id +const item = await db.orgLimitAggregate.findOne({ id: '', select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Create +const created = await db.orgLimitAggregate.create({ data: { entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', reserved: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitAggregate.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitAggregate.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCap` + +CRUD operations for OrgLimitCap records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCap records +const items = await db.orgLimitCap.findMany({ select: { entityId: true, id: true, max: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCap.findOne({ id: '', select: { entityId: true, id: true, max: true, name: true } }).execute(); + +// Create +const created = await db.orgLimitCap.create({ data: { entityId: '', max: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCap.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCap.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCapsDefault` + +CRUD operations for OrgLimitCapsDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCapsDefault records +const items = await db.orgLimitCapsDefault.findMany({ select: { id: true, max: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCapsDefault.findOne({ id: '', select: { id: true, max: true, name: true } }).execute(); + +// Create +const created = await db.orgLimitCapsDefault.create({ data: { max: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCapsDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCapsDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimit` + +CRUD operations for OrgLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `num` | BigInt | Yes | +| `organizationId` | UUID | Yes | +| `periodCredits` | BigInt | Yes | +| `planMax` | BigInt | Yes | +| `purchasedCredits` | BigInt | Yes | +| `softMax` | BigInt | Yes | +| `windowDuration` | Interval | Yes | +| `windowStart` | Datetime | Yes | + +**Operations:** + +```typescript +// List all orgLimit records +const items = await db.orgLimit.findMany({ select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Get one by id +const item = await db.orgLimit.findOne({ id: '', select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Create +const created = await db.orgLimit.create({ data: { actorId: '', entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCredit` + +CRUD operations for OrgLimitCredit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `amount` | BigInt | Yes | +| `creditType` | String | Yes | +| `defaultLimitId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `organizationId` | UUID | Yes | +| `reason` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCredit records +const items = await db.orgLimitCredit.findMany({ select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCredit.findOne({ id: '', select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); + +// Create +const created = await db.orgLimitCredit.create({ data: { actorId: '', amount: '', creditType: '', defaultLimitId: '', entityId: '', entityType: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCredit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCredit.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitDefault` + +CRUD operations for OrgLimitDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `softMax` | BigInt | Yes | + +**Operations:** + +```typescript +// List all orgLimitDefault records +const items = await db.orgLimitDefault.findMany({ select: { id: true, max: true, name: true, softMax: true } }).execute(); + +// Get one by id +const item = await db.orgLimitDefault.findOne({ id: '', select: { id: true, max: true, name: true, softMax: true } }).execute(); + +// Create +const created = await db.orgLimitDefault.create({ data: { max: '', name: '', softMax: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); ``` ### `db.orgLimitEvent` @@ -676,8 +1173,324 @@ const updated = await db.orgLimitWarning.update({ where: { id: '' }, data: const deleted = await db.orgLimitWarning.delete({ where: { id: '' } }).execute(); ``` +### `db.planCap` + +CRUD operations for PlanCap records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capName` | String | Yes | +| `capValue` | BigInt | Yes | +| `id` | UUID | No | +| `planId` | UUID | Yes | + +**Operations:** + +```typescript +// List all planCap records +const items = await db.planCap.findMany({ select: { capName: true, capValue: true, id: true, planId: true } }).execute(); + +// Get one by id +const item = await db.planCap.findOne({ id: '', select: { capName: true, capValue: true, id: true, planId: true } }).execute(); + +// Create +const created = await db.planCap.create({ data: { capName: '', capValue: '', planId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planCap.update({ where: { id: '' }, data: { capName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planCap.delete({ where: { id: '' } }).execute(); +``` + +### `db.plan` + +CRUD operations for Plan records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `description` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all plan records +const items = await db.plan.findMany({ select: { description: true, id: true, isActive: true, name: true } }).execute(); + +// Get one by id +const item = await db.plan.findOne({ id: '', select: { description: true, id: true, isActive: true, name: true } }).execute(); + +// Create +const created = await db.plan.create({ data: { description: '', isActive: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.plan.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.plan.delete({ where: { id: '' } }).execute(); +``` + +### `db.planLimit` + +CRUD operations for PlanLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `limitName` | String | Yes | +| `maxValue` | BigInt | Yes | +| `planId` | UUID | Yes | + +**Operations:** + +```typescript +// List all planLimit records +const items = await db.planLimit.findMany({ select: { id: true, limitName: true, maxValue: true, planId: true } }).execute(); + +// Get one by id +const item = await db.planLimit.findOne({ id: '', select: { id: true, limitName: true, maxValue: true, planId: true } }).execute(); + +// Create +const created = await db.planLimit.create({ data: { limitName: '', maxValue: '', planId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planLimit.update({ where: { id: '' }, data: { limitName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.planMeterLimit` + +CRUD operations for PlanMeterLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `meterSlug` | String | Yes | +| `planId` | UUID | Yes | +| `planLimit` | BigInt | Yes | + +**Operations:** + +```typescript +// List all planMeterLimit records +const items = await db.planMeterLimit.findMany({ select: { id: true, meterSlug: true, planId: true, planLimit: true } }).execute(); + +// Get one by id +const item = await db.planMeterLimit.findOne({ id: '', select: { id: true, meterSlug: true, planId: true, planLimit: true } }).execute(); + +// Create +const created = await db.planMeterLimit.create({ data: { meterSlug: '', planId: '', planLimit: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planMeterLimit.update({ where: { id: '' }, data: { meterSlug: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planMeterLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.planOverride` + +CRUD operations for PlanOverride records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `expiresAt` | Datetime | Yes | +| `id` | UUID | No | +| `limitName` | String | Yes | +| `maxValue` | BigInt | Yes | +| `reason` | String | Yes | + +**Operations:** + +```typescript +// List all planOverride records +const items = await db.planOverride.findMany({ select: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }).execute(); + +// Get one by id +const item = await db.planOverride.findOne({ id: '', select: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }).execute(); + +// Create +const created = await db.planOverride.create({ data: { entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planOverride.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planOverride.delete({ where: { id: '' } }).execute(); +``` + +### `db.planPricing` + +CRUD operations for PlanPricing records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `billingInterval` | String | Yes | +| `currency` | String | Yes | +| `discountPercent` | BigFloat | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `planId` | UUID | Yes | +| `price` | BigInt | Yes | + +**Operations:** + +```typescript +// List all planPricing records +const items = await db.planPricing.findMany({ select: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }).execute(); + +// Get one by id +const item = await db.planPricing.findOne({ id: '', select: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }).execute(); + +// Create +const created = await db.planPricing.create({ data: { billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planPricing.update({ where: { id: '' }, data: { billingInterval: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planPricing.delete({ where: { id: '' } }).execute(); +``` + +### `db.planSubscription` + +CRUD operations for PlanSubscription records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `endsAt` | Datetime | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `organizationId` | UUID | Yes | +| `planId` | UUID | Yes | +| `startsAt` | Datetime | Yes | + +**Operations:** + +```typescript +// List all planSubscription records +const items = await db.planSubscription.findMany({ select: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }).execute(); + +// Get one by id +const item = await db.planSubscription.findOne({ id: '', select: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }).execute(); + +// Create +const created = await db.planSubscription.create({ data: { endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planSubscription.update({ where: { id: '' }, data: { endsAt: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planSubscription.delete({ where: { id: '' } }).execute(); +``` + ## Custom Operations +### `db.query.captureAppLimitDefaults` + +captureAppLimitDefaults + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureAppLimitDefaults().execute(); +``` + +### `db.query.captureOrgLimitDefaults` + +captureOrgLimitDefaults + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureOrgLimitDefaults().execute(); +``` + +### `db.query.captureTrustLadder` + +captureTrustLadder + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureTrustLadder().execute(); +``` + +### `db.query.eventsAchieved` + +eventsAchieved + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `level` | String | + | `roleId` | UUID | + +```typescript +const result = await db.query.eventsAchieved({ level: '', roleId: '' }).execute(); +``` + +### `db.query.eventsRequired` + +Reads and enables pagination through a set of `AppLevelRequirement`. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `after` | Cursor | + | `first` | Int | + | `level` | String | + | `offset` | Int | + | `roleId` | UUID | + +```typescript +const result = await db.query.eventsRequired({ after: '', first: '', level: '', offset: '', roleId: '' }).execute(); +``` + +### `db.mutation.grantAchievement` + +grantAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | GrantAchievementInput (required) | + +```typescript +const result = await db.mutation.grantAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -696,6 +1509,36 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.recomputeCapabilities` + +recomputeCapabilities + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RecomputeCapabilitiesInput (required) | + +```typescript +const result = await db.mutation.recomputeCapabilities({ input: { actorId: '' } }).execute(); +``` + +### `db.mutation.revokeAchievement` + +revokeAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeAchievementInput (required) | + +```typescript +const result = await db.mutation.revokeAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` + ### `db.mutation.seedAppLimitCapsDefaults` seedAppLimitCapsDefaults @@ -726,6 +1569,21 @@ seedAppLimitDefaults const result = await db.mutation.seedAppLimitDefaults({ input: { defaults: '' } }).execute(); ``` +### `db.mutation.seedMeterDefaults` + +seedMeterDefaults + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedMeterDefaultsInput (required) | + +```typescript +const result = await db.mutation.seedMeterDefaults({ input: { defaults: '' } }).execute(); +``` + ### `db.mutation.seedOrgLimitCapsDefaults` seedOrgLimitCapsDefaults @@ -756,6 +1614,36 @@ seedOrgLimitDefaults const result = await db.mutation.seedOrgLimitDefaults({ input: { defaults: '' } }).execute(); ``` +### `db.mutation.seedPlan` + +seedPlan + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedPlanInput (required) | + +```typescript +const result = await db.mutation.seedPlan({ input: { planConfig: '', planName: '' } }).execute(); +``` + +### `db.mutation.seedTrustLadder` + +seedTrustLadder + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedTrustLadderInput (required) | + +```typescript +const result = await db.mutation.seedTrustLadder({ input: { ladder: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/usage/orm/index.ts b/sdk/constructive-react/src/usage/orm/index.ts index 7d48027d3b..39b71e8b29 100644 --- a/sdk/constructive-react/src/usage/orm/index.ts +++ b/sdk/constructive-react/src/usage/orm/index.ts @@ -5,6 +5,13 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { AppAchievementRewardModel } from './models/appAchievementReward'; +import { AppEventAggregateModel } from './models/appEventAggregate'; +import { AppEventModel } from './models/appEvent'; +import { AppEventTypeModel } from './models/appEventType'; +import { AppLevelModel } from './models/appLevel'; +import { AppLevelGrantModel } from './models/appLevelGrant'; +import { AppLevelRequirementModel } from './models/appLevelRequirement'; import { AppLimitCapModel } from './models/appLimitCap'; import { AppLimitCapsDefaultModel } from './models/appLimitCapsDefault'; import { AppLimitModel } from './models/appLimit'; @@ -15,6 +22,12 @@ import { AppLimitCreditRedemptionModel } from './models/appLimitCreditRedemption import { AppLimitDefaultModel } from './models/appLimitDefault'; import { AppLimitEventModel } from './models/appLimitEvent'; import { AppLimitWarningModel } from './models/appLimitWarning'; +import { BillingUsageSummaryModel } from './models/billingUsageSummary'; +import { LedgerModel } from './models/ledger'; +import { MeterModel } from './models/meter'; +import { MeterCreditModel } from './models/meterCredit'; +import { MeterDefaultModel } from './models/meterDefault'; +import { MeterSourceModel } from './models/meterSource'; import { OrgLimitAggregateModel } from './models/orgLimitAggregate'; import { OrgLimitCapModel } from './models/orgLimitCap'; import { OrgLimitCapsDefaultModel } from './models/orgLimitCapsDefault'; @@ -23,12 +36,21 @@ import { OrgLimitCreditModel } from './models/orgLimitCredit'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; import { OrgLimitEventModel } from './models/orgLimitEvent'; import { OrgLimitWarningModel } from './models/orgLimitWarning'; +import { PlanCapModel } from './models/planCap'; +import { PlanModel } from './models/plan'; +import { PlanLimitModel } from './models/planLimit'; +import { PlanMeterLimitModel } from './models/planMeterLimit'; +import { PlanOverrideModel } from './models/planOverride'; +import { PlanPricingModel } from './models/planPricing'; +import { PlanSubscriptionModel } from './models/planSubscription'; +import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; +export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -56,6 +78,13 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + appAchievementReward: new AppAchievementRewardModel(client), + appEventAggregate: new AppEventAggregateModel(client), + appEvent: new AppEventModel(client), + appEventType: new AppEventTypeModel(client), + appLevel: new AppLevelModel(client), + appLevelGrant: new AppLevelGrantModel(client), + appLevelRequirement: new AppLevelRequirementModel(client), appLimitCap: new AppLimitCapModel(client), appLimitCapsDefault: new AppLimitCapsDefaultModel(client), appLimit: new AppLimitModel(client), @@ -66,6 +95,12 @@ export function createClient(config: OrmClientConfig) { appLimitDefault: new AppLimitDefaultModel(client), appLimitEvent: new AppLimitEventModel(client), appLimitWarning: new AppLimitWarningModel(client), + billingUsageSummary: new BillingUsageSummaryModel(client), + ledger: new LedgerModel(client), + meter: new MeterModel(client), + meterCredit: new MeterCreditModel(client), + meterDefault: new MeterDefaultModel(client), + meterSource: new MeterSourceModel(client), orgLimitAggregate: new OrgLimitAggregateModel(client), orgLimitCap: new OrgLimitCapModel(client), orgLimitCapsDefault: new OrgLimitCapsDefaultModel(client), @@ -74,6 +109,14 @@ export function createClient(config: OrmClientConfig) { orgLimitDefault: new OrgLimitDefaultModel(client), orgLimitEvent: new OrgLimitEventModel(client), orgLimitWarning: new OrgLimitWarningModel(client), + planCap: new PlanCapModel(client), + plan: new PlanModel(client), + planLimit: new PlanLimitModel(client), + planMeterLimit: new PlanMeterLimitModel(client), + planOverride: new PlanOverrideModel(client), + planPricing: new PlanPricingModel(client), + planSubscription: new PlanSubscriptionModel(client), + query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-react/src/usage/orm/input-types.ts b/sdk/constructive-react/src/usage/orm/input-types.ts index f8df1c43d8..a9d363ba3a 100644 --- a/sdk/constructive-react/src/usage/orm/input-types.ts +++ b/sdk/constructive-react/src/usage/orm/input-types.ts @@ -230,8 +230,119 @@ export interface UUIDListFilter { anyGreaterThan?: string; anyGreaterThanOrEqualTo?: string; } -/** Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. */ +// ============ Custom Scalar Types ============ +export type ConstructiveInternalTypeImage = unknown; +/** Defines rewards granted when a level is achieved; supports limit_credits and meter_credits */ // ============ Entity Types ============ +export interface AppAchievementReward { + /** Number of credits to grant; unused by capability rewards */ + amount?: number | null; + createdAt?: string | null; + /** Credit type: permanent, expiring, etc. */ + creditType?: string | null; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: string | null; + id: string; + /** Name of the level this reward is granted for */ + levelName?: string | null; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType?: string | null; + /** Target limit name, meter slug, or capability catalog name */ + targetName?: string | null; + updatedAt?: string | null; +} +/** Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually */ +export interface AppEventAggregate { + actorId?: string | null; + /** Cumulative count of completed steps toward this requirement */ + count?: number | null; + createdAt?: string | null; + id: string; + /** Name identifier of the level requirement being tracked */ + name?: string | null; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string | null; + updatedAt?: string | null; +} +/** Partitioned append-only log of individual user actions; every single event ever recorded */ +export interface AppEvent { + actorId?: string | null; + /** Number of units completed in this step action */ + count?: number | null; + createdAt?: string | null; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id: string; + /** Name identifier of the level requirement this step fulfills */ + name?: string | null; +} +/** Catalog of known event types with per-type configuration for aggregation, retention, and level participation */ +export interface AppEventType { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string | null; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string | null; + createdAt?: string | null; + /** Human-readable description of this event type */ + description?: string | null; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean | null; + id: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean | null; + /** Unique name identifier for this event type */ + name?: string | null; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: string | null; + updatedAt?: string | null; +} +/** Defines available levels that users can achieve by completing requirements */ +export interface AppLevel { + createdAt?: string | null; + /** Human-readable description of what this level represents */ + description?: string | null; + id: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage | null; + /** Unique name of the level */ + name?: string | null; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string | null; + updatedAt?: string | null; +} +/** Records when a user achieves a level; prevents duplicate reward grants */ +export interface AppLevelGrant { + actorId?: string | null; + createdAt?: string | null; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string | null; + id: string; + /** Name of the level that was achieved */ + levelName?: string | null; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string | null; + updatedAt?: string | null; +} +/** Defines the specific requirements that must be met to achieve a level */ +export interface AppLevelRequirement { + createdAt?: string | null; + /** Human-readable description of what this requirement entails */ + description?: string | null; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string | null; + id: string; + /** Name of the level this requirement belongs to */ + level?: string | null; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string | null; + /** Name identifier of the requirement (matches step names) */ + name?: string | null; + /** Display ordering priority; lower values appear first */ + priority?: number | null; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number | null; + updatedAt?: string | null; +} +/** Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. */ export interface AppLimitCap { /** Entity this cap override applies to */ entityId?: string | null; @@ -266,7 +377,7 @@ export interface AppLimit { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -277,7 +388,7 @@ export interface AppLimit { /** Start of the current metering window; NULL means no time window */ windowStart?: string | null; } -/** Redeemable credit codes managed by admins with the add_credits permission */ +/** Redeemable credit codes managed by admins with the add_credits capability */ export interface AppLimitCreditCode { /** Human-readable credit code (case-insensitive, unique) */ code?: string | null; @@ -377,6 +488,134 @@ export interface AppLimitWarning { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string | null; } +/** Permanent monthly usage summary per entity per meter (user-facing billing dashboard) */ +export interface BillingUsageSummary { + /** Universal credits consumed during this period */ + creditsConsumed?: string | null; + /** The entity (org, team, user) this summary belongs to */ + entityId?: string | null; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string | null; + id: string; + /** Which meter this summary tracks */ + meterSlug?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string | null; + /** End of the billing period this summary covers */ + periodEnd?: string | null; + /** Start of the billing period this summary covers */ + periodStart?: string | null; + /** Plan limit that was in effect during this period */ + planLimit?: string | null; + /** Total units consumed during this period */ + quantityUsed?: string | null; +} +/** Append-only event log for all billing events (usage, grants, adjustments) */ +export interface Ledger { + createdAt?: string | null; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta?: string | null; + /** The entity this ledger entry belongs to */ + entityId?: string | null; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string | null; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string | null; + /** Unique identifier for each ledger entry */ + id: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string | null; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: Record | null; + /** Which meter this entry is for */ + meterSlug?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Running total of usage after this entry */ + usageAfter?: string | null; +} +/** Defines billable meters (what to track: quotas, feature flags, credit pools) */ +export interface Meter { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string | null; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string | null; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number | null; + /** Human-readable name for the meter */ + displayName?: string | null; + id: string; + /** Whether this meter is currently active */ + isActive?: boolean | null; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string | null; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: string | null; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string | null; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug?: string | null; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string | null; +} +/** Append-only ledger of credit grants for billing meters that automatically update balances */ +export interface MeterCredit { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount?: string | null; + /** When this credit was granted */ + createdAt?: string | null; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string | null; + /** Entity this credit applies to */ + entityId?: string | null; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string | null; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string | null; + id: string; + /** FK to meters — which meter definition this credit applies to */ + meterId?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string | null; +} +/** Default meter catalog: defines which meters are available and their default plan_limit values for new entities */ +export interface MeterDefault { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string | null; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string | null; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string | null; + /** Human-readable name for the default meter */ + displayName?: string | null; + id: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean | null; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string | null; + /** Meter slug that matches the slug in the meters table */ + slug?: string | null; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string | null; +} +/** Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. */ +export interface MeterSource { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string | null; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath?: string | null; + id: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean | null; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug?: string | null; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric?: string | null; +} /** Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) */ export interface OrgLimitAggregate { /** Entity (org) whose aggregate usage is being tracked */ @@ -394,7 +633,7 @@ export interface OrgLimitAggregate { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -443,7 +682,7 @@ export interface OrgLimit { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -526,6 +765,94 @@ export interface OrgLimitWarning { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string | null; } +/** Maps each plan to feature flag cap values (written to limit_caps when plan is applied) */ +export interface PlanCap { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName?: string | null; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string | null; + id: string; + /** Reference to the plan this cap setting belongs to */ + planId?: string | null; +} +/** Defines plan tiers with named limit configurations */ +export interface Plan { + /** Human-readable description of the plan tier */ + description?: string | null; + id: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean | null; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name?: string | null; +} +/** Maps each plan to specific limit names and their maximum allowed values */ +export interface PlanLimit { + id: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName?: string | null; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue?: string | null; + /** Reference to the plan this limit configuration belongs to */ + planId?: string | null; +} +/** Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) */ +export interface PlanMeterLimit { + id: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug?: string | null; + /** Reference to the plan this meter limit belongs to */ + planId?: string | null; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit?: string | null; +} +/** Per-entity limit overrides that take precedence over plan defaults */ +export interface PlanOverride { + /** Entity receiving the custom override (personal org or actual org) */ + entityId?: string | null; + /** When this override expires; NULL means permanent */ + expiresAt?: string | null; + id: string; + /** Name of the limit being overridden */ + limitName?: string | null; + /** Override maximum value; negative means unlimited */ + maxValue?: string | null; + /** Admin note explaining why this override was granted */ + reason?: string | null; +} +/** Billing intervals and pricing for each plan tier */ +export interface PlanPricing { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval?: string | null; + /** ISO 4217 currency code (lowercase) */ + currency?: string | null; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string | null; + id: string; + /** Whether this pricing option is currently available */ + isActive?: boolean | null; + /** Reference to the plan this pricing belongs to */ + planId?: string | null; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price?: string | null; +} +/** Assigns a plan to an entity with subscription lifecycle (start, end, active state) */ +export interface PlanSubscription { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string | null; + /** The entity (org, team, user) this subscription belongs to */ + entityId?: string | null; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string | null; + id: string; + /** Whether the subscription is currently active */ + isActive?: boolean | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Reference to the plan this subscription is for */ + planId?: string | null; + /** When the subscription becomes active */ + startsAt?: string | null; +} // ============ Relation Helper Types ============ export interface ConnectionResult { nodes: T[]; @@ -539,6 +866,13 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface AppAchievementRewardRelations {} +export interface AppEventAggregateRelations {} +export interface AppEventRelations {} +export interface AppEventTypeRelations {} +export interface AppLevelRelations {} +export interface AppLevelGrantRelations {} +export interface AppLevelRequirementRelations {} export interface AppLimitCapRelations {} export interface AppLimitCapsDefaultRelations {} export interface AppLimitRelations {} @@ -562,6 +896,16 @@ export interface AppLimitDefaultRelations { } export interface AppLimitEventRelations {} export interface AppLimitWarningRelations {} +export interface BillingUsageSummaryRelations {} +export interface LedgerRelations {} +export interface MeterRelations { + meterCredits?: ConnectionResult; +} +export interface MeterCreditRelations { + meter?: Meter | null; +} +export interface MeterDefaultRelations {} +export interface MeterSourceRelations {} export interface OrgLimitAggregateRelations {} export interface OrgLimitCapRelations {} export interface OrgLimitCapsDefaultRelations {} @@ -574,7 +918,38 @@ export interface OrgLimitDefaultRelations { } export interface OrgLimitEventRelations {} export interface OrgLimitWarningRelations {} +export interface PlanCapRelations { + plan?: Plan | null; +} +export interface PlanRelations { + planCaps?: ConnectionResult; + planLimits?: ConnectionResult; + planMeterLimits?: ConnectionResult; + planPricings?: ConnectionResult; + planSubscriptions?: ConnectionResult; +} +export interface PlanLimitRelations { + plan?: Plan | null; +} +export interface PlanMeterLimitRelations { + plan?: Plan | null; +} +export interface PlanOverrideRelations {} +export interface PlanPricingRelations { + plan?: Plan | null; +} +export interface PlanSubscriptionRelations { + plan?: Plan | null; +} // ============ Entity Types With Relations ============ +export type AppAchievementRewardWithRelations = AppAchievementReward & + AppAchievementRewardRelations; +export type AppEventAggregateWithRelations = AppEventAggregate & AppEventAggregateRelations; +export type AppEventWithRelations = AppEvent & AppEventRelations; +export type AppEventTypeWithRelations = AppEventType & AppEventTypeRelations; +export type AppLevelWithRelations = AppLevel & AppLevelRelations; +export type AppLevelGrantWithRelations = AppLevelGrant & AppLevelGrantRelations; +export type AppLevelRequirementWithRelations = AppLevelRequirement & AppLevelRequirementRelations; export type AppLimitCapWithRelations = AppLimitCap & AppLimitCapRelations; export type AppLimitCapsDefaultWithRelations = AppLimitCapsDefault & AppLimitCapsDefaultRelations; export type AppLimitWithRelations = AppLimit & AppLimitRelations; @@ -587,6 +962,12 @@ export type AppLimitCreditRedemptionWithRelations = AppLimitCreditRedemption & export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRelations; export type AppLimitEventWithRelations = AppLimitEvent & AppLimitEventRelations; export type AppLimitWarningWithRelations = AppLimitWarning & AppLimitWarningRelations; +export type BillingUsageSummaryWithRelations = BillingUsageSummary & BillingUsageSummaryRelations; +export type LedgerWithRelations = Ledger & LedgerRelations; +export type MeterWithRelations = Meter & MeterRelations; +export type MeterCreditWithRelations = MeterCredit & MeterCreditRelations; +export type MeterDefaultWithRelations = MeterDefault & MeterDefaultRelations; +export type MeterSourceWithRelations = MeterSource & MeterSourceRelations; export type OrgLimitAggregateWithRelations = OrgLimitAggregate & OrgLimitAggregateRelations; export type OrgLimitCapWithRelations = OrgLimitCap & OrgLimitCapRelations; export type OrgLimitCapsDefaultWithRelations = OrgLimitCapsDefault & OrgLimitCapsDefaultRelations; @@ -595,7 +976,83 @@ export type OrgLimitCreditWithRelations = OrgLimitCredit & OrgLimitCreditRelatio export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; export type OrgLimitEventWithRelations = OrgLimitEvent & OrgLimitEventRelations; export type OrgLimitWarningWithRelations = OrgLimitWarning & OrgLimitWarningRelations; +export type PlanCapWithRelations = PlanCap & PlanCapRelations; +export type PlanWithRelations = Plan & PlanRelations; +export type PlanLimitWithRelations = PlanLimit & PlanLimitRelations; +export type PlanMeterLimitWithRelations = PlanMeterLimit & PlanMeterLimitRelations; +export type PlanOverrideWithRelations = PlanOverride & PlanOverrideRelations; +export type PlanPricingWithRelations = PlanPricing & PlanPricingRelations; +export type PlanSubscriptionWithRelations = PlanSubscription & PlanSubscriptionRelations; // ============ Entity Select Types ============ +export type AppAchievementRewardSelect = { + amount?: boolean; + createdAt?: boolean; + creditType?: boolean; + expiresInterval?: boolean; + id?: boolean; + levelName?: boolean; + rewardType?: boolean; + targetName?: boolean; + updatedAt?: boolean; +}; +export type AppEventAggregateSelect = { + actorId?: boolean; + count?: boolean; + createdAt?: boolean; + id?: boolean; + name?: boolean; + periodStart?: boolean; + updatedAt?: boolean; +}; +export type AppEventSelect = { + actorId?: boolean; + count?: boolean; + createdAt?: boolean; + id?: boolean; + name?: boolean; +}; +export type AppEventTypeSelect = { + aggregation?: boolean; + category?: boolean; + createdAt?: boolean; + description?: boolean; + feedsLevels?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + periodInterval?: boolean; + updatedAt?: boolean; +}; +export type AppLevelSelect = { + createdAt?: boolean; + description?: boolean; + id?: boolean; + image?: boolean; + name?: boolean; + ownerId?: boolean; + updatedAt?: boolean; +}; +export type AppLevelGrantSelect = { + actorId?: boolean; + createdAt?: boolean; + expiresAt?: boolean; + id?: boolean; + levelName?: boolean; + periodStart?: boolean; + updatedAt?: boolean; +}; +export type AppLevelRequirementSelect = { + createdAt?: boolean; + description?: boolean; + groupKey?: boolean; + id?: boolean; + level?: boolean; + metric?: boolean; + name?: boolean; + priority?: boolean; + requiredCount?: boolean; + updatedAt?: boolean; +}; export type AppLimitCapSelect = { entityId?: boolean; id?: boolean; @@ -715,6 +1172,85 @@ export type AppLimitWarningSelect = { thresholdValue?: boolean; warningType?: boolean; }; +export type BillingUsageSummarySelect = { + creditsConsumed?: boolean; + entityId?: boolean; + entityType?: boolean; + id?: boolean; + meterSlug?: boolean; + organizationId?: boolean; + overageUnits?: boolean; + periodEnd?: boolean; + periodStart?: boolean; + planLimit?: boolean; + quantityUsed?: boolean; +}; +export type LedgerSelect = { + createdAt?: boolean; + delta?: boolean; + entityId?: boolean; + entityType?: boolean; + entryType?: boolean; + id?: boolean; + ledgerClass?: boolean; + metadata?: boolean; + meterSlug?: boolean; + organizationId?: boolean; + usageAfter?: boolean; +}; +export type MeterSelect = { + aggregation?: boolean; + categoryMeter?: boolean; + creditCost?: boolean; + displayName?: boolean; + id?: boolean; + isActive?: boolean; + meterType?: boolean; + periodInterval?: boolean; + rolloverCap?: boolean; + slug?: boolean; + unit?: boolean; + meterCredits?: { + select: MeterCreditSelect; + first?: number; + filter?: MeterCreditFilter; + orderBy?: MeterCreditOrderBy[]; + }; +}; +export type MeterCreditSelect = { + amount?: boolean; + createdAt?: boolean; + creditType?: boolean; + entityId?: boolean; + entityType?: boolean; + expiresAt?: boolean; + id?: boolean; + meterId?: boolean; + organizationId?: boolean; + reason?: boolean; + meter?: { + select: MeterSelect; + }; +}; +export type MeterDefaultSelect = { + categoryMeter?: boolean; + creditCost?: boolean; + defaultPlanLimit?: boolean; + displayName?: boolean; + id?: boolean; + isActive?: boolean; + meterType?: boolean; + slug?: boolean; + unit?: boolean; +}; +export type MeterSourceSelect = { + aggregationType?: boolean; + dimensionPath?: boolean; + id?: boolean; + isActive?: boolean; + meterSlug?: boolean; + sourceMetric?: boolean; +}; export type OrgLimitAggregateSelect = { entityId?: boolean; entityType?: boolean; @@ -807,78 +1343,340 @@ export type OrgLimitWarningSelect = { thresholdValue?: boolean; warningType?: boolean; }; +export type PlanCapSelect = { + capName?: boolean; + capValue?: boolean; + id?: boolean; + planId?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanSelect = { + description?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + planCaps?: { + select: PlanCapSelect; + first?: number; + filter?: PlanCapFilter; + orderBy?: PlanCapOrderBy[]; + }; + planLimits?: { + select: PlanLimitSelect; + first?: number; + filter?: PlanLimitFilter; + orderBy?: PlanLimitOrderBy[]; + }; + planMeterLimits?: { + select: PlanMeterLimitSelect; + first?: number; + filter?: PlanMeterLimitFilter; + orderBy?: PlanMeterLimitOrderBy[]; + }; + planPricings?: { + select: PlanPricingSelect; + first?: number; + filter?: PlanPricingFilter; + orderBy?: PlanPricingOrderBy[]; + }; + planSubscriptions?: { + select: PlanSubscriptionSelect; + first?: number; + filter?: PlanSubscriptionFilter; + orderBy?: PlanSubscriptionOrderBy[]; + }; +}; +export type PlanLimitSelect = { + id?: boolean; + limitName?: boolean; + maxValue?: boolean; + planId?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanMeterLimitSelect = { + id?: boolean; + meterSlug?: boolean; + planId?: boolean; + planLimit?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanOverrideSelect = { + entityId?: boolean; + expiresAt?: boolean; + id?: boolean; + limitName?: boolean; + maxValue?: boolean; + reason?: boolean; +}; +export type PlanPricingSelect = { + billingInterval?: boolean; + currency?: boolean; + discountPercent?: boolean; + id?: boolean; + isActive?: boolean; + planId?: boolean; + price?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanSubscriptionSelect = { + endsAt?: boolean; + entityId?: boolean; + entityType?: boolean; + id?: boolean; + isActive?: boolean; + organizationId?: boolean; + planId?: boolean; + startsAt?: boolean; + plan?: { + select: PlanSelect; + }; +}; // ============ Table Filter Types ============ -export interface AppLimitCapFilter { +export interface AppAchievementRewardFilter { + /** Filter by the object’s `amount` field. */ + amount?: IntFilter; /** Checks for all expressions in this list. */ - and?: AppLimitCapFilter[]; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + and?: AppAchievementRewardFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `expiresInterval` field. */ + expiresInterval?: IntervalFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppAchievementRewardFilter; + /** Checks for any expressions in this list. */ + or?: AppAchievementRewardFilter[]; + /** Filter by the object’s `rewardType` field. */ + rewardType?: StringFilter; + /** Filter by the object’s `targetName` field. */ + targetName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppEventAggregateFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppEventAggregateFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitCapFilter; + not?: AppEventAggregateFilter; /** Checks for any expressions in this list. */ - or?: AppLimitCapFilter[]; + or?: AppEventAggregateFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppLimitCapsDefaultFilter { +export interface AppEventFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: AppLimitCapsDefaultFilter[]; + and?: AppEventFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitCapsDefaultFilter; + not?: AppEventFilter; /** Checks for any expressions in this list. */ - or?: AppLimitCapsDefaultFilter[]; + or?: AppEventFilter[]; } -export interface AppLimitFilter { - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; +export interface AppEventTypeFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; /** Checks for all expressions in this list. */ - and?: AppLimitFilter[]; - /** Filter by the object’s `entityType` field. */ - entityType?: StringFilter; + and?: AppEventTypeFilter[]; + /** Filter by the object’s `category` field. */ + category?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `feedsLevels` field. */ + feedsLevels?: BooleanFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitFilter; - /** Filter by the object’s `num` field. */ - num?: BigIntFilter; + not?: AppEventTypeFilter; /** Checks for any expressions in this list. */ - or?: AppLimitFilter[]; - /** Filter by the object’s `organizationId` field. */ - organizationId?: UUIDFilter; - /** Filter by the object’s `periodCredits` field. */ - periodCredits?: BigIntFilter; - /** Filter by the object’s `planMax` field. */ - planMax?: BigIntFilter; - /** Filter by the object’s `purchasedCredits` field. */ - purchasedCredits?: BigIntFilter; - /** Filter by the object’s `softMax` field. */ - softMax?: BigIntFilter; - /** Filter by the object’s `windowDuration` field. */ - windowDuration?: IntervalFilter; - /** Filter by the object’s `windowStart` field. */ - windowStart?: DatetimeFilter; + or?: AppEventTypeFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppLimitCreditCodeFilter { +export interface AppLevelFilter { /** Checks for all expressions in this list. */ - and?: AppLimitCreditCodeFilter[]; - /** Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. */ - appLimitCreditCodeItemsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter; - /** `appLimitCreditCodeItemsByCreditCodeId` exist. */ - appLimitCreditCodeItemsByCreditCodeIdExist?: boolean; + and?: AppLevelFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `image` field. */ + image?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelFilter[]; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLevelGrantFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppLevelGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppLevelGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelGrantFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLevelRequirementFilter { + /** Checks for all expressions in this list. */ + and?: AppLevelRequirementFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `groupKey` field. */ + groupKey?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `level` field. */ + level?: StringFilter; + /** Filter by the object’s `metric` field. */ + metric?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelRequirementFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelRequirementFilter[]; + /** Filter by the object’s `priority` field. */ + priority?: IntFilter; + /** Filter by the object’s `requiredCount` field. */ + requiredCount?: IntFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLimitCapFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCapFilter[]; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitCapFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitCapFilter[]; +} +export interface AppLimitCapsDefaultFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCapsDefaultFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitCapsDefaultFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitCapsDefaultFilter[]; +} +export interface AppLimitFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppLimitFilter[]; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitFilter; + /** Filter by the object’s `num` field. */ + num?: BigIntFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `periodCredits` field. */ + periodCredits?: BigIntFilter; + /** Filter by the object’s `planMax` field. */ + planMax?: BigIntFilter; + /** Filter by the object’s `purchasedCredits` field. */ + purchasedCredits?: BigIntFilter; + /** Filter by the object’s `softMax` field. */ + softMax?: BigIntFilter; + /** Filter by the object’s `windowDuration` field. */ + windowDuration?: IntervalFilter; + /** Filter by the object’s `windowStart` field. */ + windowStart?: DatetimeFilter; +} +export interface AppLimitCreditCodeFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCreditCodeFilter[]; + /** Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. */ + appLimitCreditCodeItemsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter; + /** `appLimitCreditCodeItemsByCreditCodeId` exist. */ + appLimitCreditCodeItemsByCreditCodeIdExist?: boolean; /** Filter by the object’s `appLimitCreditRedemptionsByCreditCodeId` relation. */ appLimitCreditRedemptionsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter; /** `appLimitCreditRedemptionsByCreditCodeId` exist. */ @@ -1038,6 +1836,176 @@ export interface AppLimitWarningFilter { /** Filter by the object’s `warningType` field. */ warningType?: StringFilter; } +export interface BillingUsageSummaryFilter { + /** Checks for all expressions in this list. */ + and?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `creditsConsumed` field. */ + creditsConsumed?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: BillingUsageSummaryFilter; + /** Checks for any expressions in this list. */ + or?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `overageUnits` field. */ + overageUnits?: BigIntFilter; + /** Filter by the object’s `periodEnd` field. */ + periodEnd?: DatetimeFilter; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; + /** Filter by the object’s `quantityUsed` field. */ + quantityUsed?: BigIntFilter; +} +export interface LedgerFilter { + /** Checks for all expressions in this list. */ + and?: LedgerFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `delta` field. */ + delta?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `entryType` field. */ + entryType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ledgerClass` field. */ + ledgerClass?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: LedgerFilter; + /** Checks for any expressions in this list. */ + or?: LedgerFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `usageAfter` field. */ + usageAfter?: BigIntFilter; +} +export interface MeterFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: IntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterCredits` relation. */ + meterCredits?: MeterToManyMeterCreditFilter; + /** `meterCredits` exist. */ + meterCreditsExist?: boolean; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterFilter; + /** Checks for any expressions in this list. */ + or?: MeterFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `rolloverCap` field. */ + rolloverCap?: BigIntFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +export interface MeterCreditFilter { + /** Filter by the object’s `amount` field. */ + amount?: BigIntFilter; + /** Checks for all expressions in this list. */ + and?: MeterCreditFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meter` relation. */ + meter?: MeterFilter; + /** Filter by the object’s `meterId` field. */ + meterId?: UUIDFilter; + /** Negates the expression. */ + not?: MeterCreditFilter; + /** Checks for any expressions in this list. */ + or?: MeterCreditFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +export interface MeterDefaultFilter { + /** Checks for all expressions in this list. */ + and?: MeterDefaultFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: BigFloatFilter; + /** Filter by the object’s `defaultPlanLimit` field. */ + defaultPlanLimit?: BigIntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterDefaultFilter; + /** Checks for any expressions in this list. */ + or?: MeterDefaultFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +export interface MeterSourceFilter { + /** Filter by the object’s `aggregationType` field. */ + aggregationType?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterSourceFilter[]; + /** Filter by the object’s `dimensionPath` field. */ + dimensionPath?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: MeterSourceFilter; + /** Checks for any expressions in this list. */ + or?: MeterSourceFilter[]; + /** Filter by the object’s `sourceMetric` field. */ + sourceMetric?: StringFilter; +} export interface OrgLimitAggregateFilter { /** Checks for all expressions in this list. */ and?: OrgLimitAggregateFilter[]; @@ -1242,7 +2210,305 @@ export interface OrgLimitWarningFilter { /** Filter by the object’s `warningType` field. */ warningType?: StringFilter; } +export interface PlanCapFilter { + /** Checks for all expressions in this list. */ + and?: PlanCapFilter[]; + /** Filter by the object’s `capName` field. */ + capName?: StringFilter; + /** Filter by the object’s `capValue` field. */ + capValue?: BigIntFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlanCapFilter; + /** Checks for any expressions in this list. */ + or?: PlanCapFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +export interface PlanFilter { + /** Checks for all expressions in this list. */ + and?: PlanFilter[]; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlanFilter; + /** Checks for any expressions in this list. */ + or?: PlanFilter[]; + /** Filter by the object’s `planCaps` relation. */ + planCaps?: PlanToManyPlanCapFilter; + /** `planCaps` exist. */ + planCapsExist?: boolean; + /** Filter by the object’s `planLimits` relation. */ + planLimits?: PlanToManyPlanLimitFilter; + /** `planLimits` exist. */ + planLimitsExist?: boolean; + /** Filter by the object’s `planMeterLimits` relation. */ + planMeterLimits?: PlanToManyPlanMeterLimitFilter; + /** `planMeterLimits` exist. */ + planMeterLimitsExist?: boolean; + /** Filter by the object’s `planPricings` relation. */ + planPricings?: PlanToManyPlanPricingFilter; + /** `planPricings` exist. */ + planPricingsExist?: boolean; + /** Filter by the object’s `planSubscriptions` relation. */ + planSubscriptions?: PlanToManyPlanSubscriptionFilter; + /** `planSubscriptions` exist. */ + planSubscriptionsExist?: boolean; +} +export interface PlanLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +export interface PlanMeterLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanMeterLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: PlanMeterLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanMeterLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; +} +export interface PlanOverrideFilter { + /** Checks for all expressions in this list. */ + and?: PlanOverrideFilter[]; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanOverrideFilter; + /** Checks for any expressions in this list. */ + or?: PlanOverrideFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +export interface PlanPricingFilter { + /** Checks for all expressions in this list. */ + and?: PlanPricingFilter[]; + /** Filter by the object’s `billingInterval` field. */ + billingInterval?: StringFilter; + /** Filter by the object’s `currency` field. */ + currency?: StringFilter; + /** Filter by the object’s `discountPercent` field. */ + discountPercent?: BigFloatFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanPricingFilter; + /** Checks for any expressions in this list. */ + or?: PlanPricingFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `price` field. */ + price?: BigIntFilter; +} +export interface PlanSubscriptionFilter { + /** Checks for all expressions in this list. */ + and?: PlanSubscriptionFilter[]; + /** Filter by the object’s `endsAt` field. */ + endsAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanSubscriptionFilter; + /** Checks for any expressions in this list. */ + or?: PlanSubscriptionFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `startsAt` field. */ + startsAt?: DatetimeFilter; +} // ============ OrderBy Types ============ +export type AppAchievementRewardOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'EXPIRES_INTERVAL_ASC' + | 'EXPIRES_INTERVAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REWARD_TYPE_ASC' + | 'REWARD_TYPE_DESC' + | 'TARGET_NAME_ASC' + | 'TARGET_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppEventAggregateOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppEventOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppEventTypeOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'FEEDS_LEVELS_ASC' + | 'FEEDS_LEVELS_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IMAGE_ASC' + | 'IMAGE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelGrantOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelRequirementOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'GROUP_KEY_ASC' + | 'GROUP_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_ASC' + | 'LEVEL_DESC' + | 'METRIC_ASC' + | 'METRIC_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIORITY_ASC' + | 'PRIORITY_DESC' + | 'REQUIRED_COUNT_ASC' + | 'REQUIRED_COUNT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppLimitCapOrderBy = | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' @@ -1409,6 +2675,146 @@ export type AppLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +export type BillingUsageSummaryOrderBy = + | 'CREDITS_CONSUMED_ASC' + | 'CREDITS_CONSUMED_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'OVERAGE_UNITS_ASC' + | 'OVERAGE_UNITS_DESC' + | 'PERIOD_END_ASC' + | 'PERIOD_END_DESC' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'QUANTITY_USED_ASC' + | 'QUANTITY_USED_DESC'; +export type LedgerOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DELTA_ASC' + | 'DELTA_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ENTRY_TYPE_ASC' + | 'ENTRY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEDGER_CLASS_ASC' + | 'LEDGER_CLASS_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'USAGE_AFTER_ASC' + | 'USAGE_AFTER_DESC'; +export type MeterOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLLOVER_CAP_ASC' + | 'ROLLOVER_CAP_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +export type MeterCreditOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_ID_ASC' + | 'METER_ID_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +export type MeterDefaultOrderBy = + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DEFAULT_PLAN_LIMIT_ASC' + | 'DEFAULT_PLAN_LIMIT_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +export type MeterSourceOrderBy = + | 'AGGREGATION_TYPE_ASC' + | 'AGGREGATION_TYPE_DESC' + | 'DIMENSION_PATH_ASC' + | 'DIMENSION_PATH_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SOURCE_METRIC_ASC' + | 'SOURCE_METRIC_DESC'; export type OrgLimitAggregateOrderBy = | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' @@ -1575,7 +2981,292 @@ export type OrgLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +export type PlanCapOrderBy = + | 'CAP_NAME_ASC' + | 'CAP_NAME_DESC' + | 'CAP_VALUE_ASC' + | 'CAP_VALUE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanOrderBy = + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanMeterLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanOverrideOrderBy = + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +export type PlanPricingOrderBy = + | 'BILLING_INTERVAL_ASC' + | 'BILLING_INTERVAL_DESC' + | 'CURRENCY_ASC' + | 'CURRENCY_DESC' + | 'DISCOUNT_PERCENT_ASC' + | 'DISCOUNT_PERCENT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRICE_ASC' + | 'PRICE_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanSubscriptionOrderBy = + | 'ENDS_AT_ASC' + | 'ENDS_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STARTS_AT_ASC' + | 'STARTS_AT_DESC'; // ============ CRUD Input Types ============ +export interface CreateAppAchievementRewardInput { + clientMutationId?: string; + appAchievementReward: { + amount?: number; + creditType?: string; + expiresInterval?: IntervalInput; + levelName: string; + rewardType: string; + targetName: string; + }; +} +export interface AppAchievementRewardPatch { + amount?: number | null; + creditType?: string | null; + expiresInterval?: IntervalInput | null; + levelName?: string | null; + rewardType?: string | null; + targetName?: string | null; +} +export interface UpdateAppAchievementRewardInput { + clientMutationId?: string; + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; +} +export interface DeleteAppAchievementRewardInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventAggregateInput { + clientMutationId?: string; + appEventAggregate: { + actorId?: string; + count?: number; + name: string; + periodStart?: string; + }; +} +export interface AppEventAggregatePatch { + actorId?: string | null; + count?: number | null; + name?: string | null; + periodStart?: string | null; +} +export interface UpdateAppEventAggregateInput { + clientMutationId?: string; + id: string; + appEventAggregatePatch: AppEventAggregatePatch; +} +export interface DeleteAppEventAggregateInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventInput { + clientMutationId?: string; + appEvent: { + actorId?: string; + count?: number; + name: string; + }; +} +export interface AppEventPatch { + actorId?: string | null; + count?: number | null; + name?: string | null; +} +export interface UpdateAppEventInput { + clientMutationId?: string; + id: string; + appEventPatch: AppEventPatch; +} +export interface DeleteAppEventInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventTypeInput { + clientMutationId?: string; + appEventType: { + aggregation?: string; + category?: string; + description?: string; + feedsLevels?: boolean; + isActive?: boolean; + name: string; + periodInterval?: IntervalInput; + }; +} +export interface AppEventTypePatch { + aggregation?: string | null; + category?: string | null; + description?: string | null; + feedsLevels?: boolean | null; + isActive?: boolean | null; + name?: string | null; + periodInterval?: IntervalInput | null; +} +export interface UpdateAppEventTypeInput { + clientMutationId?: string; + id: string; + appEventTypePatch: AppEventTypePatch; +} +export interface DeleteAppEventTypeInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelInput { + clientMutationId?: string; + appLevel: { + description?: string; + image?: ConstructiveInternalTypeImage; + name: string; + ownerId?: string; + }; +} +export interface AppLevelPatch { + description?: string | null; + image?: ConstructiveInternalTypeImage | null; + imageUpload?: File | null; + name?: string | null; + ownerId?: string | null; +} +export interface UpdateAppLevelInput { + clientMutationId?: string; + id: string; + appLevelPatch: AppLevelPatch; +} +export interface DeleteAppLevelInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelGrantInput { + clientMutationId?: string; + appLevelGrant: { + actorId?: string; + expiresAt?: string; + levelName: string; + periodStart?: string; + }; +} +export interface AppLevelGrantPatch { + actorId?: string | null; + expiresAt?: string | null; + levelName?: string | null; + periodStart?: string | null; +} +export interface UpdateAppLevelGrantInput { + clientMutationId?: string; + id: string; + appLevelGrantPatch: AppLevelGrantPatch; +} +export interface DeleteAppLevelGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelRequirementInput { + clientMutationId?: string; + appLevelRequirement: { + description?: string; + groupKey?: string; + level: string; + metric?: string; + name: string; + priority?: number; + requiredCount?: number; + }; +} +export interface AppLevelRequirementPatch { + description?: string | null; + groupKey?: string | null; + level?: string | null; + metric?: string | null; + name?: string | null; + priority?: number | null; + requiredCount?: number | null; +} +export interface UpdateAppLevelRequirementInput { + clientMutationId?: string; + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; +} +export interface DeleteAppLevelRequirementInput { + clientMutationId?: string; + id: string; +} export interface CreateAppLimitCapInput { clientMutationId?: string; appLimitCap: { @@ -1840,6 +3531,202 @@ export interface DeleteAppLimitWarningInput { clientMutationId?: string; id: string; } +export interface CreateBillingUsageSummaryInput { + clientMutationId?: string; + billingUsageSummary: { + creditsConsumed?: string; + entityId: string; + entityType?: string; + meterSlug: string; + organizationId?: string; + overageUnits?: string; + periodEnd: string; + periodStart: string; + planLimit?: string; + quantityUsed?: string; + }; +} +export interface BillingUsageSummaryPatch { + creditsConsumed?: string | null; + entityId?: string | null; + entityType?: string | null; + meterSlug?: string | null; + organizationId?: string | null; + overageUnits?: string | null; + periodEnd?: string | null; + periodStart?: string | null; + planLimit?: string | null; + quantityUsed?: string | null; +} +export interface UpdateBillingUsageSummaryInput { + clientMutationId?: string; + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; +} +export interface DeleteBillingUsageSummaryInput { + clientMutationId?: string; + id: string; +} +export interface CreateLedgerInput { + clientMutationId?: string; + ledger: { + delta: string; + entityId: string; + entityType?: string; + entryType?: string; + ledgerClass?: string; + metadata?: Record; + meterSlug: string; + organizationId?: string; + usageAfter: string; + }; +} +export interface LedgerPatch { + delta?: string | null; + entityId?: string | null; + entityType?: string | null; + entryType?: string | null; + ledgerClass?: string | null; + metadata?: Record | null; + meterSlug?: string | null; + organizationId?: string | null; + usageAfter?: string | null; +} +export interface UpdateLedgerInput { + clientMutationId?: string; + id: string; + ledgerPatch: LedgerPatch; +} +export interface DeleteLedgerInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterInput { + clientMutationId?: string; + meter: { + aggregation?: string; + categoryMeter?: string; + creditCost?: number; + displayName?: string; + isActive?: boolean; + meterType?: string; + periodInterval?: IntervalInput; + rolloverCap?: string; + slug: string; + unit?: string; + }; +} +export interface MeterPatch { + aggregation?: string | null; + categoryMeter?: string | null; + creditCost?: number | null; + displayName?: string | null; + isActive?: boolean | null; + meterType?: string | null; + periodInterval?: IntervalInput | null; + rolloverCap?: string | null; + slug?: string | null; + unit?: string | null; +} +export interface UpdateMeterInput { + clientMutationId?: string; + id: string; + meterPatch: MeterPatch; +} +export interface DeleteMeterInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterCreditInput { + clientMutationId?: string; + meterCredit: { + amount: string; + creditType?: string; + entityId: string; + entityType?: string; + expiresAt?: string; + meterId: string; + organizationId?: string; + reason?: string; + }; +} +export interface MeterCreditPatch { + amount?: string | null; + creditType?: string | null; + entityId?: string | null; + entityType?: string | null; + expiresAt?: string | null; + meterId?: string | null; + organizationId?: string | null; + reason?: string | null; +} +export interface UpdateMeterCreditInput { + clientMutationId?: string; + id: string; + meterCreditPatch: MeterCreditPatch; +} +export interface DeleteMeterCreditInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterDefaultInput { + clientMutationId?: string; + meterDefault: { + categoryMeter?: string; + creditCost?: string; + defaultPlanLimit?: string; + displayName?: string; + isActive?: boolean; + meterType?: string; + slug: string; + unit?: string; + }; +} +export interface MeterDefaultPatch { + categoryMeter?: string | null; + creditCost?: string | null; + defaultPlanLimit?: string | null; + displayName?: string | null; + isActive?: boolean | null; + meterType?: string | null; + slug?: string | null; + unit?: string | null; +} +export interface UpdateMeterDefaultInput { + clientMutationId?: string; + id: string; + meterDefaultPatch: MeterDefaultPatch; +} +export interface DeleteMeterDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterSourceInput { + clientMutationId?: string; + meterSource: { + aggregationType?: string; + dimensionPath: string; + isActive?: boolean; + meterSlug: string; + sourceMetric: string; + }; +} +export interface MeterSourcePatch { + aggregationType?: string | null; + dimensionPath?: string | null; + isActive?: boolean | null; + meterSlug?: string | null; + sourceMetric?: string | null; +} +export interface UpdateMeterSourceInput { + clientMutationId?: string; + id: string; + meterSourcePatch: MeterSourcePatch; +} +export interface DeleteMeterSourceInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgLimitAggregateInput { clientMutationId?: string; orgLimitAggregate: { @@ -2084,6 +3971,178 @@ export interface DeleteOrgLimitWarningInput { clientMutationId?: string; id: string; } +export interface CreatePlanCapInput { + clientMutationId?: string; + planCap: { + capName: string; + capValue?: string; + planId: string; + }; +} +export interface PlanCapPatch { + capName?: string | null; + capValue?: string | null; + planId?: string | null; +} +export interface UpdatePlanCapInput { + clientMutationId?: string; + id: string; + planCapPatch: PlanCapPatch; +} +export interface DeletePlanCapInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanInput { + clientMutationId?: string; + plan: { + description?: string; + isActive?: boolean; + name: string; + }; +} +export interface PlanPatch { + description?: string | null; + isActive?: boolean | null; + name?: string | null; +} +export interface UpdatePlanInput { + clientMutationId?: string; + id: string; + planPatch: PlanPatch; +} +export interface DeletePlanInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanLimitInput { + clientMutationId?: string; + planLimit: { + limitName: string; + maxValue: string; + planId: string; + }; +} +export interface PlanLimitPatch { + limitName?: string | null; + maxValue?: string | null; + planId?: string | null; +} +export interface UpdatePlanLimitInput { + clientMutationId?: string; + id: string; + planLimitPatch: PlanLimitPatch; +} +export interface DeletePlanLimitInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanMeterLimitInput { + clientMutationId?: string; + planMeterLimit: { + meterSlug: string; + planId: string; + planLimit: string; + }; +} +export interface PlanMeterLimitPatch { + meterSlug?: string | null; + planId?: string | null; + planLimit?: string | null; +} +export interface UpdatePlanMeterLimitInput { + clientMutationId?: string; + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; +} +export interface DeletePlanMeterLimitInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanOverrideInput { + clientMutationId?: string; + planOverride: { + entityId: string; + expiresAt?: string; + limitName: string; + maxValue: string; + reason?: string; + }; +} +export interface PlanOverridePatch { + entityId?: string | null; + expiresAt?: string | null; + limitName?: string | null; + maxValue?: string | null; + reason?: string | null; +} +export interface UpdatePlanOverrideInput { + clientMutationId?: string; + id: string; + planOverridePatch: PlanOverridePatch; +} +export interface DeletePlanOverrideInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanPricingInput { + clientMutationId?: string; + planPricing: { + billingInterval: string; + currency?: string; + discountPercent?: string; + isActive?: boolean; + planId: string; + price: string; + }; +} +export interface PlanPricingPatch { + billingInterval?: string | null; + currency?: string | null; + discountPercent?: string | null; + isActive?: boolean | null; + planId?: string | null; + price?: string | null; +} +export interface UpdatePlanPricingInput { + clientMutationId?: string; + id: string; + planPricingPatch: PlanPricingPatch; +} +export interface DeletePlanPricingInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanSubscriptionInput { + clientMutationId?: string; + planSubscription: { + endsAt?: string; + entityId: string; + entityType?: string; + isActive?: boolean; + organizationId?: string; + planId: string; + startsAt?: string; + }; +} +export interface PlanSubscriptionPatch { + endsAt?: string | null; + entityId?: string | null; + entityType?: string | null; + isActive?: boolean | null; + organizationId?: string | null; + planId?: string | null; + startsAt?: string | null; +} +export interface UpdatePlanSubscriptionInput { + clientMutationId?: string; + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; +} +export interface DeletePlanSubscriptionInput { + clientMutationId?: string; + id: string; +} // ============ Connection Fields Map ============ export const connectionFieldsMap = { AppLimitCreditCode: { @@ -2094,11 +4153,26 @@ export const connectionFieldsMap = { appLimitCreditCodeItemsByDefaultLimitId: 'AppLimitCreditCodeItem', appLimitCreditsByDefaultLimitId: 'AppLimitCredit', }, + Meter: { + meterCredits: 'MeterCredit', + }, OrgLimitDefault: { orgLimitCreditsByDefaultLimitId: 'OrgLimitCredit', }, + Plan: { + planCaps: 'PlanCap', + planLimits: 'PlanLimit', + planMeterLimits: 'PlanMeterLimit', + planPricings: 'PlanPricing', + planSubscriptions: 'PlanSubscription', + }, } as Record>; // ============ Custom Input Types (from schema) ============ +export interface GrantAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -2108,6 +4182,15 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface RecomputeCapabilitiesInput { + actorId?: string; + clientMutationId?: string; +} +export interface RevokeAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} export interface SeedAppLimitCapsDefaultsInput { clientMutationId?: string; defaults?: Record; @@ -2116,6 +4199,10 @@ export interface SeedAppLimitDefaultsInput { clientMutationId?: string; defaults?: Record; } +export interface SeedMeterDefaultsInput { + clientMutationId?: string; + defaults?: Record; +} export interface SeedOrgLimitCapsDefaultsInput { clientMutationId?: string; defaults?: Record; @@ -2124,6 +4211,15 @@ export interface SeedOrgLimitDefaultsInput { clientMutationId?: string; defaults?: Record; } +export interface SeedPlanInput { + clientMutationId?: string; + planConfig?: Record; + planName?: string; +} +export interface SeedTrustLadderInput { + clientMutationId?: string; + ladder?: Record; +} /** A filter to be used against Interval fields. All fields are combined with a logical ‘and.’ */ export interface IntervalFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -2149,6 +4245,41 @@ export interface IntervalFilter { /** Not included in the specified list. */ notIn?: IntervalInput[]; } +/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeImageFilter { + /** Contained by the specified JSON. */ + containedBy?: ConstructiveInternalTypeImage; + /** Contains the specified JSON. */ + contains?: ConstructiveInternalTypeImage; + /** Contains all of the specified keys. */ + containsAllKeys?: string[]; + /** Contains any of the specified keys. */ + containsAnyKeys?: string[]; + /** Contains the specified key. */ + containsKey?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: ConstructiveInternalTypeImage; + /** Equal to the specified value. */ + equalTo?: ConstructiveInternalTypeImage; + /** Greater than the specified value. */ + greaterThan?: ConstructiveInternalTypeImage; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Included in the specified list. */ + in?: ConstructiveInternalTypeImage[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: ConstructiveInternalTypeImage; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: ConstructiveInternalTypeImage; + /** Not equal to the specified value. */ + notEqualTo?: ConstructiveInternalTypeImage; + /** Not included in the specified list. */ + notIn?: ConstructiveInternalTypeImage[]; +} /** A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ */ export interface AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter { /** Filters to entities where every related entity matches. */ @@ -2185,6 +4316,15 @@ export interface AppLimitDefaultToManyAppLimitCreditFilter { /** Filters to entities where at least one related entity matches. */ some?: AppLimitCreditFilter; } +/** A filter to be used against many `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterToManyMeterCreditFilter { + /** Filters to entities where every related entity matches. */ + every?: MeterCreditFilter; + /** Filters to entities where no related entity matches. */ + none?: MeterCreditFilter; + /** Filters to entities where at least one related entity matches. */ + some?: MeterCreditFilter; +} /** A filter to be used against many `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitDefaultToManyOrgLimitCreditFilter { /** Filters to entities where every related entity matches. */ @@ -2194,6 +4334,179 @@ export interface OrgLimitDefaultToManyOrgLimitCreditFilter { /** Filters to entities where at least one related entity matches. */ some?: OrgLimitCreditFilter; } +/** A filter to be used against many `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanCapFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanCapFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanCapFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanCapFilter; +} +/** A filter to be used against many `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanLimitFilter; +} +/** A filter to be used against many `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanMeterLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanMeterLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanMeterLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanMeterLimitFilter; +} +/** A filter to be used against many `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanPricingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanPricingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanPricingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanPricingFilter; +} +/** A filter to be used against many `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanSubscriptionFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanSubscriptionFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanSubscriptionFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanSubscriptionFilter; +} +/** An input for mutations affecting `AppAchievementReward` */ +export interface AppAchievementRewardInput { + /** Number of credits to grant; unused by capability rewards */ + amount?: number; + createdAt?: string; + /** Credit type: permanent, expiring, etc. */ + creditType?: string; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: IntervalInput; + id?: string; + /** Name of the level this reward is granted for */ + levelName: string; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType: string; + /** Target limit name, meter slug, or capability catalog name */ + targetName: string; + updatedAt?: string; +} +/** An interval of time that has passed where the smallest distinct unit is a second. */ +export interface IntervalInput { + /** A quantity of days. */ + days?: number; + /** A quantity of hours. */ + hours?: number; + /** A quantity of minutes. */ + minutes?: number; + /** A quantity of months. */ + months?: number; + /** + * A quantity of seconds. This is the only non-integer field, as all the other + * fields will dump their overflow into a smaller unit of time. Intervals don’t + * have a smaller unit than seconds. + */ + seconds?: number; + /** A quantity of years. */ + years?: number; +} +/** An input for mutations affecting `AppEventAggregate` */ +export interface AppEventAggregateInput { + actorId?: string; + /** Cumulative count of completed steps toward this requirement */ + count?: number; + createdAt?: string; + id?: string; + /** Name identifier of the level requirement being tracked */ + name: string; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppEvent` */ +export interface AppEventInput { + actorId?: string; + /** Number of units completed in this step action */ + count?: number; + createdAt?: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id?: string; + /** Name identifier of the level requirement this step fulfills */ + name: string; +} +/** An input for mutations affecting `AppEventType` */ +export interface AppEventTypeInput { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string; + createdAt?: string; + /** Human-readable description of this event type */ + description?: string; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean; + id?: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean; + /** Unique name identifier for this event type */ + name: string; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: IntervalInput; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevel` */ +export interface AppLevelInput { + createdAt?: string; + /** Human-readable description of what this level represents */ + description?: string; + id?: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage; + /** Unique name of the level */ + name: string; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevelGrant` */ +export interface AppLevelGrantInput { + actorId?: string; + createdAt?: string; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string; + id?: string; + /** Name of the level that was achieved */ + levelName: string; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevelRequirement` */ +export interface AppLevelRequirementInput { + createdAt?: string; + /** Human-readable description of what this requirement entails */ + description?: string; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string; + id?: string; + /** Name of the level this requirement belongs to */ + level: string; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string; + /** Name identifier of the requirement (matches step names) */ + name: string; + /** Display ordering priority; lower values appear first */ + priority?: number; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number; + updatedAt?: string; +} /** An input for mutations affecting `AppLimitCap` */ export interface AppLimitCapInput { /** Entity this cap override applies to */ @@ -2229,7 +4542,7 @@ export interface AppLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2240,25 +4553,6 @@ export interface AppLimitInput { /** Start of the current metering window; NULL means no time window */ windowStart?: string; } -/** An interval of time that has passed where the smallest distinct unit is a second. */ -export interface IntervalInput { - /** A quantity of days. */ - days?: number; - /** A quantity of hours. */ - hours?: number; - /** A quantity of minutes. */ - minutes?: number; - /** A quantity of months. */ - months?: number; - /** - * A quantity of seconds. This is the only non-integer field, as all the other - * fields will dump their overflow into a smaller unit of time. Intervals don’t - * have a smaller unit than seconds. - */ - seconds?: number; - /** A quantity of years. */ - years?: number; -} /** An input for mutations affecting `AppLimitCreditCode` */ export interface AppLimitCreditCodeInput { /** Human-readable credit code (case-insensitive, unique) */ @@ -2359,6 +4653,134 @@ export interface AppLimitWarningInput { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType: string; } +/** An input for mutations affecting `BillingUsageSummary` */ +export interface BillingUsageSummaryInput { + /** Universal credits consumed during this period */ + creditsConsumed?: string; + /** The entity (org, team, user) this summary belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + id?: string; + /** Which meter this summary tracks */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string; + /** End of the billing period this summary covers */ + periodEnd: string; + /** Start of the billing period this summary covers */ + periodStart: string; + /** Plan limit that was in effect during this period */ + planLimit?: string; + /** Total units consumed during this period */ + quantityUsed?: string; +} +/** An input for mutations affecting `Ledger` */ +export interface LedgerInput { + createdAt?: string; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta: string; + /** The entity this ledger entry belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string; + /** Unique identifier for each ledger entry */ + id?: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: Record; + /** Which meter this entry is for */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Running total of usage after this entry */ + usageAfter: string; +} +/** An input for mutations affecting `Meter` */ +export interface MeterInput { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number; + /** Human-readable name for the meter */ + displayName?: string; + id?: string; + /** Whether this meter is currently active */ + isActive?: boolean; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: IntervalInput; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string; +} +/** An input for mutations affecting `MeterCredit` */ +export interface MeterCreditInput { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount: string; + /** When this credit was granted */ + createdAt?: string; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string; + /** Entity this credit applies to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string; + id?: string; + /** FK to meters — which meter definition this credit applies to */ + meterId: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string; +} +/** An input for mutations affecting `MeterDefault` */ +export interface MeterDefaultInput { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string; + /** Human-readable name for the default meter */ + displayName?: string; + id?: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string; + /** Meter slug that matches the slug in the meters table */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string; +} +/** An input for mutations affecting `MeterSource` */ +export interface MeterSourceInput { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath: string; + id?: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug: string; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric: string; +} /** An input for mutations affecting `OrgLimitAggregate` */ export interface OrgLimitAggregateInput { /** Entity (org) whose aggregate usage is being tracked */ @@ -2376,7 +4798,7 @@ export interface OrgLimitAggregateInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2425,7 +4847,7 @@ export interface OrgLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2508,6 +4930,94 @@ export interface OrgLimitWarningInput { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType: string; } +/** An input for mutations affecting `PlanCap` */ +export interface PlanCapInput { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName: string; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string; + id?: string; + /** Reference to the plan this cap setting belongs to */ + planId: string; +} +/** An input for mutations affecting `Plan` */ +export interface PlanInput { + /** Human-readable description of the plan tier */ + description?: string; + id?: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name: string; +} +/** An input for mutations affecting `PlanLimit` */ +export interface PlanLimitInput { + id?: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName: string; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue: string; + /** Reference to the plan this limit configuration belongs to */ + planId: string; +} +/** An input for mutations affecting `PlanMeterLimit` */ +export interface PlanMeterLimitInput { + id?: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug: string; + /** Reference to the plan this meter limit belongs to */ + planId: string; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit: string; +} +/** An input for mutations affecting `PlanOverride` */ +export interface PlanOverrideInput { + /** Entity receiving the custom override (personal org or actual org) */ + entityId: string; + /** When this override expires; NULL means permanent */ + expiresAt?: string; + id?: string; + /** Name of the limit being overridden */ + limitName: string; + /** Override maximum value; negative means unlimited */ + maxValue: string; + /** Admin note explaining why this override was granted */ + reason?: string; +} +/** An input for mutations affecting `PlanPricing` */ +export interface PlanPricingInput { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval: string; + /** ISO 4217 currency code (lowercase) */ + currency?: string; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string; + id?: string; + /** Whether this pricing option is currently available */ + isActive?: boolean; + /** Reference to the plan this pricing belongs to */ + planId: string; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price: string; +} +/** An input for mutations affecting `PlanSubscription` */ +export interface PlanSubscriptionInput { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string; + /** The entity (org, team, user) this subscription belongs to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + id?: string; + /** Whether the subscription is currently active */ + isActive?: boolean; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Reference to the plan this subscription is for */ + planId: string; + /** When the subscription becomes active */ + startsAt?: string; +} /** A filter to be used against `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ */ export interface AppLimitCreditCodeItemFilter { /** Filter by the object’s `amount` field. */ @@ -2575,6 +5085,37 @@ export interface AppLimitCreditFilter { /** Filter by the object’s `reason` field. */ reason?: StringFilter; } +/** A filter to be used against `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterCreditFilter { + /** Filter by the object’s `amount` field. */ + amount?: BigIntFilter; + /** Checks for all expressions in this list. */ + and?: MeterCreditFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meter` relation. */ + meter?: MeterFilter; + /** Filter by the object’s `meterId` field. */ + meterId?: UUIDFilter; + /** Negates the expression. */ + not?: MeterCreditFilter; + /** Checks for any expressions in this list. */ + or?: MeterCreditFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} /** A filter to be used against `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitCreditFilter { /** Filter by the object’s `actorId` field. */ @@ -2604,6 +5145,115 @@ export interface OrgLimitCreditFilter { /** Filter by the object’s `reason` field. */ reason?: StringFilter; } +/** A filter to be used against `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanCapFilter { + /** Checks for all expressions in this list. */ + and?: PlanCapFilter[]; + /** Filter by the object’s `capName` field. */ + capName?: StringFilter; + /** Filter by the object’s `capValue` field. */ + capValue?: BigIntFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlanCapFilter; + /** Checks for any expressions in this list. */ + or?: PlanCapFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** A filter to be used against `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** A filter to be used against `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanMeterLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanMeterLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: PlanMeterLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanMeterLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; +} +/** A filter to be used against `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanPricingFilter { + /** Checks for all expressions in this list. */ + and?: PlanPricingFilter[]; + /** Filter by the object’s `billingInterval` field. */ + billingInterval?: StringFilter; + /** Filter by the object’s `currency` field. */ + currency?: StringFilter; + /** Filter by the object’s `discountPercent` field. */ + discountPercent?: BigFloatFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanPricingFilter; + /** Checks for any expressions in this list. */ + or?: PlanPricingFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `price` field. */ + price?: BigIntFilter; +} +/** A filter to be used against `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanSubscriptionFilter { + /** Checks for all expressions in this list. */ + and?: PlanSubscriptionFilter[]; + /** Filter by the object’s `endsAt` field. */ + endsAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanSubscriptionFilter; + /** Checks for any expressions in this list. */ + or?: PlanSubscriptionFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `startsAt` field. */ + startsAt?: DatetimeFilter; +} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -2783,6 +5433,66 @@ export interface AppLimitDefaultFilter { /** Filter by the object’s `softMax` field. */ softMax?: BigIntFilter; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against `Meter` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: IntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterCredits` relation. */ + meterCredits?: MeterToManyMeterCreditFilter; + /** `meterCredits` exist. */ + meterCreditsExist?: boolean; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterFilter; + /** Checks for any expressions in this list. */ + or?: MeterFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `rolloverCap` field. */ + rolloverCap?: BigIntFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} /** A filter to be used against `OrgLimitDefault` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitDefaultFilter { /** Checks for all expressions in this list. */ @@ -2804,57 +5514,144 @@ export interface OrgLimitDefaultFilter { /** Filter by the object’s `softMax` field. */ softMax?: BigIntFilter; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { +/** A filter to be used against `Plan` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanFilter { + /** Checks for all expressions in this list. */ + and?: PlanFilter[]; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlanFilter; + /** Checks for any expressions in this list. */ + or?: PlanFilter[]; + /** Filter by the object’s `planCaps` relation. */ + planCaps?: PlanToManyPlanCapFilter; + /** `planCaps` exist. */ + planCapsExist?: boolean; + /** Filter by the object’s `planLimits` relation. */ + planLimits?: PlanToManyPlanLimitFilter; + /** `planLimits` exist. */ + planLimitsExist?: boolean; + /** Filter by the object’s `planMeterLimits` relation. */ + planMeterLimits?: PlanToManyPlanMeterLimitFilter; + /** `planMeterLimits` exist. */ + planMeterLimitsExist?: boolean; + /** Filter by the object’s `planPricings` relation. */ + planPricings?: PlanToManyPlanPricingFilter; + /** `planPricings` exist. */ + planPricingsExist?: boolean; + /** Filter by the object’s `planSubscriptions` relation. */ + planSubscriptions?: PlanToManyPlanSubscriptionFilter; + /** `planSubscriptions` exist. */ + planSubscriptionsExist?: boolean; +} +/** A filter to be used against BigFloat fields. All fields are combined with a logical ‘and.’ */ +export interface BigFloatFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; + distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: number; + equalTo?: string; /** Greater than the specified value. */ - greaterThan?: number; + greaterThan?: string; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; + greaterThanOrEqualTo?: string; /** Included in the specified list. */ - in?: number[]; + in?: string[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: number; + lessThan?: string; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; + lessThanOrEqualTo?: string; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; + notDistinctFrom?: string; /** Not equal to the specified value. */ - notEqualTo?: number; + notEqualTo?: string; /** Not included in the specified list. */ - notIn?: number[]; + notIn?: string[]; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; + distinctFrom?: boolean; /** Equal to the specified value. */ - equalTo?: string; + equalTo?: boolean; /** Greater than the specified value. */ - greaterThan?: string; + greaterThan?: boolean; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; + greaterThanOrEqualTo?: boolean; /** Included in the specified list. */ - in?: string[]; + in?: boolean[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: string; + lessThan?: boolean; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; + lessThanOrEqualTo?: boolean; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; + notDistinctFrom?: boolean; /** Not equal to the specified value. */ - notEqualTo?: string; + notEqualTo?: boolean; /** Not included in the specified list. */ - notIn?: string[]; + notIn?: boolean[]; +} +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value. */ + equalTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; + /** Included in the specified list. */ + in?: number[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not included in the specified list. */ + notIn?: number[]; } +/** A connection to a list of `AppLevelRequirement` values. */ // ============ Payload/Return Types (for custom operations) ============ +export interface AppLevelRequirementConnection { + edges: AppLevelRequirementEdge[]; + nodes: AppLevelRequirement[]; + pageInfo: PageInfo; + totalCount: number; +} +export type AppLevelRequirementConnectionSelect = { + edges?: { + select: AppLevelRequirementEdgeSelect; + }; + nodes?: { + select: AppLevelRequirementSelect; + }; + pageInfo?: { + select: PageInfoSelect; + }; + totalCount?: boolean; +}; +export interface GrantAchievementPayload { + clientMutationId?: string | null; +} +export type GrantAchievementPayloadSelect = { + clientMutationId?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -2877,6 +5674,18 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface RecomputeCapabilitiesPayload { + clientMutationId?: string | null; +} +export type RecomputeCapabilitiesPayloadSelect = { + clientMutationId?: boolean; +}; +export interface RevokeAchievementPayload { + clientMutationId?: string | null; +} +export type RevokeAchievementPayloadSelect = { + clientMutationId?: boolean; +}; export interface SeedAppLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2893,6 +5702,14 @@ export type SeedAppLimitDefaultsPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SeedMeterDefaultsPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SeedMeterDefaultsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface SeedOrgLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2909,6 +5726,337 @@ export type SeedOrgLimitDefaultsPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SeedPlanPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type SeedPlanPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface SeedTrustLadderPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SeedTrustLadderPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was created by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type CreateAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was updated by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppAchievementRewardPayload { + /** The `AppAchievementReward` that was deleted by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventAggregatePayload { + /** The `AppEventAggregate` that was created by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventAggregatePayload { + /** The `AppEventAggregate` that was updated by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventAggregatePayload { + /** The `AppEventAggregate` that was deleted by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventPayload { + /** The `AppEvent` that was created by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventPayload { + /** The `AppEvent` that was updated by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventPayload { + /** The `AppEvent` that was deleted by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventTypePayload { + /** The `AppEventType` that was created by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventTypePayload { + /** The `AppEventType` that was updated by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventTypePayload { + /** The `AppEventType` that was deleted by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelPayload { + /** The `AppLevel` that was created by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelPayload { + /** The `AppLevel` that was updated by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelPayload { + /** The `AppLevel` that was deleted by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelGrantPayload { + /** The `AppLevelGrant` that was created by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelGrantPayload { + /** The `AppLevelGrant` that was updated by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelGrantPayload { + /** The `AppLevelGrant` that was deleted by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was created by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was updated by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was deleted by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateAppLimitCapPayload { /** The `AppLimitCap` that was created by this mutation. */ appLimitCap?: AppLimitCap | null; @@ -3354,10 +6502,280 @@ export type DeleteAppLimitWarningPayloadSelect = { appLimitWarning?: { select: AppLimitWarningSelect; }; - appLimitWarningEdge?: { - select: AppLimitWarningEdgeSelect; + appLimitWarningEdge?: { + select: AppLimitWarningEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was created by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type CreateBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was updated by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type UpdateBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was deleted by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type DeleteBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was created by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type CreateLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface UpdateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was updated by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type UpdateLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface DeleteLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was deleted by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type DeleteLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface CreateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was created by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type CreateMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface UpdateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was updated by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type UpdateMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface DeleteMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was deleted by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type DeleteMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface CreateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was created by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type CreateMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface UpdateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was updated by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type UpdateMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface DeleteMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was deleted by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type DeleteMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface CreateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was created by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type CreateMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface UpdateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was updated by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type UpdateMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface DeleteMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was deleted by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type DeleteMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface CreateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was created by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type CreateMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; + }; +}; +export interface UpdateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was updated by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type UpdateMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; + }; +}; +export interface DeleteMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was deleted by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type DeleteMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; }; - clientMutationId?: boolean; }; export interface CreateOrgLimitAggregatePayload { clientMutationId?: string | null; @@ -3719,6 +7137,422 @@ export type DeleteOrgLimitWarningPayloadSelect = { select: OrgLimitWarningEdgeSelect; }; }; +export interface CreatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was created by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type CreatePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface UpdatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was updated by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type UpdatePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface DeletePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was deleted by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type DeletePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface CreatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was created by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type CreatePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface UpdatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was updated by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type UpdatePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface DeletePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was deleted by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type DeletePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface CreatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was created by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type CreatePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface UpdatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was updated by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type UpdatePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface DeletePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was deleted by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type DeletePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface CreatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was created by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type CreatePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface UpdatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was updated by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type UpdatePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface DeletePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was deleted by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type DeletePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface CreatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was created by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type CreatePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface UpdatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was updated by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type UpdatePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface DeletePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was deleted by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type DeletePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface CreatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was created by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type CreatePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface UpdatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was updated by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type UpdatePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface DeletePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was deleted by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type DeletePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface CreatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was created by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type CreatePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +export interface UpdatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was updated by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type UpdatePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +export interface DeletePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was deleted by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type DeletePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +/** A `AppLevelRequirement` edge in the connection. */ +export interface AppLevelRequirementEdge { + cursor?: string | null; + /** The `AppLevelRequirement` at the end of the edge. */ + node?: AppLevelRequirement | null; +} +export type AppLevelRequirementEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelRequirementSelect; + }; +}; +/** Information about pagination in a connection. */ +export interface PageInfo { + /** When paginating forwards, the cursor to continue. */ + endCursor?: string | null; + /** When paginating forwards, are there more items? */ + hasNextPage: boolean; + /** When paginating backwards, are there more items? */ + hasPreviousPage: boolean; + /** When paginating backwards, the cursor to continue. */ + startCursor?: string | null; +} +export type PageInfoSelect = { + endCursor?: boolean; + hasNextPage?: boolean; + hasPreviousPage?: boolean; + startCursor?: boolean; +}; +/** A `AppAchievementReward` edge in the connection. */ +export interface AppAchievementRewardEdge { + cursor?: string | null; + /** The `AppAchievementReward` at the end of the edge. */ + node?: AppAchievementReward | null; +} +export type AppAchievementRewardEdgeSelect = { + cursor?: boolean; + node?: { + select: AppAchievementRewardSelect; + }; +}; +/** A `AppEventAggregate` edge in the connection. */ +export interface AppEventAggregateEdge { + cursor?: string | null; + /** The `AppEventAggregate` at the end of the edge. */ + node?: AppEventAggregate | null; +} +export type AppEventAggregateEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventAggregateSelect; + }; +}; +/** A `AppEvent` edge in the connection. */ +export interface AppEventEdge { + cursor?: string | null; + /** The `AppEvent` at the end of the edge. */ + node?: AppEvent | null; +} +export type AppEventEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventSelect; + }; +}; +/** A `AppEventType` edge in the connection. */ +export interface AppEventTypeEdge { + cursor?: string | null; + /** The `AppEventType` at the end of the edge. */ + node?: AppEventType | null; +} +export type AppEventTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventTypeSelect; + }; +}; +/** A `AppLevel` edge in the connection. */ +export interface AppLevelEdge { + cursor?: string | null; + /** The `AppLevel` at the end of the edge. */ + node?: AppLevel | null; +} +export type AppLevelEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelSelect; + }; +}; +/** A `AppLevelGrant` edge in the connection. */ +export interface AppLevelGrantEdge { + cursor?: string | null; + /** The `AppLevelGrant` at the end of the edge. */ + node?: AppLevelGrant | null; +} +export type AppLevelGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelGrantSelect; + }; +}; /** A `AppLimitCap` edge in the connection. */ export interface AppLimitCapEdge { cursor?: string | null; @@ -3839,6 +7673,78 @@ export type AppLimitWarningEdgeSelect = { select: AppLimitWarningSelect; }; }; +/** A `BillingUsageSummary` edge in the connection. */ +export interface BillingUsageSummaryEdge { + cursor?: string | null; + /** The `BillingUsageSummary` at the end of the edge. */ + node?: BillingUsageSummary | null; +} +export type BillingUsageSummaryEdgeSelect = { + cursor?: boolean; + node?: { + select: BillingUsageSummarySelect; + }; +}; +/** A `Ledger` edge in the connection. */ +export interface LedgerEdge { + cursor?: string | null; + /** The `Ledger` at the end of the edge. */ + node?: Ledger | null; +} +export type LedgerEdgeSelect = { + cursor?: boolean; + node?: { + select: LedgerSelect; + }; +}; +/** A `Meter` edge in the connection. */ +export interface MeterEdge { + cursor?: string | null; + /** The `Meter` at the end of the edge. */ + node?: Meter | null; +} +export type MeterEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterSelect; + }; +}; +/** A `MeterCredit` edge in the connection. */ +export interface MeterCreditEdge { + cursor?: string | null; + /** The `MeterCredit` at the end of the edge. */ + node?: MeterCredit | null; +} +export type MeterCreditEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterCreditSelect; + }; +}; +/** A `MeterDefault` edge in the connection. */ +export interface MeterDefaultEdge { + cursor?: string | null; + /** The `MeterDefault` at the end of the edge. */ + node?: MeterDefault | null; +} +export type MeterDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterDefaultSelect; + }; +}; +/** A `MeterSource` edge in the connection. */ +export interface MeterSourceEdge { + cursor?: string | null; + /** The `MeterSource` at the end of the edge. */ + node?: MeterSource | null; +} +export type MeterSourceEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterSourceSelect; + }; +}; /** A `OrgLimitAggregate` edge in the connection. */ export interface OrgLimitAggregateEdge { cursor?: string | null; @@ -3935,3 +7841,87 @@ export type OrgLimitWarningEdgeSelect = { select: OrgLimitWarningSelect; }; }; +/** A `PlanCap` edge in the connection. */ +export interface PlanCapEdge { + cursor?: string | null; + /** The `PlanCap` at the end of the edge. */ + node?: PlanCap | null; +} +export type PlanCapEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanCapSelect; + }; +}; +/** A `Plan` edge in the connection. */ +export interface PlanEdge { + cursor?: string | null; + /** The `Plan` at the end of the edge. */ + node?: Plan | null; +} +export type PlanEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanSelect; + }; +}; +/** A `PlanLimit` edge in the connection. */ +export interface PlanLimitEdge { + cursor?: string | null; + /** The `PlanLimit` at the end of the edge. */ + node?: PlanLimit | null; +} +export type PlanLimitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanLimitSelect; + }; +}; +/** A `PlanMeterLimit` edge in the connection. */ +export interface PlanMeterLimitEdge { + cursor?: string | null; + /** The `PlanMeterLimit` at the end of the edge. */ + node?: PlanMeterLimit | null; +} +export type PlanMeterLimitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanMeterLimitSelect; + }; +}; +/** A `PlanOverride` edge in the connection. */ +export interface PlanOverrideEdge { + cursor?: string | null; + /** The `PlanOverride` at the end of the edge. */ + node?: PlanOverride | null; +} +export type PlanOverrideEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanOverrideSelect; + }; +}; +/** A `PlanPricing` edge in the connection. */ +export interface PlanPricingEdge { + cursor?: string | null; + /** The `PlanPricing` at the end of the edge. */ + node?: PlanPricing | null; +} +export type PlanPricingEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanPricingSelect; + }; +}; +/** A `PlanSubscription` edge in the connection. */ +export interface PlanSubscriptionEdge { + cursor?: string | null; + /** The `PlanSubscription` at the end of the edge. */ + node?: PlanSubscription | null; +} +export type PlanSubscriptionEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanSubscriptionSelect; + }; +}; diff --git a/sdk/constructive-react/src/usage/orm/models/appAchievementReward.ts b/sdk/constructive-react/src/usage/orm/models/appAchievementReward.ts new file mode 100644 index 0000000000..cdbccdd6b0 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appAchievementReward.ts @@ -0,0 +1,247 @@ +/** + * AppAchievementReward 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 { + AppAchievementReward, + AppAchievementRewardWithRelations, + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy, + CreateAppAchievementRewardInput, + UpdateAppAchievementRewardInput, + AppAchievementRewardPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppAchievementRewardModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementRewards: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppAchievementReward', + 'appAchievementRewards', + 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, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementRewards', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementReward: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppAchievementReward', + 'appAchievementRewards', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementReward', + document, + variables, + transform: (data: { + appAchievementRewards?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievementReward: data.appAchievementRewards?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementReward: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppAchievementReward', + 'appAchievementRewards', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementReward', + document, + variables, + transform: (data: { + appAchievementRewards?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievementReward: data.appAchievementRewards?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppAchievementReward', + 'createAppAchievementReward', + 'appAchievementReward', + args.select, + args.data, + 'CreateAppAchievementRewardInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'createAppAchievementReward', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppAchievementRewardPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppAchievementReward', + 'updateAppAchievementReward', + 'appAchievementReward', + args.select, + args.where.id, + args.data, + 'UpdateAppAchievementRewardInput', + 'id', + 'appAchievementRewardPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'updateAppAchievementReward', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppAchievementReward', + 'deleteAppAchievementReward', + 'appAchievementReward', + { + id: args.where.id, + }, + 'DeleteAppAchievementRewardInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'deleteAppAchievementReward', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/appEvent.ts b/sdk/constructive-react/src/usage/orm/models/appEvent.ts new file mode 100644 index 0000000000..b0cc9982d4 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appEvent.ts @@ -0,0 +1,250 @@ +/** + * AppEvent 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 { + AppEvent, + AppEventWithRelations, + AppEventSelect, + AppEventFilter, + AppEventOrderBy, + CreateAppEventInput, + UpdateAppEventInput, + AppEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEvent', + 'appEvents', + 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, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEvent', + 'appEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvent', + document, + variables, + transform: (data: { + appEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEvent: data.appEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEvent', + 'appEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvent', + document, + variables, + transform: (data: { + appEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEvent: data.appEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEvent', + 'createAppEvent', + 'appEvent', + args.select, + args.data, + 'CreateAppEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'createAppEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + AppEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEvent', + 'updateAppEvent', + 'appEvent', + args.select, + args.where.id, + args.data, + 'UpdateAppEventInput', + 'id', + 'appEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'updateAppEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEvent', + 'deleteAppEvent', + 'appEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteAppEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'deleteAppEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/appEventAggregate.ts b/sdk/constructive-react/src/usage/orm/models/appEventAggregate.ts new file mode 100644 index 0000000000..74985e675e --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appEventAggregate.ts @@ -0,0 +1,245 @@ +/** + * AppEventAggregate 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 { + AppEventAggregate, + AppEventAggregateWithRelations, + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy, + CreateAppEventAggregateInput, + UpdateAppEventAggregateInput, + AppEventAggregatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventAggregateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventAggregate', + 'appEventAggregates', + 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, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEventAggregate', + 'appEventAggregates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregate', + document, + variables, + transform: (data: { + appEventAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventAggregate: data.appEventAggregates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventAggregate', + 'appEventAggregates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregate', + document, + variables, + transform: (data: { + appEventAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventAggregate: data.appEventAggregates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEventAggregate', + 'createAppEventAggregate', + 'appEventAggregate', + args.select, + args.data, + 'CreateAppEventAggregateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'createAppEventAggregate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppEventAggregatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEventAggregate', + 'updateAppEventAggregate', + 'appEventAggregate', + args.select, + args.where.id, + args.data, + 'UpdateAppEventAggregateInput', + 'id', + 'appEventAggregatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'updateAppEventAggregate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEventAggregate', + 'deleteAppEventAggregate', + 'appEventAggregate', + { + id: args.where.id, + }, + 'DeleteAppEventAggregateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'deleteAppEventAggregate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/appEventType.ts b/sdk/constructive-react/src/usage/orm/models/appEventType.ts new file mode 100644 index 0000000000..4781228b4c --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appEventType.ts @@ -0,0 +1,245 @@ +/** + * AppEventType 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 { + AppEventType, + AppEventTypeWithRelations, + AppEventTypeSelect, + AppEventTypeFilter, + AppEventTypeOrderBy, + CreateAppEventTypeInput, + UpdateAppEventTypeInput, + AppEventTypePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventTypeModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventTypes: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventType', + 'appEventTypes', + 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, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventTypes', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventType: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEventType', + 'appEventTypes', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventType', + document, + variables, + transform: (data: { + appEventTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventType: data.appEventTypes?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventType: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventType', + 'appEventTypes', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventType', + document, + variables, + transform: (data: { + appEventTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventType: data.appEventTypes?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEventType', + 'createAppEventType', + 'appEventType', + args.select, + args.data, + 'CreateAppEventTypeInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'createAppEventType', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppEventTypePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEventType', + 'updateAppEventType', + 'appEventType', + args.select, + args.where.id, + args.data, + 'UpdateAppEventTypeInput', + 'id', + 'appEventTypePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'updateAppEventType', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEventType', + 'deleteAppEventType', + 'appEventType', + { + id: args.where.id, + }, + 'DeleteAppEventTypeInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'deleteAppEventType', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/appLevel.ts b/sdk/constructive-react/src/usage/orm/models/appLevel.ts new file mode 100644 index 0000000000..36a050cba3 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appLevel.ts @@ -0,0 +1,245 @@ +/** + * AppLevel 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 { + AppLevel, + AppLevelWithRelations, + AppLevelSelect, + AppLevelFilter, + AppLevelOrderBy, + CreateAppLevelInput, + UpdateAppLevelInput, + AppLevelPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppLevelModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevels: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevel', + 'appLevels', + 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, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevels', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevel: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppLevel', + 'appLevels', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevel', + document, + variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevel: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevel', + 'appLevels', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevel', + document, + variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppLevel', + 'createAppLevel', + 'appLevel', + args.select, + args.data, + 'CreateAppLevelInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'createAppLevel', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppLevelPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppLevel', + 'updateAppLevel', + 'appLevel', + args.select, + args.where.id, + args.data, + 'UpdateAppLevelInput', + 'id', + 'appLevelPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'updateAppLevel', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppLevel', + 'deleteAppLevel', + 'appLevel', + { + id: args.where.id, + }, + 'DeleteAppLevelInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'deleteAppLevel', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/appPermission.ts b/sdk/constructive-react/src/usage/orm/models/appLevelGrant.ts similarity index 53% rename from sdk/constructive-react/src/admin/orm/models/appPermission.ts rename to sdk/constructive-react/src/usage/orm/models/appLevelGrant.ts index efa4812398..9324be5b70 100644 --- a/sdk/constructive-react/src/admin/orm/models/appPermission.ts +++ b/sdk/constructive-react/src/usage/orm/models/appLevelGrant.ts @@ -1,5 +1,5 @@ /** - * AppPermission model for ORM client + * AppLevelGrant 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 { - AppPermission, - AppPermissionWithRelations, - AppPermissionSelect, - AppPermissionFilter, - AppPermissionOrderBy, - CreateAppPermissionInput, - UpdateAppPermissionInput, - AppPermissionPatch, + AppLevelGrant, + AppLevelGrantWithRelations, + AppLevelGrantSelect, + AppLevelGrantFilter, + AppLevelGrantOrderBy, + CreateAppLevelGrantInput, + UpdateAppLevelGrantInput, + AppLevelGrantPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class AppPermissionModel { +export class AppLevelGrantModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermissions: ConnectionResult>; + appLevelGrants: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'AppPermission', - 'appPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class AppPermissionModel { before: args?.before, offset: args?.offset, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermissions', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrants', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermission: InferSelectResult | null; + appLevelGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'AppPermission', - 'appPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermission', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrant', document, variables, transform: (data: { - appPermissions?: { - nodes?: InferSelectResult[]; + appLevelGrants?: { + nodes?: InferSelectResult[]; }; }) => ({ - appPermission: data.appPermissions?.nodes?.[0] ?? null, + appLevelGrant: data.appLevelGrants?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - appPermission: InferSelectResult | null; + appLevelGrant: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'AppPermission', - 'appPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: { @@ -124,91 +124,91 @@ export class AppPermissionModel { }, first: 1, }, - 'AppPermissionFilter', - 'AppPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'AppPermission', - fieldName: 'appPermission', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrant', document, variables, transform: (data: { - appPermissions?: { - nodes?: InferSelectResult[]; + appLevelGrants?: { + nodes?: InferSelectResult[]; }; }) => ({ - appPermission: data.appPermissions?.nodes?.[0] ?? null, + appLevelGrant: data.appLevelGrants?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createAppPermission: { - appPermission: InferSelectResult; + createAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'AppPermission', - 'createAppPermission', - 'appPermission', + 'AppLevelGrant', + 'createAppLevelGrant', + 'appLevelGrant', args.select, args.data, - 'CreateAppPermissionInput', + 'CreateAppLevelGrantInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'createAppPermission', + operationName: 'AppLevelGrant', + fieldName: 'createAppLevelGrant', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - AppPermissionPatch + AppLevelGrantPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateAppPermission: { - appPermission: InferSelectResult; + updateAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'AppPermission', - 'updateAppPermission', - 'appPermission', + 'AppLevelGrant', + 'updateAppLevelGrant', + 'appLevelGrant', args.select, args.where.id, args.data, - 'UpdateAppPermissionInput', + 'UpdateAppLevelGrantInput', 'id', - 'appPermissionPatch', + 'appLevelGrantPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'updateAppPermission', + operationName: 'AppLevelGrant', + fieldName: 'updateAppLevelGrant', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class AppPermissionModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteAppPermission: { - appPermission: InferSelectResult; + deleteAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'AppPermission', - 'deleteAppPermission', - 'appPermission', + 'AppLevelGrant', + 'deleteAppLevelGrant', + 'appLevelGrant', { id: args.where.id, }, - 'DeleteAppPermissionInput', + 'DeleteAppLevelGrantInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'AppPermission', - fieldName: 'deleteAppPermission', + operationName: 'AppLevelGrant', + fieldName: 'deleteAppLevelGrant', document, variables, }); diff --git a/sdk/constructive-react/src/usage/orm/models/appLevelRequirement.ts b/sdk/constructive-react/src/usage/orm/models/appLevelRequirement.ts new file mode 100644 index 0000000000..f7634bc482 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/appLevelRequirement.ts @@ -0,0 +1,245 @@ +/** + * AppLevelRequirement 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 { + AppLevelRequirement, + AppLevelRequirementWithRelations, + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy, + CreateAppLevelRequirementInput, + UpdateAppLevelRequirementInput, + AppLevelRequirementPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppLevelRequirementModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirements: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + 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, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirements', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirement: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirement', + document, + variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirement: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirement', + document, + variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppLevelRequirement', + 'createAppLevelRequirement', + 'appLevelRequirement', + args.select, + args.data, + 'CreateAppLevelRequirementInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'createAppLevelRequirement', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppLevelRequirementPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppLevelRequirement', + 'updateAppLevelRequirement', + 'appLevelRequirement', + args.select, + args.where.id, + args.data, + 'UpdateAppLevelRequirementInput', + 'id', + 'appLevelRequirementPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'updateAppLevelRequirement', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppLevelRequirement', + 'deleteAppLevelRequirement', + 'appLevelRequirement', + { + id: args.where.id, + }, + 'DeleteAppLevelRequirementInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'deleteAppLevelRequirement', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/billingUsageSummary.ts b/sdk/constructive-react/src/usage/orm/models/billingUsageSummary.ts new file mode 100644 index 0000000000..38512d9f62 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/billingUsageSummary.ts @@ -0,0 +1,245 @@ +/** + * BillingUsageSummary 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 { + BillingUsageSummary, + BillingUsageSummaryWithRelations, + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy, + CreateBillingUsageSummaryInput, + UpdateBillingUsageSummaryInput, + BillingUsageSummaryPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class BillingUsageSummaryModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummaries: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + 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, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummaries', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummary: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummary', + document, + variables, + transform: (data: { + billingUsageSummaries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingUsageSummary: data.billingUsageSummaries?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummary: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummary', + document, + variables, + transform: (data: { + billingUsageSummaries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingUsageSummary: data.billingUsageSummaries?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'BillingUsageSummary', + 'createBillingUsageSummary', + 'billingUsageSummary', + args.select, + args.data, + 'CreateBillingUsageSummaryInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'createBillingUsageSummary', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + BillingUsageSummaryPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'BillingUsageSummary', + 'updateBillingUsageSummary', + 'billingUsageSummary', + args.select, + args.where.id, + args.data, + 'UpdateBillingUsageSummaryInput', + 'id', + 'billingUsageSummaryPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'updateBillingUsageSummary', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'BillingUsageSummary', + 'deleteBillingUsageSummary', + 'billingUsageSummary', + { + id: args.where.id, + }, + 'DeleteBillingUsageSummaryInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'deleteBillingUsageSummary', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/index.ts b/sdk/constructive-react/src/usage/orm/models/index.ts index 049cfdab13..ef279b7afb 100644 --- a/sdk/constructive-react/src/usage/orm/models/index.ts +++ b/sdk/constructive-react/src/usage/orm/models/index.ts @@ -3,6 +3,13 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { AppAchievementRewardModel } from './appAchievementReward'; +export { AppEventAggregateModel } from './appEventAggregate'; +export { AppEventModel } from './appEvent'; +export { AppEventTypeModel } from './appEventType'; +export { AppLevelModel } from './appLevel'; +export { AppLevelGrantModel } from './appLevelGrant'; +export { AppLevelRequirementModel } from './appLevelRequirement'; export { AppLimitCapModel } from './appLimitCap'; export { AppLimitCapsDefaultModel } from './appLimitCapsDefault'; export { AppLimitModel } from './appLimit'; @@ -13,6 +20,12 @@ export { AppLimitCreditRedemptionModel } from './appLimitCreditRedemption'; export { AppLimitDefaultModel } from './appLimitDefault'; export { AppLimitEventModel } from './appLimitEvent'; export { AppLimitWarningModel } from './appLimitWarning'; +export { BillingUsageSummaryModel } from './billingUsageSummary'; +export { LedgerModel } from './ledger'; +export { MeterModel } from './meter'; +export { MeterCreditModel } from './meterCredit'; +export { MeterDefaultModel } from './meterDefault'; +export { MeterSourceModel } from './meterSource'; export { OrgLimitAggregateModel } from './orgLimitAggregate'; export { OrgLimitCapModel } from './orgLimitCap'; export { OrgLimitCapsDefaultModel } from './orgLimitCapsDefault'; @@ -21,3 +34,10 @@ export { OrgLimitCreditModel } from './orgLimitCredit'; export { OrgLimitDefaultModel } from './orgLimitDefault'; export { OrgLimitEventModel } from './orgLimitEvent'; export { OrgLimitWarningModel } from './orgLimitWarning'; +export { PlanCapModel } from './planCap'; +export { PlanModel } from './plan'; +export { PlanLimitModel } from './planLimit'; +export { PlanMeterLimitModel } from './planMeterLimit'; +export { PlanOverrideModel } from './planOverride'; +export { PlanPricingModel } from './planPricing'; +export { PlanSubscriptionModel } from './planSubscription'; diff --git a/sdk/constructive-react/src/usage/orm/models/ledger.ts b/sdk/constructive-react/src/usage/orm/models/ledger.ts new file mode 100644 index 0000000000..37a6cfd886 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/ledger.ts @@ -0,0 +1,250 @@ +/** + * Ledger 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 { + Ledger, + LedgerWithRelations, + LedgerSelect, + LedgerFilter, + LedgerOrderBy, + CreateLedgerInput, + UpdateLedgerInput, + LedgerPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class LedgerModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledgers: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Ledger', + 'ledgers', + 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, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledgers', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledger: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Ledger', + 'ledgers', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledger', + document, + variables, + transform: (data: { + ledgers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ledger: data.ledgers?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledger: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Ledger', + 'ledgers', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledger', + document, + variables, + transform: (data: { + ledgers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ledger: data.ledgers?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Ledger', + 'createLedger', + 'ledger', + args.select, + args.data, + 'CreateLedgerInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'createLedger', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + LedgerPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Ledger', + 'updateLedger', + 'ledger', + args.select, + args.where.id, + args.data, + 'UpdateLedgerInput', + 'id', + 'ledgerPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'updateLedger', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Ledger', + 'deleteLedger', + 'ledger', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteLedgerInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'deleteLedger', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/meter.ts b/sdk/constructive-react/src/usage/orm/models/meter.ts new file mode 100644 index 0000000000..26718a0190 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/meter.ts @@ -0,0 +1,245 @@ +/** + * Meter 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 { + Meter, + MeterWithRelations, + MeterSelect, + MeterFilter, + MeterOrderBy, + CreateMeterInput, + UpdateMeterInput, + MeterPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meters: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Meter', + 'meters', + 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, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meters', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meter: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Meter', + 'meters', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meter', + document, + variables, + transform: (data: { + meters?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meter: data.meters?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meter: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Meter', + 'meters', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meter', + document, + variables, + transform: (data: { + meters?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meter: data.meters?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Meter', + 'createMeter', + 'meter', + args.select, + args.data, + 'CreateMeterInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'createMeter', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Meter', + 'updateMeter', + 'meter', + args.select, + args.where.id, + args.data, + 'UpdateMeterInput', + 'id', + 'meterPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'updateMeter', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Meter', + 'deleteMeter', + 'meter', + { + id: args.where.id, + }, + 'DeleteMeterInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'deleteMeter', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/meterCredit.ts b/sdk/constructive-react/src/usage/orm/models/meterCredit.ts new file mode 100644 index 0000000000..ba2881f8f5 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/meterCredit.ts @@ -0,0 +1,245 @@ +/** + * MeterCredit 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 { + MeterCredit, + MeterCreditWithRelations, + MeterCreditSelect, + MeterCreditFilter, + MeterCreditOrderBy, + CreateMeterCreditInput, + UpdateMeterCreditInput, + MeterCreditPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterCreditModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterCredit', + 'meterCredits', + 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, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterCredit', + 'meterCredits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredit', + document, + variables, + transform: (data: { + meterCredits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterCredit: data.meterCredits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterCredit', + 'meterCredits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredit', + document, + variables, + transform: (data: { + meterCredits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterCredit: data.meterCredits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterCredit', + 'createMeterCredit', + 'meterCredit', + args.select, + args.data, + 'CreateMeterCreditInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'createMeterCredit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterCreditPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterCredit', + 'updateMeterCredit', + 'meterCredit', + args.select, + args.where.id, + args.data, + 'UpdateMeterCreditInput', + 'id', + 'meterCreditPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'updateMeterCredit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterCredit', + 'deleteMeterCredit', + 'meterCredit', + { + id: args.where.id, + }, + 'DeleteMeterCreditInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'deleteMeterCredit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/meterDefault.ts b/sdk/constructive-react/src/usage/orm/models/meterDefault.ts new file mode 100644 index 0000000000..a5bec1564f --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/meterDefault.ts @@ -0,0 +1,245 @@ +/** + * MeterDefault 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 { + MeterDefault, + MeterDefaultWithRelations, + MeterDefaultSelect, + MeterDefaultFilter, + MeterDefaultOrderBy, + CreateMeterDefaultInput, + UpdateMeterDefaultInput, + MeterDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefaults: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterDefault', + 'meterDefaults', + 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, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterDefault', + 'meterDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefault', + document, + variables, + transform: (data: { + meterDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterDefault: data.meterDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterDefault', + 'meterDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefault', + document, + variables, + transform: (data: { + meterDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterDefault: data.meterDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterDefault', + 'createMeterDefault', + 'meterDefault', + args.select, + args.data, + 'CreateMeterDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'createMeterDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterDefault', + 'updateMeterDefault', + 'meterDefault', + args.select, + args.where.id, + args.data, + 'UpdateMeterDefaultInput', + 'id', + 'meterDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'updateMeterDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterDefault', + 'deleteMeterDefault', + 'meterDefault', + { + id: args.where.id, + }, + 'DeleteMeterDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'deleteMeterDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/meterSource.ts b/sdk/constructive-react/src/usage/orm/models/meterSource.ts new file mode 100644 index 0000000000..8e1ddd7b0f --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/meterSource.ts @@ -0,0 +1,245 @@ +/** + * MeterSource 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 { + MeterSource, + MeterSourceWithRelations, + MeterSourceSelect, + MeterSourceFilter, + MeterSourceOrderBy, + CreateMeterSourceInput, + UpdateMeterSourceInput, + MeterSourcePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterSourceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSources: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterSource', + 'meterSources', + 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, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSources', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSource: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterSource', + 'meterSources', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSource', + document, + variables, + transform: (data: { + meterSources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterSource: data.meterSources?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSource: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterSource', + 'meterSources', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSource', + document, + variables, + transform: (data: { + meterSources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterSource: data.meterSources?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterSource', + 'createMeterSource', + 'meterSource', + args.select, + args.data, + 'CreateMeterSourceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'createMeterSource', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterSourcePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterSource', + 'updateMeterSource', + 'meterSource', + args.select, + args.where.id, + args.data, + 'UpdateMeterSourceInput', + 'id', + 'meterSourcePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'updateMeterSource', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterSource', + 'deleteMeterSource', + 'meterSource', + { + id: args.where.id, + }, + 'DeleteMeterSourceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'deleteMeterSource', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/plan.ts b/sdk/constructive-react/src/usage/orm/models/plan.ts new file mode 100644 index 0000000000..16b199389a --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/plan.ts @@ -0,0 +1,245 @@ +/** + * Plan 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 { + Plan, + PlanWithRelations, + PlanSelect, + PlanFilter, + PlanOrderBy, + CreatePlanInput, + UpdatePlanInput, + PlanPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + plans: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Plan', + 'plans', + 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, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plans', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + plan: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Plan', + 'plans', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plan', + document, + variables, + transform: (data: { + plans?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plan: data.plans?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + plan: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Plan', + 'plans', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plan', + document, + variables, + transform: (data: { + plans?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plan: data.plans?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Plan', + 'createPlan', + 'plan', + args.select, + args.data, + 'CreatePlanInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'createPlan', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Plan', + 'updatePlan', + 'plan', + args.select, + args.where.id, + args.data, + 'UpdatePlanInput', + 'id', + 'planPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'updatePlan', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Plan', + 'deletePlan', + 'plan', + { + id: args.where.id, + }, + 'DeletePlanInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'deletePlan', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planCap.ts b/sdk/constructive-react/src/usage/orm/models/planCap.ts new file mode 100644 index 0000000000..2c3b676aff --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planCap.ts @@ -0,0 +1,245 @@ +/** + * PlanCap 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 { + PlanCap, + PlanCapWithRelations, + PlanCapSelect, + PlanCapFilter, + PlanCapOrderBy, + CreatePlanCapInput, + UpdatePlanCapInput, + PlanCapPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanCapModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCaps: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanCap', + 'planCaps', + 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, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCaps', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCap: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanCap', + 'planCaps', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCap', + document, + variables, + transform: (data: { + planCaps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planCap: data.planCaps?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCap: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanCap', + 'planCaps', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCap', + document, + variables, + transform: (data: { + planCaps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planCap: data.planCaps?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanCap', + 'createPlanCap', + 'planCap', + args.select, + args.data, + 'CreatePlanCapInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'createPlanCap', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanCapPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanCap', + 'updatePlanCap', + 'planCap', + args.select, + args.where.id, + args.data, + 'UpdatePlanCapInput', + 'id', + 'planCapPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'updatePlanCap', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanCap', + 'deletePlanCap', + 'planCap', + { + id: args.where.id, + }, + 'DeletePlanCapInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'deletePlanCap', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planLimit.ts b/sdk/constructive-react/src/usage/orm/models/planLimit.ts new file mode 100644 index 0000000000..b35f99c5e2 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planLimit.ts @@ -0,0 +1,245 @@ +/** + * PlanLimit 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 { + PlanLimit, + PlanLimitWithRelations, + PlanLimitSelect, + PlanLimitFilter, + PlanLimitOrderBy, + CreatePlanLimitInput, + UpdatePlanLimitInput, + PlanLimitPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanLimitModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanLimit', + 'planLimits', + 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, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanLimit', + 'planLimits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimit', + document, + variables, + transform: (data: { + planLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planLimit: data.planLimits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanLimit', + 'planLimits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimit', + document, + variables, + transform: (data: { + planLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planLimit: data.planLimits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanLimit', + 'createPlanLimit', + 'planLimit', + args.select, + args.data, + 'CreatePlanLimitInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'createPlanLimit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanLimitPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanLimit', + 'updatePlanLimit', + 'planLimit', + args.select, + args.where.id, + args.data, + 'UpdatePlanLimitInput', + 'id', + 'planLimitPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'updatePlanLimit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanLimit', + 'deletePlanLimit', + 'planLimit', + { + id: args.where.id, + }, + 'DeletePlanLimitInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'deletePlanLimit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planMeterLimit.ts b/sdk/constructive-react/src/usage/orm/models/planMeterLimit.ts new file mode 100644 index 0000000000..9e2529dafb --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planMeterLimit.ts @@ -0,0 +1,245 @@ +/** + * PlanMeterLimit 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 { + PlanMeterLimit, + PlanMeterLimitWithRelations, + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy, + CreatePlanMeterLimitInput, + UpdatePlanMeterLimitInput, + PlanMeterLimitPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanMeterLimitModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanMeterLimit', + 'planMeterLimits', + 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, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanMeterLimit', + 'planMeterLimits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimit', + document, + variables, + transform: (data: { + planMeterLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planMeterLimit: data.planMeterLimits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanMeterLimit', + 'planMeterLimits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimit', + document, + variables, + transform: (data: { + planMeterLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planMeterLimit: data.planMeterLimits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanMeterLimit', + 'createPlanMeterLimit', + 'planMeterLimit', + args.select, + args.data, + 'CreatePlanMeterLimitInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'createPlanMeterLimit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanMeterLimitPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanMeterLimit', + 'updatePlanMeterLimit', + 'planMeterLimit', + args.select, + args.where.id, + args.data, + 'UpdatePlanMeterLimitInput', + 'id', + 'planMeterLimitPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'updatePlanMeterLimit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanMeterLimit', + 'deletePlanMeterLimit', + 'planMeterLimit', + { + id: args.where.id, + }, + 'DeletePlanMeterLimitInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'deletePlanMeterLimit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planOverride.ts b/sdk/constructive-react/src/usage/orm/models/planOverride.ts new file mode 100644 index 0000000000..d8fc2bbf51 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planOverride.ts @@ -0,0 +1,245 @@ +/** + * PlanOverride 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 { + PlanOverride, + PlanOverrideWithRelations, + PlanOverrideSelect, + PlanOverrideFilter, + PlanOverrideOrderBy, + CreatePlanOverrideInput, + UpdatePlanOverrideInput, + PlanOverridePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanOverrideModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverrides: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanOverride', + 'planOverrides', + 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, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverrides', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanOverride', + 'planOverrides', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverride', + document, + variables, + transform: (data: { + planOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planOverride: data.planOverrides?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanOverride', + 'planOverrides', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverride', + document, + variables, + transform: (data: { + planOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planOverride: data.planOverrides?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanOverride', + 'createPlanOverride', + 'planOverride', + args.select, + args.data, + 'CreatePlanOverrideInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'createPlanOverride', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanOverridePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanOverride', + 'updatePlanOverride', + 'planOverride', + args.select, + args.where.id, + args.data, + 'UpdatePlanOverrideInput', + 'id', + 'planOverridePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'updatePlanOverride', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanOverride', + 'deletePlanOverride', + 'planOverride', + { + id: args.where.id, + }, + 'DeletePlanOverrideInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'deletePlanOverride', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planPricing.ts b/sdk/constructive-react/src/usage/orm/models/planPricing.ts new file mode 100644 index 0000000000..feb19c37e0 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planPricing.ts @@ -0,0 +1,245 @@ +/** + * PlanPricing 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 { + PlanPricing, + PlanPricingWithRelations, + PlanPricingSelect, + PlanPricingFilter, + PlanPricingOrderBy, + CreatePlanPricingInput, + UpdatePlanPricingInput, + PlanPricingPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanPricingModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricings: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanPricing', + 'planPricings', + 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, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricings', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricing: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanPricing', + 'planPricings', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricing', + document, + variables, + transform: (data: { + planPricings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planPricing: data.planPricings?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricing: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanPricing', + 'planPricings', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricing', + document, + variables, + transform: (data: { + planPricings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planPricing: data.planPricings?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanPricing', + 'createPlanPricing', + 'planPricing', + args.select, + args.data, + 'CreatePlanPricingInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'createPlanPricing', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanPricingPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanPricing', + 'updatePlanPricing', + 'planPricing', + args.select, + args.where.id, + args.data, + 'UpdatePlanPricingInput', + 'id', + 'planPricingPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'updatePlanPricing', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanPricing', + 'deletePlanPricing', + 'planPricing', + { + id: args.where.id, + }, + 'DeletePlanPricingInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'deletePlanPricing', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/models/planSubscription.ts b/sdk/constructive-react/src/usage/orm/models/planSubscription.ts new file mode 100644 index 0000000000..8622e5b6ad --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/models/planSubscription.ts @@ -0,0 +1,245 @@ +/** + * PlanSubscription 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 { + PlanSubscription, + PlanSubscriptionWithRelations, + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy, + CreatePlanSubscriptionInput, + UpdatePlanSubscriptionInput, + PlanSubscriptionPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanSubscriptionModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscriptions: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanSubscription', + 'planSubscriptions', + 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, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscriptions', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscription: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanSubscription', + 'planSubscriptions', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscription', + document, + variables, + transform: (data: { + planSubscriptions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planSubscription: data.planSubscriptions?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscription: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanSubscription', + 'planSubscriptions', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscription', + document, + variables, + transform: (data: { + planSubscriptions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planSubscription: data.planSubscriptions?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanSubscription', + 'createPlanSubscription', + 'planSubscription', + args.select, + args.data, + 'CreatePlanSubscriptionInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'createPlanSubscription', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanSubscriptionPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanSubscription', + 'updatePlanSubscription', + 'planSubscription', + args.select, + args.where.id, + args.data, + 'UpdatePlanSubscriptionInput', + 'id', + 'planSubscriptionPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'updatePlanSubscription', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanSubscription', + 'deletePlanSubscription', + 'planSubscription', + { + id: args.where.id, + }, + 'DeletePlanSubscriptionInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'deletePlanSubscription', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/usage/orm/mutation/index.ts b/sdk/constructive-react/src/usage/orm/mutation/index.ts index 176d63791b..d573aa713c 100644 --- a/sdk/constructive-react/src/usage/orm/mutation/index.ts +++ b/sdk/constructive-react/src/usage/orm/mutation/index.ts @@ -7,23 +7,44 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { + GrantAchievementInput, ProvisionBucketInput, + RecomputeCapabilitiesInput, + RevokeAchievementInput, SeedAppLimitCapsDefaultsInput, SeedAppLimitDefaultsInput, + SeedMeterDefaultsInput, SeedOrgLimitCapsDefaultsInput, SeedOrgLimitDefaultsInput, + SeedPlanInput, + SeedTrustLadderInput, + GrantAchievementPayload, ProvisionBucketPayload, + RecomputeCapabilitiesPayload, + RevokeAchievementPayload, SeedAppLimitCapsDefaultsPayload, SeedAppLimitDefaultsPayload, + SeedMeterDefaultsPayload, SeedOrgLimitCapsDefaultsPayload, SeedOrgLimitDefaultsPayload, + SeedPlanPayload, + SeedTrustLadderPayload, + GrantAchievementPayloadSelect, ProvisionBucketPayloadSelect, + RecomputeCapabilitiesPayloadSelect, + RevokeAchievementPayloadSelect, SeedAppLimitCapsDefaultsPayloadSelect, SeedAppLimitDefaultsPayloadSelect, + SeedMeterDefaultsPayloadSelect, SeedOrgLimitCapsDefaultsPayloadSelect, SeedOrgLimitDefaultsPayloadSelect, + SeedPlanPayloadSelect, + SeedTrustLadderPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface GrantAchievementVariables { + input: GrantAchievementInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -34,20 +55,64 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface RecomputeCapabilitiesVariables { + input: RecomputeCapabilitiesInput; +} +export interface RevokeAchievementVariables { + input: RevokeAchievementInput; +} export interface SeedAppLimitCapsDefaultsVariables { input: SeedAppLimitCapsDefaultsInput; } export interface SeedAppLimitDefaultsVariables { input: SeedAppLimitDefaultsInput; } +export interface SeedMeterDefaultsVariables { + input: SeedMeterDefaultsInput; +} export interface SeedOrgLimitCapsDefaultsVariables { input: SeedOrgLimitCapsDefaultsInput; } export interface SeedOrgLimitDefaultsVariables { input: SeedOrgLimitDefaultsInput; } +export interface SeedPlanVariables { + input: SeedPlanInput; +} +export interface SeedTrustLadderVariables { + input: SeedTrustLadderInput; +} export function createMutationOperations(client: OrmClient) { return { + grantAchievement: ( + args: GrantAchievementVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + grantAchievement: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'GrantAchievement', + fieldName: 'grantAchievement', + ...buildCustomDocument( + 'mutation', + 'GrantAchievement', + 'grantAchievement', + options.select, + args, + [ + { + name: 'input', + type: 'GrantAchievementInput!', + }, + ], + connectionFieldsMap, + 'GrantAchievementPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -77,6 +142,64 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + recomputeCapabilities: ( + args: RecomputeCapabilitiesVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + recomputeCapabilities: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RecomputeCapabilities', + fieldName: 'recomputeCapabilities', + ...buildCustomDocument( + 'mutation', + 'RecomputeCapabilities', + 'recomputeCapabilities', + options.select, + args, + [ + { + name: 'input', + type: 'RecomputeCapabilitiesInput!', + }, + ], + connectionFieldsMap, + 'RecomputeCapabilitiesPayload' + ), + }), + revokeAchievement: ( + args: RevokeAchievementVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeAchievement: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeAchievement', + fieldName: 'revokeAchievement', + ...buildCustomDocument( + 'mutation', + 'RevokeAchievement', + 'revokeAchievement', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeAchievementInput!', + }, + ], + connectionFieldsMap, + 'RevokeAchievementPayload' + ), + }), seedAppLimitCapsDefaults: ( args: SeedAppLimitCapsDefaultsVariables, options: { @@ -135,6 +258,35 @@ export function createMutationOperations(client: OrmClient) { 'SeedAppLimitDefaultsPayload' ), }), + seedMeterDefaults: ( + args: SeedMeterDefaultsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedMeterDefaults: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedMeterDefaults', + fieldName: 'seedMeterDefaults', + ...buildCustomDocument( + 'mutation', + 'SeedMeterDefaults', + 'seedMeterDefaults', + options.select, + args, + [ + { + name: 'input', + type: 'SeedMeterDefaultsInput!', + }, + ], + connectionFieldsMap, + 'SeedMeterDefaultsPayload' + ), + }), seedOrgLimitCapsDefaults: ( args: SeedOrgLimitCapsDefaultsVariables, options: { @@ -193,5 +345,63 @@ export function createMutationOperations(client: OrmClient) { 'SeedOrgLimitDefaultsPayload' ), }), + seedPlan: ( + args: SeedPlanVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedPlan: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedPlan', + fieldName: 'seedPlan', + ...buildCustomDocument( + 'mutation', + 'SeedPlan', + 'seedPlan', + options.select, + args, + [ + { + name: 'input', + type: 'SeedPlanInput!', + }, + ], + connectionFieldsMap, + 'SeedPlanPayload' + ), + }), + seedTrustLadder: ( + args: SeedTrustLadderVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedTrustLadder: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedTrustLadder', + fieldName: 'seedTrustLadder', + ...buildCustomDocument( + 'mutation', + 'SeedTrustLadder', + 'seedTrustLadder', + options.select, + args, + [ + { + name: 'input', + type: 'SeedTrustLadderInput!', + }, + ], + connectionFieldsMap, + 'SeedTrustLadderPayload' + ), + }), }; } diff --git a/sdk/constructive-react/src/usage/orm/query/index.ts b/sdk/constructive-react/src/usage/orm/query/index.ts new file mode 100644 index 0000000000..d620b32b26 --- /dev/null +++ b/sdk/constructive-react/src/usage/orm/query/index.ts @@ -0,0 +1,166 @@ +/** + * Custom query operations + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { QueryBuilder, buildCustomDocument } from '../query-builder'; +import type { InferSelectResult, StrictSelect } from '../select-types'; +import type { AppLevelRequirementConnection } from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export interface EventsAchievedVariables { + level?: string; + roleId?: string; +} +export interface EventsRequiredVariables { + /** Read all values in the set after (below) this cursor. */ + after?: string; + /** Only read the first `n` values of the set. */ + first?: number; + level?: string; + /** + * Skip the first `n` values from our `after` cursor, an alternative to cursor + * based pagination. May not be used with `last`. + */ + offset?: number; + roleId?: string; +} +export function createQueryOperations(client: OrmClient) { + return { + captureAppLimitDefaults: (options?: { select?: Record }) => + new QueryBuilder<{ + captureAppLimitDefaults: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureAppLimitDefaults', + fieldName: 'captureAppLimitDefaults', + ...buildCustomDocument( + 'query', + 'CaptureAppLimitDefaults', + 'captureAppLimitDefaults', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + captureOrgLimitDefaults: (options?: { select?: Record }) => + new QueryBuilder<{ + captureOrgLimitDefaults: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureOrgLimitDefaults', + fieldName: 'captureOrgLimitDefaults', + ...buildCustomDocument( + 'query', + 'CaptureOrgLimitDefaults', + 'captureOrgLimitDefaults', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + captureTrustLadder: (options?: { select?: Record }) => + new QueryBuilder<{ + captureTrustLadder: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureTrustLadder', + fieldName: 'captureTrustLadder', + ...buildCustomDocument( + 'query', + 'CaptureTrustLadder', + 'captureTrustLadder', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + eventsAchieved: ( + args: EventsAchievedVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + eventsAchieved: boolean | null; + }>({ + client, + operation: 'query', + operationName: 'EventsAchieved', + fieldName: 'eventsAchieved', + ...buildCustomDocument( + 'query', + 'EventsAchieved', + 'eventsAchieved', + options?.select, + args, + [ + { + name: 'level', + type: 'String', + }, + { + name: 'roleId', + type: 'UUID', + }, + ], + connectionFieldsMap, + undefined + ), + }), + eventsRequired: ( + args: EventsRequiredVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + eventsRequired: AppLevelRequirementConnection | null; + }>({ + client, + operation: 'query', + operationName: 'EventsRequired', + fieldName: 'eventsRequired', + ...buildCustomDocument( + 'query', + 'EventsRequired', + 'eventsRequired', + options?.select, + args, + [ + { + name: 'after', + type: 'Cursor', + }, + { + name: 'first', + type: 'Int', + }, + { + name: 'level', + type: 'String', + }, + { + name: 'offset', + type: 'Int', + }, + { + name: 'roleId', + type: 'UUID', + }, + ], + connectionFieldsMap, + undefined + ), + }), + }; +} diff --git a/sdk/constructive-react/src/usage/schema-types.ts b/sdk/constructive-react/src/usage/schema-types.ts index 4bb53eb436..e26701d7bd 100644 --- a/sdk/constructive-react/src/usage/schema-types.ts +++ b/sdk/constructive-react/src/usage/schema-types.ts @@ -5,6 +5,13 @@ */ import type { + AppAchievementReward, + AppEvent, + AppEventAggregate, + AppEventType, + AppLevel, + AppLevelGrant, + AppLevelRequirement, AppLimit, AppLimitCap, AppLimitCapsDefault, @@ -15,6 +22,12 @@ import type { AppLimitDefault, AppLimitEvent, AppLimitWarning, + BillingUsageSummary, + Ledger, + Meter, + MeterCredit, + MeterDefault, + MeterSource, OrgLimit, OrgLimitAggregate, OrgLimitCap, @@ -23,6 +36,13 @@ import type { OrgLimitDefault, OrgLimitEvent, OrgLimitWarning, + Plan, + PlanCap, + PlanLimit, + PlanMeterLimit, + PlanOverride, + PlanPricing, + PlanSubscription, BigFloatFilter, BigIntFilter, BitStringFilter, @@ -41,6 +61,152 @@ import type { UUIDListFilter, VectorFilter, } from './types'; +export type ConstructiveInternalTypeImage = unknown; +/** Methods to use when ordering `AppAchievementReward`. */ +export type AppAchievementRewardOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'EXPIRES_INTERVAL_ASC' + | 'EXPIRES_INTERVAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REWARD_TYPE_ASC' + | 'REWARD_TYPE_DESC' + | 'TARGET_NAME_ASC' + | 'TARGET_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppEventAggregate`. */ +export type AppEventAggregateOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppEvent`. */ +export type AppEventOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `AppEventType`. */ +export type AppEventTypeOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'FEEDS_LEVELS_ASC' + | 'FEEDS_LEVELS_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppLevelGrant`. */ +export type AppLevelGrantOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppLevel`. */ +export type AppLevelOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IMAGE_ASC' + | 'IMAGE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `AppLevelRequirement`. */ +export type AppLevelRequirementOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'GROUP_KEY_ASC' + | 'GROUP_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_ASC' + | 'LEVEL_DESC' + | 'METRIC_ASC' + | 'METRIC_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIORITY_ASC' + | 'PRIORITY_DESC' + | 'REQUIRED_COUNT_ASC' + | 'REQUIRED_COUNT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `AppLimitCap`. */ export type AppLimitCapOrderBy = | 'ENTITY_ID_ASC' @@ -217,6 +383,152 @@ export type AppLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +/** Methods to use when ordering `BillingUsageSummary`. */ +export type BillingUsageSummaryOrderBy = + | 'CREDITS_CONSUMED_ASC' + | 'CREDITS_CONSUMED_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'OVERAGE_UNITS_ASC' + | 'OVERAGE_UNITS_DESC' + | 'PERIOD_END_ASC' + | 'PERIOD_END_DESC' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'QUANTITY_USED_ASC' + | 'QUANTITY_USED_DESC'; +/** Methods to use when ordering `Ledger`. */ +export type LedgerOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DELTA_ASC' + | 'DELTA_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ENTRY_TYPE_ASC' + | 'ENTRY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEDGER_CLASS_ASC' + | 'LEDGER_CLASS_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'USAGE_AFTER_ASC' + | 'USAGE_AFTER_DESC'; +/** Methods to use when ordering `MeterCredit`. */ +export type MeterCreditOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_ID_ASC' + | 'METER_ID_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +/** Methods to use when ordering `MeterDefault`. */ +export type MeterDefaultOrderBy = + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DEFAULT_PLAN_LIMIT_ASC' + | 'DEFAULT_PLAN_LIMIT_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +/** Methods to use when ordering `Meter`. */ +export type MeterOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLLOVER_CAP_ASC' + | 'ROLLOVER_CAP_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +/** Methods to use when ordering `MeterSource`. */ +export type MeterSourceOrderBy = + | 'AGGREGATION_TYPE_ASC' + | 'AGGREGATION_TYPE_DESC' + | 'DIMENSION_PATH_ASC' + | 'DIMENSION_PATH_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SOURCE_METRIC_ASC' + | 'SOURCE_METRIC_DESC'; /** Methods to use when ordering `OrgLimitAggregate`. */ export type OrgLimitAggregateOrderBy = | 'ENTITY_ID_ASC' @@ -391,6 +703,508 @@ export type OrgLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +/** Methods to use when ordering `PlanCap`. */ +export type PlanCapOrderBy = + | 'CAP_NAME_ASC' + | 'CAP_NAME_DESC' + | 'CAP_VALUE_ASC' + | 'CAP_VALUE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `PlanLimit`. */ +export type PlanLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `PlanMeterLimit`. */ +export type PlanMeterLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `Plan`. */ +export type PlanOrderBy = + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `PlanOverride`. */ +export type PlanOverrideOrderBy = + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +/** Methods to use when ordering `PlanPricing`. */ +export type PlanPricingOrderBy = + | 'BILLING_INTERVAL_ASC' + | 'BILLING_INTERVAL_DESC' + | 'CURRENCY_ASC' + | 'CURRENCY_DESC' + | 'DISCOUNT_PERCENT_ASC' + | 'DISCOUNT_PERCENT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRICE_ASC' + | 'PRICE_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +/** Methods to use when ordering `PlanSubscription`. */ +export type PlanSubscriptionOrderBy = + | 'ENDS_AT_ASC' + | 'ENDS_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STARTS_AT_ASC' + | 'STARTS_AT_DESC'; +/** A filter to be used against `AppAchievementReward` object types. All fields are combined with a logical ‘and.’ */ +export interface AppAchievementRewardFilter { + /** Filter by the object’s `amount` field. */ + amount?: IntFilter; + /** Checks for all expressions in this list. */ + and?: AppAchievementRewardFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `expiresInterval` field. */ + expiresInterval?: IntervalFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppAchievementRewardFilter; + /** Checks for any expressions in this list. */ + or?: AppAchievementRewardFilter[]; + /** Filter by the object’s `rewardType` field. */ + rewardType?: StringFilter; + /** Filter by the object’s `targetName` field. */ + targetName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppAchievementReward` */ +export interface AppAchievementRewardInput { + /** Number of credits to grant; unused by capability rewards */ + amount?: number; + createdAt?: string; + /** Credit type: permanent, expiring, etc. */ + creditType?: string; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: IntervalInput; + id?: string; + /** Name of the level this reward is granted for */ + levelName: string; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType: string; + /** Target limit name, meter slug, or capability catalog name */ + targetName: string; + updatedAt?: string; +} +/** Represents an update to a `AppAchievementReward`. Fields that are set will be updated. */ +export interface AppAchievementRewardPatch { + /** Number of credits to grant; unused by capability rewards */ + amount?: number; + createdAt?: string; + /** Credit type: permanent, expiring, etc. */ + creditType?: string; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: IntervalInput; + id?: string; + /** Name of the level this reward is granted for */ + levelName?: string; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType?: string; + /** Target limit name, meter slug, or capability catalog name */ + targetName?: string; + updatedAt?: string; +} +/** A filter to be used against `AppEventAggregate` object types. All fields are combined with a logical ‘and.’ */ +export interface AppEventAggregateFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppEventAggregateFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppEventAggregateFilter; + /** Checks for any expressions in this list. */ + or?: AppEventAggregateFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppEventAggregate` */ +export interface AppEventAggregateInput { + actorId?: string; + /** Cumulative count of completed steps toward this requirement */ + count?: number; + createdAt?: string; + id?: string; + /** Name identifier of the level requirement being tracked */ + name: string; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string; + updatedAt?: string; +} +/** Represents an update to a `AppEventAggregate`. Fields that are set will be updated. */ +export interface AppEventAggregatePatch { + actorId?: string; + /** Cumulative count of completed steps toward this requirement */ + count?: number; + createdAt?: string; + id?: string; + /** Name identifier of the level requirement being tracked */ + name?: string; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string; + updatedAt?: string; +} +/** A filter to be used against `AppEvent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppEventFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppEventFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppEventFilter; + /** Checks for any expressions in this list. */ + or?: AppEventFilter[]; +} +/** An input for mutations affecting `AppEvent` */ +export interface AppEventInput { + actorId?: string; + /** Number of units completed in this step action */ + count?: number; + createdAt?: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id?: string; + /** Name identifier of the level requirement this step fulfills */ + name: string; +} +/** Represents an update to a `AppEvent`. Fields that are set will be updated. */ +export interface AppEventPatch { + actorId?: string; + /** Number of units completed in this step action */ + count?: number; + createdAt?: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id?: string; + /** Name identifier of the level requirement this step fulfills */ + name?: string; +} +/** A filter to be used against `AppEventType` object types. All fields are combined with a logical ‘and.’ */ +export interface AppEventTypeFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: AppEventTypeFilter[]; + /** Filter by the object’s `category` field. */ + category?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `feedsLevels` field. */ + feedsLevels?: BooleanFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppEventTypeFilter; + /** Checks for any expressions in this list. */ + or?: AppEventTypeFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppEventType` */ +export interface AppEventTypeInput { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string; + createdAt?: string; + /** Human-readable description of this event type */ + description?: string; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean; + id?: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean; + /** Unique name identifier for this event type */ + name: string; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: IntervalInput; + updatedAt?: string; +} +/** Represents an update to a `AppEventType`. Fields that are set will be updated. */ +export interface AppEventTypePatch { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string; + createdAt?: string; + /** Human-readable description of this event type */ + description?: string; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean; + id?: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean; + /** Unique name identifier for this event type */ + name?: string; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: IntervalInput; + updatedAt?: string; +} +/** A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ */ +export interface AppLevelFilter { + /** Checks for all expressions in this list. */ + and?: AppLevelFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `image` field. */ + image?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelFilter[]; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `AppLevelGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppLevelGrantFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppLevelGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppLevelGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelGrantFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppLevelGrant` */ +export interface AppLevelGrantInput { + actorId?: string; + createdAt?: string; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string; + id?: string; + /** Name of the level that was achieved */ + levelName: string; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string; + updatedAt?: string; +} +/** Represents an update to a `AppLevelGrant`. Fields that are set will be updated. */ +export interface AppLevelGrantPatch { + actorId?: string; + createdAt?: string; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string; + id?: string; + /** Name of the level that was achieved */ + levelName?: string; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevel` */ +export interface AppLevelInput { + createdAt?: string; + /** Human-readable description of what this level represents */ + description?: string; + id?: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage; + /** Unique name of the level */ + name: string; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string; + updatedAt?: string; +} +/** Represents an update to a `AppLevel`. Fields that are set will be updated. */ +export interface AppLevelPatch { + createdAt?: string; + /** Human-readable description of what this level represents */ + description?: string; + id?: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage; + /** Upload for Badge or icon image associated with this level */ + imageUpload?: File; + /** Unique name of the level */ + name?: string; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string; + updatedAt?: string; +} +/** A filter to be used against `AppLevelRequirement` object types. All fields are combined with a logical ‘and.’ */ +export interface AppLevelRequirementFilter { + /** Checks for all expressions in this list. */ + and?: AppLevelRequirementFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `groupKey` field. */ + groupKey?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `level` field. */ + level?: StringFilter; + /** Filter by the object’s `metric` field. */ + metric?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelRequirementFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelRequirementFilter[]; + /** Filter by the object’s `priority` field. */ + priority?: IntFilter; + /** Filter by the object’s `requiredCount` field. */ + requiredCount?: IntFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `AppLevelRequirement` */ +export interface AppLevelRequirementInput { + createdAt?: string; + /** Human-readable description of what this requirement entails */ + description?: string; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string; + id?: string; + /** Name of the level this requirement belongs to */ + level: string; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string; + /** Name identifier of the requirement (matches step names) */ + name: string; + /** Display ordering priority; lower values appear first */ + priority?: number; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number; + updatedAt?: string; +} +/** Represents an update to a `AppLevelRequirement`. Fields that are set will be updated. */ +export interface AppLevelRequirementPatch { + createdAt?: string; + /** Human-readable description of what this requirement entails */ + description?: string; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string; + id?: string; + /** Name of the level this requirement belongs to */ + level?: string; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string; + /** Name identifier of the requirement (matches step names) */ + name?: string; + /** Display ordering priority; lower values appear first */ + priority?: number; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number; + updatedAt?: string; +} /** A filter to be used against `AppLimitCap` object types. All fields are combined with a logical ‘and.’ */ export interface AppLimitCapFilter { /** Checks for all expressions in this list. */ @@ -877,7 +1691,7 @@ export interface AppLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -905,7 +1719,7 @@ export interface AppLimitPatch { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -959,6 +1773,155 @@ export interface AppLimitWarningPatch { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string; } +/** A filter to be used against `BillingUsageSummary` object types. All fields are combined with a logical ‘and.’ */ +export interface BillingUsageSummaryFilter { + /** Checks for all expressions in this list. */ + and?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `creditsConsumed` field. */ + creditsConsumed?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: BillingUsageSummaryFilter; + /** Checks for any expressions in this list. */ + or?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `overageUnits` field. */ + overageUnits?: BigIntFilter; + /** Filter by the object’s `periodEnd` field. */ + periodEnd?: DatetimeFilter; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; + /** Filter by the object’s `quantityUsed` field. */ + quantityUsed?: BigIntFilter; +} +/** An input for mutations affecting `BillingUsageSummary` */ +export interface BillingUsageSummaryInput { + /** Universal credits consumed during this period */ + creditsConsumed?: string; + /** The entity (org, team, user) this summary belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + id?: string; + /** Which meter this summary tracks */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string; + /** End of the billing period this summary covers */ + periodEnd: string; + /** Start of the billing period this summary covers */ + periodStart: string; + /** Plan limit that was in effect during this period */ + planLimit?: string; + /** Total units consumed during this period */ + quantityUsed?: string; +} +/** Represents an update to a `BillingUsageSummary`. Fields that are set will be updated. */ +export interface BillingUsageSummaryPatch { + /** Universal credits consumed during this period */ + creditsConsumed?: string; + /** The entity (org, team, user) this summary belongs to */ + entityId?: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + id?: string; + /** Which meter this summary tracks */ + meterSlug?: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string; + /** End of the billing period this summary covers */ + periodEnd?: string; + /** Start of the billing period this summary covers */ + periodStart?: string; + /** Plan limit that was in effect during this period */ + planLimit?: string; + /** Total units consumed during this period */ + quantityUsed?: string; +} +/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeImageFilter { + /** Contained by the specified JSON. */ + containedBy?: ConstructiveInternalTypeImage; + /** Contains the specified JSON. */ + contains?: ConstructiveInternalTypeImage; + /** Contains all of the specified keys. */ + containsAllKeys?: string[]; + /** Contains any of the specified keys. */ + containsAnyKeys?: string[]; + /** Contains the specified key. */ + containsKey?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: ConstructiveInternalTypeImage; + /** Equal to the specified value. */ + equalTo?: ConstructiveInternalTypeImage; + /** Greater than the specified value. */ + greaterThan?: ConstructiveInternalTypeImage; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Included in the specified list. */ + in?: ConstructiveInternalTypeImage[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: ConstructiveInternalTypeImage; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: ConstructiveInternalTypeImage; + /** Not equal to the specified value. */ + notEqualTo?: ConstructiveInternalTypeImage; + /** Not included in the specified list. */ + notIn?: ConstructiveInternalTypeImage[]; +} +export interface CreateAppAchievementRewardInput { + /** The `AppAchievementReward` to be created by this mutation. */ + appAchievementReward: AppAchievementRewardInput; + clientMutationId?: string; +} +export interface CreateAppEventAggregateInput { + /** The `AppEventAggregate` to be created by this mutation. */ + appEventAggregate: AppEventAggregateInput; + clientMutationId?: string; +} +export interface CreateAppEventInput { + /** The `AppEvent` to be created by this mutation. */ + appEvent: AppEventInput; + clientMutationId?: string; +} +export interface CreateAppEventTypeInput { + /** The `AppEventType` to be created by this mutation. */ + appEventType: AppEventTypeInput; + clientMutationId?: string; +} +export interface CreateAppLevelGrantInput { + /** The `AppLevelGrant` to be created by this mutation. */ + appLevelGrant: AppLevelGrantInput; + clientMutationId?: string; +} +export interface CreateAppLevelInput { + /** The `AppLevel` to be created by this mutation. */ + appLevel: AppLevelInput; + clientMutationId?: string; +} +export interface CreateAppLevelRequirementInput { + /** The `AppLevelRequirement` to be created by this mutation. */ + appLevelRequirement: AppLevelRequirementInput; + clientMutationId?: string; +} export interface CreateAppLimitCapInput { /** The `AppLimitCap` to be created by this mutation. */ appLimitCap: AppLimitCapInput; @@ -1009,6 +1972,36 @@ export interface CreateAppLimitWarningInput { appLimitWarning: AppLimitWarningInput; clientMutationId?: string; } +export interface CreateBillingUsageSummaryInput { + /** The `BillingUsageSummary` to be created by this mutation. */ + billingUsageSummary: BillingUsageSummaryInput; + clientMutationId?: string; +} +export interface CreateLedgerInput { + clientMutationId?: string; + /** The `Ledger` to be created by this mutation. */ + ledger: LedgerInput; +} +export interface CreateMeterCreditInput { + clientMutationId?: string; + /** The `MeterCredit` to be created by this mutation. */ + meterCredit: MeterCreditInput; +} +export interface CreateMeterDefaultInput { + clientMutationId?: string; + /** The `MeterDefault` to be created by this mutation. */ + meterDefault: MeterDefaultInput; +} +export interface CreateMeterInput { + clientMutationId?: string; + /** The `Meter` to be created by this mutation. */ + meter: MeterInput; +} +export interface CreateMeterSourceInput { + clientMutationId?: string; + /** The `MeterSource` to be created by this mutation. */ + meterSource: MeterSourceInput; +} export interface CreateOrgLimitAggregateInput { clientMutationId?: string; /** The `OrgLimitAggregate` to be created by this mutation. */ @@ -1049,6 +2042,71 @@ export interface CreateOrgLimitWarningInput { /** The `OrgLimitWarning` to be created by this mutation. */ orgLimitWarning: OrgLimitWarningInput; } +export interface CreatePlanCapInput { + clientMutationId?: string; + /** The `PlanCap` to be created by this mutation. */ + planCap: PlanCapInput; +} +export interface CreatePlanInput { + clientMutationId?: string; + /** The `Plan` to be created by this mutation. */ + plan: PlanInput; +} +export interface CreatePlanLimitInput { + clientMutationId?: string; + /** The `PlanLimit` to be created by this mutation. */ + planLimit: PlanLimitInput; +} +export interface CreatePlanMeterLimitInput { + clientMutationId?: string; + /** The `PlanMeterLimit` to be created by this mutation. */ + planMeterLimit: PlanMeterLimitInput; +} +export interface CreatePlanOverrideInput { + clientMutationId?: string; + /** The `PlanOverride` to be created by this mutation. */ + planOverride: PlanOverrideInput; +} +export interface CreatePlanPricingInput { + clientMutationId?: string; + /** The `PlanPricing` to be created by this mutation. */ + planPricing: PlanPricingInput; +} +export interface CreatePlanSubscriptionInput { + clientMutationId?: string; + /** The `PlanSubscription` to be created by this mutation. */ + planSubscription: PlanSubscriptionInput; +} +export interface DeleteAppAchievementRewardInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppEventAggregateInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppEventInput { + clientMutationId?: string; + createdAt: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id: string; +} +export interface DeleteAppEventTypeInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppLevelGrantInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppLevelInput { + clientMutationId?: string; + id: string; +} +export interface DeleteAppLevelRequirementInput { + clientMutationId?: string; + id: string; +} export interface DeleteAppLimitCapInput { clientMutationId?: string; id: string; @@ -1091,6 +2149,32 @@ export interface DeleteAppLimitWarningInput { clientMutationId?: string; id: string; } +export interface DeleteBillingUsageSummaryInput { + clientMutationId?: string; + id: string; +} +export interface DeleteLedgerInput { + clientMutationId?: string; + createdAt: string; + /** Unique identifier for each ledger entry */ + id: string; +} +export interface DeleteMeterCreditInput { + clientMutationId?: string; + id: string; +} +export interface DeleteMeterDefaultInput { + clientMutationId?: string; + id: string; +} +export interface DeleteMeterInput { + clientMutationId?: string; + id: string; +} +export interface DeleteMeterSourceInput { + clientMutationId?: string; + id: string; +} export interface DeleteOrgLimitAggregateInput { clientMutationId?: string; id: string; @@ -1125,6 +2209,39 @@ export interface DeleteOrgLimitWarningInput { clientMutationId?: string; id: string; } +export interface DeletePlanCapInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanLimitInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanMeterLimitInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanOverrideInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanPricingInput { + clientMutationId?: string; + id: string; +} +export interface DeletePlanSubscriptionInput { + clientMutationId?: string; + id: string; +} +export interface GrantAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} /** A filter to be used against Interval fields. All fields are combined with a logical ‘and.’ */ export interface IntervalFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -1150,24 +2267,386 @@ export interface IntervalFilter { /** Not included in the specified list. */ notIn?: IntervalInput[]; } -/** An interval of time that has passed where the smallest distinct unit is a second. */ -export interface IntervalInput { - /** A quantity of days. */ - days?: number; - /** A quantity of hours. */ - hours?: number; - /** A quantity of minutes. */ - minutes?: number; - /** A quantity of months. */ - months?: number; - /** - * A quantity of seconds. This is the only non-integer field, as all the other - * fields will dump their overflow into a smaller unit of time. Intervals don’t - * have a smaller unit than seconds. - */ - seconds?: number; - /** A quantity of years. */ - years?: number; +/** An interval of time that has passed where the smallest distinct unit is a second. */ +export interface IntervalInput { + /** A quantity of days. */ + days?: number; + /** A quantity of hours. */ + hours?: number; + /** A quantity of minutes. */ + minutes?: number; + /** A quantity of months. */ + months?: number; + /** + * A quantity of seconds. This is the only non-integer field, as all the other + * fields will dump their overflow into a smaller unit of time. Intervals don’t + * have a smaller unit than seconds. + */ + seconds?: number; + /** A quantity of years. */ + years?: number; +} +/** A filter to be used against `Ledger` object types. All fields are combined with a logical ‘and.’ */ +export interface LedgerFilter { + /** Checks for all expressions in this list. */ + and?: LedgerFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `delta` field. */ + delta?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `entryType` field. */ + entryType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ledgerClass` field. */ + ledgerClass?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: LedgerFilter; + /** Checks for any expressions in this list. */ + or?: LedgerFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `usageAfter` field. */ + usageAfter?: BigIntFilter; +} +/** An input for mutations affecting `Ledger` */ +export interface LedgerInput { + createdAt?: string; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta: string; + /** The entity this ledger entry belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string; + /** Unique identifier for each ledger entry */ + id?: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: unknown; + /** Which meter this entry is for */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Running total of usage after this entry */ + usageAfter: string; +} +/** Represents an update to a `Ledger`. Fields that are set will be updated. */ +export interface LedgerPatch { + createdAt?: string; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta?: string; + /** The entity this ledger entry belongs to */ + entityId?: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string; + /** Unique identifier for each ledger entry */ + id?: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: unknown; + /** Which meter this entry is for */ + meterSlug?: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Running total of usage after this entry */ + usageAfter?: string; +} +/** A filter to be used against `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterCreditFilter { + /** Filter by the object’s `amount` field. */ + amount?: BigIntFilter; + /** Checks for all expressions in this list. */ + and?: MeterCreditFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meter` relation. */ + meter?: MeterFilter; + /** Filter by the object’s `meterId` field. */ + meterId?: UUIDFilter; + /** Negates the expression. */ + not?: MeterCreditFilter; + /** Checks for any expressions in this list. */ + or?: MeterCreditFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +/** An input for mutations affecting `MeterCredit` */ +export interface MeterCreditInput { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount: string; + /** When this credit was granted */ + createdAt?: string; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string; + /** Entity this credit applies to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string; + id?: string; + /** FK to meters — which meter definition this credit applies to */ + meterId: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string; +} +/** Represents an update to a `MeterCredit`. Fields that are set will be updated. */ +export interface MeterCreditPatch { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount?: string; + /** When this credit was granted */ + createdAt?: string; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string; + /** Entity this credit applies to */ + entityId?: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string; + id?: string; + /** FK to meters — which meter definition this credit applies to */ + meterId?: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string; +} +/** A filter to be used against `MeterDefault` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterDefaultFilter { + /** Checks for all expressions in this list. */ + and?: MeterDefaultFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: BigFloatFilter; + /** Filter by the object’s `defaultPlanLimit` field. */ + defaultPlanLimit?: BigIntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterDefaultFilter; + /** Checks for any expressions in this list. */ + or?: MeterDefaultFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +/** An input for mutations affecting `MeterDefault` */ +export interface MeterDefaultInput { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string; + /** Human-readable name for the default meter */ + displayName?: string; + id?: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string; + /** Meter slug that matches the slug in the meters table */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string; +} +/** Represents an update to a `MeterDefault`. Fields that are set will be updated. */ +export interface MeterDefaultPatch { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string; + /** Human-readable name for the default meter */ + displayName?: string; + id?: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string; + /** Meter slug that matches the slug in the meters table */ + slug?: string; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string; +} +/** A filter to be used against `Meter` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: IntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterCredits` relation. */ + meterCredits?: MeterToManyMeterCreditFilter; + /** `meterCredits` exist. */ + meterCreditsExist?: boolean; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterFilter; + /** Checks for any expressions in this list. */ + or?: MeterFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `rolloverCap` field. */ + rolloverCap?: BigIntFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +/** An input for mutations affecting `Meter` */ +export interface MeterInput { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number; + /** Human-readable name for the meter */ + displayName?: string; + id?: string; + /** Whether this meter is currently active */ + isActive?: boolean; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: IntervalInput; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string; +} +/** Represents an update to a `Meter`. Fields that are set will be updated. */ +export interface MeterPatch { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number; + /** Human-readable name for the meter */ + displayName?: string; + id?: string; + /** Whether this meter is currently active */ + isActive?: boolean; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: IntervalInput; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug?: string; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string; +} +/** A filter to be used against `MeterSource` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterSourceFilter { + /** Filter by the object’s `aggregationType` field. */ + aggregationType?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterSourceFilter[]; + /** Filter by the object’s `dimensionPath` field. */ + dimensionPath?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: MeterSourceFilter; + /** Checks for any expressions in this list. */ + or?: MeterSourceFilter[]; + /** Filter by the object’s `sourceMetric` field. */ + sourceMetric?: StringFilter; +} +/** An input for mutations affecting `MeterSource` */ +export interface MeterSourceInput { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath: string; + id?: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug: string; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric: string; +} +/** Represents an update to a `MeterSource`. Fields that are set will be updated. */ +export interface MeterSourcePatch { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath?: string; + id?: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug?: string; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric?: string; +} +/** A filter to be used against many `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterToManyMeterCreditFilter { + /** Filters to entities where every related entity matches. */ + every?: MeterCreditFilter; + /** Filters to entities where no related entity matches. */ + none?: MeterCreditFilter; + /** Filters to entities where at least one related entity matches. */ + some?: MeterCreditFilter; } /** A filter to be used against `OrgLimitAggregate` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitAggregateFilter { @@ -1223,7 +2702,7 @@ export interface OrgLimitAggregateInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -1253,7 +2732,7 @@ export interface OrgLimitAggregatePatch { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -1599,7 +3078,7 @@ export interface OrgLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -1628,7 +3107,7 @@ export interface OrgLimitPatch { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -1688,6 +3167,394 @@ export interface OrgLimitWarningPatch { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string; } +/** A filter to be used against `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanCapFilter { + /** Checks for all expressions in this list. */ + and?: PlanCapFilter[]; + /** Filter by the object’s `capName` field. */ + capName?: StringFilter; + /** Filter by the object’s `capValue` field. */ + capValue?: BigIntFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlanCapFilter; + /** Checks for any expressions in this list. */ + or?: PlanCapFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** An input for mutations affecting `PlanCap` */ +export interface PlanCapInput { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName: string; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string; + id?: string; + /** Reference to the plan this cap setting belongs to */ + planId: string; +} +/** Represents an update to a `PlanCap`. Fields that are set will be updated. */ +export interface PlanCapPatch { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName?: string; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string; + id?: string; + /** Reference to the plan this cap setting belongs to */ + planId?: string; +} +/** A filter to be used against `Plan` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanFilter { + /** Checks for all expressions in this list. */ + and?: PlanFilter[]; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlanFilter; + /** Checks for any expressions in this list. */ + or?: PlanFilter[]; + /** Filter by the object’s `planCaps` relation. */ + planCaps?: PlanToManyPlanCapFilter; + /** `planCaps` exist. */ + planCapsExist?: boolean; + /** Filter by the object’s `planLimits` relation. */ + planLimits?: PlanToManyPlanLimitFilter; + /** `planLimits` exist. */ + planLimitsExist?: boolean; + /** Filter by the object’s `planMeterLimits` relation. */ + planMeterLimits?: PlanToManyPlanMeterLimitFilter; + /** `planMeterLimits` exist. */ + planMeterLimitsExist?: boolean; + /** Filter by the object’s `planPricings` relation. */ + planPricings?: PlanToManyPlanPricingFilter; + /** `planPricings` exist. */ + planPricingsExist?: boolean; + /** Filter by the object’s `planSubscriptions` relation. */ + planSubscriptions?: PlanToManyPlanSubscriptionFilter; + /** `planSubscriptions` exist. */ + planSubscriptionsExist?: boolean; +} +/** An input for mutations affecting `Plan` */ +export interface PlanInput { + /** Human-readable description of the plan tier */ + description?: string; + id?: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name: string; +} +/** A filter to be used against `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** An input for mutations affecting `PlanLimit` */ +export interface PlanLimitInput { + id?: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName: string; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue: string; + /** Reference to the plan this limit configuration belongs to */ + planId: string; +} +/** Represents an update to a `PlanLimit`. Fields that are set will be updated. */ +export interface PlanLimitPatch { + id?: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName?: string; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue?: string; + /** Reference to the plan this limit configuration belongs to */ + planId?: string; +} +/** A filter to be used against `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanMeterLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanMeterLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: PlanMeterLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanMeterLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; +} +/** An input for mutations affecting `PlanMeterLimit` */ +export interface PlanMeterLimitInput { + id?: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug: string; + /** Reference to the plan this meter limit belongs to */ + planId: string; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit: string; +} +/** Represents an update to a `PlanMeterLimit`. Fields that are set will be updated. */ +export interface PlanMeterLimitPatch { + id?: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug?: string; + /** Reference to the plan this meter limit belongs to */ + planId?: string; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit?: string; +} +/** A filter to be used against `PlanOverride` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanOverrideFilter { + /** Checks for all expressions in this list. */ + and?: PlanOverrideFilter[]; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanOverrideFilter; + /** Checks for any expressions in this list. */ + or?: PlanOverrideFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +/** An input for mutations affecting `PlanOverride` */ +export interface PlanOverrideInput { + /** Entity receiving the custom override (personal org or actual org) */ + entityId: string; + /** When this override expires; NULL means permanent */ + expiresAt?: string; + id?: string; + /** Name of the limit being overridden */ + limitName: string; + /** Override maximum value; negative means unlimited */ + maxValue: string; + /** Admin note explaining why this override was granted */ + reason?: string; +} +/** Represents an update to a `PlanOverride`. Fields that are set will be updated. */ +export interface PlanOverridePatch { + /** Entity receiving the custom override (personal org or actual org) */ + entityId?: string; + /** When this override expires; NULL means permanent */ + expiresAt?: string; + id?: string; + /** Name of the limit being overridden */ + limitName?: string; + /** Override maximum value; negative means unlimited */ + maxValue?: string; + /** Admin note explaining why this override was granted */ + reason?: string; +} +/** Represents an update to a `Plan`. Fields that are set will be updated. */ +export interface PlanPatch { + /** Human-readable description of the plan tier */ + description?: string; + id?: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name?: string; +} +/** A filter to be used against `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanPricingFilter { + /** Checks for all expressions in this list. */ + and?: PlanPricingFilter[]; + /** Filter by the object’s `billingInterval` field. */ + billingInterval?: StringFilter; + /** Filter by the object’s `currency` field. */ + currency?: StringFilter; + /** Filter by the object’s `discountPercent` field. */ + discountPercent?: BigFloatFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanPricingFilter; + /** Checks for any expressions in this list. */ + or?: PlanPricingFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `price` field. */ + price?: BigIntFilter; +} +/** An input for mutations affecting `PlanPricing` */ +export interface PlanPricingInput { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval: string; + /** ISO 4217 currency code (lowercase) */ + currency?: string; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string; + id?: string; + /** Whether this pricing option is currently available */ + isActive?: boolean; + /** Reference to the plan this pricing belongs to */ + planId: string; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price: string; +} +/** Represents an update to a `PlanPricing`. Fields that are set will be updated. */ +export interface PlanPricingPatch { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval?: string; + /** ISO 4217 currency code (lowercase) */ + currency?: string; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string; + id?: string; + /** Whether this pricing option is currently available */ + isActive?: boolean; + /** Reference to the plan this pricing belongs to */ + planId?: string; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price?: string; +} +/** A filter to be used against `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanSubscriptionFilter { + /** Checks for all expressions in this list. */ + and?: PlanSubscriptionFilter[]; + /** Filter by the object’s `endsAt` field. */ + endsAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanSubscriptionFilter; + /** Checks for any expressions in this list. */ + or?: PlanSubscriptionFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `startsAt` field. */ + startsAt?: DatetimeFilter; +} +/** An input for mutations affecting `PlanSubscription` */ +export interface PlanSubscriptionInput { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string; + /** The entity (org, team, user) this subscription belongs to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + id?: string; + /** Whether the subscription is currently active */ + isActive?: boolean; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Reference to the plan this subscription is for */ + planId: string; + /** When the subscription becomes active */ + startsAt?: string; +} +/** Represents an update to a `PlanSubscription`. Fields that are set will be updated. */ +export interface PlanSubscriptionPatch { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string; + /** The entity (org, team, user) this subscription belongs to */ + entityId?: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + id?: string; + /** Whether the subscription is currently active */ + isActive?: boolean; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Reference to the plan this subscription is for */ + planId?: string; + /** When the subscription becomes active */ + startsAt?: string; +} +/** A filter to be used against many `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanCapFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanCapFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanCapFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanCapFilter; +} +/** A filter to be used against many `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanLimitFilter; +} +/** A filter to be used against many `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanMeterLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanMeterLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanMeterLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanMeterLimitFilter; +} +/** A filter to be used against many `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanPricingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanPricingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanPricingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanPricingFilter; +} +/** A filter to be used against many `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanSubscriptionFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanSubscriptionFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanSubscriptionFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanSubscriptionFilter; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -1697,6 +3564,15 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface RecomputeCapabilitiesInput { + actorId?: string; + clientMutationId?: string; +} +export interface RevokeAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} export interface SeedAppLimitCapsDefaultsInput { clientMutationId?: string; defaults?: unknown; @@ -1705,6 +3581,10 @@ export interface SeedAppLimitDefaultsInput { clientMutationId?: string; defaults?: unknown; } +export interface SeedMeterDefaultsInput { + clientMutationId?: string; + defaults?: unknown; +} export interface SeedOrgLimitCapsDefaultsInput { clientMutationId?: string; defaults?: unknown; @@ -1713,6 +3593,59 @@ export interface SeedOrgLimitDefaultsInput { clientMutationId?: string; defaults?: unknown; } +export interface SeedPlanInput { + clientMutationId?: string; + planConfig?: unknown; + planName?: string; +} +export interface SeedTrustLadderInput { + clientMutationId?: string; + ladder?: unknown; +} +export interface UpdateAppAchievementRewardInput { + /** An object where the defined keys will be set on the `AppAchievementReward` being updated. */ + appAchievementRewardPatch: AppAchievementRewardPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppEventAggregateInput { + /** An object where the defined keys will be set on the `AppEventAggregate` being updated. */ + appEventAggregatePatch: AppEventAggregatePatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppEventInput { + /** An object where the defined keys will be set on the `AppEvent` being updated. */ + appEventPatch: AppEventPatch; + clientMutationId?: string; + createdAt: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id: string; +} +export interface UpdateAppEventTypeInput { + /** An object where the defined keys will be set on the `AppEventType` being updated. */ + appEventTypePatch: AppEventTypePatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppLevelGrantInput { + /** An object where the defined keys will be set on the `AppLevelGrant` being updated. */ + appLevelGrantPatch: AppLevelGrantPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppLevelInput { + /** An object where the defined keys will be set on the `AppLevel` being updated. */ + appLevelPatch: AppLevelPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateAppLevelRequirementInput { + /** An object where the defined keys will be set on the `AppLevelRequirement` being updated. */ + appLevelRequirementPatch: AppLevelRequirementPatch; + clientMutationId?: string; + id: string; +} export interface UpdateAppLimitCapInput { /** An object where the defined keys will be set on the `AppLimitCap` being updated. */ appLimitCapPatch: AppLimitCapPatch; @@ -1775,6 +3708,44 @@ export interface UpdateAppLimitWarningInput { clientMutationId?: string; id: string; } +export interface UpdateBillingUsageSummaryInput { + /** An object where the defined keys will be set on the `BillingUsageSummary` being updated. */ + billingUsageSummaryPatch: BillingUsageSummaryPatch; + clientMutationId?: string; + id: string; +} +export interface UpdateLedgerInput { + clientMutationId?: string; + createdAt: string; + /** Unique identifier for each ledger entry */ + id: string; + /** An object where the defined keys will be set on the `Ledger` being updated. */ + ledgerPatch: LedgerPatch; +} +export interface UpdateMeterCreditInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `MeterCredit` being updated. */ + meterCreditPatch: MeterCreditPatch; +} +export interface UpdateMeterDefaultInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `MeterDefault` being updated. */ + meterDefaultPatch: MeterDefaultPatch; +} +export interface UpdateMeterInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `Meter` being updated. */ + meterPatch: MeterPatch; +} +export interface UpdateMeterSourceInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `MeterSource` being updated. */ + meterSourcePatch: MeterSourcePatch; +} export interface UpdateOrgLimitAggregateInput { clientMutationId?: string; id: string; @@ -1799,36 +3770,127 @@ export interface UpdateOrgLimitCreditInput { /** An object where the defined keys will be set on the `OrgLimitCredit` being updated. */ orgLimitCreditPatch: OrgLimitCreditPatch; } -export interface UpdateOrgLimitDefaultInput { +export interface UpdateOrgLimitDefaultInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgLimitDefault` being updated. */ + orgLimitDefaultPatch: OrgLimitDefaultPatch; +} +export interface UpdateOrgLimitEventInput { + clientMutationId?: string; + createdAt: string; + /** Unique identifier for each limit event */ + id: string; + /** An object where the defined keys will be set on the `OrgLimitEvent` being updated. */ + orgLimitEventPatch: OrgLimitEventPatch; +} +export interface UpdateOrgLimitInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgLimit` being updated. */ + orgLimitPatch: OrgLimitPatch; +} +export interface UpdateOrgLimitWarningInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgLimitWarning` being updated. */ + orgLimitWarningPatch: OrgLimitWarningPatch; +} +export interface UpdatePlanCapInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlanCap` being updated. */ + planCapPatch: PlanCapPatch; +} +export interface UpdatePlanInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `Plan` being updated. */ + planPatch: PlanPatch; +} +export interface UpdatePlanLimitInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlanLimit` being updated. */ + planLimitPatch: PlanLimitPatch; +} +export interface UpdatePlanMeterLimitInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgLimitDefault` being updated. */ - orgLimitDefaultPatch: OrgLimitDefaultPatch; + /** An object where the defined keys will be set on the `PlanMeterLimit` being updated. */ + planMeterLimitPatch: PlanMeterLimitPatch; } -export interface UpdateOrgLimitEventInput { +export interface UpdatePlanOverrideInput { clientMutationId?: string; - createdAt: string; - /** Unique identifier for each limit event */ id: string; - /** An object where the defined keys will be set on the `OrgLimitEvent` being updated. */ - orgLimitEventPatch: OrgLimitEventPatch; + /** An object where the defined keys will be set on the `PlanOverride` being updated. */ + planOverridePatch: PlanOverridePatch; } -export interface UpdateOrgLimitInput { +export interface UpdatePlanPricingInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgLimit` being updated. */ - orgLimitPatch: OrgLimitPatch; + /** An object where the defined keys will be set on the `PlanPricing` being updated. */ + planPricingPatch: PlanPricingPatch; } -export interface UpdateOrgLimitWarningInput { +export interface UpdatePlanSubscriptionInput { clientMutationId?: string; id: string; - /** An object where the defined keys will be set on the `OrgLimitWarning` being updated. */ - orgLimitWarningPatch: OrgLimitWarningPatch; + /** An object where the defined keys will be set on the `PlanSubscription` being updated. */ + planSubscriptionPatch: PlanSubscriptionPatch; } /** Root meta schema type */ export interface MetaSchema { tables: MetaTable[]; } +/** A connection to a list of `AppAchievementReward` values. */ +export interface AppAchievementRewardConnection { + edges: AppAchievementRewardEdge[]; + nodes: AppAchievementReward[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppEventAggregate` values. */ +export interface AppEventAggregateConnection { + edges: AppEventAggregateEdge[]; + nodes: AppEventAggregate[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppEventType` values. */ +export interface AppEventTypeConnection { + edges: AppEventTypeEdge[]; + nodes: AppEventType[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppEvent` values. */ +export interface AppEventConnection { + edges: AppEventEdge[]; + nodes: AppEvent[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppLevelGrant` values. */ +export interface AppLevelGrantConnection { + edges: AppLevelGrantEdge[]; + nodes: AppLevelGrant[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppLevelRequirement` values. */ +export interface AppLevelRequirementConnection { + edges: AppLevelRequirementEdge[]; + nodes: AppLevelRequirement[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `AppLevel` values. */ +export interface AppLevelConnection { + edges: AppLevelEdge[]; + nodes: AppLevel[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppLimitCap` values. */ export interface AppLimitCapConnection { edges: AppLimitCapEdge[]; @@ -1899,6 +3961,48 @@ export interface AppLimitConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `BillingUsageSummary` values. */ +export interface BillingUsageSummaryConnection { + edges: BillingUsageSummaryEdge[]; + nodes: BillingUsageSummary[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `Ledger` values. */ +export interface LedgerConnection { + edges: LedgerEdge[]; + nodes: Ledger[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `MeterCredit` values. */ +export interface MeterCreditConnection { + edges: MeterCreditEdge[]; + nodes: MeterCredit[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `MeterDefault` values. */ +export interface MeterDefaultConnection { + edges: MeterDefaultEdge[]; + nodes: MeterDefault[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `MeterSource` values. */ +export interface MeterSourceConnection { + edges: MeterSourceEdge[]; + nodes: MeterSource[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `Meter` values. */ +export interface MeterConnection { + edges: MeterEdge[]; + nodes: Meter[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `OrgLimitAggregate` values. */ export interface OrgLimitAggregateConnection { edges: OrgLimitAggregateEdge[]; @@ -1955,6 +4059,97 @@ export interface OrgLimitConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `PlanCap` values. */ +export interface PlanCapConnection { + edges: PlanCapEdge[]; + nodes: PlanCap[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlanLimit` values. */ +export interface PlanLimitConnection { + edges: PlanLimitEdge[]; + nodes: PlanLimit[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlanMeterLimit` values. */ +export interface PlanMeterLimitConnection { + edges: PlanMeterLimitEdge[]; + nodes: PlanMeterLimit[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlanOverride` values. */ +export interface PlanOverrideConnection { + edges: PlanOverrideEdge[]; + nodes: PlanOverride[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlanPricing` values. */ +export interface PlanPricingConnection { + edges: PlanPricingEdge[]; + nodes: PlanPricing[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `PlanSubscription` values. */ +export interface PlanSubscriptionConnection { + edges: PlanSubscriptionEdge[]; + nodes: PlanSubscription[]; + pageInfo: PageInfo; + totalCount: number; +} +/** A connection to a list of `Plan` values. */ +export interface PlanConnection { + edges: PlanEdge[]; + nodes: Plan[]; + pageInfo: PageInfo; + totalCount: number; +} +export interface CreateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was created by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppEventPayload { + /** The `AppEvent` that was created by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppEventAggregatePayload { + /** The `AppEventAggregate` that was created by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppEventTypePayload { + /** The `AppEventType` that was created by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppLevelPayload { + /** The `AppLevel` that was created by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppLevelGrantPayload { + /** The `AppLevelGrant` that was created by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export interface CreateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was created by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} export interface CreateAppLimitPayload { /** The `AppLimit` that was created by this mutation. */ appLimit?: AppLimit | null; @@ -2015,6 +4210,42 @@ export interface CreateAppLimitWarningPayload { appLimitWarningEdge?: AppLimitWarningEdge | null; clientMutationId?: string | null; } +export interface CreateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was created by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export interface CreateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was created by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export interface CreateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was created by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export interface CreateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was created by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export interface CreateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was created by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export interface CreateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was created by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} export interface CreateOrgLimitPayload { clientMutationId?: string | null; /** The `OrgLimit` that was created by this mutation. */ @@ -2063,6 +4294,90 @@ export interface CreateOrgLimitWarningPayload { orgLimitWarning?: OrgLimitWarning | null; orgLimitWarningEdge?: OrgLimitWarningEdge | null; } +export interface CreatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was created by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export interface CreatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was created by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export interface CreatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was created by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export interface CreatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was created by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export interface CreatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was created by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export interface CreatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was created by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export interface CreatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was created by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export interface DeleteAppAchievementRewardPayload { + /** The `AppAchievementReward` that was deleted by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppEventPayload { + /** The `AppEvent` that was deleted by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppEventAggregatePayload { + /** The `AppEventAggregate` that was deleted by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppEventTypePayload { + /** The `AppEventType` that was deleted by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppLevelPayload { + /** The `AppLevel` that was deleted by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppLevelGrantPayload { + /** The `AppLevelGrant` that was deleted by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export interface DeleteAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was deleted by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} export interface DeleteAppLimitPayload { /** The `AppLimit` that was deleted by this mutation. */ appLimit?: AppLimit | null; @@ -2123,6 +4438,42 @@ export interface DeleteAppLimitWarningPayload { appLimitWarningEdge?: AppLimitWarningEdge | null; clientMutationId?: string | null; } +export interface DeleteBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was deleted by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export interface DeleteLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was deleted by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export interface DeleteMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was deleted by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export interface DeleteMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was deleted by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export interface DeleteMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was deleted by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export interface DeleteMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was deleted by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} export interface DeleteOrgLimitPayload { clientMutationId?: string | null; /** The `OrgLimit` that was deleted by this mutation. */ @@ -2171,6 +4522,51 @@ export interface DeleteOrgLimitWarningPayload { orgLimitWarning?: OrgLimitWarning | null; orgLimitWarningEdge?: OrgLimitWarningEdge | null; } +export interface DeletePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was deleted by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export interface DeletePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was deleted by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export interface DeletePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was deleted by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export interface DeletePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was deleted by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export interface DeletePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was deleted by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export interface DeletePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was deleted by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export interface DeletePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was deleted by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export interface GrantAchievementPayload { + clientMutationId?: string | null; +} export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -2185,6 +4581,12 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } +export interface RecomputeCapabilitiesPayload { + clientMutationId?: string | null; +} +export interface RevokeAchievementPayload { + clientMutationId?: string | null; +} export interface SeedAppLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2193,6 +4595,10 @@ export interface SeedAppLimitDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface SeedMeterDefaultsPayload { + clientMutationId?: string | null; + result?: boolean | null; +} export interface SeedOrgLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2201,6 +4607,56 @@ export interface SeedOrgLimitDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface SeedPlanPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface SeedTrustLadderPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface UpdateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was updated by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppEventPayload { + /** The `AppEvent` that was updated by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppEventAggregatePayload { + /** The `AppEventAggregate` that was updated by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppEventTypePayload { + /** The `AppEventType` that was updated by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppLevelPayload { + /** The `AppLevel` that was updated by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppLevelGrantPayload { + /** The `AppLevelGrant` that was updated by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export interface UpdateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was updated by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} export interface UpdateAppLimitPayload { /** The `AppLimit` that was updated by this mutation. */ appLimit?: AppLimit | null; @@ -2261,6 +4717,42 @@ export interface UpdateAppLimitWarningPayload { appLimitWarningEdge?: AppLimitWarningEdge | null; clientMutationId?: string | null; } +export interface UpdateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was updated by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export interface UpdateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was updated by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export interface UpdateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was updated by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export interface UpdateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was updated by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export interface UpdateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was updated by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export interface UpdateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was updated by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} export interface UpdateOrgLimitPayload { clientMutationId?: string | null; /** The `OrgLimit` that was updated by this mutation. */ @@ -2309,6 +4801,48 @@ export interface UpdateOrgLimitWarningPayload { orgLimitWarning?: OrgLimitWarning | null; orgLimitWarningEdge?: OrgLimitWarningEdge | null; } +export interface UpdatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was updated by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export interface UpdatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was updated by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export interface UpdatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was updated by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export interface UpdatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was updated by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export interface UpdatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was updated by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export interface UpdatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was updated by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export interface UpdatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was updated by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} /** Information about a database table */ export interface MetaTable { constraints: MetaConstraints; @@ -2336,11 +4870,11 @@ export interface MetaTable { tableName: string; uniqueConstraints: MetaUniqueConstraint[]; } -/** A `AppLimitCap` edge in the connection. */ -export interface AppLimitCapEdge { +/** A `AppAchievementReward` edge in the connection. */ +export interface AppAchievementRewardEdge { cursor?: string | null; - /** The `AppLimitCap` at the end of the edge. */ - node?: AppLimitCap | null; + /** The `AppAchievementReward` at the end of the edge. */ + node?: AppAchievementReward | null; } /** Information about pagination in a connection. */ export interface PageInfo { @@ -2353,6 +4887,48 @@ export interface PageInfo { /** When paginating backwards, the cursor to continue. */ startCursor?: string | null; } +/** A `AppEventAggregate` edge in the connection. */ +export interface AppEventAggregateEdge { + cursor?: string | null; + /** The `AppEventAggregate` at the end of the edge. */ + node?: AppEventAggregate | null; +} +/** A `AppEventType` edge in the connection. */ +export interface AppEventTypeEdge { + cursor?: string | null; + /** The `AppEventType` at the end of the edge. */ + node?: AppEventType | null; +} +/** A `AppEvent` edge in the connection. */ +export interface AppEventEdge { + cursor?: string | null; + /** The `AppEvent` at the end of the edge. */ + node?: AppEvent | null; +} +/** A `AppLevelGrant` edge in the connection. */ +export interface AppLevelGrantEdge { + cursor?: string | null; + /** The `AppLevelGrant` at the end of the edge. */ + node?: AppLevelGrant | null; +} +/** A `AppLevelRequirement` edge in the connection. */ +export interface AppLevelRequirementEdge { + cursor?: string | null; + /** The `AppLevelRequirement` at the end of the edge. */ + node?: AppLevelRequirement | null; +} +/** A `AppLevel` edge in the connection. */ +export interface AppLevelEdge { + cursor?: string | null; + /** The `AppLevel` at the end of the edge. */ + node?: AppLevel | null; +} +/** A `AppLimitCap` edge in the connection. */ +export interface AppLimitCapEdge { + cursor?: string | null; + /** The `AppLimitCap` at the end of the edge. */ + node?: AppLimitCap | null; +} /** A `AppLimitCapsDefault` edge in the connection. */ export interface AppLimitCapsDefaultEdge { cursor?: string | null; @@ -2407,6 +4983,42 @@ export interface AppLimitEdge { /** The `AppLimit` at the end of the edge. */ node?: AppLimit | null; } +/** A `BillingUsageSummary` edge in the connection. */ +export interface BillingUsageSummaryEdge { + cursor?: string | null; + /** The `BillingUsageSummary` at the end of the edge. */ + node?: BillingUsageSummary | null; +} +/** A `Ledger` edge in the connection. */ +export interface LedgerEdge { + cursor?: string | null; + /** The `Ledger` at the end of the edge. */ + node?: Ledger | null; +} +/** A `MeterCredit` edge in the connection. */ +export interface MeterCreditEdge { + cursor?: string | null; + /** The `MeterCredit` at the end of the edge. */ + node?: MeterCredit | null; +} +/** A `MeterDefault` edge in the connection. */ +export interface MeterDefaultEdge { + cursor?: string | null; + /** The `MeterDefault` at the end of the edge. */ + node?: MeterDefault | null; +} +/** A `MeterSource` edge in the connection. */ +export interface MeterSourceEdge { + cursor?: string | null; + /** The `MeterSource` at the end of the edge. */ + node?: MeterSource | null; +} +/** A `Meter` edge in the connection. */ +export interface MeterEdge { + cursor?: string | null; + /** The `Meter` at the end of the edge. */ + node?: Meter | null; +} /** A `OrgLimitAggregate` edge in the connection. */ export interface OrgLimitAggregateEdge { cursor?: string | null; @@ -2455,6 +5067,48 @@ export interface OrgLimitEdge { /** The `OrgLimit` at the end of the edge. */ node?: OrgLimit | null; } +/** A `PlanCap` edge in the connection. */ +export interface PlanCapEdge { + cursor?: string | null; + /** The `PlanCap` at the end of the edge. */ + node?: PlanCap | null; +} +/** A `PlanLimit` edge in the connection. */ +export interface PlanLimitEdge { + cursor?: string | null; + /** The `PlanLimit` at the end of the edge. */ + node?: PlanLimit | null; +} +/** A `PlanMeterLimit` edge in the connection. */ +export interface PlanMeterLimitEdge { + cursor?: string | null; + /** The `PlanMeterLimit` at the end of the edge. */ + node?: PlanMeterLimit | null; +} +/** A `PlanOverride` edge in the connection. */ +export interface PlanOverrideEdge { + cursor?: string | null; + /** The `PlanOverride` at the end of the edge. */ + node?: PlanOverride | null; +} +/** A `PlanPricing` edge in the connection. */ +export interface PlanPricingEdge { + cursor?: string | null; + /** The `PlanPricing` at the end of the edge. */ + node?: PlanPricing | null; +} +/** A `PlanSubscription` edge in the connection. */ +export interface PlanSubscriptionEdge { + cursor?: string | null; + /** The `PlanSubscription` at the end of the edge. */ + node?: PlanSubscription | null; +} +/** A `Plan` edge in the connection. */ +export interface PlanEdge { + cursor?: string | null; + /** The `Plan` at the end of the edge. */ + node?: Plan | null; +} /** Table constraints */ export interface MetaConstraints { foreignKey: MetaForeignKeyConstraint[]; diff --git a/sdk/constructive-react/src/usage/types.ts b/sdk/constructive-react/src/usage/types.ts index 122c65e73d..5c7a9cbebc 100644 --- a/sdk/constructive-react/src/usage/types.ts +++ b/sdk/constructive-react/src/usage/types.ts @@ -3,6 +3,76 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export type ConstructiveInternalTypeImage = unknown; +export interface AppAchievementReward { + amount: number | null; + createdAt: string | null; + creditType: string | null; + expiresInterval: string | null; + id: string | null; + levelName: string | null; + rewardType: string | null; + targetName: string | null; + updatedAt: string | null; +} +export interface AppEventAggregate { + actorId: string | null; + count: number | null; + createdAt: string | null; + id: string | null; + name: string | null; + periodStart: string | null; + updatedAt: string | null; +} +export interface AppEvent { + actorId: string | null; + count: number | null; + createdAt: string | null; + id: string | null; + name: string | null; +} +export interface AppEventType { + aggregation: string | null; + category: string | null; + createdAt: string | null; + description: string | null; + feedsLevels: boolean | null; + id: string | null; + isActive: boolean | null; + name: string | null; + periodInterval: string | null; + updatedAt: string | null; +} +export interface AppLevel { + createdAt: string | null; + description: string | null; + id: string | null; + image: ConstructiveInternalTypeImage | null; + name: string | null; + ownerId: string | null; + updatedAt: string | null; +} +export interface AppLevelGrant { + actorId: string | null; + createdAt: string | null; + expiresAt: string | null; + id: string | null; + levelName: string | null; + periodStart: string | null; + updatedAt: string | null; +} +export interface AppLevelRequirement { + createdAt: string | null; + description: string | null; + groupKey: string | null; + id: string | null; + level: string | null; + metric: string | null; + name: string | null; + priority: number | null; + requiredCount: number | null; + updatedAt: string | null; +} export interface AppLimitCap { entityId: string | null; id: string | null; @@ -86,6 +156,76 @@ export interface AppLimitWarning { thresholdValue: string | null; warningType: string | null; } +export interface BillingUsageSummary { + creditsConsumed: string | null; + entityId: string | null; + entityType: string | null; + id: string | null; + meterSlug: string | null; + organizationId: string | null; + overageUnits: string | null; + periodEnd: string | null; + periodStart: string | null; + planLimit: string | null; + quantityUsed: string | null; +} +export interface Ledger { + createdAt: string | null; + delta: string | null; + entityId: string | null; + entityType: string | null; + entryType: string | null; + id: string | null; + ledgerClass: string | null; + metadata: unknown | null; + meterSlug: string | null; + organizationId: string | null; + usageAfter: string | null; +} +export interface Meter { + aggregation: string | null; + categoryMeter: string | null; + creditCost: number | null; + displayName: string | null; + id: string | null; + isActive: boolean | null; + meterType: string | null; + periodInterval: string | null; + rolloverCap: string | null; + slug: string | null; + unit: string | null; +} +export interface MeterCredit { + amount: string | null; + createdAt: string | null; + creditType: string | null; + entityId: string | null; + entityType: string | null; + expiresAt: string | null; + id: string | null; + meterId: string | null; + organizationId: string | null; + reason: string | null; +} +export interface MeterDefault { + categoryMeter: string | null; + creditCost: string | null; + defaultPlanLimit: string | null; + displayName: string | null; + id: string | null; + isActive: boolean | null; + meterType: string | null; + slug: string | null; + unit: string | null; +} +export interface MeterSource { + aggregationType: string | null; + dimensionPath: string | null; + id: string | null; + isActive: boolean | null; + meterSlug: string | null; + sourceMetric: string | null; +} export interface OrgLimitAggregate { entityId: string | null; entityType: string | null; @@ -169,6 +309,57 @@ export interface OrgLimitWarning { thresholdValue: string | null; warningType: string | null; } +export interface PlanCap { + capName: string | null; + capValue: string | null; + id: string | null; + planId: string | null; +} +export interface Plan { + description: string | null; + id: string | null; + isActive: boolean | null; + name: string | null; +} +export interface PlanLimit { + id: string | null; + limitName: string | null; + maxValue: string | null; + planId: string | null; +} +export interface PlanMeterLimit { + id: string | null; + meterSlug: string | null; + planId: string | null; + planLimit: string | null; +} +export interface PlanOverride { + entityId: string | null; + expiresAt: string | null; + id: string | null; + limitName: string | null; + maxValue: string | null; + reason: string | null; +} +export interface PlanPricing { + billingInterval: string | null; + currency: string | null; + discountPercent: string | null; + id: string | null; + isActive: boolean | null; + planId: string | null; + price: string | null; +} +export interface PlanSubscription { + endsAt: string | null; + entityId: string | null; + entityType: string | null; + id: string | null; + isActive: boolean | null; + organizationId: string | null; + planId: string | null; + startsAt: string | null; +} export interface StringFilter { isNull?: boolean; equalTo?: string; diff --git a/sdk/constructive-sdk/schemas/admin.graphql b/sdk/constructive-sdk/schemas/admin.graphql index fab97e7ab3..2f347aad2d 100644 --- a/sdk/constructive-sdk/schemas/admin.graphql +++ b/sdk/constructive-sdk/schemas/admin.graphql @@ -123,57 +123,210 @@ input AppAdminGrantPatch { } """ -Records of successfully claimed invitations, linking senders to receivers +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control """ -type AppClaimedInvite { - createdAt: Datetime +type AppCapability { + """ + Reads a single `AppCapabilityDefaultCapability` that is related to this `AppCapability`. + """ + appCapabilityDefaultCapabilityByCapabilityId: AppCapabilityDefaultCapability - """Optional JSON payload captured at the time the invite was claimed""" - data: JSON + """ + Reads and enables pagination through a set of `AppCapabilityDefaultGrant`. + """ + appCapabilityDefaultGrantsByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppCapabilityDefaultGrant`.""" + orderBy: [AppCapabilityDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppCapabilityDefaultGrantFilter + ): AppCapabilityDefaultGrantConnection! + + """Reads and enables pagination through a set of `AppProfileCapability`.""" + appProfileCapabilitiesByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileCapabilityFilter + ): AppProfileCapabilityConnection! + + """ + Reads and enables pagination through a set of `AppProfileDefinitionGrant`. + """ + appProfileDefinitionGrantsByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileDefinitionGrantFilter + ): AppProfileDefinitionGrantConnection! + + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int + + """ + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations + """ + bitstr: BitString! + + """Human-readable description of what this capability allows""" + description: String id: UUID! - """User ID of the person who claimed and redeemed the invitation""" - receiverId: UUID + """ + Kind of catalog entry: capability (capability) or level (achievement level) + """ + kind: String! - """User ID of the original invitation sender""" - senderId: UUID + """Human-readable capability name (e.g. read, write, manage)""" + name: String +} + +"""A connection to a list of `AppCapability` values.""" +type AppCapabilityConnection { + """ + A list of edges which contains the `AppCapability` and cursor to aid in pagination. + """ + edges: [AppCapabilityEdge]! + + """A list of `AppCapability` objects.""" + nodes: [AppCapability]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppCapability` you could get from the connection.""" + totalCount: Int! +} + +""" +Stores the default capability bitmask assigned to new members upon joining +""" +type AppCapabilityDefault { + """Default capability bitmask applied to new members""" + capabilities: BitString! + id: UUID! +} + +""" +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask +""" +type AppCapabilityDefaultCapability { + """ + Reads a single `AppCapability` that is related to this `AppCapabilityDefaultCapability`. + """ + capability: AppCapability + + """References the capability included in the defaults bundle""" + capabilityId: UUID! + createdAt: Datetime + id: UUID! updatedAt: Datetime } -"""A connection to a list of `AppClaimedInvite` values.""" -type AppClaimedInviteConnection { +"""A connection to a list of `AppCapabilityDefaultCapability` values.""" +type AppCapabilityDefaultCapabilityConnection { """ - A list of edges which contains the `AppClaimedInvite` and cursor to aid in pagination. + A list of edges which contains the `AppCapabilityDefaultCapability` and cursor to aid in pagination. """ - edges: [AppClaimedInviteEdge]! + edges: [AppCapabilityDefaultCapabilityEdge]! - """A list of `AppClaimedInvite` objects.""" - nodes: [AppClaimedInvite]! + """A list of `AppCapabilityDefaultCapability` objects.""" + nodes: [AppCapabilityDefaultCapability]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `AppClaimedInvite` you could get from the connection. + The count of *all* `AppCapabilityDefaultCapability` you could get from the connection. """ totalCount: Int! } -"""A `AppClaimedInvite` edge in the connection.""" -type AppClaimedInviteEdge { +"""A `AppCapabilityDefaultCapability` edge in the connection.""" +type AppCapabilityDefaultCapabilityEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppClaimedInvite` at the end of the edge.""" - node: AppClaimedInvite + """The `AppCapabilityDefaultCapability` at the end of the edge.""" + node: AppCapabilityDefaultCapability } """ -A filter to be used against `AppClaimedInvite` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ """ -input AppClaimedInviteFilter { +input AppCapabilityDefaultCapabilityFilter { """Checks for all expressions in this list.""" - and: [AppClaimedInviteFilter!] + and: [AppCapabilityDefaultCapabilityFilter!] + + """Filter by the object’s `capability` relation.""" + capability: AppCapabilityFilter + + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -182,129 +335,158 @@ input AppClaimedInviteFilter { id: UUIDFilter """Negates the expression.""" - not: AppClaimedInviteFilter + not: AppCapabilityDefaultCapabilityFilter """Checks for any expressions in this list.""" - or: [AppClaimedInviteFilter!] - - """Filter by the object’s `receiverId` field.""" - receiverId: UUIDFilter - - """Filter by the object’s `senderId` field.""" - senderId: UUIDFilter + or: [AppCapabilityDefaultCapabilityFilter!] """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppClaimedInvite`""" -input AppClaimedInviteInput { +"""An input for mutations affecting `AppCapabilityDefaultCapability`""" +input AppCapabilityDefaultCapabilityInput { + """References the capability included in the defaults bundle""" + capabilityId: UUID! createdAt: Datetime - - """Optional JSON payload captured at the time the invite was claimed""" - data: JSON id: UUID - - """User ID of the person who claimed and redeemed the invitation""" - receiverId: UUID - - """User ID of the original invitation sender""" - senderId: UUID updatedAt: Datetime } -"""Methods to use when ordering `AppClaimedInvite`.""" -enum AppClaimedInviteOrderBy { +"""Methods to use when ordering `AppCapabilityDefaultCapability`.""" +enum AppCapabilityDefaultCapabilityOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC CREATED_AT_ASC CREATED_AT_DESC - DATA_ASC - DATA_DESC ID_ASC ID_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - RECEIVER_ID_ASC - RECEIVER_ID_DESC - SENDER_ID_ASC - SENDER_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `AppClaimedInvite`. Fields that are set will be updated. +Represents an update to a `AppCapabilityDefaultCapability`. Fields that are set will be updated. """ -input AppClaimedInvitePatch { +input AppCapabilityDefaultCapabilityPatch { + """References the capability included in the defaults bundle""" + capabilityId: UUID createdAt: Datetime - - """Optional JSON payload captured at the time the invite was claimed""" - data: JSON id: UUID + updatedAt: Datetime +} - """User ID of the person who claimed and redeemed the invitation""" - receiverId: UUID +"""A connection to a list of `AppCapabilityDefault` values.""" +type AppCapabilityDefaultConnection { + """ + A list of edges which contains the `AppCapabilityDefault` and cursor to aid in pagination. + """ + edges: [AppCapabilityDefaultEdge]! - """User ID of the original invitation sender""" - senderId: UUID - updatedAt: Datetime + """A list of `AppCapabilityDefault` objects.""" + nodes: [AppCapabilityDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `AppCapabilityDefault` you could get from the connection. + """ + totalCount: Int! +} + +"""A `AppCapabilityDefault` edge in the connection.""" +type AppCapabilityDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppCapabilityDefault` at the end of the edge.""" + node: AppCapabilityDefault } """ -Records of individual permission grants and revocations for members via bitmask +A filter to be used against `AppCapabilityDefault` object types. All fields are combined with a logical ‘and.’ """ -type AppGrant { +input AppCapabilityDefaultFilter { + """Checks for all expressions in this list.""" + and: [AppCapabilityDefaultFilter!] + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: AppCapabilityDefaultFilter + + """Checks for any expressions in this list.""" + or: [AppCapabilityDefaultFilter!] +} + +""" +Audit log of capability additions and removals from the defaults bitmask +""" +type AppCapabilityDefaultGrant { """ - The member receiving or losing the permission grant; NULL if user was deleted + Reads a single `AppCapability` that is related to this `AppCapabilityDefaultGrant`. """ - actorId: UUID + capability: AppCapability + + """References the capability being added to or removed from defaults""" + capabilityId: UUID! createdAt: Datetime grantorId: UUID id: UUID! - """True to grant the permissions, false to revoke them""" + """True to add the capability to defaults, false to remove it""" isGrant: Boolean! - - """Bitmask of permissions being granted or revoked""" - permissions: BitString! updatedAt: Datetime } -"""A connection to a list of `AppGrant` values.""" -type AppGrantConnection { +"""A connection to a list of `AppCapabilityDefaultGrant` values.""" +type AppCapabilityDefaultGrantConnection { """ - A list of edges which contains the `AppGrant` and cursor to aid in pagination. + A list of edges which contains the `AppCapabilityDefaultGrant` and cursor to aid in pagination. """ - edges: [AppGrantEdge]! + edges: [AppCapabilityDefaultGrantEdge]! - """A list of `AppGrant` objects.""" - nodes: [AppGrant]! + """A list of `AppCapabilityDefaultGrant` objects.""" + nodes: [AppCapabilityDefaultGrant]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppGrant` you could get from the connection.""" + """ + The count of *all* `AppCapabilityDefaultGrant` you could get from the connection. + """ totalCount: Int! } -"""A `AppGrant` edge in the connection.""" -type AppGrantEdge { +"""A `AppCapabilityDefaultGrant` edge in the connection.""" +type AppCapabilityDefaultGrantEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppGrant` at the end of the edge.""" - node: AppGrant + """The `AppCapabilityDefaultGrant` at the end of the edge.""" + node: AppCapabilityDefaultGrant } """ -A filter to be used against `AppGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ """ -input AppGrantFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - +input AppCapabilityDefaultGrantFilter { """Checks for all expressions in this list.""" - and: [AppGrantFilter!] + and: [AppCapabilityDefaultGrantFilter!] + + """Filter by the object’s `capability` relation.""" + capability: AppCapabilityFilter + + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -319,40 +501,32 @@ input AppGrantFilter { isGrant: BooleanFilter """Negates the expression.""" - not: AppGrantFilter + not: AppCapabilityDefaultGrantFilter """Checks for any expressions in this list.""" - or: [AppGrantFilter!] - - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter + or: [AppCapabilityDefaultGrantFilter!] """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppGrant`""" -input AppGrantInput { - """ - The member receiving or losing the permission grant; NULL if user was deleted - """ - actorId: UUID +"""An input for mutations affecting `AppCapabilityDefaultGrant`""" +input AppCapabilityDefaultGrantInput { + """References the capability being added to or removed from defaults""" + capabilityId: UUID! createdAt: Datetime grantorId: UUID id: UUID - """True to grant the permissions, false to revoke them""" + """True to add the capability to defaults, false to remove it""" isGrant: Boolean - - """Bitmask of permissions being granted or revoked""" - permissions: BitString updatedAt: Datetime } -"""Methods to use when ordering `AppGrant`.""" -enum AppGrantOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC +"""Methods to use when ordering `AppCapabilityDefaultGrant`.""" +enum AppCapabilityDefaultGrantOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC CREATED_AT_ASC CREATED_AT_DESC GRANTOR_ID_ASC @@ -362,8 +536,6 @@ enum AppGrantOrderBy { IS_GRANT_ASC IS_GRANT_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC UPDATED_AT_ASC @@ -371,817 +543,780 @@ enum AppGrantOrderBy { } """ -Represents an update to a `AppGrant`. Fields that are set will be updated. +Represents an update to a `AppCapabilityDefaultGrant`. Fields that are set will be updated. """ -input AppGrantPatch { - """ - The member receiving or losing the permission grant; NULL if user was deleted - """ - actorId: UUID +input AppCapabilityDefaultGrantPatch { + """References the capability being added to or removed from defaults""" + capabilityId: UUID createdAt: Datetime grantorId: UUID id: UUID - """True to grant the permissions, false to revoke them""" + """True to add the capability to defaults, false to remove it""" isGrant: Boolean - - """Bitmask of permissions being granted or revoked""" - permissions: BitString updatedAt: Datetime } -""" -Invitation records sent to prospective members via email, with token-based redemption and expiration -""" -type AppInvite { - """Delivery channel for this invitation: email, sms, or link""" - channel: String! - createdAt: Datetime +"""An input for mutations affecting `AppCapabilityDefault`""" +input AppCapabilityDefaultInput { + """Default capability bitmask applied to new members""" + capabilities: BitString + id: UUID +} - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime! - id: UUID! - - """Running count of how many times this invite has been claimed""" - inviteCount: Int! +"""Methods to use when ordering `AppCapabilityDefault`.""" +enum AppCapabilityDefaultOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int! +""" +Represents an update to a `AppCapabilityDefault`. Fields that are set will be updated. +""" +input AppCapabilityDefaultPatch { + """Default capability bitmask applied to new members""" + capabilities: BitString + id: UUID +} - """Unique random hex token used to redeem this invitation""" - inviteToken: String! +"""A `AppCapability` edge in the connection.""" +type AppCapabilityEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean! + """The `AppCapability` at the end of the edge.""" + node: AppCapability +} - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean! +""" +A filter to be used against `AppCapability` object types. All fields are combined with a logical ‘and.’ +""" +input AppCapabilityFilter { + """Checks for all expressions in this list.""" + and: [AppCapabilityFilter!] """ - Phone number of the invited recipient in E.164 format (required when channel=sms) + Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. """ - phone: String + appCapabilityDefaultCapabilityByCapabilityId: AppCapabilityDefaultCapabilityFilter + + """A related `appCapabilityDefaultCapabilityByCapabilityId` exists.""" + appCapabilityDefaultCapabilityByCapabilityIdExists: Boolean """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. """ - profileId: UUID + appCapabilityDefaultGrantsByCapabilityId: AppCapabilityToManyAppCapabilityDefaultGrantFilter - """User ID of the member who sent this invitation""" - senderId: UUID! - updatedAt: Datetime -} + """`appCapabilityDefaultGrantsByCapabilityId` exist.""" + appCapabilityDefaultGrantsByCapabilityIdExist: Boolean -"""A connection to a list of `AppInvite` values.""" -type AppInviteConnection { """ - A list of edges which contains the `AppInvite` and cursor to aid in pagination. + Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. """ - edges: [AppInviteEdge]! - - """A list of `AppInvite` objects.""" - nodes: [AppInvite]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `AppInvite` you could get from the connection.""" - totalCount: Int! -} - -"""A `AppInvite` edge in the connection.""" -type AppInviteEdge { - """A cursor for use in pagination.""" - cursor: Cursor + appProfileCapabilitiesByCapabilityId: AppCapabilityToManyAppProfileCapabilityFilter - """The `AppInvite` at the end of the edge.""" - node: AppInvite -} + """`appProfileCapabilitiesByCapabilityId` exist.""" + appProfileCapabilitiesByCapabilityIdExist: Boolean -""" -A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ -""" -input AppInviteFilter { - """Checks for all expressions in this list.""" - and: [AppInviteFilter!] + """ + Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. + """ + appProfileDefinitionGrantsByCapabilityId: AppCapabilityToManyAppProfileDefinitionGrantFilter - """Filter by the object’s `channel` field.""" - channel: StringFilter + """`appProfileDefinitionGrantsByCapabilityId` exist.""" + appProfileDefinitionGrantsByCapabilityIdExist: Boolean - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Filter by the object’s `bitnum` field.""" + bitnum: IntFilter - """Filter by the object’s `email` field.""" - email: ConstructiveInternalTypeEmailFilter + """Filter by the object’s `bitstr` field.""" + bitstr: BitStringFilter - """Filter by the object’s `expiresAt` field.""" - expiresAt: DatetimeFilter + """Filter by the object’s `description` field.""" + description: StringFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `inviteCount` field.""" - inviteCount: IntFilter - - """Filter by the object’s `inviteLimit` field.""" - inviteLimit: IntFilter - - """Filter by the object’s `inviteToken` field.""" - inviteToken: StringFilter - - """Filter by the object’s `inviteValid` field.""" - inviteValid: BooleanFilter + """Filter by the object’s `kind` field.""" + kind: StringFilter - """Filter by the object’s `multiple` field.""" - multiple: BooleanFilter + """Filter by the object’s `name` field.""" + name: StringFilter """Negates the expression.""" - not: AppInviteFilter + not: AppCapabilityFilter """Checks for any expressions in this list.""" - or: [AppInviteFilter!] - - """Filter by the object’s `phone` field.""" - phone: StringFilter - - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter - - """Filter by the object’s `senderId` field.""" - senderId: UUIDFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter + or: [AppCapabilityFilter!] } -"""An input for mutations affecting `AppInvite`""" -input AppInviteInput { - """Delivery channel for this invitation: email, sms, or link""" - channel: String - createdAt: Datetime - - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime - id: UUID - - """Running count of how many times this invite has been claimed""" - inviteCount: Int - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int - - """Unique random hex token used to redeem this invitation""" - inviteToken: String - - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean - - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean +"""An input for mutations affecting `AppCapability`""" +input AppCapabilityInput { + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int """ - Phone number of the invited recipient in E.164 format (required when channel=sms) + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations """ - phone: String + bitstr: BitString + + """Human-readable description of what this capability allows""" + description: String + id: UUID """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + Kind of catalog entry: capability (capability) or level (achievement level) """ - profileId: UUID + kind: String - """User ID of the member who sent this invitation""" - senderId: UUID - updatedAt: Datetime + """Human-readable capability name (e.g. read, write, manage)""" + name: String } -"""Methods to use when ordering `AppInvite`.""" -enum AppInviteOrderBy { - CHANNEL_ASC - CHANNEL_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DATA_ASC - DATA_DESC - EMAIL_ASC - EMAIL_DESC - EXPIRES_AT_ASC - EXPIRES_AT_DESC +"""Methods to use when ordering `AppCapability`.""" +enum AppCapabilityOrderBy { + BITNUM_ASC + BITNUM_DESC + BITSTR_ASC + BITSTR_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC ID_ASC ID_DESC - INVITE_COUNT_ASC - INVITE_COUNT_DESC - INVITE_LIMIT_ASC - INVITE_LIMIT_DESC - INVITE_TOKEN_ASC - INVITE_TOKEN_DESC - INVITE_VALID_ASC - INVITE_VALID_DESC - MULTIPLE_ASC - MULTIPLE_DESC + KIND_ASC + KIND_DESC + NAME_ASC + NAME_DESC NATURAL - PHONE_ASC - PHONE_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC - SENDER_ID_ASC - SENDER_ID_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC } """ -Represents an update to a `AppInvite`. Fields that are set will be updated. +Represents an update to a `AppCapability`. Fields that are set will be updated. """ -input AppInvitePatch { - """Delivery channel for this invitation: email, sms, or link""" - channel: String - createdAt: Datetime - - """Optional JSON payload of additional invite metadata""" - data: JSON +input AppCapabilityPatch { + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail + """ + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations + """ + bitstr: BitString - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime + """Human-readable description of what this capability allows""" + description: String id: UUID - """Running count of how many times this invite has been claimed""" - inviteCount: Int + """ + Kind of catalog entry: capability (capability) or level (achievement level) + """ + kind: String - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int + """Human-readable capability name (e.g. read, write, manage)""" + name: String +} - """Unique random hex token used to redeem this invitation""" - inviteToken: String +""" +A filter to be used against many `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppCapabilityToManyAppCapabilityDefaultGrantFilter { + """Filters to entities where every related entity matches.""" + every: AppCapabilityDefaultGrantFilter - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean + """Filters to entities where no related entity matches.""" + none: AppCapabilityDefaultGrantFilter - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean + """Filters to entities where at least one related entity matches.""" + some: AppCapabilityDefaultGrantFilter +} - """ - Phone number of the invited recipient in E.164 format (required when channel=sms) - """ - phone: String +""" +A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ +""" +input AppCapabilityToManyAppProfileCapabilityFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileCapabilityFilter - """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. - """ - profileId: UUID + """Filters to entities where no related entity matches.""" + none: AppProfileCapabilityFilter - """User ID of the member who sent this invitation""" - senderId: UUID - updatedAt: Datetime + """Filters to entities where at least one related entity matches.""" + some: AppProfileCapabilityFilter } """ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ """ -type AppMembership { - """References the user who holds this membership""" - actorId: UUID! - createdAt: Datetime - createdBy: UUID - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString! - id: UUID! - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean! - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean! - - """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 the actor is the owner of this entity""" - isOwner: Boolean! - - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean! - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString! - profileId: UUID - updatedAt: Datetime - updatedBy: UUID -} - -"""A connection to a list of `AppMembership` values.""" -type AppMembershipConnection { - """ - A list of edges which contains the `AppMembership` and cursor to aid in pagination. - """ - edges: [AppMembershipEdge]! - - """A list of `AppMembership` objects.""" - nodes: [AppMembership]! +input AppCapabilityToManyAppProfileDefinitionGrantFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileDefinitionGrantFilter - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Filters to entities where no related entity matches.""" + none: AppProfileDefinitionGrantFilter - """The count of *all* `AppMembership` you could get from the connection.""" - totalCount: Int! + """Filters to entities where at least one related entity matches.""" + some: AppProfileDefinitionGrantFilter } """ -Default membership settings per entity, controlling initial approval and verification state for new members +Records of successfully claimed invitations, linking senders to receivers """ -type AppMembershipDefault { +type AppClaimedInvite { createdAt: Datetime - createdBy: UUID + + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON id: UUID! - """Whether new members are automatically approved upon joining""" - isApproved: Boolean! + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID - """Whether new members are automatically verified upon joining""" - isVerified: Boolean! + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime - updatedBy: UUID } -"""A connection to a list of `AppMembershipDefault` values.""" -type AppMembershipDefaultConnection { +"""A connection to a list of `AppClaimedInvite` values.""" +type AppClaimedInviteConnection { """ - A list of edges which contains the `AppMembershipDefault` and cursor to aid in pagination. + A list of edges which contains the `AppClaimedInvite` and cursor to aid in pagination. """ - edges: [AppMembershipDefaultEdge]! + edges: [AppClaimedInviteEdge]! - """A list of `AppMembershipDefault` objects.""" - nodes: [AppMembershipDefault]! + """A list of `AppClaimedInvite` objects.""" + nodes: [AppClaimedInvite]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `AppMembershipDefault` you could get from the connection. + The count of *all* `AppClaimedInvite` you could get from the connection. """ totalCount: Int! } -"""A `AppMembershipDefault` edge in the connection.""" -type AppMembershipDefaultEdge { +"""A `AppClaimedInvite` edge in the connection.""" +type AppClaimedInviteEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppMembershipDefault` at the end of the edge.""" - node: AppMembershipDefault + """The `AppClaimedInvite` at the end of the edge.""" + node: AppClaimedInvite } """ -A filter to be used against `AppMembershipDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppClaimedInvite` object types. All fields are combined with a logical ‘and.’ """ -input AppMembershipDefaultFilter { +input AppClaimedInviteFilter { """Checks for all expressions in this list.""" - and: [AppMembershipDefaultFilter!] + and: [AppClaimedInviteFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isApproved` field.""" - isApproved: BooleanFilter - - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter - """Negates the expression.""" - not: AppMembershipDefaultFilter + not: AppClaimedInviteFilter """Checks for any expressions in this list.""" - or: [AppMembershipDefaultFilter!] + or: [AppClaimedInviteFilter!] + + """Filter by the object’s `receiverId` field.""" + receiverId: UUIDFilter + + """Filter by the object’s `senderId` field.""" + senderId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter } -"""An input for mutations affecting `AppMembershipDefault`""" -input AppMembershipDefaultInput { +"""An input for mutations affecting `AppClaimedInvite`""" +input AppClaimedInviteInput { createdAt: Datetime - createdBy: UUID + + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON id: UUID - """Whether new members are automatically approved upon joining""" - isApproved: Boolean + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID - """Whether new members are automatically verified upon joining""" - isVerified: Boolean + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime - updatedBy: UUID } -"""Methods to use when ordering `AppMembershipDefault`.""" -enum AppMembershipDefaultOrderBy { +"""Methods to use when ordering `AppClaimedInvite`.""" +enum AppClaimedInviteOrderBy { CREATED_AT_ASC CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC + DATA_ASC + DATA_DESC ID_ASC ID_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC - IS_VERIFIED_ASC - IS_VERIFIED_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + RECEIVER_ID_ASC + RECEIVER_ID_DESC + SENDER_ID_ASC + SENDER_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC } """ -Represents an update to a `AppMembershipDefault`. Fields that are set will be updated. +Represents an update to a `AppClaimedInvite`. Fields that are set will be updated. """ -input AppMembershipDefaultPatch { +input AppClaimedInvitePatch { createdAt: Datetime - createdBy: UUID + + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON id: UUID - """Whether new members are automatically approved upon joining""" - isApproved: Boolean + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID - """Whether new members are automatically verified upon joining""" - isVerified: Boolean + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime - updatedBy: UUID } -"""A `AppMembership` edge in the connection.""" -type AppMembershipEdge { +""" +Records of individual capability grants and revocations for members via bitmask +""" +type AppGrant { + """ + The member receiving or losing the capability grant; NULL if user was deleted + """ + actorId: UUID + + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString! + createdAt: Datetime + grantorId: UUID + id: UUID! + + """True to grant the capabilities, false to revoke them""" + isGrant: Boolean! + updatedAt: Datetime +} + +"""A connection to a list of `AppGrant` values.""" +type AppGrantConnection { + """ + A list of edges which contains the `AppGrant` and cursor to aid in pagination. + """ + edges: [AppGrantEdge]! + + """A list of `AppGrant` objects.""" + nodes: [AppGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppGrant` you could get from the connection.""" + totalCount: Int! +} + +"""A `AppGrant` edge in the connection.""" +type AppGrantEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppMembership` at the end of the edge.""" - node: AppMembership + """The `AppGrant` at the end of the edge.""" + node: AppGrant } """ -A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppGrant` object types. All fields are combined with a logical ‘and.’ """ -input AppMembershipFilter { +input AppGrantFilter { """Filter by the object’s `actorId` field.""" actorId: UUIDFilter """Checks for all expressions in this list.""" - and: [AppMembershipFilter!] + and: [AppGrantFilter!] + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `granted` field.""" - granted: BitStringFilter + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isActive` field.""" - isActive: BooleanFilter - - """Filter by the object’s `isAdmin` field.""" - isAdmin: BooleanFilter - - """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 `isOwner` field.""" - isOwner: BooleanFilter - - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter """Negates the expression.""" - not: AppMembershipFilter + not: AppGrantFilter """Checks for any expressions in this list.""" - or: [AppMembershipFilter!] - - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter - - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter + or: [AppGrantFilter!] """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter } -"""An input for mutations affecting `AppMembership`""" -input AppMembershipInput { - """References the user who holds this membership""" - actorId: UUID! - createdAt: Datetime - createdBy: UUID - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - id: UUID - +"""An input for mutations affecting `AppGrant`""" +input AppGrantInput { """ - Computed field indicating the membership is approved, verified, not banned, and not disabled + The member receiving or losing the capability grant; NULL if user was deleted """ - isActive: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """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 the actor is the owner of this entity""" - isOwner: Boolean + actorId: UUID - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString + createdAt: Datetime + grantorId: UUID + id: UUID - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - profileId: UUID + """True to grant the capabilities, false to revoke them""" + isGrant: Boolean updatedAt: Datetime - updatedBy: UUID } -"""Methods to use when ordering `AppMembership`.""" -enum AppMembershipOrderBy { +"""Methods to use when ordering `AppGrant`.""" +enum AppGrantOrderBy { ACTOR_ID_ASC ACTOR_ID_DESC + CAPABILITIES_ASC + CAPABILITIES_DESC CREATED_AT_ASC CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - GRANTED_ASC - GRANTED_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC ID_ASC ID_DESC - IS_ACTIVE_ASC - IS_ACTIVE_DESC - IS_ADMIN_ASC - IS_ADMIN_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC - IS_BANNED_ASC - IS_BANNED_DESC - IS_DISABLED_ASC - IS_DISABLED_DESC - IS_OWNER_ASC - IS_OWNER_DESC - IS_VERIFIED_ASC - IS_VERIFIED_DESC + IS_GRANT_ASC + IS_GRANT_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC } """ -Represents an update to a `AppMembership`. Fields that are set will be updated. +Represents an update to a `AppGrant`. Fields that are set will be updated. """ -input AppMembershipPatch { - """References the user who holds this membership""" - actorId: UUID - createdAt: Datetime - createdBy: UUID - +input AppGrantPatch { """ - Bitmask of permissions directly granted to this member (not from profiles) + The member receiving or losing the capability grant; NULL if user was deleted """ - granted: BitString + actorId: UUID + + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString + createdAt: Datetime + grantorId: UUID id: UUID - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean + """True to grant the capabilities, false to revoke them""" + isGrant: Boolean + updatedAt: Datetime +} - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean +""" +Invitation records sent to prospective members via email, with token-based redemption and expiration +""" +type AppInvite { + """Delivery channel for this invitation: email, sms, or link""" + channel: String! + createdAt: Datetime - """Whether this membership has been approved by an admin""" - isApproved: Boolean + """Optional JSON payload of additional invite metadata""" + data: JSON - """Whether this member has been banned from the entity""" - isBanned: Boolean + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail - """Whether this membership is temporarily disabled""" - isDisabled: Boolean + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime! + id: UUID! - """Whether the actor is the owner of this entity""" - isOwner: Boolean + """Running count of how many times this invite has been claimed""" + inviteCount: Int! - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int! + + """Unique random hex token used to redeem this invitation""" + inviteToken: String! + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean! + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean! """ - Aggregated permission bitmask combining profile-based and directly granted permissions + Phone number of the invited recipient in E.164 format (required when channel=sms) """ - permissions: BitString - profileId: UUID - updatedAt: Datetime - updatedBy: UUID -} + phone: String + + """Reads a single `AppProfile` that is related to this `AppInvite`.""" + profile: AppProfile -"""Records of ownership transfers and grants between members""" -type AppOwnerGrant { """ - The member receiving or losing the ownership grant; NULL if user was deleted + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. """ - actorId: UUID - createdAt: Datetime - grantorId: UUID - id: UUID! + profileId: UUID - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean! + """User ID of the member who sent this invitation""" + senderId: UUID! updatedAt: Datetime } -"""A connection to a list of `AppOwnerGrant` values.""" -type AppOwnerGrantConnection { +"""A connection to a list of `AppInvite` values.""" +type AppInviteConnection { """ - A list of edges which contains the `AppOwnerGrant` and cursor to aid in pagination. + A list of edges which contains the `AppInvite` and cursor to aid in pagination. """ - edges: [AppOwnerGrantEdge]! + edges: [AppInviteEdge]! - """A list of `AppOwnerGrant` objects.""" - nodes: [AppOwnerGrant]! + """A list of `AppInvite` objects.""" + nodes: [AppInvite]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppOwnerGrant` you could get from the connection.""" + """The count of *all* `AppInvite` you could get from the connection.""" totalCount: Int! } -"""A `AppOwnerGrant` edge in the connection.""" -type AppOwnerGrantEdge { +"""A `AppInvite` edge in the connection.""" +type AppInviteEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppOwnerGrant` at the end of the edge.""" - node: AppOwnerGrant + """The `AppInvite` at the end of the edge.""" + node: AppInvite } """ -A filter to be used against `AppOwnerGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ """ -input AppOwnerGrantFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - +input AppInviteFilter { """Checks for all expressions in this list.""" - and: [AppOwnerGrantFilter!] + and: [AppInviteFilter!] + + """Filter by the object’s `channel` field.""" + channel: StringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `grantorId` field.""" - grantorId: UUIDFilter + """Filter by the object’s `email` field.""" + email: ConstructiveInternalTypeEmailFilter + + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isGrant` field.""" - isGrant: BooleanFilter + """Filter by the object’s `inviteCount` field.""" + inviteCount: IntFilter + + """Filter by the object’s `inviteLimit` field.""" + inviteLimit: IntFilter + + """Filter by the object’s `inviteToken` field.""" + inviteToken: StringFilter + + """Filter by the object’s `inviteValid` field.""" + inviteValid: BooleanFilter + + """Filter by the object’s `multiple` field.""" + multiple: BooleanFilter """Negates the expression.""" - not: AppOwnerGrantFilter + not: AppInviteFilter """Checks for any expressions in this list.""" - or: [AppOwnerGrantFilter!] + or: [AppInviteFilter!] + + """Filter by the object’s `phone` field.""" + phone: StringFilter + + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Filter by the object’s `senderId` field.""" + senderId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppOwnerGrant`""" -input AppOwnerGrantInput { - """ - The member receiving or losing the ownership grant; NULL if user was deleted - """ - actorId: UUID +"""An input for mutations affecting `AppInvite`""" +input AppInviteInput { + """Delivery channel for this invitation: email, sms, or link""" + channel: String createdAt: Datetime - grantorId: UUID - id: UUID - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean - updatedAt: Datetime -} + """Optional JSON payload of additional invite metadata""" + data: JSON -"""Methods to use when ordering `AppOwnerGrant`.""" -enum AppOwnerGrantOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - GRANTOR_ID_ASC - GRANTOR_ID_DESC + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime + id: UUID + + """Running count of how many times this invite has been claimed""" + inviteCount: Int + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int + + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean + + """ + Phone number of the invited recipient in E.164 format (required when channel=sms) + """ + phone: String + + """ + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + """ + profileId: UUID + + """User ID of the member who sent this invitation""" + senderId: UUID + updatedAt: Datetime +} + +"""Methods to use when ordering `AppInvite`.""" +enum AppInviteOrderBy { + CHANNEL_ASC + CHANNEL_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DATA_ASC + DATA_DESC + EMAIL_ASC + EMAIL_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC ID_ASC ID_DESC - IS_GRANT_ASC - IS_GRANT_DESC + INVITE_COUNT_ASC + INVITE_COUNT_DESC + INVITE_LIMIT_ASC + INVITE_LIMIT_DESC + INVITE_TOKEN_ASC + INVITE_TOKEN_DESC + INVITE_VALID_ASC + INVITE_VALID_DESC + MULTIPLE_ASC + MULTIPLE_DESC NATURAL + PHONE_ASC + PHONE_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + SENDER_ID_ASC + SENDER_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `AppOwnerGrant`. Fields that are set will be updated. +Represents an update to a `AppInvite`. Fields that are set will be updated. """ -input AppOwnerGrantPatch { - """ - The member receiving or losing the ownership grant; NULL if user was deleted - """ - actorId: UUID +input AppInvitePatch { + """Delivery channel for this invitation: email, sms, or link""" + channel: String createdAt: Datetime - grantorId: UUID + + """Optional JSON payload of additional invite metadata""" + data: JSON + + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime id: UUID - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean + """Running count of how many times this invite has been claimed""" + inviteCount: Int + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int + + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean + + """ + Phone number of the invited recipient in E.164 format (required when channel=sms) + """ + phone: String + + """ + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + """ + profileId: UUID + + """User ID of the member who sent this invitation""" + senderId: UUID updatedAt: Datetime } """ -Defines available permissions as named bits within a bitmask, used by the RBAC system for access control +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status """ -type AppPermission { - """ - Reads and enables pagination through a set of `AppPermissionDefaultGrant`. - """ - appPermissionDefaultGrantsByPermissionId( +type AppMembership { + """References the user who holds this membership""" + actorId: UUID! + + """Reads and enables pagination through a set of `AppMembershipProfile`.""" + appMembershipProfilesByMembershipId( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -1200,326 +1335,523 @@ type AppPermission { """ offset: Int - """The method to use when ordering `AppPermissionDefaultGrant`.""" - orderBy: [AppPermissionDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionDefaultGrantFilter - ): AppPermissionDefaultGrantConnection! + where: AppMembershipProfileFilter + ): AppMembershipProfileConnection! - """ - Reads a single `AppPermissionDefaultPermission` that is related to this `AppPermission`. - """ - appPermissionDefaultPermissionByPermissionId: AppPermissionDefaultPermission + """Reads and enables pagination through a set of `AppProfileGrant`.""" + appProfileGrantsByMembershipId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileGrantFilter + ): AppProfileGrantConnection! """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set + Aggregated capability bitmask combining profile-based and directly granted capabilities """ - bitnum: Int + capabilities: BitString! + createdAt: Datetime + createdBy: UUID """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations + Bitmask of capabilities directly granted to this member (not from profiles) """ - bitstr: BitString! - - """Human-readable description of what this permission allows""" - description: String + granted: BitString! id: UUID! - """Human-readable permission name (e.g. read, write, manage)""" - name: String -} - -"""A connection to a list of `AppPermission` values.""" -type AppPermissionConnection { """ - A list of edges which contains the `AppPermission` and cursor to aid in pagination. + Computed field indicating the membership is approved, verified, not banned, and not disabled """ - edges: [AppPermissionEdge]! + isActive: Boolean! + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean! - """A list of `AppPermission` objects.""" - nodes: [AppPermission]! + """Whether this membership has been approved by an admin""" + isApproved: Boolean! - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Whether this member has been banned from the entity""" + isBanned: Boolean! - """The count of *all* `AppPermission` you could get from the connection.""" - totalCount: Int! -} + """Whether this membership is temporarily disabled""" + isDisabled: Boolean! -""" -Stores the default permission bitmask assigned to new members upon joining -""" -type AppPermissionDefault { - id: UUID! + """Whether the actor is the owner of this entity""" + isOwner: Boolean! + + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean! - """Default permission bitmask applied to new members""" - permissions: BitString! + """Reads a single `AppProfile` that is related to this `AppMembership`.""" + profile: AppProfile + profileId: UUID + updatedAt: Datetime + updatedBy: UUID } -"""A connection to a list of `AppPermissionDefault` values.""" -type AppPermissionDefaultConnection { +"""A connection to a list of `AppMembership` values.""" +type AppMembershipConnection { """ - A list of edges which contains the `AppPermissionDefault` and cursor to aid in pagination. + A list of edges which contains the `AppMembership` and cursor to aid in pagination. """ - edges: [AppPermissionDefaultEdge]! + edges: [AppMembershipEdge]! - """A list of `AppPermissionDefault` objects.""" - nodes: [AppPermissionDefault]! + """A list of `AppMembership` objects.""" + nodes: [AppMembership]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `AppPermissionDefault` you could get from the connection. - """ + """The count of *all* `AppMembership` you could get from the connection.""" totalCount: Int! } -"""A `AppPermissionDefault` edge in the connection.""" -type AppPermissionDefaultEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `AppPermissionDefault` at the end of the edge.""" - node: AppPermissionDefault -} - -""" -A filter to be used against `AppPermissionDefault` object types. All fields are combined with a logical ‘and.’ -""" -input AppPermissionDefaultFilter { - """Checks for all expressions in this list.""" - and: [AppPermissionDefaultFilter!] - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Negates the expression.""" - not: AppPermissionDefaultFilter - - """Checks for any expressions in this list.""" - or: [AppPermissionDefaultFilter!] - - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter -} - """ -Audit log of permission additions and removals from the defaults bitmask +Default membership settings per entity, controlling initial approval and verification state for new members """ -type AppPermissionDefaultGrant { +type AppMembershipDefault { createdAt: Datetime - grantorId: UUID + createdBy: UUID id: UUID! - """True to add the permission to defaults, false to remove it""" - isGrant: Boolean! - - """ - Reads a single `AppPermission` that is related to this `AppPermissionDefaultGrant`. - """ - permission: AppPermission + """Whether new members are automatically approved upon joining""" + isApproved: Boolean! - """References the permission being added to or removed from defaults""" - permissionId: UUID! + """Whether new members are automatically verified upon joining""" + isVerified: Boolean! updatedAt: Datetime + updatedBy: UUID } -"""A connection to a list of `AppPermissionDefaultGrant` values.""" -type AppPermissionDefaultGrantConnection { +"""A connection to a list of `AppMembershipDefault` values.""" +type AppMembershipDefaultConnection { """ - A list of edges which contains the `AppPermissionDefaultGrant` and cursor to aid in pagination. + A list of edges which contains the `AppMembershipDefault` and cursor to aid in pagination. """ - edges: [AppPermissionDefaultGrantEdge]! + edges: [AppMembershipDefaultEdge]! - """A list of `AppPermissionDefaultGrant` objects.""" - nodes: [AppPermissionDefaultGrant]! + """A list of `AppMembershipDefault` objects.""" + nodes: [AppMembershipDefault]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `AppPermissionDefaultGrant` you could get from the connection. + The count of *all* `AppMembershipDefault` you could get from the connection. """ totalCount: Int! } -"""A `AppPermissionDefaultGrant` edge in the connection.""" -type AppPermissionDefaultGrantEdge { +"""A `AppMembershipDefault` edge in the connection.""" +type AppMembershipDefaultEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppPermissionDefaultGrant` at the end of the edge.""" - node: AppPermissionDefaultGrant + """The `AppMembershipDefault` at the end of the edge.""" + node: AppMembershipDefault } """ -A filter to be used against `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppMembershipDefault` object types. All fields are combined with a logical ‘and.’ """ -input AppPermissionDefaultGrantFilter { +input AppMembershipDefaultFilter { """Checks for all expressions in this list.""" - and: [AppPermissionDefaultGrantFilter!] + and: [AppMembershipDefaultFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `grantorId` field.""" - grantorId: UUIDFilter + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isGrant` field.""" - isGrant: BooleanFilter + """Filter by the object’s `isApproved` field.""" + isApproved: BooleanFilter + + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter """Negates the expression.""" - not: AppPermissionDefaultGrantFilter + not: AppMembershipDefaultFilter """Checks for any expressions in this list.""" - or: [AppPermissionDefaultGrantFilter!] - - """Filter by the object’s `permission` relation.""" - permission: AppPermissionFilter - - """Filter by the object’s `permissionId` field.""" - permissionId: UUIDFilter + or: [AppMembershipDefaultFilter!] """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter } -"""An input for mutations affecting `AppPermissionDefaultGrant`""" -input AppPermissionDefaultGrantInput { - createdAt: Datetime - grantorId: UUID +"""An input for mutations affecting `AppMembershipDefault`""" +input AppMembershipDefaultInput { + createdAt: Datetime + createdBy: UUID id: UUID - """True to add the permission to defaults, false to remove it""" - isGrant: Boolean + """Whether new members are automatically approved upon joining""" + isApproved: Boolean - """References the permission being added to or removed from defaults""" - permissionId: UUID! + """Whether new members are automatically verified upon joining""" + isVerified: Boolean updatedAt: Datetime + updatedBy: UUID } -"""Methods to use when ordering `AppPermissionDefaultGrant`.""" -enum AppPermissionDefaultGrantOrderBy { +"""Methods to use when ordering `AppMembershipDefault`.""" +enum AppMembershipDefaultOrderBy { CREATED_AT_ASC CREATED_AT_DESC - GRANTOR_ID_ASC - GRANTOR_ID_DESC + CREATED_BY_ASC + CREATED_BY_DESC ID_ASC ID_DESC - IS_GRANT_ASC - IS_GRANT_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC + IS_VERIFIED_ASC + IS_VERIFIED_DESC NATURAL - PERMISSION_ID_ASC - PERMISSION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC UPDATED_AT_ASC UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC } """ -Represents an update to a `AppPermissionDefaultGrant`. Fields that are set will be updated. +Represents an update to a `AppMembershipDefault`. Fields that are set will be updated. """ -input AppPermissionDefaultGrantPatch { +input AppMembershipDefaultPatch { createdAt: Datetime - grantorId: UUID + createdBy: UUID id: UUID - """True to add the permission to defaults, false to remove it""" - isGrant: Boolean + """Whether new members are automatically approved upon joining""" + isApproved: Boolean - """References the permission being added to or removed from defaults""" - permissionId: UUID + """Whether new members are automatically verified upon joining""" + isVerified: Boolean updatedAt: Datetime + updatedBy: UUID +} + +"""A `AppMembership` edge in the connection.""" +type AppMembershipEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppMembership` at the end of the edge.""" + node: AppMembership +} + +""" +A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ +""" +input AppMembershipFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [AppMembershipFilter!] + + """Filter by the object’s `appMembershipProfilesByMembershipId` relation.""" + appMembershipProfilesByMembershipId: AppMembershipToManyAppMembershipProfileFilter + + """`appMembershipProfilesByMembershipId` exist.""" + appMembershipProfilesByMembershipIdExist: Boolean + + """Filter by the object’s `appProfileGrantsByMembershipId` relation.""" + appProfileGrantsByMembershipId: AppMembershipToManyAppProfileGrantFilter + + """`appProfileGrantsByMembershipId` exist.""" + appProfileGrantsByMembershipIdExist: Boolean + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `granted` field.""" + granted: BitStringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter + + """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 `isOwner` field.""" + isOwner: BooleanFilter + + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter + + """Negates the expression.""" + not: AppMembershipFilter + + """Checks for any expressions in this list.""" + or: [AppMembershipFilter!] + + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter } -"""An input for mutations affecting `AppPermissionDefault`""" -input AppPermissionDefaultInput { +"""An input for mutations affecting `AppMembership`""" +input AppMembershipInput { + """References the user who holds this membership""" + actorId: UUID! + + """ + Aggregated capability bitmask combining profile-based and directly granted capabilities + """ + capabilities: BitString + createdAt: Datetime + createdBy: UUID + + """ + Bitmask of capabilities directly granted to this member (not from profiles) + """ + granted: BitString id: UUID - """Default permission bitmask applied to new members""" - permissions: BitString + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """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 the actor is the owner of this entity""" + isOwner: Boolean + + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean + profileId: UUID + updatedAt: Datetime + updatedBy: UUID } -"""Methods to use when ordering `AppPermissionDefault`.""" -enum AppPermissionDefaultOrderBy { +"""Methods to use when ordering `AppMembership`.""" +enum AppMembershipOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CAPABILITIES_ASC + CAPABILITIES_DESC + CREATED_AT_ASC + CREATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + GRANTED_ASC + GRANTED_DESC ID_ASC ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC + IS_BANNED_ASC + IS_BANNED_DESC + IS_DISABLED_ASC + IS_DISABLED_DESC + IS_OWNER_ASC + IS_OWNER_DESC + IS_VERIFIED_ASC + IS_VERIFIED_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC } """ -Represents an update to a `AppPermissionDefault`. Fields that are set will be updated. +Represents an update to a `AppMembership`. Fields that are set will be updated. """ -input AppPermissionDefaultPatch { +input AppMembershipPatch { + """References the user who holds this membership""" + actorId: UUID + + """ + Aggregated capability bitmask combining profile-based and directly granted capabilities + """ + capabilities: BitString + createdAt: Datetime + createdBy: UUID + + """ + Bitmask of capabilities directly granted to this member (not from profiles) + """ + granted: BitString id: UUID - """Default permission bitmask applied to new members""" - permissions: BitString + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """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 the actor is the owner of this entity""" + isOwner: Boolean + + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean + profileId: UUID + updatedAt: Datetime + updatedBy: UUID } """ -Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask +Every profile a membership holds; memberships.profile_id points at one of them """ -type AppPermissionDefaultPermission { +type AppMembershipProfile { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID! createdAt: Datetime id: UUID! """ - Reads a single `AppPermission` that is related to this `AppPermissionDefaultPermission`. + Reads a single `AppMembership` that is related to this `AppMembershipProfile`. + """ + membership: AppMembership + + """References the membership holding the profile""" + membershipId: UUID! + + """ + Reads a single `AppProfile` that is related to this `AppMembershipProfile`. """ - permission: AppPermission + profile: AppProfile - """References the permission included in the defaults bundle""" - permissionId: UUID! + """References the held profile""" + profileId: UUID! updatedAt: Datetime } -"""A connection to a list of `AppPermissionDefaultPermission` values.""" -type AppPermissionDefaultPermissionConnection { +"""A connection to a list of `AppMembershipProfile` values.""" +type AppMembershipProfileConnection { """ - A list of edges which contains the `AppPermissionDefaultPermission` and cursor to aid in pagination. + A list of edges which contains the `AppMembershipProfile` and cursor to aid in pagination. """ - edges: [AppPermissionDefaultPermissionEdge]! + edges: [AppMembershipProfileEdge]! - """A list of `AppPermissionDefaultPermission` objects.""" - nodes: [AppPermissionDefaultPermission]! + """A list of `AppMembershipProfile` objects.""" + nodes: [AppMembershipProfile]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `AppPermissionDefaultPermission` you could get from the connection. + The count of *all* `AppMembershipProfile` you could get from the connection. """ totalCount: Int! } -"""A `AppPermissionDefaultPermission` edge in the connection.""" -type AppPermissionDefaultPermissionEdge { +"""A `AppMembershipProfile` edge in the connection.""" +type AppMembershipProfileEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppPermissionDefaultPermission` at the end of the edge.""" - node: AppPermissionDefaultPermission + """The `AppMembershipProfile` at the end of the edge.""" + node: AppMembershipProfile } """ -A filter to be used against `AppPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ """ -input AppPermissionDefaultPermissionFilter { +input AppMembershipProfileFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + """Checks for all expressions in this list.""" - and: [AppPermissionDefaultPermissionFilter!] + and: [AppMembershipProfileFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -1527,1486 +1859,1594 @@ input AppPermissionDefaultPermissionFilter { """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `membership` relation.""" + membership: AppMembershipFilter + + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter + """Negates the expression.""" - not: AppPermissionDefaultPermissionFilter + not: AppMembershipProfileFilter """Checks for any expressions in this list.""" - or: [AppPermissionDefaultPermissionFilter!] + or: [AppMembershipProfileFilter!] - """Filter by the object’s `permission` relation.""" - permission: AppPermissionFilter + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter - """Filter by the object’s `permissionId` field.""" - permissionId: UUIDFilter + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppPermissionDefaultPermission`""" -input AppPermissionDefaultPermissionInput { +"""An input for mutations affecting `AppMembershipProfile`""" +input AppMembershipProfileInput { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID! createdAt: Datetime id: UUID - """References the permission included in the defaults bundle""" - permissionId: UUID! + """References the membership holding the profile""" + membershipId: UUID! + + """References the held profile""" + profileId: UUID! updatedAt: Datetime } -"""Methods to use when ordering `AppPermissionDefaultPermission`.""" -enum AppPermissionDefaultPermissionOrderBy { +"""Methods to use when ordering `AppMembershipProfile`.""" +enum AppMembershipProfileOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC CREATED_AT_ASC CREATED_AT_DESC ID_ASC ID_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC NATURAL - PERMISSION_ID_ASC - PERMISSION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `AppPermissionDefaultPermission`. Fields that are set will be updated. +Represents an update to a `AppMembershipProfile`. Fields that are set will be updated. """ -input AppPermissionDefaultPermissionPatch { +input AppMembershipProfilePatch { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID createdAt: Datetime id: UUID - """References the permission included in the defaults bundle""" - permissionId: UUID - updatedAt: Datetime -} - -"""A `AppPermission` edge in the connection.""" -type AppPermissionEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """References the membership holding the profile""" + membershipId: UUID - """The `AppPermission` at the end of the edge.""" - node: AppPermission + """References the held profile""" + profileId: UUID + updatedAt: Datetime } """ -A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ """ -input AppPermissionFilter { - """Checks for all expressions in this list.""" - and: [AppPermissionFilter!] +input AppMembershipToManyAppMembershipProfileFilter { + """Filters to entities where every related entity matches.""" + every: AppMembershipProfileFilter + + """Filters to entities where no related entity matches.""" + none: AppMembershipProfileFilter + + """Filters to entities where at least one related entity matches.""" + some: AppMembershipProfileFilter +} + +""" +A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppMembershipToManyAppProfileGrantFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileGrantFilter + + """Filters to entities where no related entity matches.""" + none: AppProfileGrantFilter + + """Filters to entities where at least one related entity matches.""" + some: AppProfileGrantFilter +} +"""Records of ownership transfers and grants between members""" +type AppOwnerGrant { """ - Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. + The member receiving or losing the ownership grant; NULL if user was deleted """ - appPermissionDefaultGrantsByPermissionId: AppPermissionToManyAppPermissionDefaultGrantFilter + actorId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID! - """`appPermissionDefaultGrantsByPermissionId` exist.""" - appPermissionDefaultGrantsByPermissionIdExist: Boolean + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean! + updatedAt: Datetime +} +"""A connection to a list of `AppOwnerGrant` values.""" +type AppOwnerGrantConnection { """ - Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. + A list of edges which contains the `AppOwnerGrant` and cursor to aid in pagination. """ - appPermissionDefaultPermissionByPermissionId: AppPermissionDefaultPermissionFilter + edges: [AppOwnerGrantEdge]! + + """A list of `AppOwnerGrant` objects.""" + nodes: [AppOwnerGrant]! - """A related `appPermissionDefaultPermissionByPermissionId` exists.""" - appPermissionDefaultPermissionByPermissionIdExists: Boolean + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Filter by the object’s `bitnum` field.""" - bitnum: IntFilter + """The count of *all* `AppOwnerGrant` you could get from the connection.""" + totalCount: Int! +} - """Filter by the object’s `bitstr` field.""" - bitstr: BitStringFilter +"""A `AppOwnerGrant` edge in the connection.""" +type AppOwnerGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Filter by the object’s `description` field.""" - description: StringFilter + """The `AppOwnerGrant` at the end of the edge.""" + node: AppOwnerGrant +} + +""" +A filter to be used against `AppOwnerGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppOwnerGrantFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [AppOwnerGrantFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter """Negates the expression.""" - not: AppPermissionFilter + not: AppOwnerGrantFilter """Checks for any expressions in this list.""" - or: [AppPermissionFilter!] -} + or: [AppOwnerGrantFilter!] -"""An input for mutations affecting `AppPermission`""" -input AppPermissionInput { - """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set - """ - bitnum: Int + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} +"""An input for mutations affecting `AppOwnerGrant`""" +input AppOwnerGrantInput { """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations + The member receiving or losing the ownership grant; NULL if user was deleted """ - bitstr: BitString - - """Human-readable description of what this permission allows""" - description: String + actorId: UUID + createdAt: Datetime + grantorId: UUID id: UUID - """Human-readable permission name (e.g. read, write, manage)""" - name: String + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean + updatedAt: Datetime } -"""Methods to use when ordering `AppPermission`.""" -enum AppPermissionOrderBy { - BITNUM_ASC - BITNUM_DESC - BITSTR_ASC - BITSTR_DESC - DESCRIPTION_ASC - DESCRIPTION_DESC +"""Methods to use when ordering `AppOwnerGrant`.""" +enum AppOwnerGrantOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC ID_ASC ID_DESC - NAME_ASC - NAME_DESC + IS_GRANT_ASC + IS_GRANT_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppPermission`. Fields that are set will be updated. +Represents an update to a `AppOwnerGrant`. Fields that are set will be updated. """ -input AppPermissionPatch { - """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set - """ - bitnum: Int - +input AppOwnerGrantPatch { """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations + The member receiving or losing the ownership grant; NULL if user was deleted """ - bitstr: BitString - - """Human-readable description of what this permission allows""" - description: String + actorId: UUID + createdAt: Datetime + grantorId: UUID id: UUID - """Human-readable permission name (e.g. read, write, manage)""" - name: String + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean + updatedAt: Datetime } """ -A filter to be used against many `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ +Named capability bundles (roles) that group multiple capabilities into reusable profiles """ -input AppPermissionToManyAppPermissionDefaultGrantFilter { - """Filters to entities where every related entity matches.""" - every: AppPermissionDefaultGrantFilter +type AppProfile { + """Reads and enables pagination through a set of `AppInvite`.""" + appInvitesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filters to entities where no related entity matches.""" - none: AppPermissionDefaultGrantFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filters to entities where at least one related entity matches.""" - some: AppPermissionDefaultGrantFilter -} + """Only read the first `n` values of the set.""" + first: Int -"""A string representing a series of binary bits""" -scalar BitString + """Only read the last `n` values of the set.""" + last: Int -""" -A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ -""" -input BitStringFilter { - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: BitString + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Equal to the specified value.""" - equalTo: BitString + """The method to use when ordering `AppInvite`.""" + orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] - """Greater than the specified value.""" - greaterThan: BitString + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppInviteFilter + ): AppInviteConnection! - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: BitString + """Reads and enables pagination through a set of `AppMembershipProfile`.""" + appMembershipProfilesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Included in the specified list.""" - in: [BitString!] + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean + """Only read the first `n` values of the set.""" + first: Int - """Less than the specified value.""" - lessThan: BitString + """Only read the last `n` values of the set.""" + last: Int - """Less than or equal to the specified value.""" - lessThanOrEqualTo: BitString + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: BitString + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] - """Not equal to the specified value.""" - notEqualTo: BitString + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppMembershipProfileFilter + ): AppMembershipProfileConnection! - """Not included in the specified list.""" - notIn: [BitString!] -} + """Reads and enables pagination through a set of `AppMembership`.""" + appMembershipsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor -""" -A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ -""" -input BooleanFilter { - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: Boolean + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Equal to the specified value.""" - equalTo: Boolean + """Only read the first `n` values of the set.""" + first: Int - """Greater than the specified value.""" - greaterThan: Boolean + """Only read the last `n` values of the set.""" + last: Int - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Boolean + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Included in the specified list.""" - in: [Boolean!] + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppMembershipFilter + ): AppMembershipConnection! - """Less than the specified value.""" - lessThan: Boolean + """Reads and enables pagination through a set of `AppProfileCapability`.""" + appProfileCapabilitiesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Less than or equal to the specified value.""" - lessThanOrEqualTo: Boolean + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Boolean + """Only read the first `n` values of the set.""" + first: Int - """Not equal to the specified value.""" - notEqualTo: Boolean + """Only read the last `n` values of the set.""" + last: Int - """Not included in the specified list.""" - notIn: [Boolean!] -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -scalar ConstructiveInternalTypeEmail + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] -""" -A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ -""" -input ConstructiveInternalTypeEmailFilter { - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: String + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileCapabilityFilter + ): AppProfileCapabilityConnection! """ - Not equal to the specified value, treating null like an ordinary value (case-insensitive). + Reads and enables pagination through a set of `AppProfileDefinitionGrant`. """ - distinctFromInsensitive: ConstructiveInternalTypeEmail + appProfileDefinitionGrantsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Ends with the specified string (case-sensitive).""" - endsWith: String + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Ends with the specified string (case-insensitive).""" - endsWithInsensitive: ConstructiveInternalTypeEmail + """Only read the first `n` values of the set.""" + first: Int - """Equal to the specified value.""" - equalTo: String + """Only read the last `n` values of the set.""" + last: Int - """Equal to the specified value (case-insensitive).""" - equalToInsensitive: ConstructiveInternalTypeEmail + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Greater than the specified value.""" - greaterThan: String + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] - """Greater than the specified value (case-insensitive).""" - greaterThanInsensitive: ConstructiveInternalTypeEmail + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileDefinitionGrantFilter + ): AppProfileDefinitionGrantConnection! - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: String + """Reads and enables pagination through a set of `AppProfileGrant`.""" + appProfileGrantsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Greater than or equal to the specified value (case-insensitive).""" - greaterThanOrEqualToInsensitive: ConstructiveInternalTypeEmail + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Included in the specified list.""" - in: [String!] + """Only read the first `n` values of the set.""" + first: Int - """Included in the specified list (case-insensitive).""" - inInsensitive: [ConstructiveInternalTypeEmail!] + """Only read the last `n` values of the set.""" + last: Int - """Contains the specified string (case-sensitive).""" - includes: String + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Contains the specified string (case-insensitive).""" - includesInsensitive: ConstructiveInternalTypeEmail + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppProfileGrantFilter + ): AppProfileGrantConnection! """ - Is null (if `true` is specified) or is not null (if `false` is specified). + Pre-computed capability bitmask aggregating all capabilities in this profile """ - isNull: Boolean + capabilities: BitString! + createdAt: Datetime - """Less than the specified value.""" - lessThan: String + """Human-readable description of this profile and its intended use""" + description: String + id: UUID! - """Less than the specified value (case-insensitive).""" - lessThanInsensitive: ConstructiveInternalTypeEmail + """ + The default profile is automatically assigned to new members when they join + """ + isDefault: Boolean! - """Less than or equal to the specified value.""" - lessThanOrEqualTo: String + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean! - """Less than or equal to the specified value (case-insensitive).""" - lessThanOrEqualToInsensitive: ConstructiveInternalTypeEmail + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """URL-safe identifier for this profile, used in API references""" + slug: String! + updatedAt: Datetime +} +"""Join table linking profiles to individual capabilities they include""" +type AppProfileCapability { """ - Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. + Reads a single `AppCapability` that is related to this `AppProfileCapability`. """ - like: String + capability: AppCapability + + """References the capability included in this profile""" + capabilityId: UUID! + createdAt: Datetime + id: UUID! """ - Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. + Reads a single `AppProfile` that is related to this `AppProfileCapability`. """ - likeInsensitive: ConstructiveInternalTypeEmail + profile: AppProfile - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: String + """References the profile this capability belongs to""" + profileId: UUID! + updatedAt: Datetime +} +"""A connection to a list of `AppProfileCapability` values.""" +type AppProfileCapabilityConnection { """ - Equal to the specified value, treating null like an ordinary value (case-insensitive). + A list of edges which contains the `AppProfileCapability` and cursor to aid in pagination. """ - notDistinctFromInsensitive: ConstructiveInternalTypeEmail + edges: [AppProfileCapabilityEdge]! - """Does not end with the specified string (case-sensitive).""" - notEndsWith: String + """A list of `AppProfileCapability` objects.""" + nodes: [AppProfileCapability]! - """Does not end with the specified string (case-insensitive).""" - notEndsWithInsensitive: ConstructiveInternalTypeEmail + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Not equal to the specified value.""" - notEqualTo: String + """ + The count of *all* `AppProfileCapability` you could get from the connection. + """ + totalCount: Int! +} - """Not equal to the specified value (case-insensitive).""" - notEqualToInsensitive: ConstructiveInternalTypeEmail +"""A `AppProfileCapability` edge in the connection.""" +type AppProfileCapabilityEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Not included in the specified list.""" - notIn: [String!] + """The `AppProfileCapability` at the end of the edge.""" + node: AppProfileCapability +} - """Not included in the specified list (case-insensitive).""" - notInInsensitive: [ConstructiveInternalTypeEmail!] +""" +A filter to be used against `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileCapabilityFilter { + """Checks for all expressions in this list.""" + and: [AppProfileCapabilityFilter!] - """Does not contain the specified string (case-sensitive).""" - notIncludes: String + """Filter by the object’s `capability` relation.""" + capability: AppCapabilityFilter - """Does not contain the specified string (case-insensitive).""" - notIncludesInsensitive: ConstructiveInternalTypeEmail + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter - """ - Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. - """ - notLike: String + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """ - Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. - """ - notLikeInsensitive: ConstructiveInternalTypeEmail + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Does not start with the specified string (case-sensitive).""" - notStartsWith: String + """Negates the expression.""" + not: AppProfileCapabilityFilter - """Does not start with the specified string (case-insensitive).""" - notStartsWithInsensitive: ConstructiveInternalTypeEmail + """Checks for any expressions in this list.""" + or: [AppProfileCapabilityFilter!] - """Starts with the specified string (case-sensitive).""" - startsWith: String + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter - """Starts with the specified string (case-insensitive).""" - startsWithInsensitive: ConstructiveInternalTypeEmail + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -scalar ConstructiveInternalTypeImage +"""An input for mutations affecting `AppProfileCapability`""" +input AppProfileCapabilityInput { + """References the capability included in this profile""" + capabilityId: UUID! + createdAt: Datetime + id: UUID + + """References the profile this capability belongs to""" + profileId: UUID! + updatedAt: Datetime +} + +"""Methods to use when ordering `AppProfileCapability`.""" +enum AppProfileCapabilityOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} """ -A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ +Represents an update to a `AppProfileCapability`. Fields that are set will be updated. """ -input ConstructiveInternalTypeImageFilter { - """Contained by the specified JSON.""" - containedBy: ConstructiveInternalTypeImage +input AppProfileCapabilityPatch { + """References the capability included in this profile""" + capabilityId: UUID + createdAt: Datetime + id: UUID - """Contains the specified JSON.""" - contains: ConstructiveInternalTypeImage + """References the profile this capability belongs to""" + profileId: UUID + updatedAt: Datetime +} - """Contains all of the specified keys.""" - containsAllKeys: [String!] +"""A connection to a list of `AppProfile` values.""" +type AppProfileConnection { + """ + A list of edges which contains the `AppProfile` and cursor to aid in pagination. + """ + edges: [AppProfileEdge]! - """Contains any of the specified keys.""" - containsAnyKeys: [String!] + """A list of `AppProfile` objects.""" + nodes: [AppProfile]! - """Contains the specified key.""" - containsKey: String + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppProfile` you could get from the connection.""" + totalCount: Int! +} +""" +Audit log of capability additions and removals from profile definitions +""" +type AppProfileDefinitionGrant { """ - Not equal to the specified value, treating null like an ordinary value. + Reads a single `AppCapability` that is related to this `AppProfileDefinitionGrant`. """ - distinctFrom: ConstructiveInternalTypeImage + capability: AppCapability - """Equal to the specified value.""" - equalTo: ConstructiveInternalTypeImage + """ + References the capability that was added to or removed from the profile; NULL if capability was deleted + """ + capabilityId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID! - """Greater than the specified value.""" - greaterThan: ConstructiveInternalTypeImage + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean! - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: ConstructiveInternalTypeImage + """ + Reads a single `AppProfile` that is related to this `AppProfileDefinitionGrant`. + """ + profile: AppProfile - """Included in the specified list.""" - in: [ConstructiveInternalTypeImage!] + """ + References the profile whose definition was modified; NULL if profile was deleted + """ + profileId: UUID + updatedAt: Datetime +} +"""A connection to a list of `AppProfileDefinitionGrant` values.""" +type AppProfileDefinitionGrantConnection { """ - Is null (if `true` is specified) or is not null (if `false` is specified). + A list of edges which contains the `AppProfileDefinitionGrant` and cursor to aid in pagination. """ - isNull: Boolean + edges: [AppProfileDefinitionGrantEdge]! - """Less than the specified value.""" - lessThan: ConstructiveInternalTypeImage + """A list of `AppProfileDefinitionGrant` objects.""" + nodes: [AppProfileDefinitionGrant]! - """Less than or equal to the specified value.""" - lessThanOrEqualTo: ConstructiveInternalTypeImage + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: ConstructiveInternalTypeImage + """ + The count of *all* `AppProfileDefinitionGrant` you could get from the connection. + """ + totalCount: Int! +} - """Not equal to the specified value.""" - notEqualTo: ConstructiveInternalTypeImage +"""A `AppProfileDefinitionGrant` edge in the connection.""" +type AppProfileDefinitionGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Not included in the specified list.""" - notIn: [ConstructiveInternalTypeImage!] + """The `AppProfileDefinitionGrant` at the end of the edge.""" + node: AppProfileDefinitionGrant } -"""All input for the create `AppAdminGrant` mutation.""" -input CreateAppAdminGrantInput { - """The `AppAdminGrant` to be created by this mutation.""" - appAdminGrant: AppAdminGrantInput! +""" +A filter to be used against `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileDefinitionGrantFilter { + """Checks for all expressions in this list.""" + and: [AppProfileDefinitionGrantFilter!] - """ - 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 -} + """Filter by the object’s `capability` relation.""" + capability: AppCapabilityFilter -"""The output of our create `AppAdminGrant` mutation.""" -type CreateAppAdminGrantPayload { - """The `AppAdminGrant` that was created by this mutation.""" - appAdminGrant: AppAdminGrant + """A related `capability` exists.""" + capabilityExists: Boolean - """An edge for our `AppAdminGrant`. May be used by Relay 1.""" - appAdminGrantEdge( - """The method to use when ordering `AppAdminGrant`.""" - orderBy: [AppAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppAdminGrantEdge + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter - """ - 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 + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter -"""All input for the create `AppClaimedInvite` mutation.""" -input CreateAppClaimedInviteInput { - """The `AppClaimedInvite` to be created by this mutation.""" - appClaimedInvite: AppClaimedInviteInput! + """Filter by the object’s `id` field.""" + id: UUIDFilter - """ - 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 -} + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter -"""The output of our create `AppClaimedInvite` mutation.""" -type CreateAppClaimedInvitePayload { - """The `AppClaimedInvite` that was created by this mutation.""" - appClaimedInvite: AppClaimedInvite + """Negates the expression.""" + not: AppProfileDefinitionGrantFilter - """An edge for our `AppClaimedInvite`. May be used by Relay 1.""" - appClaimedInviteEdge( - """The method to use when ordering `AppClaimedInvite`.""" - orderBy: [AppClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppClaimedInviteEdge + """Checks for any expressions in this list.""" + or: [AppProfileDefinitionGrantFilter!] - """ - 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 + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `AppProfileDefinitionGrant`""" +input AppProfileDefinitionGrantInput { """ - Our root query field type. Allows us to run any query from our mutation payload. + References the capability that was added to or removed from the profile; NULL if capability was deleted """ - query: Query -} + capabilityId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID -"""All input for the create `AppGrant` mutation.""" -input CreateAppGrantInput { - """The `AppGrant` to be created by this mutation.""" - appGrant: AppGrantInput! + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + References the profile whose definition was modified; NULL if profile was deleted """ - clientMutationId: String + profileId: UUID + updatedAt: Datetime } -"""The output of our create `AppGrant` mutation.""" -type CreateAppGrantPayload { - """The `AppGrant` that was created by this mutation.""" - appGrant: AppGrant - - """An edge for our `AppGrant`. May be used by Relay 1.""" - appGrantEdge( - """The method to use when ordering `AppGrant`.""" - orderBy: [AppGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppGrantEdge +"""Methods to use when ordering `AppProfileDefinitionGrant`.""" +enum AppProfileDefinitionGrantOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} +""" +Represents an update to a `AppProfileDefinitionGrant`. Fields that are set will be updated. +""" +input AppProfileDefinitionGrantPatch { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + References the capability that was added to or removed from the profile; NULL if capability was deleted """ - clientMutationId: String + capabilityId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID + + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean """ - Our root query field type. Allows us to run any query from our mutation payload. + References the profile whose definition was modified; NULL if profile was deleted """ - query: Query + profileId: UUID + updatedAt: Datetime } -"""All input for the create `AppInvite` mutation.""" -input CreateAppInviteInput { - """The `AppInvite` to be created by this mutation.""" - appInvite: AppInviteInput! +"""A `AppProfile` edge in the connection.""" +type AppProfileEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """ - 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 `AppProfile` at the end of the edge.""" + node: AppProfile } -"""The output of our create `AppInvite` mutation.""" -type CreateAppInvitePayload { - """The `AppInvite` that was created by this mutation.""" - appInvite: AppInvite +""" +A filter to be used against `AppProfile` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileFilter { + """Checks for all expressions in this list.""" + and: [AppProfileFilter!] - """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 + """Filter by the object’s `appInvitesByProfileId` relation.""" + appInvitesByProfileId: AppProfileToManyAppInviteFilter - """ - 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 + """`appInvitesByProfileId` exist.""" + appInvitesByProfileIdExist: Boolean - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `appMembershipProfilesByProfileId` relation.""" + appMembershipProfilesByProfileId: AppProfileToManyAppMembershipProfileFilter -"""All input for the create `AppMembershipDefault` mutation.""" -input CreateAppMembershipDefaultInput { - """The `AppMembershipDefault` to be created by this mutation.""" - appMembershipDefault: AppMembershipDefaultInput! + """`appMembershipProfilesByProfileId` exist.""" + appMembershipProfilesByProfileIdExist: Boolean + + """Filter by the object’s `appMembershipsByProfileId` relation.""" + appMembershipsByProfileId: AppProfileToManyAppMembershipFilter + + """`appMembershipsByProfileId` exist.""" + appMembershipsByProfileIdExist: Boolean + + """Filter by the object’s `appProfileCapabilitiesByProfileId` relation.""" + appProfileCapabilitiesByProfileId: AppProfileToManyAppProfileCapabilityFilter + + """`appProfileCapabilitiesByProfileId` exist.""" + appProfileCapabilitiesByProfileIdExist: Boolean """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. """ - clientMutationId: String + appProfileDefinitionGrantsByProfileId: AppProfileToManyAppProfileDefinitionGrantFilter + + """`appProfileDefinitionGrantsByProfileId` exist.""" + appProfileDefinitionGrantsByProfileIdExist: Boolean + + """Filter by the object’s `appProfileGrantsByProfileId` relation.""" + appProfileGrantsByProfileId: AppProfileToManyAppProfileGrantFilter + + """`appProfileGrantsByProfileId` exist.""" + appProfileGrantsByProfileIdExist: Boolean + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter + + """Filter by the object’s `isSystem` field.""" + isSystem: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: AppProfileFilter + + """Checks for any expressions in this list.""" + or: [AppProfileFilter!] + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""The output of our create `AppMembershipDefault` mutation.""" -type CreateAppMembershipDefaultPayload { - """The `AppMembershipDefault` that was created by this mutation.""" - appMembershipDefault: AppMembershipDefault +"""Audit log of profile assignments and revocations for members""" +type AppProfileGrant { + createdAt: Datetime + grantorId: UUID + id: UUID! - """An edge for our `AppMembershipDefault`. May be used by Relay 1.""" - appMembershipDefaultEdge( - """The method to use when ordering `AppMembershipDefault`.""" - orderBy: [AppMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipDefaultEdge + """True to assign the profile, false to revoke it""" + isGrant: Boolean! """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Reads a single `AppMembership` that is related to this `AppProfileGrant`. """ - clientMutationId: String + membership: AppMembership """ - Our root query field type. Allows us to run any query from our mutation payload. + References the membership that received or lost this profile; NULL if membership was deleted """ - query: Query -} + membershipId: UUID -"""All input for the create `AppMembership` mutation.""" -input CreateAppMembershipInput { - """The `AppMembership` to be created by this mutation.""" - appMembership: AppMembershipInput! + """Reads a single `AppProfile` that is related to this `AppProfileGrant`.""" + profile: AppProfile """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + References the profile being assigned; NULL indicates the profile was removed """ - clientMutationId: String + profileId: UUID + updatedAt: Datetime } -"""The output of our create `AppMembership` mutation.""" -type CreateAppMembershipPayload { - """The `AppMembership` that was created by this mutation.""" - appMembership: AppMembership - - """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 - +"""A connection to a list of `AppProfileGrant` values.""" +type AppProfileGrantConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `AppProfileGrant` and cursor to aid in pagination. """ - clientMutationId: String + edges: [AppProfileGrantEdge]! + + """A list of `AppProfileGrant` objects.""" + nodes: [AppProfileGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Our root query field type. Allows us to run any query from our mutation payload. + The count of *all* `AppProfileGrant` you could get from the connection. """ - query: Query + totalCount: Int! } -"""All input for the create `AppOwnerGrant` mutation.""" -input CreateAppOwnerGrantInput { - """The `AppOwnerGrant` to be created by this mutation.""" - appOwnerGrant: AppOwnerGrantInput! +"""A `AppProfileGrant` edge in the connection.""" +type AppProfileGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """ - 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 `AppProfileGrant` at the end of the edge.""" + node: AppProfileGrant } -"""The output of our create `AppOwnerGrant` mutation.""" -type CreateAppOwnerGrantPayload { - """The `AppOwnerGrant` that was created by this mutation.""" - appOwnerGrant: AppOwnerGrant +""" +A filter to be used against `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileGrantFilter { + """Checks for all expressions in this list.""" + and: [AppProfileGrantFilter!] - """An edge for our `AppOwnerGrant`. May be used by Relay 1.""" - appOwnerGrantEdge( - """The method to use when ordering `AppOwnerGrant`.""" - orderBy: [AppOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppOwnerGrantEdge + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """ - 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 + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `id` field.""" + id: UUIDFilter -"""All input for the create `AppPermissionDefaultGrant` mutation.""" -input CreateAppPermissionDefaultGrantInput { - """The `AppPermissionDefaultGrant` to be created by this mutation.""" - appPermissionDefaultGrant: AppPermissionDefaultGrantInput! + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter - """ - 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 -} + """Filter by the object’s `membership` relation.""" + membership: AppMembershipFilter -"""The output of our create `AppPermissionDefaultGrant` mutation.""" -type CreateAppPermissionDefaultGrantPayload { - """The `AppPermissionDefaultGrant` that was created by this mutation.""" - appPermissionDefaultGrant: AppPermissionDefaultGrant + """A related `membership` exists.""" + membershipExists: Boolean - """An edge for our `AppPermissionDefaultGrant`. May be used by Relay 1.""" - appPermissionDefaultGrantEdge( - """The method to use when ordering `AppPermissionDefaultGrant`.""" - orderBy: [AppPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultGrantEdge + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter - """ - 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 + """Negates the expression.""" + not: AppProfileGrantFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Checks for any expressions in this list.""" + or: [AppProfileGrantFilter!] -"""All input for the create `AppPermissionDefault` mutation.""" -input CreateAppPermissionDefaultInput { - """The `AppPermissionDefault` to be created by this mutation.""" - appPermissionDefault: AppPermissionDefaultInput! + """Filter by the object’s `profile` relation.""" + profile: AppProfileFilter - """ - 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 + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""The output of our create `AppPermissionDefault` mutation.""" -type CreateAppPermissionDefaultPayload { - """The `AppPermissionDefault` that was created by this mutation.""" - appPermissionDefault: AppPermissionDefault +"""An input for mutations affecting `AppProfileGrant`""" +input AppProfileGrantInput { + createdAt: Datetime + grantorId: UUID + id: UUID - """An edge for our `AppPermissionDefault`. May be used by Relay 1.""" - appPermissionDefaultEdge( - """The method to use when ordering `AppPermissionDefault`.""" - orderBy: [AppPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultEdge + """True to assign the profile, false to revoke it""" + isGrant: Boolean """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + References the membership that received or lost this profile; NULL if membership was deleted """ - clientMutationId: String + membershipId: UUID """ - Our root query field type. Allows us to run any query from our mutation payload. + References the profile being assigned; NULL indicates the profile was removed """ - query: Query + profileId: UUID + updatedAt: Datetime } -"""All input for the create `AppPermissionDefaultPermission` mutation.""" -input CreateAppPermissionDefaultPermissionInput { - """The `AppPermissionDefaultPermission` to be created by this mutation.""" - appPermissionDefaultPermission: AppPermissionDefaultPermissionInput! - - """ - 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 +"""Methods to use when ordering `AppProfileGrant`.""" +enum AppProfileGrantOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } -"""The output of our create `AppPermissionDefaultPermission` mutation.""" -type CreateAppPermissionDefaultPermissionPayload { - """ - The `AppPermissionDefaultPermission` that was created by this mutation. - """ - appPermissionDefaultPermission: AppPermissionDefaultPermission +""" +Represents an update to a `AppProfileGrant`. Fields that are set will be updated. +""" +input AppProfileGrantPatch { + createdAt: Datetime + grantorId: UUID + id: UUID + + """True to assign the profile, false to revoke it""" + isGrant: Boolean """ - An edge for our `AppPermissionDefaultPermission`. May be used by Relay 1. + References the membership that received or lost this profile; NULL if membership was deleted """ - appPermissionDefaultPermissionEdge( - """The method to use when ordering `AppPermissionDefaultPermission`.""" - orderBy: [AppPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultPermissionEdge + membershipId: UUID """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + References the profile being assigned; NULL indicates the profile was removed """ - clientMutationId: String + profileId: UUID + updatedAt: Datetime +} +"""An input for mutations affecting `AppProfile`""" +input AppProfileInput { """ - Our root query field type. Allows us to run any query from our mutation payload. + Pre-computed capability bitmask aggregating all capabilities in this profile """ - query: Query -} + capabilities: BitString + createdAt: Datetime -"""All input for the create `AppPermission` mutation.""" -input CreateAppPermissionInput { - """The `AppPermission` to be created by this mutation.""" - appPermission: AppPermissionInput! + """Human-readable description of this profile and its intended use""" + description: String + id: UUID """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + The default profile is automatically assigned to new members when they join """ - clientMutationId: String -} + isDefault: Boolean -"""The output of our create `AppPermission` mutation.""" -type CreateAppPermissionPayload { - """The `AppPermission` that was created by this mutation.""" - appPermission: AppPermission + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean - """An edge for our `AppPermission`. May be used by Relay 1.""" - appPermissionEdge( - """The method to use when ordering `AppPermission`.""" - orderBy: [AppPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionEdge + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String! - """ - 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 + """URL-safe identifier for this profile, used in API references""" + slug: String! + updatedAt: Datetime +} - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query +"""Methods to use when ordering `AppProfile`.""" +enum AppProfileOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + ID_ASC + ID_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + IS_SYSTEM_ASC + IS_SYSTEM_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } -"""All input for the create `MembershipType` mutation.""" -input CreateMembershipTypeInput { +""" +Represents an update to a `AppProfile`. Fields that are set will be updated. +""" +input AppProfilePatch { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Pre-computed capability bitmask aggregating all capabilities in this profile """ - clientMutationId: String + capabilities: BitString + createdAt: Datetime - """The `MembershipType` to be created by this mutation.""" - membershipType: MembershipTypeInput! -} + """Human-readable description of this profile and its intended use""" + description: String + id: 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. + The default profile is automatically assigned to new members when they join """ - clientMutationId: String + isDefault: Boolean - """The `MembershipType` that was created by this mutation.""" - membershipType: MembershipType + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean - """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 + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """URL-safe identifier for this profile, used in API references""" + slug: String + updatedAt: Datetime } -"""All input for the create `OrgAdminGrant` mutation.""" -input CreateOrgAdminGrantInput { - """ - 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 +""" +Template profiles that are automatically seeded into new entities when created +""" +type AppProfileTemplate { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString! + createdAt: Datetime - """The `OrgAdminGrant` to be created by this mutation.""" - orgAdminGrant: OrgAdminGrantInput! + """Human-readable description of this template profile""" + description: String + id: UUID! + + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean! + + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """URL-safe identifier for the template profile""" + slug: String! + updatedAt: Datetime } -"""The output of our create `OrgAdminGrant` mutation.""" -type CreateOrgAdminGrantPayload { +"""A connection to a list of `AppProfileTemplate` values.""" +type AppProfileTemplateConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `AppProfileTemplate` and cursor to aid in pagination. """ - clientMutationId: String + edges: [AppProfileTemplateEdge]! - """The `OrgAdminGrant` that was created by this mutation.""" - orgAdminGrant: OrgAdminGrant + """A list of `AppProfileTemplate` objects.""" + nodes: [AppProfileTemplate]! - """An edge for our `OrgAdminGrant`. May be used by Relay 1.""" - orgAdminGrantEdge( - """The method to use when ordering `OrgAdminGrant`.""" - orderBy: [OrgAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgAdminGrantEdge + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Our root query field type. Allows us to run any query from our mutation payload. + The count of *all* `AppProfileTemplate` you could get from the connection. """ - query: Query + totalCount: Int! } -"""All input for the create `OrgChartEdgeGrant` mutation.""" -input CreateOrgChartEdgeGrantInput { - """ - 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 +"""A `AppProfileTemplate` edge in the connection.""" +type AppProfileTemplateEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """The `OrgChartEdgeGrant` to be created by this mutation.""" - orgChartEdgeGrant: OrgChartEdgeGrantInput! + """The `AppProfileTemplate` at the end of the edge.""" + node: AppProfileTemplate } -"""The output of our create `OrgChartEdgeGrant` mutation.""" -type CreateOrgChartEdgeGrantPayload { - """ - 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 +""" +A filter to be used against `AppProfileTemplate` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileTemplateFilter { + """Checks for all expressions in this list.""" + and: [AppProfileTemplateFilter!] - """The `OrgChartEdgeGrant` that was created by this mutation.""" - orgChartEdgeGrant: OrgChartEdgeGrant + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter - """An edge for our `OrgChartEdgeGrant`. May be used by Relay 1.""" - orgChartEdgeGrantEdge( - """The method to use when ordering `OrgChartEdgeGrant`.""" - orderBy: [OrgChartEdgeGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgChartEdgeGrantEdge + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - -"""All input for the create `OrgChartEdge` mutation.""" -input CreateOrgChartEdgeInput { - """ - 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 + """Filter by the object’s `description` field.""" + description: StringFilter - """The `OrgChartEdge` to be created by this mutation.""" - orgChartEdge: OrgChartEdgeInput! -} + """Filter by the object’s `id` field.""" + id: UUIDFilter -"""The output of our create `OrgChartEdge` mutation.""" -type CreateOrgChartEdgePayload { - """ - 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 + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter - """The `OrgChartEdge` that was created by this mutation.""" - orgChartEdge: OrgChartEdge + """Filter by the object’s `name` field.""" + name: StringFilter - """An edge for our `OrgChartEdge`. May be used by Relay 1.""" - orgChartEdgeEdge( - """The method to use when ordering `OrgChartEdge`.""" - orderBy: [OrgChartEdgeOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgChartEdgeEdge + """Negates the expression.""" + not: AppProfileTemplateFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Checks for any expressions in this list.""" + or: [AppProfileTemplateFilter!] -"""All input for the create `OrgClaimedInvite` mutation.""" -input CreateOrgClaimedInviteInput { - """ - 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 + """Filter by the object’s `slug` field.""" + slug: StringFilter - """The `OrgClaimedInvite` to be created by this mutation.""" - orgClaimedInvite: OrgClaimedInviteInput! + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""The output of our create `OrgClaimedInvite` mutation.""" -type CreateOrgClaimedInvitePayload { - """ - 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 +"""An input for mutations affecting `AppProfileTemplate`""" +input AppProfileTemplateInput { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString + createdAt: Datetime - """The `OrgClaimedInvite` that was created by this mutation.""" - orgClaimedInvite: OrgClaimedInvite + """Human-readable description of this template profile""" + description: String + id: UUID - """An edge for our `OrgClaimedInvite`. May be used by Relay 1.""" - orgClaimedInviteEdge( - """The method to use when ordering `OrgClaimedInvite`.""" - orderBy: [OrgClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgClaimedInviteEdge + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String! -"""All input for the create `OrgGrant` mutation.""" -input CreateOrgGrantInput { - """ - 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 + """URL-safe identifier for the template profile""" + slug: String! + updatedAt: Datetime +} - """The `OrgGrant` to be created by this mutation.""" - orgGrant: OrgGrantInput! +"""Methods to use when ordering `AppProfileTemplate`.""" +enum AppProfileTemplateOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + ID_ASC + ID_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } -"""The output of our create `OrgGrant` mutation.""" -type CreateOrgGrantPayload { - """ - 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 +""" +Represents an update to a `AppProfileTemplate`. Fields that are set will be updated. +""" +input AppProfileTemplatePatch { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString + createdAt: Datetime - """The `OrgGrant` that was created by this mutation.""" - orgGrant: OrgGrant + """Human-readable description of this template profile""" + description: String + id: UUID - """An edge for our `OrgGrant`. May be used by Relay 1.""" - orgGrantEdge( - """The method to use when ordering `OrgGrant`.""" - orderBy: [OrgGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgGrantEdge + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String + + """URL-safe identifier for the template profile""" + slug: String + updatedAt: Datetime } -"""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 +""" +A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppInviteFilter { + """Filters to entities where every related entity matches.""" + every: AppInviteFilter - """The `OrgInvite` to be created by this mutation.""" - orgInvite: OrgInviteInput! -} + """Filters to entities where no related entity matches.""" + none: AppInviteFilter -"""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 + """Filters to entities where at least one related entity matches.""" + some: AppInviteFilter +} - """The `OrgInvite` that was created by this mutation.""" - orgInvite: OrgInvite +""" +A filter to be used against many `AppMembership` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppMembershipFilter { + """Filters to entities where every related entity matches.""" + every: AppMembershipFilter - """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 + """Filters to entities where no related entity matches.""" + none: AppMembershipFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Filters to entities where at least one related entity matches.""" + some: AppMembershipFilter } -"""All input for the create `OrgMember` mutation.""" -input CreateOrgMemberInput { - """ - 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 +""" +A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppMembershipProfileFilter { + """Filters to entities where every related entity matches.""" + every: AppMembershipProfileFilter - """The `OrgMember` to be created by this mutation.""" - orgMember: OrgMemberInput! + """Filters to entities where no related entity matches.""" + none: AppMembershipProfileFilter + + """Filters to entities where at least one related entity matches.""" + some: AppMembershipProfileFilter } -"""The output of our create `OrgMember` mutation.""" -type CreateOrgMemberPayload { - """ - 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 +""" +A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppProfileCapabilityFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileCapabilityFilter - """The `OrgMember` that was created by this mutation.""" - orgMember: OrgMember + """Filters to entities where no related entity matches.""" + none: AppProfileCapabilityFilter - """An edge for our `OrgMember`. May be used by Relay 1.""" - orgMemberEdge( - """The method to use when ordering `OrgMember`.""" - orderBy: [OrgMemberOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMemberEdge + """Filters to entities where at least one related entity matches.""" + some: AppProfileCapabilityFilter +} - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query +""" +A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppProfileDefinitionGrantFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileDefinitionGrantFilter + + """Filters to entities where no related entity matches.""" + none: AppProfileDefinitionGrantFilter + + """Filters to entities where at least one related entity matches.""" + some: AppProfileDefinitionGrantFilter } -"""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 +""" +A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppProfileToManyAppProfileGrantFilter { + """Filters to entities where every related entity matches.""" + every: AppProfileGrantFilter - """The `OrgMemberProfile` to be created by this mutation.""" - orgMemberProfile: OrgMemberProfileInput! + """Filters to entities where no related entity matches.""" + none: AppProfileGrantFilter + + """Filters to entities where at least one related entity matches.""" + some: AppProfileGrantFilter } -"""The output of our create `OrgMemberProfile` mutation.""" -type CreateOrgMemberProfilePayload { +"""A string representing a series of binary bits""" +scalar BitString + +""" +A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ +""" +input BitStringFilter { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Not equal to the specified value, treating null like an ordinary value. """ - clientMutationId: String + distinctFrom: BitString - """The `OrgMemberProfile` that was created by this mutation.""" - orgMemberProfile: OrgMemberProfile + """Equal to the specified value.""" + equalTo: BitString - """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 + """Greater than the specified value.""" + greaterThan: BitString + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: BitString + + """Included in the specified list.""" + in: [BitString!] """ - Our root query field type. Allows us to run any query from our mutation payload. + Is null (if `true` is specified) or is not null (if `false` is specified). """ - query: Query -} - -"""All input for the create `OrgMembershipDefault` mutation.""" -input CreateOrgMembershipDefaultInput { - """ - 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 + isNull: Boolean - """The `OrgMembershipDefault` to be created by this mutation.""" - orgMembershipDefault: OrgMembershipDefaultInput! -} + """Less than the specified value.""" + lessThan: BitString -"""The output of our create `OrgMembershipDefault` mutation.""" -type CreateOrgMembershipDefaultPayload { - """ - 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 + """Less than or equal to the specified value.""" + lessThanOrEqualTo: BitString - """The `OrgMembershipDefault` that was created by this mutation.""" - orgMembershipDefault: OrgMembershipDefault + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: BitString - """An edge for our `OrgMembershipDefault`. May be used by Relay 1.""" - orgMembershipDefaultEdge( - """The method to use when ordering `OrgMembershipDefault`.""" - orderBy: [OrgMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipDefaultEdge + """Not equal to the specified value.""" + notEqualTo: BitString - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Not included in the specified list.""" + notIn: [BitString!] } -"""All input for the create `OrgMembership` mutation.""" -input CreateOrgMembershipInput { +""" +A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ +""" +input BooleanFilter { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Not equal to the specified value, treating null like an ordinary value. """ - clientMutationId: String - - """The `OrgMembership` to be created by this mutation.""" - orgMembership: OrgMembershipInput! -} + distinctFrom: Boolean -"""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 + """Equal to the specified value.""" + equalTo: Boolean - """The `OrgMembership` that was created by this mutation.""" - orgMembership: OrgMembership + """Greater than the specified value.""" + greaterThan: Boolean - """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 + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Boolean - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Included in the specified list.""" + in: [Boolean!] -"""All input for the create `OrgMembershipSetting` mutation.""" -input CreateOrgMembershipSettingInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Is null (if `true` is specified) or is not null (if `false` is specified). """ - clientMutationId: String + isNull: Boolean - """The `OrgMembershipSetting` to be created by this mutation.""" - orgMembershipSetting: OrgMembershipSettingInput! -} + """Less than the specified value.""" + lessThan: Boolean -"""The output of our create `OrgMembershipSetting` mutation.""" -type CreateOrgMembershipSettingPayload { - """ - 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 + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Boolean - """The `OrgMembershipSetting` that was created by this mutation.""" - orgMembershipSetting: OrgMembershipSetting + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Boolean - """An edge for our `OrgMembershipSetting`. May be used by Relay 1.""" - orgMembershipSettingEdge( - """The method to use when ordering `OrgMembershipSetting`.""" - orderBy: [OrgMembershipSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipSettingEdge + """Not equal to the specified value.""" + notEqualTo: Boolean - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Not included in the specified list.""" + notIn: [Boolean!] } -"""All input for the create `OrgOwnerGrant` mutation.""" -input CreateOrgOwnerGrantInput { - """ - 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 `OrgOwnerGrant` to be created by this mutation.""" - orgOwnerGrant: OrgOwnerGrantInput! -} +scalar ConstructiveInternalTypeEmail -"""The output of our create `OrgOwnerGrant` mutation.""" -type CreateOrgOwnerGrantPayload { +""" +A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ +""" +input ConstructiveInternalTypeEmailFilter { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Not equal to the specified value, treating null like an ordinary value. """ - clientMutationId: String - - """The `OrgOwnerGrant` that was created by this mutation.""" - orgOwnerGrant: OrgOwnerGrant - - """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 + distinctFrom: String """ - Our root query field type. Allows us to run any query from our mutation payload. + Not equal to the specified value, treating null like an ordinary value (case-insensitive). """ - query: Query -} + distinctFromInsensitive: ConstructiveInternalTypeEmail -"""All input for the create `OrgPermissionDefaultGrant` mutation.""" -input CreateOrgPermissionDefaultGrantInput { - """ - 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 + """Ends with the specified string (case-sensitive).""" + endsWith: String - """The `OrgPermissionDefaultGrant` to be created by this mutation.""" - orgPermissionDefaultGrant: OrgPermissionDefaultGrantInput! -} + """Ends with the specified string (case-insensitive).""" + endsWithInsensitive: ConstructiveInternalTypeEmail -"""The output of our create `OrgPermissionDefaultGrant` mutation.""" -type CreateOrgPermissionDefaultGrantPayload { - """ - 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 + """Equal to the specified value.""" + equalTo: String - """The `OrgPermissionDefaultGrant` that was created by this mutation.""" - orgPermissionDefaultGrant: OrgPermissionDefaultGrant + """Equal to the specified value (case-insensitive).""" + equalToInsensitive: ConstructiveInternalTypeEmail - """An edge for our `OrgPermissionDefaultGrant`. May be used by Relay 1.""" - orgPermissionDefaultGrantEdge( - """The method to use when ordering `OrgPermissionDefaultGrant`.""" - orderBy: [OrgPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultGrantEdge + """Greater than the specified value.""" + greaterThan: String - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Greater than the specified value (case-insensitive).""" + greaterThanInsensitive: ConstructiveInternalTypeEmail -"""All input for the create `OrgPermissionDefault` mutation.""" -input CreateOrgPermissionDefaultInput { - """ - 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 + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: String - """The `OrgPermissionDefault` to be created by this mutation.""" - orgPermissionDefault: OrgPermissionDefaultInput! -} + """Greater than or equal to the specified value (case-insensitive).""" + greaterThanOrEqualToInsensitive: ConstructiveInternalTypeEmail -"""The output of our create `OrgPermissionDefault` mutation.""" -type CreateOrgPermissionDefaultPayload { - """ - 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 + """Included in the specified list.""" + in: [String!] - """The `OrgPermissionDefault` that was created by this mutation.""" - orgPermissionDefault: OrgPermissionDefault + """Included in the specified list (case-insensitive).""" + inInsensitive: [ConstructiveInternalTypeEmail!] - """An edge for our `OrgPermissionDefault`. May be used by Relay 1.""" - orgPermissionDefaultEdge( - """The method to use when ordering `OrgPermissionDefault`.""" - orderBy: [OrgPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultEdge + """Contains the specified string (case-sensitive).""" + includes: String - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Contains the specified string (case-insensitive).""" + includesInsensitive: ConstructiveInternalTypeEmail -"""All input for the create `OrgPermissionDefaultPermission` mutation.""" -input CreateOrgPermissionDefaultPermissionInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Is null (if `true` is specified) or is not null (if `false` is specified). """ - clientMutationId: String + isNull: Boolean - """The `OrgPermissionDefaultPermission` to be created by this mutation.""" - orgPermissionDefaultPermission: OrgPermissionDefaultPermissionInput! -} + """Less than the specified value.""" + lessThan: String -"""The output of our create `OrgPermissionDefaultPermission` mutation.""" -type CreateOrgPermissionDefaultPermissionPayload { - """ - 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 + """Less than the specified value (case-insensitive).""" + lessThanInsensitive: ConstructiveInternalTypeEmail - """ - The `OrgPermissionDefaultPermission` that was created by this mutation. - """ - orgPermissionDefaultPermission: OrgPermissionDefaultPermission + """Less than or equal to the specified value.""" + lessThanOrEqualTo: String - """ - An edge for our `OrgPermissionDefaultPermission`. May be used by Relay 1. - """ - orgPermissionDefaultPermissionEdge( - """The method to use when ordering `OrgPermissionDefaultPermission`.""" - orderBy: [OrgPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultPermissionEdge + """Less than or equal to the specified value (case-insensitive).""" + lessThanOrEqualToInsensitive: ConstructiveInternalTypeEmail """ - Our root query field type. Allows us to run any query from our mutation payload. + Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - query: Query -} + like: String -"""All input for the create `OrgPermission` mutation.""" -input CreateOrgPermissionInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - clientMutationId: String + likeInsensitive: ConstructiveInternalTypeEmail - """The `OrgPermission` to be created by this mutation.""" - orgPermission: OrgPermissionInput! -} + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: String -"""The output of our create `OrgPermission` mutation.""" -type CreateOrgPermissionPayload { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Equal to the specified value, treating null like an ordinary value (case-insensitive). """ - clientMutationId: String + notDistinctFromInsensitive: ConstructiveInternalTypeEmail - """The `OrgPermission` that was created by this mutation.""" - orgPermission: OrgPermission + """Does not end with the specified string (case-sensitive).""" + notEndsWith: String + + """Does not end with the specified string (case-insensitive).""" + notEndsWithInsensitive: ConstructiveInternalTypeEmail + + """Not equal to the specified value.""" + notEqualTo: String + + """Not equal to the specified value (case-insensitive).""" + notEqualToInsensitive: ConstructiveInternalTypeEmail + + """Not included in the specified list.""" + notIn: [String!] + + """Not included in the specified list (case-insensitive).""" + notInInsensitive: [ConstructiveInternalTypeEmail!] + + """Does not contain the specified string (case-sensitive).""" + notIncludes: String - """An edge for our `OrgPermission`. May be used by Relay 1.""" - orgPermissionEdge( - """The method to use when ordering `OrgPermission`.""" - orderBy: [OrgPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionEdge + """Does not contain the specified string (case-insensitive).""" + notIncludesInsensitive: ConstructiveInternalTypeEmail """ - Our root query field type. Allows us to run any query from our mutation payload. + Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. """ - query: Query + notLike: String + + """ + Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. + """ + notLikeInsensitive: ConstructiveInternalTypeEmail + + """Does not start with the specified string (case-sensitive).""" + notStartsWith: String + + """Does not start with the specified string (case-insensitive).""" + notStartsWithInsensitive: ConstructiveInternalTypeEmail + + """Starts with the specified string (case-sensitive).""" + startsWith: String + + """Starts with the specified string (case-insensitive).""" + startsWithInsensitive: ConstructiveInternalTypeEmail } -"""A location in a connection that can be used for resuming pagination.""" -scalar Cursor +scalar ConstructiveInternalTypeImage """ -A point in time as described by the [ISO -8601](https://en.wikipedia.org/wiki/ISO_8601) and, if it has a timezone, [RFC -3339](https://datatracker.ietf.org/doc/html/rfc3339) standards. Input values -that do not conform to both ISO 8601 and RFC 3339 may be coerced, which may lead -to unexpected results. +A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ """ -scalar Datetime +input ConstructiveInternalTypeImageFilter { + """Contained by the specified JSON.""" + containedBy: ConstructiveInternalTypeImage + + """Contains the specified JSON.""" + contains: ConstructiveInternalTypeImage + + """Contains all of the specified keys.""" + containsAllKeys: [String!] + + """Contains any of the specified keys.""" + containsAnyKeys: [String!] + + """Contains the specified key.""" + containsKey: String -""" -A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ -""" -input DatetimeFilter { """ Not equal to the specified value, treating null like an ordinary value. """ - distinctFrom: Datetime + distinctFrom: ConstructiveInternalTypeImage """Equal to the specified value.""" - equalTo: Datetime + equalTo: ConstructiveInternalTypeImage """Greater than the specified value.""" - greaterThan: Datetime + greaterThan: ConstructiveInternalTypeImage """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Datetime + greaterThanOrEqualTo: ConstructiveInternalTypeImage """Included in the specified list.""" - in: [Datetime!] + in: [ConstructiveInternalTypeImage!] """ Is null (if `true` is specified) or is not null (if `false` is specified). @@ -3014,34 +3454,36 @@ input DatetimeFilter { isNull: Boolean """Less than the specified value.""" - lessThan: Datetime + lessThan: ConstructiveInternalTypeImage """Less than or equal to the specified value.""" - lessThanOrEqualTo: Datetime + lessThanOrEqualTo: ConstructiveInternalTypeImage """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Datetime + notDistinctFrom: ConstructiveInternalTypeImage """Not equal to the specified value.""" - notEqualTo: Datetime + notEqualTo: ConstructiveInternalTypeImage """Not included in the specified list.""" - notIn: [Datetime!] + notIn: [ConstructiveInternalTypeImage!] } -"""All input for the `deleteAppAdminGrant` mutation.""" -input DeleteAppAdminGrantInput { +"""All input for the create `AppAdminGrant` mutation.""" +input CreateAppAdminGrantInput { + """The `AppAdminGrant` to be created by this mutation.""" + appAdminGrant: AppAdminGrantInput! + """ 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 { - """The `AppAdminGrant` that was deleted by this mutation.""" +"""The output of our create `AppAdminGrant` mutation.""" +type CreateAppAdminGrantPayload { + """The `AppAdminGrant` that was created by this mutation.""" appAdminGrant: AppAdminGrant """An edge for our `AppAdminGrant`. May be used by Relay 1.""" @@ -3062,26 +3504,32 @@ type DeleteAppAdminGrantPayload { query: Query } -"""All input for the `deleteAppClaimedInvite` mutation.""" -input DeleteAppClaimedInviteInput { +"""All input for the create `AppCapabilityDefaultCapability` mutation.""" +input CreateAppCapabilityDefaultCapabilityInput { + """The `AppCapabilityDefaultCapability` to be created by this mutation.""" + appCapabilityDefaultCapability: AppCapabilityDefaultCapabilityInput! + """ 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 `AppClaimedInvite` mutation.""" -type DeleteAppClaimedInvitePayload { - """The `AppClaimedInvite` that was deleted by this mutation.""" - appClaimedInvite: AppClaimedInvite +"""The output of our create `AppCapabilityDefaultCapability` mutation.""" +type CreateAppCapabilityDefaultCapabilityPayload { + """ + The `AppCapabilityDefaultCapability` that was created by this mutation. + """ + appCapabilityDefaultCapability: AppCapabilityDefaultCapability - """An edge for our `AppClaimedInvite`. May be used by Relay 1.""" - appClaimedInviteEdge( - """The method to use when ordering `AppClaimedInvite`.""" - orderBy: [AppClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppClaimedInviteEdge + """ + An edge for our `AppCapabilityDefaultCapability`. May be used by Relay 1. + """ + appCapabilityDefaultCapabilityEdge( + """The method to use when ordering `AppCapabilityDefaultCapability`.""" + orderBy: [AppCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultCapabilityEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3095,26 +3543,28 @@ type DeleteAppClaimedInvitePayload { query: Query } -"""All input for the `deleteAppGrant` mutation.""" -input DeleteAppGrantInput { +"""All input for the create `AppCapabilityDefaultGrant` mutation.""" +input CreateAppCapabilityDefaultGrantInput { + """The `AppCapabilityDefaultGrant` to be created by this mutation.""" + appCapabilityDefaultGrant: AppCapabilityDefaultGrantInput! + """ 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 `AppGrant` mutation.""" -type DeleteAppGrantPayload { - """The `AppGrant` that was deleted by this mutation.""" - appGrant: AppGrant +"""The output of our create `AppCapabilityDefaultGrant` mutation.""" +type CreateAppCapabilityDefaultGrantPayload { + """The `AppCapabilityDefaultGrant` that was created by this mutation.""" + appCapabilityDefaultGrant: AppCapabilityDefaultGrant - """An edge for our `AppGrant`. May be used by Relay 1.""" - appGrantEdge( - """The method to use when ordering `AppGrant`.""" - orderBy: [AppGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppGrantEdge + """An edge for our `AppCapabilityDefaultGrant`. May be used by Relay 1.""" + appCapabilityDefaultGrantEdge( + """The method to use when ordering `AppCapabilityDefaultGrant`.""" + orderBy: [AppCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultGrantEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3128,26 +3578,28 @@ type DeleteAppGrantPayload { query: Query } -"""All input for the `deleteAppInvite` mutation.""" -input DeleteAppInviteInput { +"""All input for the create `AppCapabilityDefault` mutation.""" +input CreateAppCapabilityDefaultInput { + """The `AppCapabilityDefault` to be created by this mutation.""" + appCapabilityDefault: AppCapabilityDefaultInput! + """ 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 `AppInvite` mutation.""" -type DeleteAppInvitePayload { - """The `AppInvite` that was deleted by this mutation.""" - appInvite: AppInvite +"""The output of our create `AppCapabilityDefault` mutation.""" +type CreateAppCapabilityDefaultPayload { + """The `AppCapabilityDefault` that was created by this mutation.""" + appCapabilityDefault: AppCapabilityDefault - """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 `AppCapabilityDefault`. May be used by Relay 1.""" + appCapabilityDefaultEdge( + """The method to use when ordering `AppCapabilityDefault`.""" + orderBy: [AppCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3161,26 +3613,28 @@ type DeleteAppInvitePayload { query: Query } -"""All input for the `deleteAppMembershipDefault` mutation.""" -input DeleteAppMembershipDefaultInput { +"""All input for the create `AppCapability` mutation.""" +input CreateAppCapabilityInput { + """The `AppCapability` to be created by this mutation.""" + appCapability: AppCapabilityInput! + """ 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 `AppMembershipDefault` mutation.""" -type DeleteAppMembershipDefaultPayload { - """The `AppMembershipDefault` that was deleted by this mutation.""" - appMembershipDefault: AppMembershipDefault +"""The output of our create `AppCapability` mutation.""" +type CreateAppCapabilityPayload { + """The `AppCapability` that was created by this mutation.""" + appCapability: AppCapability - """An edge for our `AppMembershipDefault`. May be used by Relay 1.""" - appMembershipDefaultEdge( - """The method to use when ordering `AppMembershipDefault`.""" - orderBy: [AppMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipDefaultEdge + """An edge for our `AppCapability`. May be used by Relay 1.""" + appCapabilityEdge( + """The method to use when ordering `AppCapability`.""" + orderBy: [AppCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3194,26 +3648,28 @@ type DeleteAppMembershipDefaultPayload { query: Query } -"""All input for the `deleteAppMembership` mutation.""" -input DeleteAppMembershipInput { +"""All input for the create `AppClaimedInvite` mutation.""" +input CreateAppClaimedInviteInput { + """The `AppClaimedInvite` to be created by this mutation.""" + appClaimedInvite: AppClaimedInviteInput! + """ 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 `AppMembership` mutation.""" -type DeleteAppMembershipPayload { - """The `AppMembership` that was deleted by this mutation.""" - appMembership: AppMembership +"""The output of our create `AppClaimedInvite` mutation.""" +type CreateAppClaimedInvitePayload { + """The `AppClaimedInvite` that was created by this mutation.""" + appClaimedInvite: AppClaimedInvite - """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 `AppClaimedInvite`. May be used by Relay 1.""" + appClaimedInviteEdge( + """The method to use when ordering `AppClaimedInvite`.""" + orderBy: [AppClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppClaimedInviteEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3227,26 +3683,28 @@ type DeleteAppMembershipPayload { query: Query } -"""All input for the `deleteAppOwnerGrant` mutation.""" -input DeleteAppOwnerGrantInput { +"""All input for the create `AppGrant` mutation.""" +input CreateAppGrantInput { + """The `AppGrant` to be created by this mutation.""" + appGrant: AppGrantInput! + """ 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 `AppOwnerGrant` mutation.""" -type DeleteAppOwnerGrantPayload { - """The `AppOwnerGrant` that was deleted by this mutation.""" - appOwnerGrant: AppOwnerGrant +"""The output of our create `AppGrant` mutation.""" +type CreateAppGrantPayload { + """The `AppGrant` that was created by this mutation.""" + appGrant: AppGrant - """An edge for our `AppOwnerGrant`. May be used by Relay 1.""" - appOwnerGrantEdge( - """The method to use when ordering `AppOwnerGrant`.""" - orderBy: [AppOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppOwnerGrantEdge + """An edge for our `AppGrant`. May be used by Relay 1.""" + appGrantEdge( + """The method to use when ordering `AppGrant`.""" + orderBy: [AppGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppGrantEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3260,26 +3718,28 @@ type DeleteAppOwnerGrantPayload { query: Query } -"""All input for the `deleteAppPermissionDefaultGrant` mutation.""" -input DeleteAppPermissionDefaultGrantInput { +"""All input for the create `AppInvite` mutation.""" +input CreateAppInviteInput { + """The `AppInvite` to be created by this mutation.""" + appInvite: AppInviteInput! + """ 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 `AppPermissionDefaultGrant` mutation.""" -type DeleteAppPermissionDefaultGrantPayload { - """The `AppPermissionDefaultGrant` that was deleted by this mutation.""" - appPermissionDefaultGrant: AppPermissionDefaultGrant +"""The output of our create `AppInvite` mutation.""" +type CreateAppInvitePayload { + """The `AppInvite` that was created by this mutation.""" + appInvite: AppInvite - """An edge for our `AppPermissionDefaultGrant`. May be used by Relay 1.""" - appPermissionDefaultGrantEdge( - """The method to use when ordering `AppPermissionDefaultGrant`.""" - orderBy: [AppPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultGrantEdge + """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 """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3293,26 +3753,28 @@ type DeleteAppPermissionDefaultGrantPayload { query: Query } -"""All input for the `deleteAppPermissionDefault` mutation.""" -input DeleteAppPermissionDefaultInput { +"""All input for the create `AppMembershipDefault` mutation.""" +input CreateAppMembershipDefaultInput { + """The `AppMembershipDefault` to be created by this mutation.""" + appMembershipDefault: AppMembershipDefaultInput! + """ 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 `AppPermissionDefault` mutation.""" -type DeleteAppPermissionDefaultPayload { - """The `AppPermissionDefault` that was deleted by this mutation.""" - appPermissionDefault: AppPermissionDefault +"""The output of our create `AppMembershipDefault` mutation.""" +type CreateAppMembershipDefaultPayload { + """The `AppMembershipDefault` that was created by this mutation.""" + appMembershipDefault: AppMembershipDefault - """An edge for our `AppPermissionDefault`. May be used by Relay 1.""" - appPermissionDefaultEdge( - """The method to use when ordering `AppPermissionDefault`.""" - orderBy: [AppPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultEdge + """An edge for our `AppMembershipDefault`. May be used by Relay 1.""" + appMembershipDefaultEdge( + """The method to use when ordering `AppMembershipDefault`.""" + orderBy: [AppMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipDefaultEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3326,30 +3788,28 @@ type DeleteAppPermissionDefaultPayload { query: Query } -"""All input for the `deleteAppPermissionDefaultPermission` mutation.""" -input DeleteAppPermissionDefaultPermissionInput { +"""All input for the create `AppMembership` mutation.""" +input CreateAppMembershipInput { + """The `AppMembership` to be created by this mutation.""" + appMembership: AppMembershipInput! + """ 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 `AppPermissionDefaultPermission` mutation.""" -type DeleteAppPermissionDefaultPermissionPayload { - """ - The `AppPermissionDefaultPermission` that was deleted by this mutation. - """ - appPermissionDefaultPermission: AppPermissionDefaultPermission +"""The output of our create `AppMembership` mutation.""" +type CreateAppMembershipPayload { + """The `AppMembership` that was created by this mutation.""" + appMembership: AppMembership - """ - An edge for our `AppPermissionDefaultPermission`. May be used by Relay 1. - """ - appPermissionDefaultPermissionEdge( - """The method to use when ordering `AppPermissionDefaultPermission`.""" - orderBy: [AppPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultPermissionEdge + """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 """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3363,26 +3823,28 @@ type DeleteAppPermissionDefaultPermissionPayload { query: Query } -"""All input for the `deleteAppPermission` mutation.""" -input DeleteAppPermissionInput { +"""All input for the create `AppMembershipProfile` mutation.""" +input CreateAppMembershipProfileInput { + """The `AppMembershipProfile` to be created by this mutation.""" + appMembershipProfile: AppMembershipProfileInput! + """ 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 `AppPermission` mutation.""" -type DeleteAppPermissionPayload { - """The `AppPermission` that was deleted by this mutation.""" - appPermission: AppPermission +"""The output of our create `AppMembershipProfile` mutation.""" +type CreateAppMembershipProfilePayload { + """The `AppMembershipProfile` that was created by this mutation.""" + appMembershipProfile: AppMembershipProfile - """An edge for our `AppPermission`. May be used by Relay 1.""" - appPermissionEdge( - """The method to use when ordering `AppPermission`.""" - orderBy: [AppPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionEdge + """An edge for our `AppMembershipProfile`. May be used by Relay 1.""" + appMembershipProfileEdge( + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipProfileEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -3396,234 +3858,244 @@ type DeleteAppPermissionPayload { query: Query } -"""All input for the `deleteMembershipType` mutation.""" -input DeleteMembershipTypeInput { +"""All input for the create `AppOwnerGrant` mutation.""" +input CreateAppOwnerGrantInput { + """The `AppOwnerGrant` to be created by this mutation.""" + appOwnerGrant: AppOwnerGrantInput! + """ 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 `MembershipType` mutation.""" -type DeleteMembershipTypePayload { +"""The output of our create `AppOwnerGrant` mutation.""" +type CreateAppOwnerGrantPayload { + """The `AppOwnerGrant` that was created by this mutation.""" + appOwnerGrant: AppOwnerGrant + + """An edge for our `AppOwnerGrant`. May be used by Relay 1.""" + appOwnerGrantEdge( + """The method to use when ordering `AppOwnerGrant`.""" + orderBy: [AppOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppOwnerGrantEdge + """ 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 - - """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 - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgAdminGrant` mutation.""" -input DeleteOrgAdminGrantInput { +"""All input for the create `AppProfileCapability` mutation.""" +input CreateAppProfileCapabilityInput { + """The `AppProfileCapability` to be created by this mutation.""" + appProfileCapability: AppProfileCapabilityInput! + """ 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 { +"""The output of our create `AppProfileCapability` mutation.""" +type CreateAppProfileCapabilityPayload { + """The `AppProfileCapability` that was created by this mutation.""" + appProfileCapability: AppProfileCapability + + """An edge for our `AppProfileCapability`. May be used by Relay 1.""" + appProfileCapabilityEdge( + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileCapabilityEdge + """ 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 `OrgAdminGrant` that was deleted by this mutation.""" - orgAdminGrant: OrgAdminGrant - - """An edge for our `OrgAdminGrant`. May be used by Relay 1.""" - orgAdminGrantEdge( - """The method to use when ordering `OrgAdminGrant`.""" - orderBy: [OrgAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgAdminGrantEdge - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgChartEdgeGrant` mutation.""" -input DeleteOrgChartEdgeGrantInput { +"""All input for the create `AppProfileDefinitionGrant` mutation.""" +input CreateAppProfileDefinitionGrantInput { + """The `AppProfileDefinitionGrant` to be created by this mutation.""" + appProfileDefinitionGrant: AppProfileDefinitionGrantInput! + """ 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 { +"""The output of our create `AppProfileDefinitionGrant` mutation.""" +type CreateAppProfileDefinitionGrantPayload { + """The `AppProfileDefinitionGrant` that was created by this mutation.""" + appProfileDefinitionGrant: AppProfileDefinitionGrant + + """An edge for our `AppProfileDefinitionGrant`. May be used by Relay 1.""" + appProfileDefinitionGrantEdge( + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileDefinitionGrantEdge + """ 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 `OrgChartEdgeGrant` that was deleted by this mutation.""" - orgChartEdgeGrant: OrgChartEdgeGrant - - """An edge for our `OrgChartEdgeGrant`. May be used by Relay 1.""" - orgChartEdgeGrantEdge( - """The method to use when ordering `OrgChartEdgeGrant`.""" - orderBy: [OrgChartEdgeGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgChartEdgeGrantEdge - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgChartEdge` mutation.""" -input DeleteOrgChartEdgeInput { +"""All input for the create `AppProfileGrant` mutation.""" +input CreateAppProfileGrantInput { + """The `AppProfileGrant` to be created by this mutation.""" + appProfileGrant: AppProfileGrantInput! + """ 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 `OrgChartEdge` mutation.""" -type DeleteOrgChartEdgePayload { +"""The output of our create `AppProfileGrant` mutation.""" +type CreateAppProfileGrantPayload { + """The `AppProfileGrant` that was created by this mutation.""" + appProfileGrant: AppProfileGrant + + """An edge for our `AppProfileGrant`. May be used by Relay 1.""" + appProfileGrantEdge( + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileGrantEdge + """ 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 `OrgChartEdge` that was deleted by this mutation.""" - orgChartEdge: OrgChartEdge - - """An edge for our `OrgChartEdge`. May be used by Relay 1.""" - orgChartEdgeEdge( - """The method to use when ordering `OrgChartEdge`.""" - orderBy: [OrgChartEdgeOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgChartEdgeEdge - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgClaimedInvite` mutation.""" -input DeleteOrgClaimedInviteInput { +"""All input for the create `AppProfile` mutation.""" +input CreateAppProfileInput { + """The `AppProfile` to be created by this mutation.""" + appProfile: AppProfileInput! + """ 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 `OrgClaimedInvite` mutation.""" -type DeleteOrgClaimedInvitePayload { +"""The output of our create `AppProfile` mutation.""" +type CreateAppProfilePayload { + """The `AppProfile` that was created by this mutation.""" + appProfile: AppProfile + + """An edge for our `AppProfile`. May be used by Relay 1.""" + appProfileEdge( + """The method to use when ordering `AppProfile`.""" + orderBy: [AppProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileEdge + """ 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 `OrgClaimedInvite` that was deleted by this mutation.""" - orgClaimedInvite: OrgClaimedInvite - - """An edge for our `OrgClaimedInvite`. May be used by Relay 1.""" - orgClaimedInviteEdge( - """The method to use when ordering `OrgClaimedInvite`.""" - orderBy: [OrgClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgClaimedInviteEdge - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgGrant` mutation.""" -input DeleteOrgGrantInput { +"""All input for the create `AppProfileTemplate` mutation.""" +input CreateAppProfileTemplateInput { + """The `AppProfileTemplate` to be created by this mutation.""" + appProfileTemplate: AppProfileTemplateInput! + """ 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 `OrgGrant` mutation.""" -type DeleteOrgGrantPayload { +"""The output of our create `AppProfileTemplate` mutation.""" +type CreateAppProfileTemplatePayload { + """The `AppProfileTemplate` that was created by this mutation.""" + appProfileTemplate: AppProfileTemplate + + """An edge for our `AppProfileTemplate`. May be used by Relay 1.""" + appProfileTemplateEdge( + """The method to use when ordering `AppProfileTemplate`.""" + orderBy: [AppProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileTemplateEdge + """ 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 `OrgGrant` that was deleted by this mutation.""" - orgGrant: OrgGrant - - """An edge for our `OrgGrant`. May be used by Relay 1.""" - orgGrantEdge( - """The method to use when ordering `OrgGrant`.""" - orderBy: [OrgGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgGrantEdge - """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `deleteOrgInvite` mutation.""" -input DeleteOrgInviteInput { +"""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 - id: UUID! + + """The `MembershipType` to be created by this mutation.""" + membershipType: MembershipTypeInput! } -"""The output of our delete `OrgInvite` mutation.""" -type DeleteOrgInvitePayload { +"""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 `OrgInvite` that was deleted by this mutation.""" - orgInvite: OrgInvite + """The `MembershipType` that was created by this mutation.""" + membershipType: MembershipType - """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 `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3631,32 +4103,34 @@ type DeleteOrgInvitePayload { query: Query } -"""All input for the `deleteOrgMember` mutation.""" -input DeleteOrgMemberInput { +"""All input for the create `OrgAdminGrant` mutation.""" +input CreateOrgAdminGrantInput { """ 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 `OrgAdminGrant` to be created by this mutation.""" + orgAdminGrant: OrgAdminGrantInput! } -"""The output of our delete `OrgMember` mutation.""" -type DeleteOrgMemberPayload { +"""The output of our create `OrgAdminGrant` mutation.""" +type CreateOrgAdminGrantPayload { """ 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 `OrgMember` that was deleted by this mutation.""" - orgMember: OrgMember + """The `OrgAdminGrant` that was created by this mutation.""" + orgAdminGrant: OrgAdminGrant - """An edge for our `OrgMember`. May be used by Relay 1.""" - orgMemberEdge( - """The method to use when ordering `OrgMember`.""" - orderBy: [OrgMemberOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMemberEdge + """An edge for our `OrgAdminGrant`. May be used by Relay 1.""" + orgAdminGrantEdge( + """The method to use when ordering `OrgAdminGrant`.""" + orderBy: [OrgAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgAdminGrantEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3664,32 +4138,38 @@ type DeleteOrgMemberPayload { query: Query } -"""All input for the `deleteOrgMemberProfile` mutation.""" -input DeleteOrgMemberProfileInput { +"""All input for the create `OrgCapabilityDefaultCapability` mutation.""" +input CreateOrgCapabilityDefaultCapabilityInput { """ 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 `OrgCapabilityDefaultCapability` to be created by this mutation.""" + orgCapabilityDefaultCapability: OrgCapabilityDefaultCapabilityInput! } -"""The output of our delete `OrgMemberProfile` mutation.""" -type DeleteOrgMemberProfilePayload { +"""The output of our create `OrgCapabilityDefaultCapability` mutation.""" +type CreateOrgCapabilityDefaultCapabilityPayload { """ 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 + """ + The `OrgCapabilityDefaultCapability` that was created by this mutation. + """ + orgCapabilityDefaultCapability: OrgCapabilityDefaultCapability - """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 + """ + An edge for our `OrgCapabilityDefaultCapability`. May be used by Relay 1. + """ + orgCapabilityDefaultCapabilityEdge( + """The method to use when ordering `OrgCapabilityDefaultCapability`.""" + orderBy: [OrgCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultCapabilityEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3697,32 +4177,34 @@ type DeleteOrgMemberProfilePayload { query: Query } -"""All input for the `deleteOrgMembershipDefault` mutation.""" -input DeleteOrgMembershipDefaultInput { +"""All input for the create `OrgCapabilityDefaultGrant` mutation.""" +input CreateOrgCapabilityDefaultGrantInput { """ 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 `OrgCapabilityDefaultGrant` to be created by this mutation.""" + orgCapabilityDefaultGrant: OrgCapabilityDefaultGrantInput! } -"""The output of our delete `OrgMembershipDefault` mutation.""" -type DeleteOrgMembershipDefaultPayload { +"""The output of our create `OrgCapabilityDefaultGrant` mutation.""" +type CreateOrgCapabilityDefaultGrantPayload { """ 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 `OrgMembershipDefault` that was deleted by this mutation.""" - orgMembershipDefault: OrgMembershipDefault + """The `OrgCapabilityDefaultGrant` that was created by this mutation.""" + orgCapabilityDefaultGrant: OrgCapabilityDefaultGrant - """An edge for our `OrgMembershipDefault`. May be used by Relay 1.""" - orgMembershipDefaultEdge( - """The method to use when ordering `OrgMembershipDefault`.""" - orderBy: [OrgMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipDefaultEdge + """An edge for our `OrgCapabilityDefaultGrant`. May be used by Relay 1.""" + orgCapabilityDefaultGrantEdge( + """The method to use when ordering `OrgCapabilityDefaultGrant`.""" + orderBy: [OrgCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultGrantEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3730,32 +4212,34 @@ type DeleteOrgMembershipDefaultPayload { query: Query } -"""All input for the `deleteOrgMembership` mutation.""" -input DeleteOrgMembershipInput { +"""All input for the create `OrgCapabilityDefault` mutation.""" +input CreateOrgCapabilityDefaultInput { """ 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 `OrgCapabilityDefault` to be created by this mutation.""" + orgCapabilityDefault: OrgCapabilityDefaultInput! } -"""The output of our delete `OrgMembership` mutation.""" -type DeleteOrgMembershipPayload { +"""The output of our create `OrgCapabilityDefault` mutation.""" +type CreateOrgCapabilityDefaultPayload { """ 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 `OrgCapabilityDefault` that was created by this mutation.""" + orgCapabilityDefault: OrgCapabilityDefault - """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 `OrgCapabilityDefault`. May be used by Relay 1.""" + orgCapabilityDefaultEdge( + """The method to use when ordering `OrgCapabilityDefault`.""" + orderBy: [OrgCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3763,32 +4247,34 @@ type DeleteOrgMembershipPayload { query: Query } -"""All input for the `deleteOrgMembershipSetting` mutation.""" -input DeleteOrgMembershipSettingInput { +"""All input for the create `OrgCapability` mutation.""" +input CreateOrgCapabilityInput { """ 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 `OrgCapability` to be created by this mutation.""" + orgCapability: OrgCapabilityInput! } -"""The output of our delete `OrgMembershipSetting` mutation.""" -type DeleteOrgMembershipSettingPayload { +"""The output of our create `OrgCapability` mutation.""" +type CreateOrgCapabilityPayload { """ 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 `OrgMembershipSetting` that was deleted by this mutation.""" - orgMembershipSetting: OrgMembershipSetting + """The `OrgCapability` that was created by this mutation.""" + orgCapability: OrgCapability - """An edge for our `OrgMembershipSetting`. May be used by Relay 1.""" - orgMembershipSettingEdge( - """The method to use when ordering `OrgMembershipSetting`.""" - orderBy: [OrgMembershipSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipSettingEdge + """An edge for our `OrgCapability`. May be used by Relay 1.""" + orgCapabilityEdge( + """The method to use when ordering `OrgCapability`.""" + orderBy: [OrgCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3796,32 +4282,34 @@ type DeleteOrgMembershipSettingPayload { query: Query } -"""All input for the `deleteOrgOwnerGrant` mutation.""" -input DeleteOrgOwnerGrantInput { +"""All input for the create `OrgChartEdgeGrant` mutation.""" +input CreateOrgChartEdgeGrantInput { """ 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 `OrgChartEdgeGrant` to be created by this mutation.""" + orgChartEdgeGrant: OrgChartEdgeGrantInput! } -"""The output of our delete `OrgOwnerGrant` mutation.""" -type DeleteOrgOwnerGrantPayload { +"""The output of our create `OrgChartEdgeGrant` mutation.""" +type CreateOrgChartEdgeGrantPayload { """ 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 deleted by this mutation.""" - orgOwnerGrant: OrgOwnerGrant + """The `OrgChartEdgeGrant` that was created by this mutation.""" + orgChartEdgeGrant: OrgChartEdgeGrant - """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 + """An edge for our `OrgChartEdgeGrant`. May be used by Relay 1.""" + orgChartEdgeGrantEdge( + """The method to use when ordering `OrgChartEdgeGrant`.""" + orderBy: [OrgChartEdgeGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgChartEdgeGrantEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3829,32 +4317,34 @@ type DeleteOrgOwnerGrantPayload { query: Query } -"""All input for the `deleteOrgPermissionDefaultGrant` mutation.""" -input DeleteOrgPermissionDefaultGrantInput { +"""All input for the create `OrgChartEdge` mutation.""" +input CreateOrgChartEdgeInput { """ 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 `OrgChartEdge` to be created by this mutation.""" + orgChartEdge: OrgChartEdgeInput! } -"""The output of our delete `OrgPermissionDefaultGrant` mutation.""" -type DeleteOrgPermissionDefaultGrantPayload { +"""The output of our create `OrgChartEdge` mutation.""" +type CreateOrgChartEdgePayload { """ 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 `OrgPermissionDefaultGrant` that was deleted by this mutation.""" - orgPermissionDefaultGrant: OrgPermissionDefaultGrant + """The `OrgChartEdge` that was created by this mutation.""" + orgChartEdge: OrgChartEdge - """An edge for our `OrgPermissionDefaultGrant`. May be used by Relay 1.""" - orgPermissionDefaultGrantEdge( - """The method to use when ordering `OrgPermissionDefaultGrant`.""" - orderBy: [OrgPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultGrantEdge + """An edge for our `OrgChartEdge`. May be used by Relay 1.""" + orgChartEdgeEdge( + """The method to use when ordering `OrgChartEdge`.""" + orderBy: [OrgChartEdgeOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgChartEdgeEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3862,32 +4352,34 @@ type DeleteOrgPermissionDefaultGrantPayload { query: Query } -"""All input for the `deleteOrgPermissionDefault` mutation.""" -input DeleteOrgPermissionDefaultInput { +"""All input for the create `OrgClaimedInvite` mutation.""" +input CreateOrgClaimedInviteInput { """ 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 `OrgClaimedInvite` to be created by this mutation.""" + orgClaimedInvite: OrgClaimedInviteInput! } -"""The output of our delete `OrgPermissionDefault` mutation.""" -type DeleteOrgPermissionDefaultPayload { +"""The output of our create `OrgClaimedInvite` mutation.""" +type CreateOrgClaimedInvitePayload { """ 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 `OrgPermissionDefault` that was deleted by this mutation.""" - orgPermissionDefault: OrgPermissionDefault + """The `OrgClaimedInvite` that was created by this mutation.""" + orgClaimedInvite: OrgClaimedInvite - """An edge for our `OrgPermissionDefault`. May be used by Relay 1.""" - orgPermissionDefaultEdge( - """The method to use when ordering `OrgPermissionDefault`.""" - orderBy: [OrgPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultEdge + """An edge for our `OrgClaimedInvite`. May be used by Relay 1.""" + orgClaimedInviteEdge( + """The method to use when ordering `OrgClaimedInvite`.""" + orderBy: [OrgClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgClaimedInviteEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3895,36 +4387,34 @@ type DeleteOrgPermissionDefaultPayload { query: Query } -"""All input for the `deleteOrgPermissionDefaultPermission` mutation.""" -input DeleteOrgPermissionDefaultPermissionInput { +"""All input for the create `OrgGrant` mutation.""" +input CreateOrgGrantInput { """ 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 `OrgGrant` to be created by this mutation.""" + orgGrant: OrgGrantInput! } -"""The output of our delete `OrgPermissionDefaultPermission` mutation.""" -type DeleteOrgPermissionDefaultPermissionPayload { +"""The output of our create `OrgGrant` mutation.""" +type CreateOrgGrantPayload { """ 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 `OrgPermissionDefaultPermission` that was deleted by this mutation. - """ - orgPermissionDefaultPermission: OrgPermissionDefaultPermission + """The `OrgGrant` that was created by this mutation.""" + orgGrant: OrgGrant - """ - An edge for our `OrgPermissionDefaultPermission`. May be used by Relay 1. - """ - orgPermissionDefaultPermissionEdge( - """The method to use when ordering `OrgPermissionDefaultPermission`.""" - orderBy: [OrgPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultPermissionEdge + """An edge for our `OrgGrant`. May be used by Relay 1.""" + orgGrantEdge( + """The method to use when ordering `OrgGrant`.""" + orderBy: [OrgGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgGrantEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3932,32 +4422,34 @@ type DeleteOrgPermissionDefaultPermissionPayload { query: Query } -"""All input for the `deleteOrgPermission` mutation.""" -input DeleteOrgPermissionInput { +"""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 - id: UUID! + + """The `OrgInvite` to be created by this mutation.""" + orgInvite: OrgInviteInput! } -"""The output of our delete `OrgPermission` mutation.""" -type DeleteOrgPermissionPayload { +"""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 `OrgPermission` that was deleted by this mutation.""" - orgPermission: OrgPermission + """The `OrgInvite` that was created by this mutation.""" + orgInvite: OrgInvite - """An edge for our `OrgPermission`. May be used by Relay 1.""" - orgPermissionEdge( - """The method to use when ordering `OrgPermission`.""" - orderBy: [OrgPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionEdge + """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 """ Our root query field type. Allows us to run any query from our mutation payload. @@ -3965,1301 +4457,4623 @@ type DeleteOrgPermissionPayload { query: Query } -""" -A filter to be used against Int fields. All fields are combined with a logical ‘and.’ -""" -input IntFilter { +"""All input for the create `OrgMember` mutation.""" +input CreateOrgMemberInput { """ - Not equal to the specified value, treating null like an ordinary value. + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - distinctFrom: Int + clientMutationId: String - """Equal to the specified value.""" - equalTo: Int + """The `OrgMember` to be created by this mutation.""" + orgMember: OrgMemberInput! +} - """Greater than the specified value.""" - greaterThan: Int +"""The output of our create `OrgMember` mutation.""" +type CreateOrgMemberPayload { + """ + 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 - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Int + """The `OrgMember` that was created by this mutation.""" + orgMember: OrgMember - """Included in the specified list.""" - in: [Int!] + """An edge for our `OrgMember`. May be used by Relay 1.""" + orgMemberEdge( + """The method to use when ordering `OrgMember`.""" + orderBy: [OrgMemberOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberEdge """ - Is null (if `true` is specified) or is not null (if `false` is specified). + Our root query field type. Allows us to run any query from our mutation payload. """ - isNull: Boolean - - """Less than the specified value.""" - lessThan: Int + query: Query +} - """Less than or equal to the specified value.""" - lessThanOrEqualTo: Int +"""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 - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Int + """The `OrgMemberProfile` to be created by this mutation.""" + orgMemberProfile: OrgMemberProfileInput! +} - """Not equal to the specified value.""" - notEqualTo: 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 - """Not included in the specified list.""" - notIn: [Int!] -} + """The `OrgMemberProfile` that was created by this mutation.""" + orgMemberProfile: OrgMemberProfile -""" -Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). -""" -scalar JSON + """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 -""" -Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) -""" -type MembershipType { - """Description of what this membership type represents""" - description: String! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} +"""All input for the create `OrgMembershipDefault` mutation.""" +input CreateOrgMembershipDefaultInput { """ - 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 + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - hasUsersTableEntry: Boolean! + clientMutationId: String + + """The `OrgMembershipDefault` to be created by this mutation.""" + orgMembershipDefault: OrgMembershipDefaultInput! +} +"""The output of our create `OrgMembershipDefault` mutation.""" +type CreateOrgMembershipDefaultPayload { """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - id: Int! + clientMutationId: String - """Human-readable name of the membership type""" - name: String! + """The `OrgMembershipDefault` that was created by this mutation.""" + orgMembershipDefault: OrgMembershipDefault + + """An edge for our `OrgMembershipDefault`. May be used by Relay 1.""" + orgMembershipDefaultEdge( + """The method to use when ordering `OrgMembershipDefault`.""" + orderBy: [OrgMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipDefaultEdge """ - Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + Our root query field type. Allows us to run any query from our mutation payload. """ - parentMembershipType: Int + query: Query +} +"""All input for the create `OrgMembership` mutation.""" +input CreateOrgMembershipInput { """ - Scope identifier for this membership type, used to resolve scope on module config tables + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - scope: String! + clientMutationId: String + + """The `OrgMembership` to be created by this mutation.""" + orgMembership: OrgMembershipInput! } -"""A connection to a list of `MembershipType` values.""" -type MembershipTypeConnection { +"""The output of our create `OrgMembership` mutation.""" +type CreateOrgMembershipPayload { """ - A list of edges which contains the `MembershipType` and cursor to aid in pagination. + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - edges: [MembershipTypeEdge]! + clientMutationId: String - """A list of `MembershipType` objects.""" - nodes: [MembershipType]! + """The `OrgMembership` that was created by this mutation.""" + orgMembership: OrgMembership - """Information to aid in pagination.""" - pageInfo: PageInfo! + """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 - """The count of *all* `MembershipType` you could get from the connection.""" - totalCount: Int! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""A `MembershipType` edge in the connection.""" -type MembershipTypeEdge { - """A cursor for use in pagination.""" - cursor: Cursor +"""All input for the create `OrgMembershipProfile` mutation.""" +input CreateOrgMembershipProfileInput { + """ + 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` at the end of the edge.""" - node: MembershipType + """The `OrgMembershipProfile` to be created by this mutation.""" + orgMembershipProfile: OrgMembershipProfileInput! } -""" -A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ -""" -input MembershipTypeFilter { - """Checks for all expressions in this list.""" - and: [MembershipTypeFilter!] +"""The output of our create `OrgMembershipProfile` mutation.""" +type CreateOrgMembershipProfilePayload { + """ + 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 - """Filter by the object’s `description` field.""" - description: StringFilter + """The `OrgMembershipProfile` that was created by this mutation.""" + orgMembershipProfile: OrgMembershipProfile - """Filter by the object’s `hasUsersTableEntry` field.""" - hasUsersTableEntry: BooleanFilter - - """Filter by the object’s `id` field.""" - id: IntFilter + """An edge for our `OrgMembershipProfile`. May be used by Relay 1.""" + orgMembershipProfileEdge( + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipProfileEdge - """Filter by the object’s `name` field.""" - name: StringFilter + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Negates the expression.""" - not: MembershipTypeFilter +"""All input for the create `OrgMembershipSetting` mutation.""" +input CreateOrgMembershipSettingInput { + """ + 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 - """Checks for any expressions in this list.""" - or: [MembershipTypeFilter!] + """The `OrgMembershipSetting` to be created by this mutation.""" + orgMembershipSetting: OrgMembershipSettingInput! +} - """Filter by the object’s `parentMembershipType` field.""" - parentMembershipType: IntFilter +"""The output of our create `OrgMembershipSetting` mutation.""" +type CreateOrgMembershipSettingPayload { + """ + 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 - """Filter by the object’s `scope` field.""" - scope: StringFilter -} + """The `OrgMembershipSetting` that was created by this mutation.""" + orgMembershipSetting: OrgMembershipSetting -"""An input for mutations affecting `MembershipType`""" -input MembershipTypeInput { - """Description of what this membership type represents""" - description: String! + """An edge for our `OrgMembershipSetting`. May be used by Relay 1.""" + orgMembershipSettingEdge( + """The method to use when ordering `OrgMembershipSetting`.""" + orderBy: [OrgMembershipSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipSettingEdge """ - 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 + Our root query field type. Allows us to run any query from our mutation payload. """ - hasUsersTableEntry: Boolean + query: Query +} +"""All input for the create `OrgOwnerGrant` mutation.""" +input CreateOrgOwnerGrantInput { """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - id: Int! + clientMutationId: String - """Human-readable name of the membership type""" - name: String! + """The `OrgOwnerGrant` to be created by this mutation.""" + orgOwnerGrant: OrgOwnerGrantInput! +} +"""The output of our create `OrgOwnerGrant` mutation.""" +type CreateOrgOwnerGrantPayload { """ - Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - parentMembershipType: Int + clientMutationId: String + + """The `OrgOwnerGrant` that was created by this mutation.""" + orgOwnerGrant: OrgOwnerGrant + + """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 """ - Scope identifier for this membership type, used to resolve scope on module config tables + Our root query field type. Allows us to run any query from our mutation payload. """ - scope: String! + query: Query } -"""Methods to use when ordering `MembershipType`.""" -enum MembershipTypeOrderBy { - DESCRIPTION_ASC - DESCRIPTION_DESC - HAS_USERS_TABLE_ENTRY_ASC - HAS_USERS_TABLE_ENTRY_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - NATURAL - PARENT_MEMBERSHIP_TYPE_ASC - PARENT_MEMBERSHIP_TYPE_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - SCOPE_ASC - SCOPE_DESC +"""All input for the create `OrgProfileCapability` mutation.""" +input CreateOrgProfileCapabilityInput { + """ + 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 `OrgProfileCapability` to be created by this mutation.""" + orgProfileCapability: OrgProfileCapabilityInput! } -""" -Represents an update to a `MembershipType`. Fields that are set will be updated. -""" -input MembershipTypePatch { - """Description of what this membership type represents""" - description: String +"""The output of our create `OrgProfileCapability` mutation.""" +type CreateOrgProfileCapabilityPayload { + """ + 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 `OrgProfileCapability` that was created by this mutation.""" + orgProfileCapability: OrgProfileCapability + + """An edge for our `OrgProfileCapability`. May be used by Relay 1.""" + orgProfileCapabilityEdge( + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileCapabilityEdge """ - 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 + Our root query field type. Allows us to run any query from our mutation payload. """ - hasUsersTableEntry: Boolean + query: Query +} +"""All input for the create `OrgProfileDefinitionGrant` mutation.""" +input CreateOrgProfileDefinitionGrantInput { """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - id: Int + clientMutationId: String - """Human-readable name of the membership type""" - name: String + """The `OrgProfileDefinitionGrant` to be created by this mutation.""" + orgProfileDefinitionGrant: OrgProfileDefinitionGrantInput! +} +"""The output of our create `OrgProfileDefinitionGrant` mutation.""" +type CreateOrgProfileDefinitionGrantPayload { """ - Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - parentMembershipType: Int + clientMutationId: String + + """The `OrgProfileDefinitionGrant` that was created by this mutation.""" + orgProfileDefinitionGrant: OrgProfileDefinitionGrant + + """An edge for our `OrgProfileDefinitionGrant`. May be used by Relay 1.""" + orgProfileDefinitionGrantEdge( + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileDefinitionGrantEdge """ - Scope identifier for this membership type, used to resolve scope on module config tables + Our root query field type. Allows us to run any query from our mutation payload. """ - scope: String + query: Query } -"""A belongs-to (forward FK) relation""" -type MetaBelongsToRelation { - fieldName: String - isUnique: Boolean! - keys: [MetaField!]! - references: MetaRefTable! - type: String +"""All input for the create `OrgProfileGrant` mutation.""" +input CreateOrgProfileGrantInput { + """ + 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 `OrgProfileGrant` to be created by this mutation.""" + orgProfileGrant: OrgProfileGrantInput! } -"""Table constraints""" -type MetaConstraints { - foreignKey: [MetaForeignKeyConstraint!]! - primaryKey: MetaPrimaryKeyConstraint - unique: [MetaUniqueConstraint!]! +"""The output of our create `OrgProfileGrant` mutation.""" +type CreateOrgProfileGrantPayload { + """ + 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 `OrgProfileGrant` that was created by this mutation.""" + orgProfileGrant: OrgProfileGrant + + """An edge for our `OrgProfileGrant`. May be used by Relay 1.""" + orgProfileGrantEdge( + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Information about a PostgreSQL enum type""" -type MetaEnum { - """The PostgreSQL enum type name""" - name: String! +"""All input for the create `OrgProfile` mutation.""" +input CreateOrgProfileInput { + """ + 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 - """Allowed values for this enum""" - values: [String!]! + """The `OrgProfile` to be created by this mutation.""" + orgProfile: OrgProfileInput! } -"""Information about a table field/column""" -type MetaField { - """PostgreSQL column name""" - columnName: String! - description: String +"""The output of our create `OrgProfile` mutation.""" +type CreateOrgProfilePayload { + """ + 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 - """Enum metadata if this field has an enum type""" - enumValues: MetaEnum - hasDefault: Boolean! - isForeignKey: Boolean! - isNotNull: Boolean! - isPrimaryKey: Boolean! + """The `OrgProfile` that was created by this mutation.""" + orgProfile: OrgProfile - """Final GraphQL field name""" - name: String! - type: MetaType! -} + """An edge for our `OrgProfile`. May be used by Relay 1.""" + orgProfileEdge( + """The method to use when ordering `OrgProfile`.""" + orderBy: [OrgProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileEdge -"""Information about a foreign key constraint""" -type MetaForeignKeyConstraint { - fields: [MetaField!]! - name: String! - refFields: [MetaField!] - refTable: MetaRefTable - referencedFields: [String!]! - referencedTable: String! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""A has-one or has-many (reverse FK) relation""" -type MetaHasRelation { - fieldName: String - isUnique: Boolean! - keys: [MetaField!]! - referencedBy: MetaRefTable! - type: String +"""All input for the create `OrgProfileTemplate` mutation.""" +input CreateOrgProfileTemplateInput { + """ + 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 `OrgProfileTemplate` to be created by this mutation.""" + orgProfileTemplate: OrgProfileTemplateInput! } -"""i18n metadata for a table with @i18n tag""" -type MetaI18n { - """Fields that are translatable""" - translatableFields: [MetaI18nField!]! +"""The output of our create `OrgProfileTemplate` mutation.""" +type CreateOrgProfileTemplatePayload { + """ + 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 - """Name of the translation table""" - translationTable: String! -} + """The `OrgProfileTemplate` that was created by this mutation.""" + orgProfileTemplate: OrgProfileTemplate -"""A translatable field""" -type MetaI18nField { - """GraphQL field name""" - name: String! + """An edge for our `OrgProfileTemplate`. May be used by Relay 1.""" + orgProfileTemplateEdge( + """The method to use when ordering `OrgProfileTemplate`.""" + orderBy: [OrgProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileTemplateEdge - """PostgreSQL column type (text, citext)""" - type: String! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Information about a database index""" -type MetaIndex { - columns: [String!]! - fields: [MetaField!] - isPrimary: Boolean! - isUnique: Boolean! - name: String! -} +"""A location in a connection that can be used for resuming pagination.""" +scalar Cursor -"""Table inflection names""" -type MetaInflection { - allRows: String! - conditionType: String! - connection: String! - createInputType: String! - createPayloadType: String! - deletePayloadType: String! - edge: String! - filterType: String - orderByType: String! - patchType: String - tableType: String! - updatePayloadType: String -} +""" +A point in time as described by the [ISO +8601](https://en.wikipedia.org/wiki/ISO_8601) and, if it has a timezone, [RFC +3339](https://datatracker.ietf.org/doc/html/rfc3339) standards. Input values +that do not conform to both ISO 8601 and RFC 3339 may be coerced, which may lead +to unexpected results. +""" +scalar Datetime -"""A many-to-many relation via junction table""" -type MetaManyToManyRelation { - fieldName: String - junctionLeftConstraint: MetaForeignKeyConstraint! - junctionLeftKeyAttributes: [MetaField!]! - junctionRightConstraint: MetaForeignKeyConstraint! - junctionRightKeyAttributes: [MetaField!]! - junctionTable: MetaRefTable! - leftKeyAttributes: [MetaField!]! - rightKeyAttributes: [MetaField!]! - rightTable: MetaRefTable! - type: String -} +""" +A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ +""" +input DatetimeFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Datetime -"""Information about a primary key constraint""" -type MetaPrimaryKeyConstraint { - fields: [MetaField!]! - name: String! -} + """Equal to the specified value.""" + equalTo: Datetime -"""Table query/mutation names""" -type MetaQuery { - all: String - create: String - delete: String - one: String - update: String -} + """Greater than the specified value.""" + greaterThan: Datetime -"""Realtime metadata for a table with @realtime tag""" -type MetaRealtime { - """The generated subscription field name (e.g. onPostChanged)""" - subscriptionFieldName: String! -} + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Datetime -"""Reference to a related table""" -type MetaRefTable { - name: String! -} + """Included in the specified list.""" + in: [Datetime!] -"""Table relations""" -type MetaRelations { - belongsTo: [MetaBelongsToRelation!]! - has: [MetaHasRelation!]! - hasMany: [MetaHasRelation!]! - hasOne: [MetaHasRelation!]! - manyToMany: [MetaManyToManyRelation!]! -} + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean -""" -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. -""" -type MetaScalarEncoding { - """For 'vector': declared length, else null.""" - dimensions: Int + """Less than the specified value.""" + lessThan: Datetime - """For 'ltree': values are dot-separated path strings.""" - dotPath: Boolean + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Datetime - """For 'vector': element scalar (e.g. 'float').""" - elementType: String + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Datetime - """For 'geojson': Point/LineString/Polygon/…, else null.""" - geometrySubtype: String + """Not equal to the specified value.""" + notEqualTo: Datetime + + """Not included in the specified list.""" + notIn: [Datetime!] +} +"""All input for the `deleteAppAdminGrant` mutation.""" +input DeleteAppAdminGrantInput { """ - Machine kind: bigint, datetime, date, time, interval, uuid, geojson, point, inet, ltree, vector, bytea, or composite. + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - kind: String! + clientMutationId: String + id: UUID! +} - """For 'geojson': spatial reference id, else null.""" - srid: Int +"""The output of our delete `AppAdminGrant` mutation.""" +type DeleteAppAdminGrantPayload { + """The `AppAdminGrant` that was deleted by this mutation.""" + appAdminGrant: AppAdminGrant + + """An edge for our `AppAdminGrant`. May be used by Relay 1.""" + appAdminGrantEdge( + """The method to use when ordering `AppAdminGrant`.""" + orderBy: [AppAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppAdminGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Root meta schema type""" -type MetaSchema { - tables: [MetaTable!]! +"""All input for the `deleteAppCapabilityDefaultCapability` mutation.""" +input DeleteAppCapabilityDefaultCapabilityInput { + """ + 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! } -"""Provisioning scope metadata for a table""" -type MetaScope { - """SQL name of the entity table for entity scopes, else null""" - entityTable: String +"""The output of our delete `AppCapabilityDefaultCapability` mutation.""" +type DeleteAppCapabilityDefaultCapabilityPayload { + """ + The `AppCapabilityDefaultCapability` that was deleted by this mutation. + """ + appCapabilityDefaultCapability: AppCapabilityDefaultCapability """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + An edge for our `AppCapabilityDefaultCapability`. May be used by Relay 1. """ - keyColumn: String + appCapabilityDefaultCapabilityEdge( + """The method to use when ordering `AppCapabilityDefaultCapability`.""" + orderBy: [AppCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultCapabilityEdge """ - Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - scope: String! + clientMutationId: String - """Provenance of the scope metadata (always 'smartTag')""" - source: String! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Coarse bucket: 'global', 'database', or 'entity'""" - tier: String! +"""All input for the `deleteAppCapabilityDefaultGrant` mutation.""" +input DeleteAppCapabilityDefaultGrantInput { + """ + 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! } -"""Search metadata for a table""" -type MetaSearch { - """Active search algorithms on this table""" - algorithms: [String!]! +"""The output of our delete `AppCapabilityDefaultGrant` mutation.""" +type DeleteAppCapabilityDefaultGrantPayload { + """The `AppCapabilityDefaultGrant` that was deleted by this mutation.""" + appCapabilityDefaultGrant: AppCapabilityDefaultGrant - """Searchable columns with their algorithm""" - columns: [MetaSearchColumn!]! + """An edge for our `AppCapabilityDefaultGrant`. May be used by Relay 1.""" + appCapabilityDefaultGrantEdge( + """The method to use when ordering `AppCapabilityDefaultGrant`.""" + orderBy: [AppCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultGrantEdge - """Per-table search configuration""" - config: MetaSearchConfig + """ + 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 - """Whether unifiedSearch composite filter is available""" - hasUnifiedSearch: Boolean! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""A searchable column with its algorithm""" -type MetaSearchColumn { - """Search algorithm: tsvector, bm25, trgm, or vector""" - algorithm: String! - - """Column name (camelCase)""" - name: String! +"""All input for the `deleteAppCapabilityDefault` mutation.""" +input DeleteAppCapabilityDefaultInput { + """ + 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! } -"""Per-table search configuration from @searchConfig smart tag""" -type MetaSearchConfig { - """Exponential decay factor per day""" - boostRecencyDecay: Float +"""The output of our delete `AppCapabilityDefault` mutation.""" +type DeleteAppCapabilityDefaultPayload { + """The `AppCapabilityDefault` that was deleted by this mutation.""" + appCapabilityDefault: AppCapabilityDefault - """Field used for recency decay""" - boostRecencyField: String + """An edge for our `AppCapabilityDefault`. May be used by Relay 1.""" + appCapabilityDefaultEdge( + """The method to use when ordering `AppCapabilityDefault`.""" + orderBy: [AppCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultEdge - """Whether recency boosting is enabled""" - boostRecent: Boolean! + """ + 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 - """JSON-encoded per-adapter score weights""" - weights: String + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Storage metadata for a table""" -type MetaStorage { - """Whether this table is a storage buckets table""" - isBucketsTable: Boolean! - - """Whether this table is a storage files table""" - isFilesTable: Boolean! +"""All input for the `deleteAppCapability` mutation.""" +input DeleteAppCapabilityInput { + """ + 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! } -"""Information about a database table""" -type MetaTable { - constraints: MetaConstraints! - fields: [MetaField!]! - foreignKeyConstraints: [MetaForeignKeyConstraint!]! +"""The output of our delete `AppCapability` mutation.""" +type DeleteAppCapabilityPayload { + """The `AppCapability` that was deleted by this mutation.""" + appCapability: AppCapability - """i18n metadata (null if no @i18n tag)""" + """An edge for our `AppCapability`. May be used by Relay 1.""" + appCapabilityEdge( + """The method to use when ordering `AppCapability`.""" + orderBy: [AppCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppClaimedInvite` mutation.""" +input DeleteAppClaimedInviteInput { + """ + 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 `AppClaimedInvite` mutation.""" +type DeleteAppClaimedInvitePayload { + """The `AppClaimedInvite` that was deleted by this mutation.""" + appClaimedInvite: AppClaimedInvite + + """An edge for our `AppClaimedInvite`. May be used by Relay 1.""" + appClaimedInviteEdge( + """The method to use when ordering `AppClaimedInvite`.""" + orderBy: [AppClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppClaimedInviteEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppGrant` mutation.""" +input DeleteAppGrantInput { + """ + 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 `AppGrant` mutation.""" +type DeleteAppGrantPayload { + """The `AppGrant` that was deleted by this mutation.""" + appGrant: AppGrant + + """An edge for our `AppGrant`. May be used by Relay 1.""" + appGrantEdge( + """The method to use when ordering `AppGrant`.""" + orderBy: [AppGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppInvite` mutation.""" +input DeleteAppInviteInput { + """ + 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 `AppInvite` mutation.""" +type DeleteAppInvitePayload { + """The `AppInvite` that was deleted by this mutation.""" + appInvite: AppInvite + + """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 + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppMembershipDefault` mutation.""" +input DeleteAppMembershipDefaultInput { + """ + 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 `AppMembershipDefault` mutation.""" +type DeleteAppMembershipDefaultPayload { + """The `AppMembershipDefault` that was deleted by this mutation.""" + appMembershipDefault: AppMembershipDefault + + """An edge for our `AppMembershipDefault`. May be used by Relay 1.""" + appMembershipDefaultEdge( + """The method to use when ordering `AppMembershipDefault`.""" + orderBy: [AppMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipDefaultEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""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 `AppMembership` mutation.""" +type DeleteAppMembershipPayload { + """The `AppMembership` that was deleted by this mutation.""" + appMembership: AppMembership + + """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 + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppMembershipProfile` mutation.""" +input DeleteAppMembershipProfileInput { + """ + 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 `AppMembershipProfile` mutation.""" +type DeleteAppMembershipProfilePayload { + """The `AppMembershipProfile` that was deleted by this mutation.""" + appMembershipProfile: AppMembershipProfile + + """An edge for our `AppMembershipProfile`. May be used by Relay 1.""" + appMembershipProfileEdge( + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipProfileEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppOwnerGrant` mutation.""" +input DeleteAppOwnerGrantInput { + """ + 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 `AppOwnerGrant` mutation.""" +type DeleteAppOwnerGrantPayload { + """The `AppOwnerGrant` that was deleted by this mutation.""" + appOwnerGrant: AppOwnerGrant + + """An edge for our `AppOwnerGrant`. May be used by Relay 1.""" + appOwnerGrantEdge( + """The method to use when ordering `AppOwnerGrant`.""" + orderBy: [AppOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppOwnerGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppProfileCapability` mutation.""" +input DeleteAppProfileCapabilityInput { + """ + 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 `AppProfileCapability` mutation.""" +type DeleteAppProfileCapabilityPayload { + """The `AppProfileCapability` that was deleted by this mutation.""" + appProfileCapability: AppProfileCapability + + """An edge for our `AppProfileCapability`. May be used by Relay 1.""" + appProfileCapabilityEdge( + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileCapabilityEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppProfileDefinitionGrant` mutation.""" +input DeleteAppProfileDefinitionGrantInput { + """ + 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 `AppProfileDefinitionGrant` mutation.""" +type DeleteAppProfileDefinitionGrantPayload { + """The `AppProfileDefinitionGrant` that was deleted by this mutation.""" + appProfileDefinitionGrant: AppProfileDefinitionGrant + + """An edge for our `AppProfileDefinitionGrant`. May be used by Relay 1.""" + appProfileDefinitionGrantEdge( + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileDefinitionGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppProfileGrant` mutation.""" +input DeleteAppProfileGrantInput { + """ + 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 `AppProfileGrant` mutation.""" +type DeleteAppProfileGrantPayload { + """The `AppProfileGrant` that was deleted by this mutation.""" + appProfileGrant: AppProfileGrant + + """An edge for our `AppProfileGrant`. May be used by Relay 1.""" + appProfileGrantEdge( + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppProfile` mutation.""" +input DeleteAppProfileInput { + """ + 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 `AppProfile` mutation.""" +type DeleteAppProfilePayload { + """The `AppProfile` that was deleted by this mutation.""" + appProfile: AppProfile + + """An edge for our `AppProfile`. May be used by Relay 1.""" + appProfileEdge( + """The method to use when ordering `AppProfile`.""" + orderBy: [AppProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppProfileTemplate` mutation.""" +input DeleteAppProfileTemplateInput { + """ + 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 `AppProfileTemplate` mutation.""" +type DeleteAppProfileTemplatePayload { + """The `AppProfileTemplate` that was deleted by this mutation.""" + appProfileTemplate: AppProfileTemplate + + """An edge for our `AppProfileTemplate`. May be used by Relay 1.""" + appProfileTemplateEdge( + """The method to use when ordering `AppProfileTemplate`.""" + orderBy: [AppProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileTemplateEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""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 `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 + + """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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgAdminGrant` mutation.""" +input DeleteOrgAdminGrantInput { + """ + 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 { + """ + 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 `OrgAdminGrant` that was deleted by this mutation.""" + orgAdminGrant: OrgAdminGrant + + """An edge for our `OrgAdminGrant`. May be used by Relay 1.""" + orgAdminGrantEdge( + """The method to use when ordering `OrgAdminGrant`.""" + orderBy: [OrgAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgAdminGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgCapabilityDefaultCapability` mutation.""" +input DeleteOrgCapabilityDefaultCapabilityInput { + """ + 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 `OrgCapabilityDefaultCapability` mutation.""" +type DeleteOrgCapabilityDefaultCapabilityPayload { + """ + 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 `OrgCapabilityDefaultCapability` that was deleted by this mutation. + """ + orgCapabilityDefaultCapability: OrgCapabilityDefaultCapability + + """ + An edge for our `OrgCapabilityDefaultCapability`. May be used by Relay 1. + """ + orgCapabilityDefaultCapabilityEdge( + """The method to use when ordering `OrgCapabilityDefaultCapability`.""" + orderBy: [OrgCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultCapabilityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgCapabilityDefaultGrant` mutation.""" +input DeleteOrgCapabilityDefaultGrantInput { + """ + 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 `OrgCapabilityDefaultGrant` mutation.""" +type DeleteOrgCapabilityDefaultGrantPayload { + """ + 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 `OrgCapabilityDefaultGrant` that was deleted by this mutation.""" + orgCapabilityDefaultGrant: OrgCapabilityDefaultGrant + + """An edge for our `OrgCapabilityDefaultGrant`. May be used by Relay 1.""" + orgCapabilityDefaultGrantEdge( + """The method to use when ordering `OrgCapabilityDefaultGrant`.""" + orderBy: [OrgCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgCapabilityDefault` mutation.""" +input DeleteOrgCapabilityDefaultInput { + """ + 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 `OrgCapabilityDefault` mutation.""" +type DeleteOrgCapabilityDefaultPayload { + """ + 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 `OrgCapabilityDefault` that was deleted by this mutation.""" + orgCapabilityDefault: OrgCapabilityDefault + + """An edge for our `OrgCapabilityDefault`. May be used by Relay 1.""" + orgCapabilityDefaultEdge( + """The method to use when ordering `OrgCapabilityDefault`.""" + orderBy: [OrgCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgCapability` mutation.""" +input DeleteOrgCapabilityInput { + """ + 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 `OrgCapability` mutation.""" +type DeleteOrgCapabilityPayload { + """ + 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 `OrgCapability` that was deleted by this mutation.""" + orgCapability: OrgCapability + + """An edge for our `OrgCapability`. May be used by Relay 1.""" + orgCapabilityEdge( + """The method to use when ordering `OrgCapability`.""" + orderBy: [OrgCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgChartEdgeGrant` mutation.""" +input DeleteOrgChartEdgeGrantInput { + """ + 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 { + """ + 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 `OrgChartEdgeGrant` that was deleted by this mutation.""" + orgChartEdgeGrant: OrgChartEdgeGrant + + """An edge for our `OrgChartEdgeGrant`. May be used by Relay 1.""" + orgChartEdgeGrantEdge( + """The method to use when ordering `OrgChartEdgeGrant`.""" + orderBy: [OrgChartEdgeGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgChartEdgeGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgChartEdge` mutation.""" +input DeleteOrgChartEdgeInput { + """ + 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 `OrgChartEdge` mutation.""" +type DeleteOrgChartEdgePayload { + """ + 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 `OrgChartEdge` that was deleted by this mutation.""" + orgChartEdge: OrgChartEdge + + """An edge for our `OrgChartEdge`. May be used by Relay 1.""" + orgChartEdgeEdge( + """The method to use when ordering `OrgChartEdge`.""" + orderBy: [OrgChartEdgeOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgChartEdgeEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgClaimedInvite` mutation.""" +input DeleteOrgClaimedInviteInput { + """ + 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 `OrgClaimedInvite` mutation.""" +type DeleteOrgClaimedInvitePayload { + """ + 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 `OrgClaimedInvite` that was deleted by this mutation.""" + orgClaimedInvite: OrgClaimedInvite + + """An edge for our `OrgClaimedInvite`. May be used by Relay 1.""" + orgClaimedInviteEdge( + """The method to use when ordering `OrgClaimedInvite`.""" + orderBy: [OrgClaimedInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgClaimedInviteEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgGrant` mutation.""" +input DeleteOrgGrantInput { + """ + 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 `OrgGrant` mutation.""" +type DeleteOrgGrantPayload { + """ + 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 `OrgGrant` that was deleted by this mutation.""" + orgGrant: OrgGrant + + """An edge for our `OrgGrant`. May be used by Relay 1.""" + orgGrantEdge( + """The method to use when ordering `OrgGrant`.""" + orderBy: [OrgGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""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. + """ + clientMutationId: String + id: UUID! +} + +"""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 `OrgInvite` that was deleted by this mutation.""" + orgInvite: OrgInvite + + """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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgMember` mutation.""" +input DeleteOrgMemberInput { + """ + 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 `OrgMember` mutation.""" +type DeleteOrgMemberPayload { + """ + 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 `OrgMember` that was deleted by this mutation.""" + orgMember: OrgMember + + """An edge for our `OrgMember`. May be used by Relay 1.""" + orgMemberEdge( + """The method to use when ordering `OrgMember`.""" + orderBy: [OrgMemberOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""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 `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 + + """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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgMembershipDefault` mutation.""" +input DeleteOrgMembershipDefaultInput { + """ + 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 `OrgMembershipDefault` mutation.""" +type DeleteOrgMembershipDefaultPayload { + """ + 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 `OrgMembershipDefault` that was deleted by this mutation.""" + orgMembershipDefault: OrgMembershipDefault + + """An edge for our `OrgMembershipDefault`. May be used by Relay 1.""" + orgMembershipDefaultEdge( + """The method to use when ordering `OrgMembershipDefault`.""" + orderBy: [OrgMembershipDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""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 `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 + + """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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgMembershipProfile` mutation.""" +input DeleteOrgMembershipProfileInput { + """ + 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 `OrgMembershipProfile` mutation.""" +type DeleteOrgMembershipProfilePayload { + """ + 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 `OrgMembershipProfile` that was deleted by this mutation.""" + orgMembershipProfile: OrgMembershipProfile + + """An edge for our `OrgMembershipProfile`. May be used by Relay 1.""" + orgMembershipProfileEdge( + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipProfileEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgMembershipSetting` mutation.""" +input DeleteOrgMembershipSettingInput { + """ + 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 `OrgMembershipSetting` mutation.""" +type DeleteOrgMembershipSettingPayload { + """ + 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 `OrgMembershipSetting` that was deleted by this mutation.""" + orgMembershipSetting: OrgMembershipSetting + + """An edge for our `OrgMembershipSetting`. May be used by Relay 1.""" + orgMembershipSettingEdge( + """The method to use when ordering `OrgMembershipSetting`.""" + orderBy: [OrgMembershipSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipSettingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgOwnerGrant` mutation.""" +input DeleteOrgOwnerGrantInput { + """ + 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 `OrgOwnerGrant` mutation.""" +type DeleteOrgOwnerGrantPayload { + """ + 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 deleted by this mutation.""" + orgOwnerGrant: OrgOwnerGrant + + """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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgProfileCapability` mutation.""" +input DeleteOrgProfileCapabilityInput { + """ + 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 `OrgProfileCapability` mutation.""" +type DeleteOrgProfileCapabilityPayload { + """ + 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 `OrgProfileCapability` that was deleted by this mutation.""" + orgProfileCapability: OrgProfileCapability + + """An edge for our `OrgProfileCapability`. May be used by Relay 1.""" + orgProfileCapabilityEdge( + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileCapabilityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgProfileDefinitionGrant` mutation.""" +input DeleteOrgProfileDefinitionGrantInput { + """ + 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 `OrgProfileDefinitionGrant` mutation.""" +type DeleteOrgProfileDefinitionGrantPayload { + """ + 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 `OrgProfileDefinitionGrant` that was deleted by this mutation.""" + orgProfileDefinitionGrant: OrgProfileDefinitionGrant + + """An edge for our `OrgProfileDefinitionGrant`. May be used by Relay 1.""" + orgProfileDefinitionGrantEdge( + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileDefinitionGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgProfileGrant` mutation.""" +input DeleteOrgProfileGrantInput { + """ + 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 `OrgProfileGrant` mutation.""" +type DeleteOrgProfileGrantPayload { + """ + 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 `OrgProfileGrant` that was deleted by this mutation.""" + orgProfileGrant: OrgProfileGrant + + """An edge for our `OrgProfileGrant`. May be used by Relay 1.""" + orgProfileGrantEdge( + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgProfile` mutation.""" +input DeleteOrgProfileInput { + """ + 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 `OrgProfile` mutation.""" +type DeleteOrgProfilePayload { + """ + 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 `OrgProfile` that was deleted by this mutation.""" + orgProfile: OrgProfile + + """An edge for our `OrgProfile`. May be used by Relay 1.""" + orgProfileEdge( + """The method to use when ordering `OrgProfile`.""" + orderBy: [OrgProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgProfileTemplate` mutation.""" +input DeleteOrgProfileTemplateInput { + """ + 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 `OrgProfileTemplate` mutation.""" +type DeleteOrgProfileTemplatePayload { + """ + 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 `OrgProfileTemplate` that was deleted by this mutation.""" + orgProfileTemplate: OrgProfileTemplate + + """An edge for our `OrgProfileTemplate`. May be used by Relay 1.""" + orgProfileTemplateEdge( + """The method to use when ordering `OrgProfileTemplate`.""" + orderBy: [OrgProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileTemplateEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +""" +A filter to be used against Int fields. All fields are combined with a logical ‘and.’ +""" +input IntFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Int + + """Equal to the specified value.""" + equalTo: Int + + """Greater than the specified value.""" + greaterThan: Int + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Int + + """Included in the specified list.""" + in: [Int!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: Int + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Int + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Int + + """Not equal to the specified value.""" + notEqualTo: Int + + """Not included in the specified list.""" + notIn: [Int!] +} + +""" +Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" +scalar JSON + +""" +Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) +""" +type MembershipType { + """Description of what this membership type represents""" + description: String! + + """ + 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! + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + Scope identifier for this membership type, used to resolve scope on module config tables + """ + scope: String! +} + +"""A connection to a list of `MembershipType` values.""" +type MembershipTypeConnection { + """ + A list of edges which contains the `MembershipType` and cursor to aid in pagination. + """ + edges: [MembershipTypeEdge]! + + """A list of `MembershipType` objects.""" + nodes: [MembershipType]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MembershipType` you could get from the connection.""" + totalCount: Int! +} + +"""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 { + """Checks for all expressions in this list.""" + and: [MembershipTypeFilter!] + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `hasUsersTableEntry` field.""" + hasUsersTableEntry: BooleanFilter + + """Filter by the object’s `id` field.""" + id: IntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: MembershipTypeFilter + + """Checks for any expressions in this list.""" + or: [MembershipTypeFilter!] + + """Filter by the object’s `parentMembershipType` field.""" + parentMembershipType: IntFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter +} + +"""An input for mutations affecting `MembershipType`""" +input MembershipTypeInput { + """Description of what this membership type represents""" + description: String! + + """ + 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 + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + Scope identifier for this membership type, used to resolve scope on module config tables + """ + scope: String! +} + +"""Methods to use when ordering `MembershipType`.""" +enum MembershipTypeOrderBy { + DESCRIPTION_ASC + DESCRIPTION_DESC + HAS_USERS_TABLE_ENTRY_ASC + HAS_USERS_TABLE_ENTRY_DESC + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + NATURAL + PARENT_MEMBERSHIP_TYPE_ASC + PARENT_MEMBERSHIP_TYPE_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SCOPE_ASC + SCOPE_DESC +} + +""" +Represents an update to a `MembershipType`. Fields that are set will be updated. +""" +input MembershipTypePatch { + """Description of what this membership type represents""" + description: String + + """ + 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 + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int + + """Human-readable name of the membership type""" + name: String + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + Scope identifier for this membership type, used to resolve scope on module config tables + """ + scope: String +} + +"""A belongs-to (forward FK) relation""" +type MetaBelongsToRelation { + fieldName: String + isUnique: Boolean! + keys: [MetaField!]! + references: MetaRefTable! + type: String +} + +"""Table constraints""" +type MetaConstraints { + foreignKey: [MetaForeignKeyConstraint!]! + primaryKey: MetaPrimaryKeyConstraint + unique: [MetaUniqueConstraint!]! +} + +"""Information about a PostgreSQL enum type""" +type MetaEnum { + """The PostgreSQL enum type name""" + name: String! + + """Allowed values for this enum""" + values: [String!]! +} + +"""Information about a table field/column""" +type MetaField { + """PostgreSQL column name""" + columnName: String! + description: String + + """Enum metadata if this field has an enum type""" + enumValues: MetaEnum + hasDefault: Boolean! + isForeignKey: Boolean! + isNotNull: Boolean! + isPrimaryKey: Boolean! + + """Final GraphQL field name""" + name: String! + type: MetaType! +} + +"""Information about a foreign key constraint""" +type MetaForeignKeyConstraint { + fields: [MetaField!]! + name: String! + refFields: [MetaField!] + refTable: MetaRefTable + referencedFields: [String!]! + referencedTable: String! +} + +"""A has-one or has-many (reverse FK) relation""" +type MetaHasRelation { + fieldName: String + isUnique: Boolean! + keys: [MetaField!]! + referencedBy: MetaRefTable! + type: String +} + +"""i18n metadata for a table with @i18n tag""" +type MetaI18n { + """Fields that are translatable""" + translatableFields: [MetaI18nField!]! + + """Name of the translation table""" + translationTable: String! +} + +"""A translatable field""" +type MetaI18nField { + """GraphQL field name""" + name: String! + + """PostgreSQL column type (text, citext)""" + type: String! +} + +"""Information about a database index""" +type MetaIndex { + columns: [String!]! + fields: [MetaField!] + isPrimary: Boolean! + isUnique: Boolean! + name: String! +} + +"""Table inflection names""" +type MetaInflection { + allRows: String! + conditionType: String! + connection: String! + createInputType: String! + createPayloadType: String! + deletePayloadType: String! + edge: String! + filterType: String + orderByType: String! + patchType: String + tableType: String! + updatePayloadType: String +} + +"""A many-to-many relation via junction table""" +type MetaManyToManyRelation { + fieldName: String + junctionLeftConstraint: MetaForeignKeyConstraint! + junctionLeftKeyAttributes: [MetaField!]! + junctionRightConstraint: MetaForeignKeyConstraint! + junctionRightKeyAttributes: [MetaField!]! + junctionTable: MetaRefTable! + leftKeyAttributes: [MetaField!]! + rightKeyAttributes: [MetaField!]! + rightTable: MetaRefTable! + type: String +} + +"""Information about a primary key constraint""" +type MetaPrimaryKeyConstraint { + fields: [MetaField!]! + name: String! +} + +"""Table query/mutation names""" +type MetaQuery { + all: String + create: String + delete: String + one: String + update: String +} + +"""Realtime metadata for a table with @realtime tag""" +type MetaRealtime { + """The generated subscription field name (e.g. onPostChanged)""" + subscriptionFieldName: String! +} + +"""Reference to a related table""" +type MetaRefTable { + name: String! +} + +"""Table relations""" +type MetaRelations { + belongsTo: [MetaBelongsToRelation!]! + has: [MetaHasRelation!]! + hasMany: [MetaHasRelation!]! + hasOne: [MetaHasRelation!]! + manyToMany: [MetaManyToManyRelation!]! +} + +""" +How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +""" +type MetaScalarEncoding { + """For 'vector': declared length, else null.""" + dimensions: Int + + """For 'ltree': values are dot-separated path strings.""" + dotPath: Boolean + + """For 'vector': element scalar (e.g. 'float').""" + elementType: String + + """For 'geojson': Point/LineString/Polygon/…, else null.""" + geometrySubtype: String + + """ + Machine kind: bigint, datetime, date, time, interval, uuid, geojson, point, inet, ltree, vector, bytea, or composite. + """ + kind: String! + + """For 'geojson': spatial reference id, else null.""" + srid: Int +} + +"""Root meta schema type""" +type MetaSchema { + tables: [MetaTable!]! +} + +"""Provisioning scope metadata for a table""" +type MetaScope { + """SQL name of the entity table for entity scopes, else null""" + entityTable: String + + """ + Inflected scope key column (e.g. databaseId, orgId), null for global tiers + """ + keyColumn: String + + """ + Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') + """ + scope: String! + + """Provenance of the scope metadata (always 'smartTag')""" + source: String! + + """Coarse bucket: 'global', 'database', or 'entity'""" + tier: String! +} + +"""Search metadata for a table""" +type MetaSearch { + """Active search algorithms on this table""" + algorithms: [String!]! + + """Searchable columns with their algorithm""" + columns: [MetaSearchColumn!]! + + """Per-table search configuration""" + config: MetaSearchConfig + + """Whether unifiedSearch composite filter is available""" + hasUnifiedSearch: Boolean! +} + +"""A searchable column with its algorithm""" +type MetaSearchColumn { + """Search algorithm: tsvector, bm25, trgm, or vector""" + algorithm: String! + + """Column name (camelCase)""" + name: String! +} + +"""Per-table search configuration from @searchConfig smart tag""" +type MetaSearchConfig { + """Exponential decay factor per day""" + boostRecencyDecay: Float + + """Field used for recency decay""" + boostRecencyField: String + + """Whether recency boosting is enabled""" + boostRecent: Boolean! + + """JSON-encoded per-adapter score weights""" + weights: String +} + +"""Storage metadata for a table""" +type MetaStorage { + """Whether this table is a storage buckets table""" + isBucketsTable: Boolean! + + """Whether this table is a storage files table""" + isFilesTable: Boolean! +} + +"""Information about a database table""" +type MetaTable { + constraints: MetaConstraints! + fields: [MetaField!]! + foreignKeyConstraints: [MetaForeignKeyConstraint!]! + + """i18n metadata (null if no @i18n tag)""" i18n: MetaI18n indexes: [MetaIndex!]! inflection: MetaInflection! - """Final GraphQL output type name""" - name: String! - primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! - query: MetaQuery! + """Final GraphQL output type name""" + name: String! + primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! + query: MetaQuery! + + """Realtime metadata (null if no @realtime tag)""" + realtime: MetaRealtime + relations: MetaRelations! + schemaName: String! + + """Provisioning scope metadata (null if no @scope tag)""" + scope: MetaScope + + """Search metadata (null if no search configured)""" + search: MetaSearch + + """Storage metadata (null if not a storage table)""" + storage: MetaStorage + + """PostgreSQL table name""" + tableName: String! + uniqueConstraints: [MetaUniqueConstraint!]! +} + +"""Information about a PostgreSQL type""" +type MetaType { + """Scalar serialization contract (null for plain scalars)""" + encoding: MetaScalarEncoding + gqlType: String! + hasDefault: Boolean + isArray: Boolean! + isNotNull: Boolean + pgType: String! + subtype: String +} + +"""Information about a unique constraint""" +type MetaUniqueConstraint { + fields: [MetaField!]! + name: String! +} + +""" +The root mutation type which contains root level fields which mutate data. +""" +type Mutation { + """Creates a single `AppAdminGrant`.""" + createAppAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppAdminGrantInput! + ): CreateAppAdminGrantPayload + + """Creates a single `AppCapability`.""" + createAppCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppCapabilityInput! + ): CreateAppCapabilityPayload + + """Creates a single `AppCapabilityDefault`.""" + createAppCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppCapabilityDefaultInput! + ): CreateAppCapabilityDefaultPayload + + """Creates a single `AppCapabilityDefaultCapability`.""" + createAppCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppCapabilityDefaultCapabilityInput! + ): CreateAppCapabilityDefaultCapabilityPayload + + """Creates a single `AppCapabilityDefaultGrant`.""" + createAppCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppCapabilityDefaultGrantInput! + ): CreateAppCapabilityDefaultGrantPayload + + """Creates a single `AppClaimedInvite`.""" + createAppClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppClaimedInviteInput! + ): CreateAppClaimedInvitePayload + + """Creates a single `AppGrant`.""" + createAppGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppGrantInput! + ): CreateAppGrantPayload + + """Creates a single `AppInvite`.""" + createAppInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + 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 `AppMembershipDefault`.""" + createAppMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppMembershipDefaultInput! + ): CreateAppMembershipDefaultPayload + + """Creates a single `AppMembershipProfile`.""" + createAppMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppMembershipProfileInput! + ): CreateAppMembershipProfilePayload + + """Creates a single `AppOwnerGrant`.""" + createAppOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppOwnerGrantInput! + ): CreateAppOwnerGrantPayload + + """Creates a single `AppProfile`.""" + createAppProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppProfileInput! + ): CreateAppProfilePayload + + """Creates a single `AppProfileCapability`.""" + createAppProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppProfileCapabilityInput! + ): CreateAppProfileCapabilityPayload + + """Creates a single `AppProfileDefinitionGrant`.""" + createAppProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppProfileDefinitionGrantInput! + ): CreateAppProfileDefinitionGrantPayload + + """Creates a single `AppProfileGrant`.""" + createAppProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppProfileGrantInput! + ): CreateAppProfileGrantPayload + + """Creates a single `AppProfileTemplate`.""" + createAppProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppProfileTemplateInput! + ): CreateAppProfileTemplatePayload + + """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 `OrgAdminGrant`.""" + createOrgAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgAdminGrantInput! + ): CreateOrgAdminGrantPayload + + """Creates a single `OrgCapability`.""" + createOrgCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgCapabilityInput! + ): CreateOrgCapabilityPayload + + """Creates a single `OrgCapabilityDefault`.""" + createOrgCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgCapabilityDefaultInput! + ): CreateOrgCapabilityDefaultPayload + + """Creates a single `OrgCapabilityDefaultCapability`.""" + createOrgCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgCapabilityDefaultCapabilityInput! + ): CreateOrgCapabilityDefaultCapabilityPayload + + """Creates a single `OrgCapabilityDefaultGrant`.""" + createOrgCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgCapabilityDefaultGrantInput! + ): CreateOrgCapabilityDefaultGrantPayload + + """Creates a single `OrgChartEdge`.""" + createOrgChartEdge( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgChartEdgeInput! + ): CreateOrgChartEdgePayload + + """Creates a single `OrgChartEdgeGrant`.""" + createOrgChartEdgeGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgChartEdgeGrantInput! + ): CreateOrgChartEdgeGrantPayload + + """Creates a single `OrgClaimedInvite`.""" + createOrgClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgClaimedInviteInput! + ): CreateOrgClaimedInvitePayload + + """Creates a single `OrgGrant`.""" + createOrgGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgGrantInput! + ): CreateOrgGrantPayload + + """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 `OrgMember`.""" + createOrgMember( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMemberInput! + ): CreateOrgMemberPayload + + """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 `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 `OrgMembershipDefault`.""" + createOrgMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMembershipDefaultInput! + ): CreateOrgMembershipDefaultPayload + + """Creates a single `OrgMembershipProfile`.""" + createOrgMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMembershipProfileInput! + ): CreateOrgMembershipProfilePayload + + """Creates a single `OrgMembershipSetting`.""" + createOrgMembershipSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMembershipSettingInput! + ): CreateOrgMembershipSettingPayload + + """Creates a single `OrgOwnerGrant`.""" + createOrgOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgOwnerGrantInput! + ): CreateOrgOwnerGrantPayload + + """Creates a single `OrgProfile`.""" + createOrgProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgProfileInput! + ): CreateOrgProfilePayload + + """Creates a single `OrgProfileCapability`.""" + createOrgProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgProfileCapabilityInput! + ): CreateOrgProfileCapabilityPayload + + """Creates a single `OrgProfileDefinitionGrant`.""" + createOrgProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgProfileDefinitionGrantInput! + ): CreateOrgProfileDefinitionGrantPayload + + """Creates a single `OrgProfileGrant`.""" + createOrgProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgProfileGrantInput! + ): CreateOrgProfileGrantPayload + + """Creates a single `OrgProfileTemplate`.""" + createOrgProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgProfileTemplateInput! + ): CreateOrgProfileTemplatePayload + + """Deletes a single `AppAdminGrant` using a unique key.""" + deleteAppAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppAdminGrantInput! + ): DeleteAppAdminGrantPayload + + """Deletes a single `AppCapability` using a unique key.""" + deleteAppCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppCapabilityInput! + ): DeleteAppCapabilityPayload + + """Deletes a single `AppCapabilityDefault` using a unique key.""" + deleteAppCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppCapabilityDefaultInput! + ): DeleteAppCapabilityDefaultPayload + + """Deletes a single `AppCapabilityDefaultCapability` using a unique key.""" + deleteAppCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppCapabilityDefaultCapabilityInput! + ): DeleteAppCapabilityDefaultCapabilityPayload + + """Deletes a single `AppCapabilityDefaultGrant` using a unique key.""" + deleteAppCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppCapabilityDefaultGrantInput! + ): DeleteAppCapabilityDefaultGrantPayload + + """Deletes a single `AppClaimedInvite` using a unique key.""" + deleteAppClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppClaimedInviteInput! + ): DeleteAppClaimedInvitePayload + + """Deletes a single `AppGrant` using a unique key.""" + deleteAppGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppGrantInput! + ): DeleteAppGrantPayload + + """Deletes a single `AppInvite` using a unique key.""" + deleteAppInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + 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 `AppMembershipDefault` using a unique key.""" + deleteAppMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppMembershipDefaultInput! + ): DeleteAppMembershipDefaultPayload + + """Deletes a single `AppMembershipProfile` using a unique key.""" + deleteAppMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppMembershipProfileInput! + ): DeleteAppMembershipProfilePayload + + """Deletes a single `AppOwnerGrant` using a unique key.""" + deleteAppOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppOwnerGrantInput! + ): DeleteAppOwnerGrantPayload + + """Deletes a single `AppProfile` using a unique key.""" + deleteAppProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppProfileInput! + ): DeleteAppProfilePayload + + """Deletes a single `AppProfileCapability` using a unique key.""" + deleteAppProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppProfileCapabilityInput! + ): DeleteAppProfileCapabilityPayload + + """Deletes a single `AppProfileDefinitionGrant` using a unique key.""" + deleteAppProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppProfileDefinitionGrantInput! + ): DeleteAppProfileDefinitionGrantPayload + + """Deletes a single `AppProfileGrant` using a unique key.""" + deleteAppProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppProfileGrantInput! + ): DeleteAppProfileGrantPayload + + """Deletes a single `AppProfileTemplate` using a unique key.""" + deleteAppProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppProfileTemplateInput! + ): DeleteAppProfileTemplatePayload + + """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 `OrgAdminGrant` using a unique key.""" + deleteOrgAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgAdminGrantInput! + ): DeleteOrgAdminGrantPayload + + """Deletes a single `OrgCapability` using a unique key.""" + deleteOrgCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgCapabilityInput! + ): DeleteOrgCapabilityPayload + + """Deletes a single `OrgCapabilityDefault` using a unique key.""" + deleteOrgCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgCapabilityDefaultInput! + ): DeleteOrgCapabilityDefaultPayload + + """Deletes a single `OrgCapabilityDefaultCapability` using a unique key.""" + deleteOrgCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgCapabilityDefaultCapabilityInput! + ): DeleteOrgCapabilityDefaultCapabilityPayload + + """Deletes a single `OrgCapabilityDefaultGrant` using a unique key.""" + deleteOrgCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgCapabilityDefaultGrantInput! + ): DeleteOrgCapabilityDefaultGrantPayload + + """Deletes a single `OrgChartEdge` using a unique key.""" + deleteOrgChartEdge( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgChartEdgeInput! + ): DeleteOrgChartEdgePayload + + """Deletes a single `OrgChartEdgeGrant` using a unique key.""" + deleteOrgChartEdgeGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgChartEdgeGrantInput! + ): DeleteOrgChartEdgeGrantPayload + + """Deletes a single `OrgClaimedInvite` using a unique key.""" + deleteOrgClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgClaimedInviteInput! + ): DeleteOrgClaimedInvitePayload + + """Deletes a single `OrgGrant` using a unique key.""" + deleteOrgGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgGrantInput! + ): DeleteOrgGrantPayload + + """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 `OrgMember` using a unique key.""" + deleteOrgMember( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMemberInput! + ): DeleteOrgMemberPayload + + """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 `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 `OrgMembershipDefault` using a unique key.""" + deleteOrgMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMembershipDefaultInput! + ): DeleteOrgMembershipDefaultPayload + + """Deletes a single `OrgMembershipProfile` using a unique key.""" + deleteOrgMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMembershipProfileInput! + ): DeleteOrgMembershipProfilePayload + + """Deletes a single `OrgMembershipSetting` using a unique key.""" + deleteOrgMembershipSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMembershipSettingInput! + ): DeleteOrgMembershipSettingPayload + + """Deletes a single `OrgOwnerGrant` using a unique key.""" + deleteOrgOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgOwnerGrantInput! + ): DeleteOrgOwnerGrantPayload + + """Deletes a single `OrgProfile` using a unique key.""" + deleteOrgProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgProfileInput! + ): DeleteOrgProfilePayload + + """Deletes a single `OrgProfileCapability` using a unique key.""" + deleteOrgProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgProfileCapabilityInput! + ): DeleteOrgProfileCapabilityPayload + + """Deletes a single `OrgProfileDefinitionGrant` using a unique key.""" + deleteOrgProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgProfileDefinitionGrantInput! + ): DeleteOrgProfileDefinitionGrantPayload + + """Deletes a single `OrgProfileGrant` using a unique key.""" + deleteOrgProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgProfileGrantInput! + ): DeleteOrgProfileGrantPayload + + """Deletes a single `OrgProfileTemplate` using a unique key.""" + deleteOrgProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgProfileTemplateInput! + ): DeleteOrgProfileTemplatePayload + + """ + Provision an S3 bucket for a logical bucket in the database. + Reads the bucket config via RLS, then creates and configures + the S3 bucket with the appropriate privacy policies, CORS rules, + and lifecycle settings. + """ + provisionBucket( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ProvisionBucketInput! + ): ProvisionBucketPayload + submitAppInviteCode( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SubmitAppInviteCodeInput! + ): SubmitAppInviteCodePayload + submitOrgInviteCode( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SubmitOrgInviteCodeInput! + ): SubmitOrgInviteCodePayload + + """Updates a single `AppAdminGrant` using a unique key and a patch.""" + updateAppAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppAdminGrantInput! + ): UpdateAppAdminGrantPayload + + """Updates a single `AppCapability` using a unique key and a patch.""" + updateAppCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppCapabilityInput! + ): UpdateAppCapabilityPayload + + """ + Updates a single `AppCapabilityDefault` using a unique key and a patch. + """ + updateAppCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppCapabilityDefaultInput! + ): UpdateAppCapabilityDefaultPayload + + """ + Updates a single `AppCapabilityDefaultCapability` using a unique key and a patch. + """ + updateAppCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppCapabilityDefaultCapabilityInput! + ): UpdateAppCapabilityDefaultCapabilityPayload + + """ + Updates a single `AppCapabilityDefaultGrant` using a unique key and a patch. + """ + updateAppCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppCapabilityDefaultGrantInput! + ): UpdateAppCapabilityDefaultGrantPayload + + """Updates a single `AppClaimedInvite` using a unique key and a patch.""" + updateAppClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppClaimedInviteInput! + ): UpdateAppClaimedInvitePayload + + """Updates a single `AppGrant` using a unique key and a patch.""" + updateAppGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppGrantInput! + ): UpdateAppGrantPayload + + """Updates a single `AppInvite` using a unique key and a patch.""" + updateAppInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + 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 `AppMembershipDefault` using a unique key and a patch. + """ + updateAppMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppMembershipDefaultInput! + ): UpdateAppMembershipDefaultPayload + + """ + Updates a single `AppMembershipProfile` using a unique key and a patch. + """ + updateAppMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppMembershipProfileInput! + ): UpdateAppMembershipProfilePayload + + """Updates a single `AppOwnerGrant` using a unique key and a patch.""" + updateAppOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppOwnerGrantInput! + ): UpdateAppOwnerGrantPayload + + """Updates a single `AppProfile` using a unique key and a patch.""" + updateAppProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppProfileInput! + ): UpdateAppProfilePayload + + """ + Updates a single `AppProfileCapability` using a unique key and a patch. + """ + updateAppProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppProfileCapabilityInput! + ): UpdateAppProfileCapabilityPayload + + """ + Updates a single `AppProfileDefinitionGrant` using a unique key and a patch. + """ + updateAppProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppProfileDefinitionGrantInput! + ): UpdateAppProfileDefinitionGrantPayload + + """Updates a single `AppProfileGrant` using a unique key and a patch.""" + updateAppProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppProfileGrantInput! + ): UpdateAppProfileGrantPayload + + """Updates a single `AppProfileTemplate` using a unique key and a patch.""" + updateAppProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppProfileTemplateInput! + ): UpdateAppProfileTemplatePayload + + """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 `OrgAdminGrant` using a unique key and a patch.""" + updateOrgAdminGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgAdminGrantInput! + ): UpdateOrgAdminGrantPayload + + """Updates a single `OrgCapability` using a unique key and a patch.""" + updateOrgCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgCapabilityInput! + ): UpdateOrgCapabilityPayload + + """ + Updates a single `OrgCapabilityDefault` using a unique key and a patch. + """ + updateOrgCapabilityDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgCapabilityDefaultInput! + ): UpdateOrgCapabilityDefaultPayload + + """ + Updates a single `OrgCapabilityDefaultCapability` using a unique key and a patch. + """ + updateOrgCapabilityDefaultCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgCapabilityDefaultCapabilityInput! + ): UpdateOrgCapabilityDefaultCapabilityPayload + + """ + Updates a single `OrgCapabilityDefaultGrant` using a unique key and a patch. + """ + updateOrgCapabilityDefaultGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgCapabilityDefaultGrantInput! + ): UpdateOrgCapabilityDefaultGrantPayload + + """Updates a single `OrgChartEdge` using a unique key and a patch.""" + updateOrgChartEdge( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgChartEdgeInput! + ): UpdateOrgChartEdgePayload + + """Updates a single `OrgChartEdgeGrant` using a unique key and a patch.""" + updateOrgChartEdgeGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgChartEdgeGrantInput! + ): UpdateOrgChartEdgeGrantPayload + + """Updates a single `OrgClaimedInvite` using a unique key and a patch.""" + updateOrgClaimedInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgClaimedInviteInput! + ): UpdateOrgClaimedInvitePayload + + """Updates a single `OrgGrant` using a unique key and a patch.""" + updateOrgGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgGrantInput! + ): UpdateOrgGrantPayload + + """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 `OrgMember` using a unique key and a patch.""" + updateOrgMember( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMemberInput! + ): UpdateOrgMemberPayload + + """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 `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 `OrgMembershipDefault` using a unique key and a patch. + """ + updateOrgMembershipDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMembershipDefaultInput! + ): UpdateOrgMembershipDefaultPayload + + """ + Updates a single `OrgMembershipProfile` using a unique key and a patch. + """ + updateOrgMembershipProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMembershipProfileInput! + ): UpdateOrgMembershipProfilePayload + + """ + Updates a single `OrgMembershipSetting` using a unique key and a patch. + """ + updateOrgMembershipSetting( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMembershipSettingInput! + ): UpdateOrgMembershipSettingPayload + + """Updates a single `OrgOwnerGrant` using a unique key and a patch.""" + updateOrgOwnerGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgOwnerGrantInput! + ): UpdateOrgOwnerGrantPayload + + """Updates a single `OrgProfile` using a unique key and a patch.""" + updateOrgProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgProfileInput! + ): UpdateOrgProfilePayload + + """ + Updates a single `OrgProfileCapability` using a unique key and a patch. + """ + updateOrgProfileCapability( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgProfileCapabilityInput! + ): UpdateOrgProfileCapabilityPayload + + """ + Updates a single `OrgProfileDefinitionGrant` using a unique key and a patch. + """ + updateOrgProfileDefinitionGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgProfileDefinitionGrantInput! + ): UpdateOrgProfileDefinitionGrantPayload + + """Updates a single `OrgProfileGrant` using a unique key and a patch.""" + updateOrgProfileGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgProfileGrantInput! + ): UpdateOrgProfileGrantPayload + + """Updates a single `OrgProfileTemplate` using a unique key and a patch.""" + updateOrgProfileTemplate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgProfileTemplateInput! + ): UpdateOrgProfileTemplatePayload +} + +"""Records of admin role grants and revocations between members""" +type OrgAdminGrant { + """ + The member receiving or losing the admin grant; NULL if user was deleted + """ + actorId: UUID + createdAt: Datetime + + """The entity (org or group) this admin grant applies to""" + entityId: UUID! + grantorId: UUID + id: UUID! + + """True to grant admin, false to revoke admin""" + isGrant: Boolean! + updatedAt: Datetime +} + +"""A connection to a list of `OrgAdminGrant` values.""" +type OrgAdminGrantConnection { + """ + A list of edges which contains the `OrgAdminGrant` and cursor to aid in pagination. + """ + edges: [OrgAdminGrantEdge]! + + """A list of `OrgAdminGrant` objects.""" + nodes: [OrgAdminGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgAdminGrant` you could get from the connection.""" + totalCount: Int! +} + +"""A `OrgAdminGrant` edge in the connection.""" +type OrgAdminGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgAdminGrant` at the end of the edge.""" + node: OrgAdminGrant +} + +""" +A filter to be used against `OrgAdminGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgAdminGrantFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [OrgAdminGrantFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter + + """Negates the expression.""" + not: OrgAdminGrantFilter + + """Checks for any expressions in this list.""" + or: [OrgAdminGrantFilter!] + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `OrgAdminGrant`""" +input OrgAdminGrantInput { + """ + The member receiving or losing the admin grant; NULL if user was deleted + """ + actorId: UUID + createdAt: Datetime + + """The entity (org or group) this admin grant applies to""" + entityId: UUID! + grantorId: UUID + id: UUID + + """True to grant admin, false to revoke admin""" + isGrant: Boolean + updatedAt: Datetime +} + +"""Methods to use when ordering `OrgAdminGrant`.""" +enum OrgAdminGrantOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `OrgAdminGrant`. Fields that are set will be updated. +""" +input OrgAdminGrantPatch { + """ + The member receiving or losing the admin grant; NULL if user was deleted + """ + actorId: UUID + createdAt: Datetime + + """The entity (org or group) this admin grant applies to""" + entityId: UUID + grantorId: UUID + id: UUID + + """True to grant admin, false to revoke admin""" + isGrant: Boolean + updatedAt: Datetime +} + +""" +Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control +""" +type OrgCapability { + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int + + """ + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations + """ + bitstr: BitString! + + """Human-readable description of what this capability allows""" + description: String + id: UUID! + + """ + Kind of catalog entry: capability (capability) or level (achievement level) + """ + kind: String! + + """Human-readable capability name (e.g. read, write, manage)""" + name: String + + """ + Reads and enables pagination through a set of `OrgCapabilityDefaultCapability`. + """ + orgCapabilityDefaultCapabilitiesByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgCapabilityDefaultCapability`.""" + orderBy: [OrgCapabilityDefaultCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgCapabilityDefaultCapabilityFilter + ): OrgCapabilityDefaultCapabilityConnection! + + """ + Reads and enables pagination through a set of `OrgCapabilityDefaultGrant`. + """ + orgCapabilityDefaultGrantsByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgCapabilityDefaultGrant`.""" + orderBy: [OrgCapabilityDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgCapabilityDefaultGrantFilter + ): OrgCapabilityDefaultGrantConnection! + + """Reads and enables pagination through a set of `OrgProfileCapability`.""" + orgProfileCapabilitiesByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileCapabilityFilter + ): OrgProfileCapabilityConnection! + + """ + Reads and enables pagination through a set of `OrgProfileDefinitionGrant`. + """ + orgProfileDefinitionGrantsByCapabilityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileDefinitionGrantFilter + ): OrgProfileDefinitionGrantConnection! +} + +"""A connection to a list of `OrgCapability` values.""" +type OrgCapabilityConnection { + """ + A list of edges which contains the `OrgCapability` and cursor to aid in pagination. + """ + edges: [OrgCapabilityEdge]! + + """A list of `OrgCapability` objects.""" + nodes: [OrgCapability]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgCapability` you could get from the connection.""" + totalCount: Int! +} + +""" +Stores the default capability bitmask assigned to new members upon joining +""" +type OrgCapabilityDefault { + """Default capability bitmask applied to new members""" + capabilities: BitString! + + """References the entity these default capabilities apply to""" + entityId: UUID! + id: UUID! +} + +""" +Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask +""" +type OrgCapabilityDefaultCapability { + """ + Reads a single `OrgCapability` that is related to this `OrgCapabilityDefaultCapability`. + """ + capability: OrgCapability + + """References the capability included in the defaults bundle""" + capabilityId: UUID! + createdAt: Datetime + + """Scopes this default capability to a specific entity""" + entityId: UUID! + id: UUID! + updatedAt: Datetime +} + +"""A connection to a list of `OrgCapabilityDefaultCapability` values.""" +type OrgCapabilityDefaultCapabilityConnection { + """ + A list of edges which contains the `OrgCapabilityDefaultCapability` and cursor to aid in pagination. + """ + edges: [OrgCapabilityDefaultCapabilityEdge]! + + """A list of `OrgCapabilityDefaultCapability` objects.""" + nodes: [OrgCapabilityDefaultCapability]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgCapabilityDefaultCapability` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgCapabilityDefaultCapability` edge in the connection.""" +type OrgCapabilityDefaultCapabilityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgCapabilityDefaultCapability` at the end of the edge.""" + node: OrgCapabilityDefaultCapability +} + +""" +A filter to be used against `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityDefaultCapabilityFilter { + """Checks for all expressions in this list.""" + and: [OrgCapabilityDefaultCapabilityFilter!] + + """Filter by the object’s `capability` relation.""" + capability: OrgCapabilityFilter + + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: OrgCapabilityDefaultCapabilityFilter + + """Checks for any expressions in this list.""" + or: [OrgCapabilityDefaultCapabilityFilter!] + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `OrgCapabilityDefaultCapability`""" +input OrgCapabilityDefaultCapabilityInput { + """References the capability included in the defaults bundle""" + capabilityId: UUID! + createdAt: Datetime + + """Scopes this default capability to a specific entity""" + entityId: UUID! + id: UUID + updatedAt: Datetime +} + +"""Methods to use when ordering `OrgCapabilityDefaultCapability`.""" +enum OrgCapabilityDefaultCapabilityOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `OrgCapabilityDefaultCapability`. Fields that are set will be updated. +""" +input OrgCapabilityDefaultCapabilityPatch { + """References the capability included in the defaults bundle""" + capabilityId: UUID + createdAt: Datetime - """Realtime metadata (null if no @realtime tag)""" - realtime: MetaRealtime - relations: MetaRelations! - schemaName: String! + """Scopes this default capability to a specific entity""" + entityId: UUID + id: UUID + updatedAt: Datetime +} - """Provisioning scope metadata (null if no @scope tag)""" - scope: MetaScope +"""A connection to a list of `OrgCapabilityDefault` values.""" +type OrgCapabilityDefaultConnection { + """ + A list of edges which contains the `OrgCapabilityDefault` and cursor to aid in pagination. + """ + edges: [OrgCapabilityDefaultEdge]! + + """A list of `OrgCapabilityDefault` objects.""" + nodes: [OrgCapabilityDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgCapabilityDefault` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgCapabilityDefault` edge in the connection.""" +type OrgCapabilityDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgCapabilityDefault` at the end of the edge.""" + node: OrgCapabilityDefault +} + +""" +A filter to be used against `OrgCapabilityDefault` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityDefaultFilter { + """Checks for all expressions in this list.""" + and: [OrgCapabilityDefaultFilter!] + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: OrgCapabilityDefaultFilter + + """Checks for any expressions in this list.""" + or: [OrgCapabilityDefaultFilter!] +} + +""" +Audit log of capability additions and removals from the defaults bitmask +""" +type OrgCapabilityDefaultGrant { + """ + Reads a single `OrgCapability` that is related to this `OrgCapabilityDefaultGrant`. + """ + capability: OrgCapability + + """References the capability being added to or removed from defaults""" + capabilityId: UUID! + createdAt: Datetime + + """Scopes this audit entry to a specific entity""" + entityId: UUID! + grantorId: UUID + id: UUID! + + """True to add the capability to defaults, false to remove it""" + isGrant: Boolean! + updatedAt: Datetime +} + +"""A connection to a list of `OrgCapabilityDefaultGrant` values.""" +type OrgCapabilityDefaultGrantConnection { + """ + A list of edges which contains the `OrgCapabilityDefaultGrant` and cursor to aid in pagination. + """ + edges: [OrgCapabilityDefaultGrantEdge]! + + """A list of `OrgCapabilityDefaultGrant` objects.""" + nodes: [OrgCapabilityDefaultGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgCapabilityDefaultGrant` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgCapabilityDefaultGrant` edge in the connection.""" +type OrgCapabilityDefaultGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgCapabilityDefaultGrant` at the end of the edge.""" + node: OrgCapabilityDefaultGrant +} + +""" +A filter to be used against `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityDefaultGrantFilter { + """Checks for all expressions in this list.""" + and: [OrgCapabilityDefaultGrantFilter!] + + """Filter by the object’s `capability` relation.""" + capability: OrgCapabilityFilter + + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter + + """Negates the expression.""" + not: OrgCapabilityDefaultGrantFilter + + """Checks for any expressions in this list.""" + or: [OrgCapabilityDefaultGrantFilter!] + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `OrgCapabilityDefaultGrant`""" +input OrgCapabilityDefaultGrantInput { + """References the capability being added to or removed from defaults""" + capabilityId: UUID! + createdAt: Datetime + + """Scopes this audit entry to a specific entity""" + entityId: UUID! + grantorId: UUID + id: UUID + + """True to add the capability to defaults, false to remove it""" + isGrant: Boolean + updatedAt: Datetime +} + +"""Methods to use when ordering `OrgCapabilityDefaultGrant`.""" +enum OrgCapabilityDefaultGrantOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `OrgCapabilityDefaultGrant`. Fields that are set will be updated. +""" +input OrgCapabilityDefaultGrantPatch { + """References the capability being added to or removed from defaults""" + capabilityId: UUID + createdAt: Datetime + + """Scopes this audit entry to a specific entity""" + entityId: UUID + grantorId: UUID + id: UUID + + """True to add the capability to defaults, false to remove it""" + isGrant: Boolean + updatedAt: Datetime +} + +"""An input for mutations affecting `OrgCapabilityDefault`""" +input OrgCapabilityDefaultInput { + """Default capability bitmask applied to new members""" + capabilities: BitString + + """References the entity these default capabilities apply to""" + entityId: UUID! + id: UUID +} + +"""Methods to use when ordering `OrgCapabilityDefault`.""" +enum OrgCapabilityDefaultOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} + +""" +Represents an update to a `OrgCapabilityDefault`. Fields that are set will be updated. +""" +input OrgCapabilityDefaultPatch { + """Default capability bitmask applied to new members""" + capabilities: BitString + + """References the entity these default capabilities apply to""" + entityId: UUID + id: UUID +} + +"""A `OrgCapability` edge in the connection.""" +type OrgCapabilityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgCapability` at the end of the edge.""" + node: OrgCapability +} + +""" +A filter to be used against `OrgCapability` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityFilter { + """Checks for all expressions in this list.""" + and: [OrgCapabilityFilter!] + + """Filter by the object’s `bitnum` field.""" + bitnum: IntFilter + + """Filter by the object’s `bitstr` field.""" + bitstr: BitStringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `kind` field.""" + kind: StringFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgCapabilityFilter + + """Checks for any expressions in this list.""" + or: [OrgCapabilityFilter!] + + """ + Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. + """ + orgCapabilityDefaultCapabilitiesByCapabilityId: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter + + """`orgCapabilityDefaultCapabilitiesByCapabilityId` exist.""" + orgCapabilityDefaultCapabilitiesByCapabilityIdExist: Boolean + + """ + Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. + """ + orgCapabilityDefaultGrantsByCapabilityId: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter + + """`orgCapabilityDefaultGrantsByCapabilityId` exist.""" + orgCapabilityDefaultGrantsByCapabilityIdExist: Boolean + + """ + Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. + """ + orgProfileCapabilitiesByCapabilityId: OrgCapabilityToManyOrgProfileCapabilityFilter + + """`orgProfileCapabilitiesByCapabilityId` exist.""" + orgProfileCapabilitiesByCapabilityIdExist: Boolean + + """ + Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. + """ + orgProfileDefinitionGrantsByCapabilityId: OrgCapabilityToManyOrgProfileDefinitionGrantFilter + + """`orgProfileDefinitionGrantsByCapabilityId` exist.""" + orgProfileDefinitionGrantsByCapabilityIdExist: Boolean +} + +"""An input for mutations affecting `OrgCapability`""" +input OrgCapabilityInput { + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int + + """ + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations + """ + bitstr: BitString + + """Human-readable description of what this capability allows""" + description: String + id: UUID + + """ + Kind of catalog entry: capability (capability) or level (achievement level) + """ + kind: String + + """Human-readable capability name (e.g. read, write, manage)""" + name: String +} + +"""Methods to use when ordering `OrgCapability`.""" +enum OrgCapabilityOrderBy { + BITNUM_ASC + BITNUM_DESC + BITSTR_ASC + BITSTR_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + ID_ASC + ID_DESC + KIND_ASC + KIND_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """Search metadata (null if no search configured)""" - search: MetaSearch +""" +Represents an update to a `OrgCapability`. Fields that are set will be updated. +""" +input OrgCapabilityPatch { + """ + Position of this capability in the bitmask (1-indexed), must be unique per capability set + """ + bitnum: Int - """Storage metadata (null if not a storage table)""" - storage: MetaStorage + """ + Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations + """ + bitstr: BitString - """PostgreSQL table name""" - tableName: String! - uniqueConstraints: [MetaUniqueConstraint!]! -} + """Human-readable description of what this capability allows""" + description: String + id: UUID -"""Information about a PostgreSQL type""" -type MetaType { - """Scalar serialization contract (null for plain scalars)""" - encoding: MetaScalarEncoding - gqlType: String! - hasDefault: Boolean - isArray: Boolean! - isNotNull: Boolean - pgType: String! - subtype: String -} + """ + Kind of catalog entry: capability (capability) or level (achievement level) + """ + kind: String -"""Information about a unique constraint""" -type MetaUniqueConstraint { - fields: [MetaField!]! - name: String! + """Human-readable capability name (e.g. read, write, manage)""" + name: String } """ -The root mutation type which contains root level fields which mutate data. +A filter to be used against many `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ """ -type Mutation { - """Creates a single `AppAdminGrant`.""" - createAppAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppAdminGrantInput! - ): CreateAppAdminGrantPayload +input OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter { + """Filters to entities where every related entity matches.""" + every: OrgCapabilityDefaultCapabilityFilter - """Creates a single `AppClaimedInvite`.""" - createAppClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppClaimedInviteInput! - ): CreateAppClaimedInvitePayload + """Filters to entities where no related entity matches.""" + none: OrgCapabilityDefaultCapabilityFilter - """Creates a single `AppGrant`.""" - createAppGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppGrantInput! - ): CreateAppGrantPayload + """Filters to entities where at least one related entity matches.""" + some: OrgCapabilityDefaultCapabilityFilter +} - """Creates a single `AppInvite`.""" - createAppInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppInviteInput! - ): CreateAppInvitePayload +""" +A filter to be used against many `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityToManyOrgCapabilityDefaultGrantFilter { + """Filters to entities where every related entity matches.""" + every: OrgCapabilityDefaultGrantFilter - """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 + """Filters to entities where no related entity matches.""" + none: OrgCapabilityDefaultGrantFilter - """Creates a single `AppMembershipDefault`.""" - createAppMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppMembershipDefaultInput! - ): CreateAppMembershipDefaultPayload + """Filters to entities where at least one related entity matches.""" + some: OrgCapabilityDefaultGrantFilter +} - """Creates a single `AppOwnerGrant`.""" - createAppOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppOwnerGrantInput! - ): CreateAppOwnerGrantPayload +""" +A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityToManyOrgProfileCapabilityFilter { + """Filters to entities where every related entity matches.""" + every: OrgProfileCapabilityFilter - """Creates a single `AppPermission`.""" - createAppPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppPermissionInput! - ): CreateAppPermissionPayload + """Filters to entities where no related entity matches.""" + none: OrgProfileCapabilityFilter - """Creates a single `AppPermissionDefault`.""" - createAppPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppPermissionDefaultInput! - ): CreateAppPermissionDefaultPayload + """Filters to entities where at least one related entity matches.""" + some: OrgProfileCapabilityFilter +} - """Creates a single `AppPermissionDefaultGrant`.""" - createAppPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppPermissionDefaultGrantInput! - ): CreateAppPermissionDefaultGrantPayload +""" +A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgCapabilityToManyOrgProfileDefinitionGrantFilter { + """Filters to entities where every related entity matches.""" + every: OrgProfileDefinitionGrantFilter - """Creates a single `AppPermissionDefaultPermission`.""" - createAppPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppPermissionDefaultPermissionInput! - ): CreateAppPermissionDefaultPermissionPayload + """Filters to entities where no related entity matches.""" + none: OrgProfileDefinitionGrantFilter - """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 + """Filters to entities where at least one related entity matches.""" + some: OrgProfileDefinitionGrantFilter +} - """Creates a single `OrgAdminGrant`.""" - createOrgAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgAdminGrantInput! - ): CreateOrgAdminGrantPayload +""" +Organizational chart edges defining parent-child reporting relationships between members within an entity +""" +type OrgChartEdge { + """User ID of the subordinate (employee) in this reporting relationship""" + childId: UUID! + createdAt: Datetime - """Creates a single `OrgChartEdge`.""" - createOrgChartEdge( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgChartEdgeInput! - ): CreateOrgChartEdgePayload + """Organization this hierarchy edge belongs to""" + entityId: UUID! + id: UUID! - """Creates a single `OrgChartEdgeGrant`.""" - createOrgChartEdgeGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgChartEdgeGrantInput! - ): CreateOrgChartEdgeGrantPayload + """ + User ID of the manager; NULL indicates a top-level position with no direct report + """ + parentId: UUID - """Creates a single `OrgClaimedInvite`.""" - createOrgClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgClaimedInviteInput! - ): CreateOrgClaimedInvitePayload + """Numeric seniority level for this position (higher = more senior)""" + positionLevel: Int - """Creates a single `OrgGrant`.""" - createOrgGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgGrantInput! - ): CreateOrgGrantPayload + """Job title or role name for this position in the org chart""" + positionTitle: String + updatedAt: Datetime +} - """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 +"""A connection to a list of `OrgChartEdge` values.""" +type OrgChartEdgeConnection { + """ + A list of edges which contains the `OrgChartEdge` and cursor to aid in pagination. + """ + edges: [OrgChartEdgeEdge]! - """Creates a single `OrgMember`.""" - createOrgMember( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgMemberInput! - ): CreateOrgMemberPayload + """A list of `OrgChartEdge` objects.""" + nodes: [OrgChartEdge]! - """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 + """Information to aid in pagination.""" + pageInfo: PageInfo! - """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 + """The count of *all* `OrgChartEdge` you could get from the connection.""" + totalCount: Int! +} - """Creates a single `OrgMembershipDefault`.""" - createOrgMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgMembershipDefaultInput! - ): CreateOrgMembershipDefaultPayload +"""A `OrgChartEdge` edge in the connection.""" +type OrgChartEdgeEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Creates a single `OrgMembershipSetting`.""" - createOrgMembershipSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgMembershipSettingInput! - ): CreateOrgMembershipSettingPayload + """The `OrgChartEdge` at the end of the edge.""" + node: OrgChartEdge +} - """Creates a single `OrgOwnerGrant`.""" - createOrgOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgOwnerGrantInput! - ): CreateOrgOwnerGrantPayload +""" +A filter to be used against `OrgChartEdge` object types. All fields are combined with a logical ‘and.’ +""" +input OrgChartEdgeFilter { + """Checks for all expressions in this list.""" + and: [OrgChartEdgeFilter!] - """Creates a single `OrgPermission`.""" - createOrgPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgPermissionInput! - ): CreateOrgPermissionPayload + """Filter by the object’s `childId` field.""" + childId: UUIDFilter - """Creates a single `OrgPermissionDefault`.""" - createOrgPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgPermissionDefaultInput! - ): CreateOrgPermissionDefaultPayload + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Creates a single `OrgPermissionDefaultGrant`.""" - createOrgPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgPermissionDefaultGrantInput! - ): CreateOrgPermissionDefaultGrantPayload + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter - """Creates a single `OrgPermissionDefaultPermission`.""" - createOrgPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgPermissionDefaultPermissionInput! - ): CreateOrgPermissionDefaultPermissionPayload + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Deletes a single `AppAdminGrant` using a unique key.""" - deleteAppAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppAdminGrantInput! - ): DeleteAppAdminGrantPayload + """Negates the expression.""" + not: OrgChartEdgeFilter - """Deletes a single `AppClaimedInvite` using a unique key.""" - deleteAppClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppClaimedInviteInput! - ): DeleteAppClaimedInvitePayload + """Checks for any expressions in this list.""" + or: [OrgChartEdgeFilter!] - """Deletes a single `AppGrant` using a unique key.""" - deleteAppGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppGrantInput! - ): DeleteAppGrantPayload + """Filter by the object’s `parentId` field.""" + parentId: UUIDFilter - """Deletes a single `AppInvite` using a unique key.""" - deleteAppInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppInviteInput! - ): DeleteAppInvitePayload + """Filter by the object’s `positionLevel` field.""" + positionLevel: IntFilter - """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 + """Filter by the object’s `positionTitle` field.""" + positionTitle: StringFilter - """Deletes a single `AppMembershipDefault` using a unique key.""" - deleteAppMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppMembershipDefaultInput! - ): DeleteAppMembershipDefaultPayload + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} - """Deletes a single `AppOwnerGrant` using a unique key.""" - deleteAppOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppOwnerGrantInput! - ): DeleteAppOwnerGrantPayload +""" +Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table +""" +type OrgChartEdgeGrant { + """User ID of the subordinate being placed in the hierarchy""" + childId: UUID! - """Deletes a single `AppPermission` using a unique key.""" - deleteAppPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppPermissionInput! - ): DeleteAppPermissionPayload + """Timestamp when this grant or revocation was recorded""" + createdAt: Datetime! - """Deletes a single `AppPermissionDefault` using a unique key.""" - deleteAppPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppPermissionDefaultInput! - ): DeleteAppPermissionDefaultPayload + """Organization this grant applies to""" + entityId: UUID! - """Deletes a single `AppPermissionDefaultGrant` using a unique key.""" - deleteAppPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppPermissionDefaultGrantInput! - ): DeleteAppPermissionDefaultGrantPayload + """ + User ID of the admin who performed this grant or revocation; NULL if grantor was deleted + """ + grantorId: UUID + id: UUID! - """Deletes a single `AppPermissionDefaultPermission` using a unique key.""" - deleteAppPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppPermissionDefaultPermissionInput! - ): DeleteAppPermissionDefaultPermissionPayload + """TRUE to add/update the edge, FALSE to remove it""" + isGrant: Boolean! - """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 + """User ID of the manager being assigned; NULL for top-level positions""" + parentId: UUID - """Deletes a single `OrgAdminGrant` using a unique key.""" - deleteOrgAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgAdminGrantInput! - ): DeleteOrgAdminGrantPayload + """Numeric seniority level being assigned in this grant""" + positionLevel: Int - """Deletes a single `OrgChartEdge` using a unique key.""" - deleteOrgChartEdge( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgChartEdgeInput! - ): DeleteOrgChartEdgePayload + """Job title or role name being assigned in this grant""" + positionTitle: String +} - """Deletes a single `OrgChartEdgeGrant` using a unique key.""" - deleteOrgChartEdgeGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgChartEdgeGrantInput! - ): DeleteOrgChartEdgeGrantPayload +"""A connection to a list of `OrgChartEdgeGrant` values.""" +type OrgChartEdgeGrantConnection { + """ + A list of edges which contains the `OrgChartEdgeGrant` and cursor to aid in pagination. + """ + edges: [OrgChartEdgeGrantEdge]! - """Deletes a single `OrgClaimedInvite` using a unique key.""" - deleteOrgClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgClaimedInviteInput! - ): DeleteOrgClaimedInvitePayload + """A list of `OrgChartEdgeGrant` objects.""" + nodes: [OrgChartEdgeGrant]! - """Deletes a single `OrgGrant` using a unique key.""" - deleteOrgGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgGrantInput! - ): DeleteOrgGrantPayload + """Information to aid in pagination.""" + pageInfo: PageInfo! - """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 + """ + The count of *all* `OrgChartEdgeGrant` you could get from the connection. + """ + totalCount: Int! +} - """Deletes a single `OrgMember` using a unique key.""" - deleteOrgMember( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgMemberInput! - ): DeleteOrgMemberPayload +"""A `OrgChartEdgeGrant` edge in the connection.""" +type OrgChartEdgeGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """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 + """The `OrgChartEdgeGrant` at the end of the edge.""" + node: OrgChartEdgeGrant +} - """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 +""" +A filter to be used against `OrgChartEdgeGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgChartEdgeGrantFilter { + """Checks for all expressions in this list.""" + and: [OrgChartEdgeGrantFilter!] - """Deletes a single `OrgMembershipDefault` using a unique key.""" - deleteOrgMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgMembershipDefaultInput! - ): DeleteOrgMembershipDefaultPayload + """Filter by the object’s `childId` field.""" + childId: UUIDFilter - """Deletes a single `OrgMembershipSetting` using a unique key.""" - deleteOrgMembershipSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgMembershipSettingInput! - ): DeleteOrgMembershipSettingPayload + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Deletes a single `OrgOwnerGrant` using a unique key.""" - deleteOrgOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgOwnerGrantInput! - ): DeleteOrgOwnerGrantPayload + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter - """Deletes a single `OrgPermission` using a unique key.""" - deleteOrgPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgPermissionInput! - ): DeleteOrgPermissionPayload + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter - """Deletes a single `OrgPermissionDefault` using a unique key.""" - deleteOrgPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgPermissionDefaultInput! - ): DeleteOrgPermissionDefaultPayload + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Deletes a single `OrgPermissionDefaultGrant` using a unique key.""" - deleteOrgPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgPermissionDefaultGrantInput! - ): DeleteOrgPermissionDefaultGrantPayload + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter - """Deletes a single `OrgPermissionDefaultPermission` using a unique key.""" - deleteOrgPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgPermissionDefaultPermissionInput! - ): DeleteOrgPermissionDefaultPermissionPayload + """Negates the expression.""" + not: OrgChartEdgeGrantFilter - """ - Provision an S3 bucket for a logical bucket in the database. - Reads the bucket config via RLS, then creates and configures - the S3 bucket with the appropriate privacy policies, CORS rules, - and lifecycle settings. - """ - provisionBucket( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionBucketInput! - ): ProvisionBucketPayload - submitAppInviteCode( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SubmitAppInviteCodeInput! - ): SubmitAppInviteCodePayload - submitOrgInviteCode( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SubmitOrgInviteCodeInput! - ): SubmitOrgInviteCodePayload + """Checks for any expressions in this list.""" + or: [OrgChartEdgeGrantFilter!] - """Updates a single `AppAdminGrant` using a unique key and a patch.""" - updateAppAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppAdminGrantInput! - ): UpdateAppAdminGrantPayload + """Filter by the object’s `parentId` field.""" + parentId: UUIDFilter - """Updates a single `AppClaimedInvite` using a unique key and a patch.""" - updateAppClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppClaimedInviteInput! - ): UpdateAppClaimedInvitePayload + """Filter by the object’s `positionLevel` field.""" + positionLevel: IntFilter - """Updates a single `AppGrant` using a unique key and a patch.""" - updateAppGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppGrantInput! - ): UpdateAppGrantPayload + """Filter by the object’s `positionTitle` field.""" + positionTitle: StringFilter +} - """Updates a single `AppInvite` using a unique key and a patch.""" - updateAppInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppInviteInput! - ): UpdateAppInvitePayload +"""An input for mutations affecting `OrgChartEdgeGrant`""" +input OrgChartEdgeGrantInput { + """User ID of the subordinate being placed in the hierarchy""" + childId: UUID! - """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 + """Timestamp when this grant or revocation was recorded""" + createdAt: Datetime + + """Organization this grant applies to""" + entityId: UUID! """ - Updates a single `AppMembershipDefault` using a unique key and a patch. + User ID of the admin who performed this grant or revocation; NULL if grantor was deleted """ - updateAppMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppMembershipDefaultInput! - ): UpdateAppMembershipDefaultPayload + grantorId: UUID + id: UUID - """Updates a single `AppOwnerGrant` using a unique key and a patch.""" - updateAppOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppOwnerGrantInput! - ): UpdateAppOwnerGrantPayload + """TRUE to add/update the edge, FALSE to remove it""" + isGrant: Boolean - """Updates a single `AppPermission` using a unique key and a patch.""" - updateAppPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppPermissionInput! - ): UpdateAppPermissionPayload + """User ID of the manager being assigned; NULL for top-level positions""" + parentId: UUID - """ - Updates a single `AppPermissionDefault` using a unique key and a patch. - """ - updateAppPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppPermissionDefaultInput! - ): UpdateAppPermissionDefaultPayload + """Numeric seniority level being assigned in this grant""" + positionLevel: Int - """ - Updates a single `AppPermissionDefaultGrant` using a unique key and a patch. - """ - updateAppPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppPermissionDefaultGrantInput! - ): UpdateAppPermissionDefaultGrantPayload + """Job title or role name being assigned in this grant""" + positionTitle: String +} - """ - Updates a single `AppPermissionDefaultPermission` using a unique key and a patch. - """ - updateAppPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppPermissionDefaultPermissionInput! - ): UpdateAppPermissionDefaultPermissionPayload +"""Methods to use when ordering `OrgChartEdgeGrant`.""" +enum OrgChartEdgeGrantOrderBy { + CHILD_ID_ASC + CHILD_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + NATURAL + PARENT_ID_ASC + PARENT_ID_DESC + POSITION_LEVEL_ASC + POSITION_LEVEL_DESC + POSITION_TITLE_ASC + POSITION_TITLE_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """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 +""" +Represents an update to a `OrgChartEdgeGrant`. Fields that are set will be updated. +""" +input OrgChartEdgeGrantPatch { + """User ID of the subordinate being placed in the hierarchy""" + childId: UUID - """Updates a single `OrgAdminGrant` using a unique key and a patch.""" - updateOrgAdminGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgAdminGrantInput! - ): UpdateOrgAdminGrantPayload + """Timestamp when this grant or revocation was recorded""" + createdAt: Datetime - """Updates a single `OrgChartEdge` using a unique key and a patch.""" - updateOrgChartEdge( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgChartEdgeInput! - ): UpdateOrgChartEdgePayload + """Organization this grant applies to""" + entityId: UUID - """Updates a single `OrgChartEdgeGrant` using a unique key and a patch.""" - updateOrgChartEdgeGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgChartEdgeGrantInput! - ): UpdateOrgChartEdgeGrantPayload + """ + User ID of the admin who performed this grant or revocation; NULL if grantor was deleted + """ + grantorId: UUID + id: UUID - """Updates a single `OrgClaimedInvite` using a unique key and a patch.""" - updateOrgClaimedInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgClaimedInviteInput! - ): UpdateOrgClaimedInvitePayload + """TRUE to add/update the edge, FALSE to remove it""" + isGrant: Boolean - """Updates a single `OrgGrant` using a unique key and a patch.""" - updateOrgGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgGrantInput! - ): UpdateOrgGrantPayload + """User ID of the manager being assigned; NULL for top-level positions""" + parentId: UUID - """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 + """Numeric seniority level being assigned in this grant""" + positionLevel: Int - """Updates a single `OrgMember` using a unique key and a patch.""" - updateOrgMember( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgMemberInput! - ): UpdateOrgMemberPayload + """Job title or role name being assigned in this grant""" + positionTitle: String +} - """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 +"""An input for mutations affecting `OrgChartEdge`""" +input OrgChartEdgeInput { + """User ID of the subordinate (employee) in this reporting relationship""" + childId: UUID! + createdAt: Datetime - """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 + """Organization this hierarchy edge belongs to""" + entityId: UUID! + id: UUID """ - Updates a single `OrgMembershipDefault` using a unique key and a patch. + User ID of the manager; NULL indicates a top-level position with no direct report """ - updateOrgMembershipDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgMembershipDefaultInput! - ): UpdateOrgMembershipDefaultPayload + parentId: UUID - """ - Updates a single `OrgMembershipSetting` using a unique key and a patch. - """ - updateOrgMembershipSetting( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgMembershipSettingInput! - ): UpdateOrgMembershipSettingPayload + """Numeric seniority level for this position (higher = more senior)""" + positionLevel: Int - """Updates a single `OrgOwnerGrant` using a unique key and a patch.""" - updateOrgOwnerGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgOwnerGrantInput! - ): UpdateOrgOwnerGrantPayload + """Job title or role name for this position in the org chart""" + positionTitle: String + updatedAt: Datetime +} - """Updates a single `OrgPermission` using a unique key and a patch.""" - updateOrgPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgPermissionInput! - ): UpdateOrgPermissionPayload +"""Methods to use when ordering `OrgChartEdge`.""" +enum OrgChartEdgeOrderBy { + CHILD_ID_ASC + CHILD_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ID_ASC + ID_DESC + NATURAL + PARENT_ID_ASC + PARENT_ID_DESC + POSITION_LEVEL_ASC + POSITION_LEVEL_DESC + POSITION_TITLE_ASC + POSITION_TITLE_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} - """ - Updates a single `OrgPermissionDefault` using a unique key and a patch. - """ - updateOrgPermissionDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgPermissionDefaultInput! - ): UpdateOrgPermissionDefaultPayload +""" +Represents an update to a `OrgChartEdge`. Fields that are set will be updated. +""" +input OrgChartEdgePatch { + """User ID of the subordinate (employee) in this reporting relationship""" + childId: UUID + createdAt: Datetime - """ - Updates a single `OrgPermissionDefaultGrant` using a unique key and a patch. - """ - updateOrgPermissionDefaultGrant( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgPermissionDefaultGrantInput! - ): UpdateOrgPermissionDefaultGrantPayload + """Organization this hierarchy edge belongs to""" + entityId: UUID + id: UUID """ - Updates a single `OrgPermissionDefaultPermission` using a unique key and a patch. + User ID of the manager; NULL indicates a top-level position with no direct report """ - updateOrgPermissionDefaultPermission( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgPermissionDefaultPermissionInput! - ): UpdateOrgPermissionDefaultPermissionPayload + parentId: UUID + + """Numeric seniority level for this position (higher = more senior)""" + positionLevel: Int + + """Job title or role name for this position in the org chart""" + positionTitle: String + updatedAt: Datetime } -"""Records of admin role grants and revocations between members""" -type OrgAdminGrant { - """ - The member receiving or losing the admin grant; NULL if user was deleted - """ - actorId: UUID +""" +Records of successfully claimed invitations, linking senders to receivers +""" +type OrgClaimedInvite { createdAt: Datetime - """The entity (org or group) this admin grant applies to""" + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON entityId: UUID! - grantorId: UUID id: UUID! - """True to grant admin, false to revoke admin""" - isGrant: Boolean! + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID + + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime } -"""A connection to a list of `OrgAdminGrant` values.""" -type OrgAdminGrantConnection { +"""A connection to a list of `OrgClaimedInvite` values.""" +type OrgClaimedInviteConnection { """ - A list of edges which contains the `OrgAdminGrant` and cursor to aid in pagination. + A list of edges which contains the `OrgClaimedInvite` and cursor to aid in pagination. """ - edges: [OrgAdminGrantEdge]! + edges: [OrgClaimedInviteEdge]! - """A list of `OrgAdminGrant` objects.""" - nodes: [OrgAdminGrant]! + """A list of `OrgClaimedInvite` objects.""" + nodes: [OrgClaimedInvite]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgAdminGrant` you could get from the connection.""" + """ + The count of *all* `OrgClaimedInvite` you could get from the connection. + """ totalCount: Int! } -"""A `OrgAdminGrant` edge in the connection.""" -type OrgAdminGrantEdge { +"""A `OrgClaimedInvite` edge in the connection.""" +type OrgClaimedInviteEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgAdminGrant` at the end of the edge.""" - node: OrgAdminGrant + """The `OrgClaimedInvite` at the end of the edge.""" + node: OrgClaimedInvite } """ -A filter to be used against `OrgAdminGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgClaimedInvite` object types. All fields are combined with a logical ‘and.’ """ -input OrgAdminGrantFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - +input OrgClaimedInviteFilter { """Checks for all expressions in this list.""" - and: [OrgAdminGrantFilter!] + and: [OrgClaimedInviteFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -5267,242 +9081,209 @@ input OrgAdminGrantFilter { """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `grantorId` field.""" - grantorId: UUIDFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isGrant` field.""" - isGrant: BooleanFilter - """Negates the expression.""" - not: OrgAdminGrantFilter + not: OrgClaimedInviteFilter """Checks for any expressions in this list.""" - or: [OrgAdminGrantFilter!] + or: [OrgClaimedInviteFilter!] + + """Filter by the object’s `receiverId` field.""" + receiverId: UUIDFilter + + """Filter by the object’s `senderId` field.""" + senderId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgAdminGrant`""" -input OrgAdminGrantInput { - """ - The member receiving or losing the admin grant; NULL if user was deleted - """ - actorId: UUID +"""An input for mutations affecting `OrgClaimedInvite`""" +input OrgClaimedInviteInput { createdAt: Datetime - """The entity (org or group) this admin grant applies to""" + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON entityId: UUID! - grantorId: UUID id: UUID - """True to grant admin, false to revoke admin""" - isGrant: Boolean + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID + + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime } -"""Methods to use when ordering `OrgAdminGrant`.""" -enum OrgAdminGrantOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC +"""Methods to use when ordering `OrgClaimedInvite`.""" +enum OrgClaimedInviteOrderBy { CREATED_AT_ASC CREATED_AT_DESC + DATA_ASC + DATA_DESC ENTITY_ID_ASC ENTITY_ID_DESC - GRANTOR_ID_ASC - GRANTOR_ID_DESC ID_ASC ID_DESC - IS_GRANT_ASC - IS_GRANT_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + RECEIVER_ID_ASC + RECEIVER_ID_DESC + SENDER_ID_ASC + SENDER_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `OrgAdminGrant`. Fields that are set will be updated. +Represents an update to a `OrgClaimedInvite`. Fields that are set will be updated. """ -input OrgAdminGrantPatch { - """ - The member receiving or losing the admin grant; NULL if user was deleted - """ - actorId: UUID +input OrgClaimedInvitePatch { createdAt: Datetime - """The entity (org or group) this admin grant applies to""" + """Optional JSON payload captured at the time the invite was claimed""" + data: JSON entityId: UUID - grantorId: UUID id: UUID - """True to grant admin, false to revoke admin""" - isGrant: Boolean + """User ID of the person who claimed and redeemed the invitation""" + receiverId: UUID + + """User ID of the original invitation sender""" + senderId: UUID updatedAt: Datetime } -""" -Organizational chart edges defining parent-child reporting relationships between members within an entity -""" -type OrgChartEdge { - """User ID of the subordinate (employee) in this reporting relationship""" - childId: UUID! - createdAt: Datetime +"""A connection to a list of `OrgGetManagersRecord` values.""" +type OrgGetManagersConnection { + """ + A list of edges which contains the `OrgGetManagersRecord` and cursor to aid in pagination. + """ + edges: [OrgGetManagersEdge]! - """Organization this hierarchy edge belongs to""" - entityId: UUID! - id: UUID! + """A list of `OrgGetManagersRecord` objects.""" + nodes: [OrgGetManagersRecord]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - User ID of the manager; NULL indicates a top-level position with no direct report + The count of *all* `OrgGetManagersRecord` you could get from the connection. """ - parentId: UUID + totalCount: Int! +} - """Numeric seniority level for this position (higher = more senior)""" - positionLevel: Int +"""A `OrgGetManagersRecord` edge in the connection.""" +type OrgGetManagersEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Job title or role name for this position in the org chart""" - positionTitle: String - updatedAt: Datetime + """The `OrgGetManagersRecord` at the end of the edge.""" + node: OrgGetManagersRecord } -"""A connection to a list of `OrgChartEdge` values.""" -type OrgChartEdgeConnection { +type OrgGetManagersRecord { + depth: Int + userId: UUID +} + +"""A connection to a list of `OrgGetSubordinatesRecord` values.""" +type OrgGetSubordinatesConnection { """ - A list of edges which contains the `OrgChartEdge` and cursor to aid in pagination. + A list of edges which contains the `OrgGetSubordinatesRecord` and cursor to aid in pagination. """ - edges: [OrgChartEdgeEdge]! + edges: [OrgGetSubordinatesEdge]! - """A list of `OrgChartEdge` objects.""" - nodes: [OrgChartEdge]! + """A list of `OrgGetSubordinatesRecord` objects.""" + nodes: [OrgGetSubordinatesRecord]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgChartEdge` you could get from the connection.""" + """ + The count of *all* `OrgGetSubordinatesRecord` you could get from the connection. + """ totalCount: Int! } -"""A `OrgChartEdge` edge in the connection.""" -type OrgChartEdgeEdge { +"""A `OrgGetSubordinatesRecord` edge in the connection.""" +type OrgGetSubordinatesEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgChartEdge` at the end of the edge.""" - node: OrgChartEdge + """The `OrgGetSubordinatesRecord` at the end of the edge.""" + node: OrgGetSubordinatesRecord } -""" -A filter to be used against `OrgChartEdge` object types. All fields are combined with a logical ‘and.’ -""" -input OrgChartEdgeFilter { - """Checks for all expressions in this list.""" - and: [OrgChartEdgeFilter!] - - """Filter by the object’s `childId` field.""" - childId: UUIDFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Negates the expression.""" - not: OrgChartEdgeFilter - - """Checks for any expressions in this list.""" - or: [OrgChartEdgeFilter!] - - """Filter by the object’s `parentId` field.""" - parentId: UUIDFilter - - """Filter by the object’s `positionLevel` field.""" - positionLevel: IntFilter - - """Filter by the object’s `positionTitle` field.""" - positionTitle: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter +type OrgGetSubordinatesRecord { + depth: Int + userId: UUID } """ -Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table +Records of individual capability grants and revocations for members via bitmask """ -type OrgChartEdgeGrant { - """User ID of the subordinate being placed in the hierarchy""" - childId: UUID! +type OrgGrant { + """ + The member receiving or losing the capability grant; NULL if user was deleted + """ + actorId: UUID - """Timestamp when this grant or revocation was recorded""" - createdAt: Datetime! + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString! + createdAt: Datetime - """Organization this grant applies to""" + """The entity (org or group) this capability grant applies to""" entityId: UUID! - - """ - User ID of the admin who performed this grant or revocation; NULL if grantor was deleted - """ grantorId: UUID id: UUID! - """TRUE to add/update the edge, FALSE to remove it""" + """True to grant the capabilities, false to revoke them""" isGrant: Boolean! - - """User ID of the manager being assigned; NULL for top-level positions""" - parentId: UUID - - """Numeric seniority level being assigned in this grant""" - positionLevel: Int - - """Job title or role name being assigned in this grant""" - positionTitle: String + updatedAt: Datetime } -"""A connection to a list of `OrgChartEdgeGrant` values.""" -type OrgChartEdgeGrantConnection { +"""A connection to a list of `OrgGrant` values.""" +type OrgGrantConnection { """ - A list of edges which contains the `OrgChartEdgeGrant` and cursor to aid in pagination. + A list of edges which contains the `OrgGrant` and cursor to aid in pagination. """ - edges: [OrgChartEdgeGrantEdge]! + edges: [OrgGrantEdge]! - """A list of `OrgChartEdgeGrant` objects.""" - nodes: [OrgChartEdgeGrant]! + """A list of `OrgGrant` objects.""" + nodes: [OrgGrant]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `OrgChartEdgeGrant` you could get from the connection. - """ + """The count of *all* `OrgGrant` you could get from the connection.""" totalCount: Int! } -"""A `OrgChartEdgeGrant` edge in the connection.""" -type OrgChartEdgeGrantEdge { +"""A `OrgGrant` edge in the connection.""" +type OrgGrantEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgChartEdgeGrant` at the end of the edge.""" - node: OrgChartEdgeGrant + """The `OrgGrant` at the end of the edge.""" + node: OrgGrant } """ -A filter to be used against `OrgChartEdgeGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgGrant` object types. All fields are combined with a logical ‘and.’ """ -input OrgChartEdgeGrantFilter { +input OrgGrantFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + """Checks for all expressions in this list.""" - and: [OrgChartEdgeGrantFilter!] + and: [OrgGrantFilter!] - """Filter by the object’s `childId` field.""" - childId: UUIDFilter + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -5520,55 +9301,42 @@ input OrgChartEdgeGrantFilter { isGrant: BooleanFilter """Negates the expression.""" - not: OrgChartEdgeGrantFilter + not: OrgGrantFilter """Checks for any expressions in this list.""" - or: [OrgChartEdgeGrantFilter!] - - """Filter by the object’s `parentId` field.""" - parentId: UUIDFilter - - """Filter by the object’s `positionLevel` field.""" - positionLevel: IntFilter + or: [OrgGrantFilter!] - """Filter by the object’s `positionTitle` field.""" - positionTitle: StringFilter + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgChartEdgeGrant`""" -input OrgChartEdgeGrantInput { - """User ID of the subordinate being placed in the hierarchy""" - childId: UUID! +"""An input for mutations affecting `OrgGrant`""" +input OrgGrantInput { + """ + The member receiving or losing the capability grant; NULL if user was deleted + """ + actorId: UUID - """Timestamp when this grant or revocation was recorded""" + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString createdAt: Datetime - """Organization this grant applies to""" + """The entity (org or group) this capability grant applies to""" entityId: UUID! - - """ - User ID of the admin who performed this grant or revocation; NULL if grantor was deleted - """ grantorId: UUID id: UUID - """TRUE to add/update the edge, FALSE to remove it""" + """True to grant the capabilities, false to revoke them""" isGrant: Boolean - - """User ID of the manager being assigned; NULL for top-level positions""" - parentId: UUID - - """Numeric seniority level being assigned in this grant""" - positionLevel: Int - - """Job title or role name being assigned in this grant""" - positionTitle: String + updatedAt: Datetime } -"""Methods to use when ordering `OrgChartEdgeGrant`.""" -enum OrgChartEdgeGrantOrderBy { - CHILD_ID_ASC - CHILD_ID_DESC +"""Methods to use when ordering `OrgGrant`.""" +enum OrgGrantOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CAPABILITIES_ASC + CAPABILITIES_DESC CREATED_AT_ASC CREATED_AT_DESC ENTITY_ID_ASC @@ -5580,88 +9348,6 @@ enum OrgChartEdgeGrantOrderBy { IS_GRANT_ASC IS_GRANT_DESC NATURAL - PARENT_ID_ASC - PARENT_ID_DESC - POSITION_LEVEL_ASC - POSITION_LEVEL_DESC - POSITION_TITLE_ASC - POSITION_TITLE_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC -} - -""" -Represents an update to a `OrgChartEdgeGrant`. Fields that are set will be updated. -""" -input OrgChartEdgeGrantPatch { - """User ID of the subordinate being placed in the hierarchy""" - childId: UUID - - """Timestamp when this grant or revocation was recorded""" - createdAt: Datetime - - """Organization this grant applies to""" - entityId: UUID - - """ - User ID of the admin who performed this grant or revocation; NULL if grantor was deleted - """ - grantorId: UUID - id: UUID - - """TRUE to add/update the edge, FALSE to remove it""" - isGrant: Boolean - - """User ID of the manager being assigned; NULL for top-level positions""" - parentId: UUID - - """Numeric seniority level being assigned in this grant""" - positionLevel: Int - - """Job title or role name being assigned in this grant""" - positionTitle: String -} - -"""An input for mutations affecting `OrgChartEdge`""" -input OrgChartEdgeInput { - """User ID of the subordinate (employee) in this reporting relationship""" - childId: UUID! - createdAt: Datetime - - """Organization this hierarchy edge belongs to""" - entityId: UUID! - id: UUID - - """ - User ID of the manager; NULL indicates a top-level position with no direct report - """ - parentId: UUID - - """Numeric seniority level for this position (higher = more senior)""" - positionLevel: Int - - """Job title or role name for this position in the org chart""" - positionTitle: String - updatedAt: Datetime -} - -"""Methods to use when ordering `OrgChartEdge`.""" -enum OrgChartEdgeOrderBy { - CHILD_ID_ASC - CHILD_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - ID_ASC - ID_DESC - NATURAL - PARENT_ID_ASC - PARENT_ID_DESC - POSITION_LEVEL_ASC - POSITION_LEVEL_DESC - POSITION_TITLE_ASC - POSITION_TITLE_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC UPDATED_AT_ASC @@ -5669,98 +9355,174 @@ enum OrgChartEdgeOrderBy { } """ -Represents an update to a `OrgChartEdge`. Fields that are set will be updated. +Represents an update to a `OrgGrant`. Fields that are set will be updated. """ -input OrgChartEdgePatch { - """User ID of the subordinate (employee) in this reporting relationship""" - childId: UUID +input OrgGrantPatch { + """ + The member receiving or losing the capability grant; NULL if user was deleted + """ + actorId: UUID + + """Bitmask of capabilities being granted or revoked""" + capabilities: BitString createdAt: Datetime - """Organization this hierarchy edge belongs to""" + """The entity (org or group) this capability grant applies to""" entityId: UUID + grantorId: UUID id: UUID - """ - User ID of the manager; NULL indicates a top-level position with no direct report - """ - parentId: UUID - - """Numeric seniority level for this position (higher = more senior)""" - positionLevel: Int - - """Job title or role name for this position in the org chart""" - positionTitle: String + """True to grant the capabilities, false to revoke them""" + isGrant: Boolean updatedAt: Datetime } """ -Records of successfully claimed invitations, linking senders to receivers +Invitation records sent to prospective members via email, with token-based redemption and expiration """ -type OrgClaimedInvite { +type OrgInvite { + """Delivery channel for this invitation: email, sms, or link""" + channel: String! createdAt: Datetime - """Optional JSON payload captured at the time the invite was claimed""" + """Optional JSON payload of additional invite metadata""" data: JSON + + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail entityId: UUID! + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime! id: UUID! - """User ID of the person who claimed and redeemed the invitation""" + """Running count of how many times this invite has been claimed""" + inviteCount: Int! + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int! + + """Unique random hex token used to redeem this invitation""" + inviteToken: String! + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean! + + """ + Whether the resulting membership should be read-only when this invite is claimed + """ + isReadOnly: Boolean! + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean! + + """ + Phone number of the invited recipient in E.164 format (required when channel=sms) + """ + phone: String + + """Reads a single `OrgProfile` that is related to this `OrgInvite`.""" + profile: OrgProfile + + """ + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + """ + profileId: UUID + + """User ID of the intended recipient, if targeting a specific user""" receiverId: UUID - """User ID of the original invitation sender""" - senderId: UUID + """User ID of the member who sent this invitation""" + senderId: UUID! updatedAt: Datetime } -"""A connection to a list of `OrgClaimedInvite` values.""" -type OrgClaimedInviteConnection { +"""A connection to a list of `OrgInvite` values.""" +type OrgInviteConnection { """ - A list of edges which contains the `OrgClaimedInvite` and cursor to aid in pagination. + A list of edges which contains the `OrgInvite` and cursor to aid in pagination. """ - edges: [OrgClaimedInviteEdge]! + edges: [OrgInviteEdge]! - """A list of `OrgClaimedInvite` objects.""" - nodes: [OrgClaimedInvite]! + """A list of `OrgInvite` objects.""" + nodes: [OrgInvite]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `OrgClaimedInvite` you could get from the connection. - """ + """The count of *all* `OrgInvite` you could get from the connection.""" totalCount: Int! } -"""A `OrgClaimedInvite` edge in the connection.""" -type OrgClaimedInviteEdge { +"""A `OrgInvite` edge in the connection.""" +type OrgInviteEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgClaimedInvite` at the end of the edge.""" - node: OrgClaimedInvite + """The `OrgInvite` at the end of the edge.""" + node: OrgInvite } """ -A filter to be used against `OrgClaimedInvite` 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 OrgClaimedInviteFilter { +input OrgInviteFilter { """Checks for all expressions in this list.""" - and: [OrgClaimedInviteFilter!] + and: [OrgInviteFilter!] + + """Filter by the object’s `channel` field.""" + channel: StringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter + """Filter by the object’s `email` field.""" + email: ConstructiveInternalTypeEmailFilter + """Filter by the object’s `entityId` field.""" entityId: UUIDFilter + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter + """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `inviteCount` field.""" + inviteCount: IntFilter + + """Filter by the object’s `inviteLimit` field.""" + inviteLimit: IntFilter + + """Filter by the object’s `inviteToken` field.""" + inviteToken: StringFilter + + """Filter by the object’s `inviteValid` field.""" + inviteValid: BooleanFilter + + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter + + """Filter by the object’s `multiple` field.""" + multiple: BooleanFilter + """Negates the expression.""" - not: OrgClaimedInviteFilter + not: OrgInviteFilter """Checks for any expressions in this list.""" - or: [OrgClaimedInviteFilter!] + or: [OrgInviteFilter!] + + """Filter by the object’s `phone` field.""" + phone: StringFilter + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `receiverId` field.""" receiverId: UUIDFilter @@ -5772,36 +9534,96 @@ input OrgClaimedInviteFilter { updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgClaimedInvite`""" -input OrgClaimedInviteInput { +"""An input for mutations affecting `OrgInvite`""" +input OrgInviteInput { + """Delivery channel for this invitation: email, sms, or link""" + channel: String createdAt: Datetime - """Optional JSON payload captured at the time the invite was claimed""" + """Optional JSON payload of additional invite metadata""" data: JSON + + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail entityId: UUID! + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime id: UUID - """User ID of the person who claimed and redeemed the invitation""" + """Running count of how many times this invite has been claimed""" + inviteCount: Int + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int + + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean + + """ + Whether the resulting membership should be read-only when this invite is claimed + """ + isReadOnly: Boolean + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean + + """ + Phone number of the invited recipient in E.164 format (required when channel=sms) + """ + phone: String + + """ + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + """ + profileId: UUID + + """User ID of the intended recipient, if targeting a specific user""" receiverId: UUID - """User ID of the original invitation sender""" + """User ID of the member who sent this invitation""" senderId: UUID updatedAt: Datetime } -"""Methods to use when ordering `OrgClaimedInvite`.""" -enum OrgClaimedInviteOrderBy { +"""Methods to use when ordering `OrgInvite`.""" +enum OrgInviteOrderBy { + CHANNEL_ASC + CHANNEL_DESC CREATED_AT_ASC CREATED_AT_DESC DATA_ASC DATA_DESC + EMAIL_ASC + EMAIL_DESC ENTITY_ID_ASC ENTITY_ID_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC ID_ASC ID_DESC + INVITE_COUNT_ASC + INVITE_COUNT_DESC + INVITE_LIMIT_ASC + INVITE_LIMIT_DESC + INVITE_TOKEN_ASC + INVITE_TOKEN_DESC + INVITE_VALID_ASC + INVITE_VALID_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC + MULTIPLE_ASC + MULTIPLE_DESC NATURAL + PHONE_ASC + PHONE_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC RECEIVER_ID_ASC RECEIVER_ID_DESC SENDER_ID_ASC @@ -5811,597 +9633,582 @@ enum OrgClaimedInviteOrderBy { } """ -Represents an update to a `OrgClaimedInvite`. Fields that are set will be updated. +Represents an update to a `OrgInvite`. Fields that are set will be updated. """ -input OrgClaimedInvitePatch { +input OrgInvitePatch { + """Delivery channel for this invitation: email, sms, or link""" + channel: String createdAt: Datetime - """Optional JSON payload captured at the time the invite was claimed""" + """Optional JSON payload of additional invite metadata""" data: JSON - entityId: UUID - id: UUID - - """User ID of the person who claimed and redeemed the invitation""" - receiverId: UUID - - """User ID of the original invitation sender""" - senderId: UUID - updatedAt: Datetime -} - -"""A connection to a list of `OrgGetManagersRecord` values.""" -type OrgGetManagersConnection { - """ - A list of edges which contains the `OrgGetManagersRecord` and cursor to aid in pagination. - """ - edges: [OrgGetManagersEdge]! - """A list of `OrgGetManagersRecord` objects.""" - nodes: [OrgGetManagersRecord]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Email address of the invited recipient (required when channel=email)""" + email: ConstructiveInternalTypeEmail + entityId: UUID - """ - The count of *all* `OrgGetManagersRecord` you could get from the connection. - """ - totalCount: Int! -} + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime + id: UUID -"""A `OrgGetManagersRecord` edge in the connection.""" -type OrgGetManagersEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Running count of how many times this invite has been claimed""" + inviteCount: Int - """The `OrgGetManagersRecord` at the end of the edge.""" - node: OrgGetManagersRecord -} + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int -type OrgGetManagersRecord { - depth: Int - userId: UUID -} + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean -"""A connection to a list of `OrgGetSubordinatesRecord` values.""" -type OrgGetSubordinatesConnection { """ - A list of edges which contains the `OrgGetSubordinatesRecord` and cursor to aid in pagination. + Whether the resulting membership should be read-only when this invite is claimed """ - edges: [OrgGetSubordinatesEdge]! - - """A list of `OrgGetSubordinatesRecord` objects.""" - nodes: [OrgGetSubordinatesRecord]! + isReadOnly: Boolean - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean """ - The count of *all* `OrgGetSubordinatesRecord` you could get from the connection. + Phone number of the invited recipient in E.164 format (required when channel=sms) """ - totalCount: Int! -} + phone: String -"""A `OrgGetSubordinatesRecord` edge in the connection.""" -type OrgGetSubordinatesEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """ + Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + """ + profileId: UUID - """The `OrgGetSubordinatesRecord` at the end of the edge.""" - node: OrgGetSubordinatesRecord -} + """User ID of the intended recipient, if targeting a specific user""" + receiverId: UUID -type OrgGetSubordinatesRecord { - depth: Int - userId: UUID + """User ID of the member who sent this invitation""" + senderId: UUID + updatedAt: Datetime } """ -Records of individual permission grants and revocations for members via bitmask +Simplified view of active members in an entity, used for listing who belongs to an org or group """ -type OrgGrant { - """ - The member receiving or losing the permission grant; NULL if user was deleted - """ - actorId: UUID - createdAt: Datetime +type OrgMember { + """References the user who is a member""" + actorId: UUID! - """The entity (org or group) this permission grant applies to""" + """References the entity (org or group) this member belongs to""" entityId: UUID! - grantorId: UUID id: UUID! - """True to grant the permissions, false to revoke them""" - isGrant: Boolean! - - """Bitmask of permissions being granted or revoked""" - permissions: BitString! - updatedAt: Datetime + """Whether this member has admin privileges""" + isAdmin: Boolean! } -"""A connection to a list of `OrgGrant` values.""" -type OrgGrantConnection { +"""A connection to a list of `OrgMember` values.""" +type OrgMemberConnection { """ - A list of edges which contains the `OrgGrant` and cursor to aid in pagination. + A list of edges which contains the `OrgMember` and cursor to aid in pagination. """ - edges: [OrgGrantEdge]! + edges: [OrgMemberEdge]! - """A list of `OrgGrant` objects.""" - nodes: [OrgGrant]! + """A list of `OrgMember` objects.""" + nodes: [OrgMember]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgGrant` you could get from the connection.""" + """The count of *all* `OrgMember` you could get from the connection.""" totalCount: Int! } -"""A `OrgGrant` edge in the connection.""" -type OrgGrantEdge { +"""A `OrgMember` edge in the connection.""" +type OrgMemberEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgGrant` at the end of the edge.""" - node: OrgGrant + """The `OrgMember` at the end of the edge.""" + node: OrgMember } """ -A filter to be used against `OrgGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ """ -input OrgGrantFilter { +input OrgMemberFilter { """Filter by the object’s `actorId` field.""" actorId: UUIDFilter """Checks for all expressions in this list.""" - and: [OrgGrantFilter!] - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + and: [OrgMemberFilter!] """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `grantorId` field.""" - grantorId: UUIDFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isGrant` field.""" - isGrant: BooleanFilter + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter """Negates the expression.""" - not: OrgGrantFilter + not: OrgMemberFilter """Checks for any expressions in this list.""" - or: [OrgGrantFilter!] - - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter + or: [OrgMemberFilter!] } -"""An input for mutations affecting `OrgGrant`""" -input OrgGrantInput { - """ - The member receiving or losing the permission grant; NULL if user was deleted - """ - actorId: UUID - createdAt: Datetime +"""An input for mutations affecting `OrgMember`""" +input OrgMemberInput { + """References the user who is a member""" + actorId: UUID! - """The entity (org or group) this permission grant applies to""" + """References the entity (org or group) this member belongs to""" entityId: UUID! - grantorId: UUID id: UUID - """True to grant the permissions, false to revoke them""" - isGrant: Boolean - - """Bitmask of permissions being granted or revoked""" - permissions: BitString - updatedAt: Datetime + """Whether this member has admin privileges""" + isAdmin: Boolean } -"""Methods to use when ordering `OrgGrant`.""" -enum OrgGrantOrderBy { +"""Methods to use when ordering `OrgMember`.""" +enum OrgMemberOrderBy { ACTOR_ID_ASC ACTOR_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC ENTITY_ID_ASC ENTITY_ID_DESC - GRANTOR_ID_ASC - GRANTOR_ID_DESC ID_ASC ID_DESC - IS_GRANT_ASC - IS_GRANT_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC } """ -Represents an update to a `OrgGrant`. Fields that are set will be updated. +Represents an update to a `OrgMember`. Fields that are set will be updated. """ -input OrgGrantPatch { - """ - The member receiving or losing the permission grant; NULL if user was deleted - """ +input OrgMemberPatch { + """References the user who is a member""" actorId: UUID - createdAt: Datetime - """The entity (org or group) this permission grant applies to""" + """References the entity (org or group) this member belongs to""" entityId: UUID - grantorId: UUID id: UUID - """True to grant the permissions, false to revoke them""" - isGrant: Boolean - - """Bitmask of permissions being granted or revoked""" - permissions: BitString - updatedAt: Datetime + """Whether this member has admin privileges""" + isAdmin: Boolean } """ -Invitation records sent to prospective members via email, with token-based redemption and expiration +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) """ -type OrgInvite { - """Delivery channel for this invitation: email, sms, or link""" - channel: String! - createdAt: Datetime - - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail - entityId: UUID! - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime! - id: UUID! - - """Running count of how many times this invite has been claimed""" - inviteCount: Int! - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int! +type OrgMemberProfile { + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! - """Unique random hex token used to redeem this invitation""" - inviteToken: String! + """Short biography visible to other entity members""" + bio: String + createdAt: Datetime - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean! + """Display name shown to other entity members""" + displayName: String """ - Whether the resulting membership should be read-only when this invite is claimed + Email address visible to other entity members (auto-populated from verified primary email) """ - isReadOnly: Boolean! + email: String - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean! + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! + id: UUID! """ - Phone number of the invited recipient in E.164 format (required when channel=sms) + Reads a single `OrgMembership` that is related to this `OrgMemberProfile`. """ - phone: String + membership: OrgMembership - """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. - """ - profileId: UUID + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage - """User ID of the member who sent this invitation""" - senderId: UUID! + """Job title or role description visible to other entity members""" + title: String updatedAt: Datetime } -"""A connection to a list of `OrgInvite` values.""" -type OrgInviteConnection { +"""A connection to a list of `OrgMemberProfile` values.""" +type OrgMemberProfileConnection { """ - A list of edges which contains the `OrgInvite` and cursor to aid in pagination. + A list of edges which contains the `OrgMemberProfile` and cursor to aid in pagination. """ - edges: [OrgInviteEdge]! + edges: [OrgMemberProfileEdge]! - """A list of `OrgInvite` objects.""" - nodes: [OrgInvite]! + """A list of `OrgMemberProfile` objects.""" + nodes: [OrgMemberProfile]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgInvite` you could get from the connection.""" + """ + The count of *all* `OrgMemberProfile` you could get from the connection. + """ totalCount: Int! } -"""A `OrgInvite` edge in the connection.""" -type OrgInviteEdge { +"""A `OrgMemberProfile` edge in the connection.""" +type OrgMemberProfileEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgInvite` at the end of the edge.""" - node: OrgInvite + """The `OrgMemberProfile` at the end of the edge.""" + node: OrgMemberProfile } """ -A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ """ -input OrgInviteFilter { +input OrgMemberProfileFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + """Checks for all expressions in this list.""" - and: [OrgInviteFilter!] + and: [OrgMemberProfileFilter!] - """Filter by the object’s `channel` field.""" - channel: StringFilter + """Filter by the object’s `bio` field.""" + bio: StringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter + """Filter by the object’s `displayName` field.""" + displayName: StringFilter + """Filter by the object’s `email` field.""" - email: ConstructiveInternalTypeEmailFilter + email: StringFilter """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `expiresAt` field.""" - expiresAt: DatetimeFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `inviteCount` field.""" - inviteCount: IntFilter - - """Filter by the object’s `inviteLimit` field.""" - inviteLimit: IntFilter - - """Filter by the object’s `inviteToken` field.""" - inviteToken: StringFilter - - """Filter by the object’s `inviteValid` field.""" - inviteValid: BooleanFilter - - """Filter by the object’s `isReadOnly` field.""" - isReadOnly: BooleanFilter + """Filter by the object’s `membership` relation.""" + membership: OrgMembershipFilter - """Filter by the object’s `multiple` field.""" - multiple: BooleanFilter + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter """Negates the expression.""" - not: OrgInviteFilter + not: OrgMemberProfileFilter """Checks for any expressions in this list.""" - or: [OrgInviteFilter!] - - """Filter by the object’s `phone` field.""" - phone: StringFilter - - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter + or: [OrgMemberProfileFilter!] - """Filter by the object’s `receiverId` field.""" - receiverId: UUIDFilter + """Filter by the object’s `profilePicture` field.""" + profilePicture: ConstructiveInternalTypeImageFilter - """Filter by the object’s `senderId` field.""" - senderId: UUIDFilter + """Filter by the object’s `title` field.""" + title: StringFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgInvite`""" -input OrgInviteInput { - """Delivery channel for this invitation: email, sms, or link""" - channel: String - createdAt: Datetime - - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail - entityId: UUID! - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime - id: UUID - - """Running count of how many times this invite has been claimed""" - inviteCount: Int - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int +"""An input for mutations affecting `OrgMemberProfile`""" +input OrgMemberProfileInput { + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! - """Unique random hex token used to redeem this invitation""" - inviteToken: String + """Short biography visible to other entity members""" + bio: String + createdAt: Datetime - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean + """Display name shown to other entity members""" + displayName: String """ - Whether the resulting membership should be read-only when this invite is claimed + Email address visible to other entity members (auto-populated from verified primary email) """ - isReadOnly: Boolean - - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean + email: String - """ - Phone number of the invited recipient in E.164 format (required when channel=sms) - """ - phone: String + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! + id: UUID - """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. - """ - profileId: UUID + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage - """User ID of the member who sent this invitation""" - senderId: UUID + """Job title or role description visible to other entity members""" + title: String updatedAt: Datetime } -"""Methods to use when ordering `OrgInvite`.""" -enum OrgInviteOrderBy { - CHANNEL_ASC - CHANNEL_DESC +"""Methods to use when ordering `OrgMemberProfile`.""" +enum OrgMemberProfileOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + BIO_ASC + BIO_DESC CREATED_AT_ASC CREATED_AT_DESC - DATA_ASC - DATA_DESC + DISPLAY_NAME_ASC + DISPLAY_NAME_DESC EMAIL_ASC EMAIL_DESC ENTITY_ID_ASC ENTITY_ID_DESC - EXPIRES_AT_ASC - EXPIRES_AT_DESC ID_ASC ID_DESC - INVITE_COUNT_ASC - INVITE_COUNT_DESC - INVITE_LIMIT_ASC - INVITE_LIMIT_DESC - INVITE_TOKEN_ASC - INVITE_TOKEN_DESC - INVITE_VALID_ASC - INVITE_VALID_DESC - IS_READ_ONLY_ASC - IS_READ_ONLY_DESC - MULTIPLE_ASC - MULTIPLE_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC NATURAL - PHONE_ASC - PHONE_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC - RECEIVER_ID_ASC - RECEIVER_ID_DESC - SENDER_ID_ASC - SENDER_ID_DESC + PROFILE_PICTURE_ASC + PROFILE_PICTURE_DESC + TITLE_ASC + TITLE_DESC UPDATED_AT_ASC UPDATED_AT_DESC } -""" -Represents an update to a `OrgInvite`. Fields that are set will be updated. -""" -input OrgInvitePatch { - """Delivery channel for this invitation: email, sms, or link""" - channel: String - createdAt: Datetime +""" +Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. +""" +input OrgMemberProfilePatch { + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID + + """Short biography visible to other entity members""" + bio: String + createdAt: Datetime + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID + id: UUID + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage + + """Upload for Profile picture visible to other entity members""" + profilePictureUpload: Upload + + """Job title or role description visible to other entity members""" + title: String + updatedAt: Datetime +} + +""" +Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status +""" +type OrgMembership { + """References the user who holds this membership""" + actorId: UUID! + + """ + Aggregated capability bitmask combining profile-based and directly granted capabilities + """ + capabilities: BitString! + createdAt: Datetime + createdBy: UUID + + """References the entity (org or group) this membership belongs to""" + entityId: UUID! + + """ + Bitmask of capabilities directly granted to this member (not from profiles) + """ + granted: BitString! + id: UUID! + + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean! + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean! + + """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 is external (not a member of the parent scope). External members may have restricted capabilities. + """ + isExternal: Boolean! + + """Whether the actor is the owner of this entity""" + isOwner: Boolean! + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean! + + """ + Reads a single `OrgMemberProfile` that is related to this `OrgMembership`. + """ + orgMemberProfileByMembershipId: OrgMemberProfile + + """Reads and enables pagination through a set of `OrgMembershipProfile`.""" + orgMembershipProfilesByMembershipId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int - """Optional JSON payload of additional invite metadata""" - data: JSON + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Email address of the invited recipient (required when channel=email)""" - email: ConstructiveInternalTypeEmail - entityId: UUID + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime - id: UUID + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMembershipProfileFilter + ): OrgMembershipProfileConnection! - """Running count of how many times this invite has been claimed""" - inviteCount: Int + """Reads and enables pagination through a set of `OrgProfileGrant`.""" + orgProfileGrantsByMembershipId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Unique random hex token used to redeem this invitation""" - inviteToken: String + """Only read the first `n` values of the set.""" + first: Int - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean + """Only read the last `n` values of the set.""" + last: Int - """ - Whether the resulting membership should be read-only when this invite is claimed - """ - isReadOnly: Boolean + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] - """ - Phone number of the invited recipient in E.164 format (required when channel=sms) - """ - phone: String + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileGrantFilter + ): OrgProfileGrantConnection! + + """Reads a single `OrgProfile` that is related to this `OrgMembership`.""" + profile: OrgProfile + profileId: UUID + updatedAt: Datetime + updatedBy: UUID +} +"""A connection to a list of `OrgMembership` values.""" +type OrgMembershipConnection { """ - Optional profile (role) to assign to the member when they claim this invite. Only allowed on email invites. + A list of edges which contains the `OrgMembership` and cursor to aid in pagination. """ - profileId: UUID + edges: [OrgMembershipEdge]! - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID + """A list of `OrgMembership` objects.""" + nodes: [OrgMembership]! - """User ID of the member who sent this invitation""" - senderId: UUID - updatedAt: Datetime + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgMembership` you could get from the connection.""" + totalCount: Int! } """ -Simplified view of active members in an entity, used for listing who belongs to an org or group +Default membership settings per entity, controlling initial approval and verification state for new members """ -type OrgMember { - """References the user who is a member""" - actorId: UUID! +type OrgMembershipDefault { + createdAt: Datetime + createdBy: UUID - """References the entity (org or group) this member belongs to""" + """References the entity these membership defaults apply to""" entityId: UUID! id: UUID! - """Whether this member has admin privileges""" - isAdmin: Boolean! + """Whether new members are automatically approved upon joining""" + isApproved: Boolean! + updatedAt: Datetime + updatedBy: UUID } -"""A connection to a list of `OrgMember` values.""" -type OrgMemberConnection { +"""A connection to a list of `OrgMembershipDefault` values.""" +type OrgMembershipDefaultConnection { """ - A list of edges which contains the `OrgMember` and cursor to aid in pagination. + A list of edges which contains the `OrgMembershipDefault` and cursor to aid in pagination. """ - edges: [OrgMemberEdge]! + edges: [OrgMembershipDefaultEdge]! - """A list of `OrgMember` objects.""" - nodes: [OrgMember]! + """A list of `OrgMembershipDefault` objects.""" + nodes: [OrgMembershipDefault]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgMember` you could get from the connection.""" + """ + The count of *all* `OrgMembershipDefault` you could get from the connection. + """ totalCount: Int! } -"""A `OrgMember` edge in the connection.""" -type OrgMemberEdge { +"""A `OrgMembershipDefault` edge in the connection.""" +type OrgMembershipDefaultEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMember` at the end of the edge.""" - node: OrgMember + """The `OrgMembershipDefault` at the end of the edge.""" + node: OrgMembershipDefault } """ -A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMembershipDefault` object types. All fields are combined with a logical ‘and.’ """ -input OrgMemberFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - +input OrgMembershipDefaultFilter { """Checks for all expressions in this list.""" - and: [OrgMemberFilter!] + and: [OrgMembershipDefaultFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter """Filter by the object’s `entityId` field.""" entityId: UUIDFilter @@ -6409,502 +10216,574 @@ input OrgMemberFilter { """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isAdmin` field.""" - isAdmin: BooleanFilter + """Filter by the object’s `isApproved` field.""" + isApproved: BooleanFilter """Negates the expression.""" - not: OrgMemberFilter + not: OrgMembershipDefaultFilter """Checks for any expressions in this list.""" - or: [OrgMemberFilter!] + or: [OrgMembershipDefaultFilter!] + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter } -"""An input for mutations affecting `OrgMember`""" -input OrgMemberInput { - """References the user who is a member""" - actorId: UUID! +"""An input for mutations affecting `OrgMembershipDefault`""" +input OrgMembershipDefaultInput { + createdAt: Datetime + createdBy: UUID - """References the entity (org or group) this member belongs to""" + """References the entity these membership defaults apply to""" entityId: UUID! id: UUID - """Whether this member has admin privileges""" - isAdmin: Boolean + """Whether new members are automatically approved upon joining""" + isApproved: Boolean + updatedAt: Datetime + updatedBy: UUID } -"""Methods to use when ordering `OrgMember`.""" -enum OrgMemberOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC +"""Methods to use when ordering `OrgMembershipDefault`.""" +enum OrgMembershipDefaultOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC ENTITY_ID_ASC ENTITY_ID_DESC ID_ASC ID_DESC - IS_ADMIN_ASC - IS_ADMIN_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC } """ -Represents an update to a `OrgMember`. Fields that are set will be updated. -""" -input OrgMemberPatch { - """References the user who is a member""" - actorId: UUID - - """References the entity (org or group) this member belongs to""" - entityId: UUID - id: UUID - - """Whether this member has admin privileges""" - isAdmin: Boolean -} - -""" -Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) +Represents an update to a `OrgMembershipDefault`. Fields that are set will be updated. """ -type OrgMemberProfile { - """References the user who owns this profile (for self-edit RLS)""" - actorId: UUID! - - """Short biography visible to other entity members""" - bio: String +input OrgMembershipDefaultPatch { createdAt: Datetime + createdBy: 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 - - """References the entity this profile belongs to (used for RLS lookups)""" - entityId: UUID! - id: UUID! - - """ - Reads a single `OrgMembership` that is related to this `OrgMemberProfile`. - """ - membership: OrgMembership - - """References the membership this profile belongs to (1:1)""" - membershipId: UUID! - - """Profile picture visible to other entity members""" - profilePicture: ConstructiveInternalTypeImage - - """Job title or role description visible to other entity members""" - title: String - updatedAt: Datetime -} - -"""A connection to a list of `OrgMemberProfile` values.""" -type OrgMemberProfileConnection { - """ - A list of edges which contains the `OrgMemberProfile` and cursor to aid in pagination. - """ - edges: [OrgMemberProfileEdge]! - - """A list of `OrgMemberProfile` objects.""" - nodes: [OrgMemberProfile]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `OrgMemberProfile` you could get from the connection. - """ - totalCount: Int! + """References the entity these membership defaults apply to""" + entityId: UUID + id: UUID + + """Whether new members are automatically approved upon joining""" + isApproved: Boolean + updatedAt: Datetime + updatedBy: UUID } -"""A `OrgMemberProfile` edge in the connection.""" -type OrgMemberProfileEdge { +"""A `OrgMembership` edge in the connection.""" +type OrgMembershipEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMemberProfile` at the end of the edge.""" - node: OrgMemberProfile + """The `OrgMembership` at the end of the edge.""" + node: OrgMembership } """ -A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ """ -input OrgMemberProfileFilter { +input OrgMembershipFilter { """Filter by the object’s `actorId` field.""" actorId: UUIDFilter """Checks for all expressions in this list.""" - and: [OrgMemberProfileFilter!] + and: [OrgMembershipFilter!] - """Filter by the object’s `bio` field.""" - bio: StringFilter + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `displayName` field.""" - displayName: StringFilter - - """Filter by the object’s `email` field.""" - email: StringFilter + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter """Filter by the object’s `entityId` field.""" entityId: UUIDFilter + """Filter by the object’s `granted` field.""" + granted: BitStringFilter + """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `membership` relation.""" - membership: OrgMembershipFilter + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter - """Filter by the object’s `membershipId` field.""" - membershipId: UUIDFilter + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter + + """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 `isExternal` field.""" + isExternal: BooleanFilter + + """Filter by the object’s `isOwner` field.""" + isOwner: BooleanFilter + + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter """Negates the expression.""" - not: OrgMemberProfileFilter + not: OrgMembershipFilter """Checks for any expressions in this list.""" - or: [OrgMemberProfileFilter!] + or: [OrgMembershipFilter!] - """Filter by the object’s `profilePicture` field.""" - profilePicture: ConstructiveInternalTypeImageFilter + """Filter by the object’s `orgMemberProfileByMembershipId` relation.""" + orgMemberProfileByMembershipId: OrgMemberProfileFilter - """Filter by the object’s `title` field.""" - title: StringFilter + """A related `orgMemberProfileByMembershipId` exists.""" + orgMemberProfileByMembershipIdExists: Boolean + + """Filter by the object’s `orgMembershipProfilesByMembershipId` relation.""" + orgMembershipProfilesByMembershipId: OrgMembershipToManyOrgMembershipProfileFilter + + """`orgMembershipProfilesByMembershipId` exist.""" + orgMembershipProfilesByMembershipIdExist: Boolean + + """Filter by the object’s `orgProfileGrantsByMembershipId` relation.""" + orgProfileGrantsByMembershipId: OrgMembershipToManyOrgProfileGrantFilter + + """`orgProfileGrantsByMembershipId` exist.""" + orgProfileGrantsByMembershipIdExist: Boolean + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter } -"""An input for mutations affecting `OrgMemberProfile`""" -input OrgMemberProfileInput { - """References the user who owns this profile (for self-edit RLS)""" +"""An input for mutations affecting `OrgMembership`""" +input OrgMembershipInput { + """References the user who holds this membership""" actorId: UUID! - """Short biography visible to other entity members""" - bio: String + """ + Aggregated capability bitmask combining profile-based and directly granted capabilities + """ + capabilities: BitString createdAt: Datetime + createdBy: UUID - """Display name shown to other entity members""" - displayName: String + """References the entity (org or group) this membership belongs to""" + entityId: UUID! """ - Email address visible to other entity members (auto-populated from verified primary email) + Bitmask of capabilities directly granted to this member (not from profiles) """ - email: String - - """References the entity this profile belongs to (used for RLS lookups)""" - entityId: UUID! + granted: BitString id: UUID - """References the membership this profile belongs to (1:1)""" - membershipId: UUID! + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean - """Profile picture visible to other entity members""" - profilePicture: ConstructiveInternalTypeImage + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean - """Job title or role description visible to other entity members""" - title: 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 is external (not a member of the parent scope). External members may have restricted capabilities. + """ + isExternal: Boolean + + """Whether the actor is the owner of this entity""" + isOwner: Boolean + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID updatedAt: Datetime + updatedBy: UUID } -"""Methods to use when ordering `OrgMemberProfile`.""" -enum OrgMemberProfileOrderBy { +"""Methods to use when ordering `OrgMembership`.""" +enum OrgMembershipOrderBy { ACTOR_ID_ASC ACTOR_ID_DESC - BIO_ASC - BIO_DESC + CAPABILITIES_ASC + CAPABILITIES_DESC CREATED_AT_ASC CREATED_AT_DESC - DISPLAY_NAME_ASC - DISPLAY_NAME_DESC - EMAIL_ASC - EMAIL_DESC + CREATED_BY_ASC + CREATED_BY_DESC ENTITY_ID_ASC ENTITY_ID_DESC + GRANTED_ASC + GRANTED_DESC ID_ASC ID_DESC - MEMBERSHIP_ID_ASC - MEMBERSHIP_ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC + IS_BANNED_ASC + IS_BANNED_DESC + IS_DISABLED_ASC + IS_DISABLED_DESC + IS_EXTERNAL_ASC + IS_EXTERNAL_DESC + IS_OWNER_ASC + IS_OWNER_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PROFILE_PICTURE_ASC - PROFILE_PICTURE_DESC - TITLE_ASC - TITLE_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC } """ -Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. +Represents an update to a `OrgMembership`. Fields that are set will be updated. """ -input OrgMemberProfilePatch { - """References the user who owns this profile (for self-edit RLS)""" +input OrgMembershipPatch { + """References the user who holds this membership""" actorId: UUID - """Short biography visible to other entity members""" - bio: String - createdAt: Datetime - - """Display name shown to other entity members""" - displayName: String - """ - Email address visible to other entity members (auto-populated from verified primary email) + Aggregated capability bitmask combining profile-based and directly granted capabilities """ - email: String - - """References the entity this profile belongs to (used for RLS lookups)""" - entityId: UUID - id: UUID - - """References the membership this profile belongs to (1:1)""" - membershipId: UUID - - """Profile picture visible to other entity members""" - profilePicture: ConstructiveInternalTypeImage - - """Upload for Profile picture visible to other entity members""" - profilePictureUpload: Upload - - """Job title or role description visible to other entity members""" - title: String - updatedAt: Datetime -} - -""" -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status -""" -type OrgMembership { - """References the user who holds this membership""" - actorId: UUID! + capabilities: BitString createdAt: Datetime createdBy: UUID """References the entity (org or group) this membership belongs to""" - entityId: UUID! + entityId: UUID """ - Bitmask of permissions directly granted to this member (not from profiles) + Bitmask of capabilities directly granted to this member (not from profiles) """ - granted: BitString! - id: UUID! + granted: BitString + id: UUID """ Computed field indicating the membership is approved, verified, not banned, and not disabled """ - isActive: Boolean! + isActive: Boolean """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean! + isAdmin: Boolean """Whether this membership has been approved by an admin""" - isApproved: Boolean! + isApproved: Boolean """Whether this member has been banned from the entity""" - isBanned: Boolean! + isBanned: Boolean """Whether this membership is temporarily disabled""" - isDisabled: 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 this member has read-only access (blocks mutations when true)""" - isReadOnly: Boolean! - - """ - Reads a single `OrgMemberProfile` that is related to this `OrgMembership`. - """ - orgMemberProfileByMembershipId: OrgMemberProfile - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString! - profileId: UUID - updatedAt: Datetime - updatedBy: UUID -} - -"""A connection to a list of `OrgMembership` values.""" -type OrgMembershipConnection { + isDisabled: Boolean + """ - A list of edges which contains the `OrgMembership` and cursor to aid in pagination. + Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. """ - edges: [OrgMembershipEdge]! - - """A list of `OrgMembership` objects.""" - nodes: [OrgMembership]! + isExternal: Boolean - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Whether the actor is the owner of this entity""" + isOwner: Boolean - """The count of *all* `OrgMembership` you could get from the connection.""" - totalCount: Int! + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID + updatedAt: Datetime + updatedBy: UUID } """ -Default membership settings per entity, controlling initial approval and verification state for new members +Every profile a membership holds; memberships.profile_id points at one of them """ -type OrgMembershipDefault { +type OrgMembershipProfile { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID! createdAt: Datetime - createdBy: UUID - - """References the entity these membership defaults apply to""" - entityId: UUID! id: UUID! - """Whether new members are automatically approved upon joining""" - isApproved: Boolean! + """ + Reads a single `OrgMembership` that is related to this `OrgMembershipProfile`. + """ + membership: OrgMembership + + """References the membership holding the profile""" + membershipId: UUID! + + """ + Reads a single `OrgProfile` that is related to this `OrgMembershipProfile`. + """ + profile: OrgProfile + + """References the held profile""" + profileId: UUID! updatedAt: Datetime - updatedBy: UUID } -"""A connection to a list of `OrgMembershipDefault` values.""" -type OrgMembershipDefaultConnection { +"""A connection to a list of `OrgMembershipProfile` values.""" +type OrgMembershipProfileConnection { """ - A list of edges which contains the `OrgMembershipDefault` and cursor to aid in pagination. + A list of edges which contains the `OrgMembershipProfile` and cursor to aid in pagination. """ - edges: [OrgMembershipDefaultEdge]! + edges: [OrgMembershipProfileEdge]! - """A list of `OrgMembershipDefault` objects.""" - nodes: [OrgMembershipDefault]! + """A list of `OrgMembershipProfile` objects.""" + nodes: [OrgMembershipProfile]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `OrgMembershipDefault` you could get from the connection. + The count of *all* `OrgMembershipProfile` you could get from the connection. """ totalCount: Int! } -"""A `OrgMembershipDefault` edge in the connection.""" -type OrgMembershipDefaultEdge { +"""A `OrgMembershipProfile` edge in the connection.""" +type OrgMembershipProfileEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMembershipDefault` at the end of the edge.""" - node: OrgMembershipDefault + """The `OrgMembershipProfile` at the end of the edge.""" + node: OrgMembershipProfile } """ -A filter to be used against `OrgMembershipDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ """ -input OrgMembershipDefaultFilter { +input OrgMembershipProfileFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + """Checks for all expressions in this list.""" - and: [OrgMembershipDefaultFilter!] + and: [OrgMembershipProfileFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isApproved` field.""" - isApproved: BooleanFilter + """Filter by the object’s `membership` relation.""" + membership: OrgMembershipFilter + + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter """Negates the expression.""" - not: OrgMembershipDefaultFilter + not: OrgMembershipProfileFilter """Checks for any expressions in this list.""" - or: [OrgMembershipDefaultFilter!] + or: [OrgMembershipProfileFilter!] + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter } -"""An input for mutations affecting `OrgMembershipDefault`""" -input OrgMembershipDefaultInput { +"""An input for mutations affecting `OrgMembershipProfile`""" +input OrgMembershipProfileInput { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID! createdAt: Datetime - createdBy: UUID - - """References the entity these membership defaults apply to""" - entityId: UUID! id: UUID - """Whether new members are automatically approved upon joining""" - isApproved: Boolean + """References the membership holding the profile""" + membershipId: UUID! + + """References the held profile""" + profileId: UUID! updatedAt: Datetime - updatedBy: UUID } -"""Methods to use when ordering `OrgMembershipDefault`.""" -enum OrgMembershipDefaultOrderBy { +"""Methods to use when ordering `OrgMembershipProfile`.""" +enum OrgMembershipProfileOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC CREATED_AT_ASC CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC ID_ASC ID_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC } """ -Represents an update to a `OrgMembershipDefault`. Fields that are set will be updated. +Represents an update to a `OrgMembershipProfile`. Fields that are set will be updated. """ -input OrgMembershipDefaultPatch { +input OrgMembershipProfilePatch { + """ + References the user holding the profile, denormalised from the membership + """ + actorId: UUID + createdAt: Datetime + id: UUID + + """References the membership holding the profile""" + membershipId: UUID + + """References the held profile""" + profileId: UUID + updatedAt: Datetime +} + +"""Per-entity settings for the memberships module""" +type OrgMembershipSetting { + """ + Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) + """ + allowExternalMembers: Boolean! + + """ + When a child entity is created, whether to auto-add existing org-level admins as child-entity admins + """ + createChildCascadeAdmins: Boolean! + + """ + When a child entity is created, whether to auto-add existing org-level members (non-admin, non-owner) as child-entity members + """ + createChildCascadeMembers: Boolean! + + """ + When a child entity is created, whether to auto-add existing org-level owners as child-entity owners + """ + createChildCascadeOwners: Boolean! createdAt: Datetime createdBy: UUID - """References the entity these membership defaults apply to""" - entityId: UUID - id: UUID + """ + When a member is deleted, whether to cascade-remove their descendant-entity memberships + """ + deleteMemberCascadeChildren: Boolean! - """Whether new members are automatically approved upon joining""" - isApproved: Boolean + """References the entity these settings apply to""" + entityId: UUID! + id: UUID! + + """ + Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) + """ + inviteProfileAssignmentMode: String! + + """ + Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) + """ + limitAllocationMode: String! + + """ + Whether member_profiles.email is snapshot on join and kept synced with the user's primary email. When FALSE, the email field is left blank and never synced from the user's primary email. + """ + populateMemberEmail: Boolean! updatedAt: Datetime updatedBy: UUID } -"""A `OrgMembership` edge in the connection.""" -type OrgMembershipEdge { +"""A connection to a list of `OrgMembershipSetting` values.""" +type OrgMembershipSettingConnection { + """ + A list of edges which contains the `OrgMembershipSetting` and cursor to aid in pagination. + """ + edges: [OrgMembershipSettingEdge]! + + """A list of `OrgMembershipSetting` objects.""" + nodes: [OrgMembershipSetting]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgMembershipSetting` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgMembershipSetting` edge in the connection.""" +type OrgMembershipSettingEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMembership` at the end of the edge.""" - node: OrgMembership + """The `OrgMembershipSetting` at the end of the edge.""" + node: OrgMembershipSetting } """ -A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgMembershipSetting` object types. All fields are combined with a logical ‘and.’ """ -input OrgMembershipFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter +input OrgMembershipSettingFilter { + """Filter by the object’s `allowExternalMembers` field.""" + allowExternalMembers: BooleanFilter """Checks for all expressions in this list.""" - and: [OrgMembershipFilter!] + and: [OrgMembershipSettingFilter!] + + """Filter by the object’s `createChildCascadeAdmins` field.""" + createChildCascadeAdmins: BooleanFilter + + """Filter by the object’s `createChildCascadeMembers` field.""" + createChildCascadeMembers: BooleanFilter + + """Filter by the object’s `createChildCascadeOwners` field.""" + createChildCascadeOwners: BooleanFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -6912,56 +10791,29 @@ input OrgMembershipFilter { """Filter by the object’s `createdBy` field.""" createdBy: UUIDFilter + """Filter by the object’s `deleteMemberCascadeChildren` field.""" + deleteMemberCascadeChildren: BooleanFilter + """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `granted` field.""" - granted: BitStringFilter - """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isActive` field.""" - isActive: BooleanFilter - - """Filter by the object’s `isAdmin` field.""" - isAdmin: BooleanFilter - - """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 `isExternal` field.""" - isExternal: BooleanFilter - - """Filter by the object’s `isOwner` field.""" - isOwner: BooleanFilter - - """Filter by the object’s `isReadOnly` field.""" - isReadOnly: BooleanFilter - - """Negates the expression.""" - not: OrgMembershipFilter - - """Checks for any expressions in this list.""" - or: [OrgMembershipFilter!] + """Filter by the object’s `inviteProfileAssignmentMode` field.""" + inviteProfileAssignmentMode: StringFilter - """Filter by the object’s `orgMemberProfileByMembershipId` relation.""" - orgMemberProfileByMembershipId: OrgMemberProfileFilter + """Filter by the object’s `limitAllocationMode` field.""" + limitAllocationMode: StringFilter - """A related `orgMemberProfileByMembershipId` exists.""" - orgMemberProfileByMembershipIdExists: Boolean + """Negates the expression.""" + not: OrgMembershipSettingFilter - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter + """Checks for any expressions in this list.""" + or: [OrgMembershipSettingFilter!] - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter + """Filter by the object’s `populateMemberEmail` field.""" + populateMemberEmail: BooleanFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter @@ -6970,96 +10822,86 @@ input OrgMembershipFilter { updatedBy: UUIDFilter } -"""An input for mutations affecting `OrgMembership`""" -input OrgMembershipInput { - """References the user who holds this membership""" - actorId: UUID! - createdAt: Datetime - createdBy: UUID - - """References the entity (org or group) this membership belongs to""" - entityId: UUID! - +"""An input for mutations affecting `OrgMembershipSetting`""" +input OrgMembershipSettingInput { """ - Bitmask of permissions directly granted to this member (not from profiles) + Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) """ - granted: BitString - id: UUID + allowExternalMembers: Boolean """ - Computed field indicating the membership is approved, verified, not banned, and not disabled + When a child entity is created, whether to auto-add existing org-level admins as child-entity admins """ - isActive: Boolean + createChildCascadeAdmins: Boolean - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean + """ + When a child entity is created, whether to auto-add existing org-level members (non-admin, non-owner) as child-entity members + """ + createChildCascadeMembers: Boolean - """Whether this membership has been approved by an admin""" - isApproved: Boolean + """ + When a child entity is created, whether to auto-add existing org-level owners as child-entity owners + """ + createChildCascadeOwners: Boolean + createdAt: Datetime + createdBy: UUID - """Whether this member has been banned from the entity""" - isBanned: Boolean + """ + When a member is deleted, whether to cascade-remove their descendant-entity memberships + """ + deleteMemberCascadeChildren: Boolean - """Whether this membership is temporarily disabled""" - isDisabled: Boolean + """References the entity these settings apply to""" + entityId: UUID! + id: UUID """ - Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) """ - isExternal: Boolean - - """Whether the actor is the owner of this entity""" - isOwner: Boolean + inviteProfileAssignmentMode: String - """Whether this member has read-only access (blocks mutations when true)""" - isReadOnly: Boolean + """ + Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) + """ + limitAllocationMode: String """ - Aggregated permission bitmask combining profile-based and directly granted permissions + Whether member_profiles.email is snapshot on join and kept synced with the user's primary email. When FALSE, the email field is left blank and never synced from the user's primary email. """ - permissions: BitString - profileId: UUID + populateMemberEmail: Boolean updatedAt: Datetime updatedBy: UUID } -"""Methods to use when ordering `OrgMembership`.""" -enum OrgMembershipOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC +"""Methods to use when ordering `OrgMembershipSetting`.""" +enum OrgMembershipSettingOrderBy { + ALLOW_EXTERNAL_MEMBERS_ASC + ALLOW_EXTERNAL_MEMBERS_DESC CREATED_AT_ASC CREATED_AT_DESC CREATED_BY_ASC CREATED_BY_DESC + CREATE_CHILD_CASCADE_ADMINS_ASC + CREATE_CHILD_CASCADE_ADMINS_DESC + CREATE_CHILD_CASCADE_MEMBERS_ASC + CREATE_CHILD_CASCADE_MEMBERS_DESC + CREATE_CHILD_CASCADE_OWNERS_ASC + CREATE_CHILD_CASCADE_OWNERS_DESC + DELETE_MEMBER_CASCADE_CHILDREN_ASC + DELETE_MEMBER_CASCADE_CHILDREN_DESC ENTITY_ID_ASC ENTITY_ID_DESC - GRANTED_ASC - GRANTED_DESC ID_ASC ID_DESC - IS_ACTIVE_ASC - IS_ACTIVE_DESC - IS_ADMIN_ASC - IS_ADMIN_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC - IS_BANNED_ASC - IS_BANNED_DESC - IS_DISABLED_ASC - IS_DISABLED_DESC - IS_EXTERNAL_ASC - IS_EXTERNAL_DESC - IS_OWNER_ASC - IS_OWNER_DESC - IS_READ_ONLY_ASC - IS_READ_ONLY_DESC + INVITE_PROFILE_ASSIGNMENT_MODE_ASC + INVITE_PROFILE_ASSIGNMENT_MODE_DESC + LIMIT_ALLOCATION_MODE_ASC + LIMIT_ALLOCATION_MODE_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC + POPULATE_MEMBER_EMAIL_ASC + POPULATE_MEMBER_EMAIL_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC UPDATED_BY_ASC @@ -7067,619 +10909,774 @@ enum OrgMembershipOrderBy { } """ -Represents an update to a `OrgMembership`. Fields that are set will be updated. +Represents an update to a `OrgMembershipSetting`. Fields that are set will be updated. """ -input OrgMembershipPatch { - """References the user who holds this membership""" - actorId: UUID - createdAt: Datetime - createdBy: UUID - - """References the entity (org or group) this membership belongs to""" - entityId: UUID - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - id: UUID - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """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 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 this member has read-only access (blocks mutations when true)""" - isReadOnly: Boolean - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - profileId: UUID - updatedAt: Datetime - updatedBy: UUID -} - -"""Per-entity settings for the memberships module""" -type OrgMembershipSetting { +input OrgMembershipSettingPatch { """ Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) """ - allowExternalMembers: Boolean! + allowExternalMembers: Boolean """ When a child entity is created, whether to auto-add existing org-level admins as child-entity admins """ - createChildCascadeAdmins: Boolean! + createChildCascadeAdmins: Boolean """ When a child entity is created, whether to auto-add existing org-level members (non-admin, non-owner) as child-entity members """ - createChildCascadeMembers: Boolean! + createChildCascadeMembers: Boolean """ When a child entity is created, whether to auto-add existing org-level owners as child-entity owners """ - createChildCascadeOwners: Boolean! + createChildCascadeOwners: Boolean createdAt: Datetime createdBy: UUID """ When a member is deleted, whether to cascade-remove their descendant-entity memberships """ - deleteMemberCascadeChildren: Boolean! + deleteMemberCascadeChildren: Boolean """References the entity these settings apply to""" - entityId: UUID! - id: UUID! + entityId: UUID + id: UUID """ - Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) + Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) """ - inviteProfileAssignmentMode: String! + inviteProfileAssignmentMode: String """ Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) """ - limitAllocationMode: String! + limitAllocationMode: String """ Whether member_profiles.email is snapshot on join and kept synced with the user's primary email. When FALSE, the email field is left blank and never synced from the user's primary email. """ - populateMemberEmail: Boolean! + populateMemberEmail: Boolean updatedAt: Datetime updatedBy: UUID } -"""A connection to a list of `OrgMembershipSetting` values.""" -type OrgMembershipSettingConnection { +""" +A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ +""" +input OrgMembershipToManyOrgMembershipProfileFilter { + """Filters to entities where every related entity matches.""" + every: OrgMembershipProfileFilter + + """Filters to entities where no related entity matches.""" + none: OrgMembershipProfileFilter + + """Filters to entities where at least one related entity matches.""" + some: OrgMembershipProfileFilter +} + +""" +A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgMembershipToManyOrgProfileGrantFilter { + """Filters to entities where every related entity matches.""" + every: OrgProfileGrantFilter + + """Filters to entities where no related entity matches.""" + none: OrgProfileGrantFilter + + """Filters to entities where at least one related entity matches.""" + some: OrgProfileGrantFilter +} + +"""Records of ownership transfers and grants between members""" +type OrgOwnerGrant { """ - A list of edges which contains the `OrgMembershipSetting` and cursor to aid in pagination. + The member receiving or losing the ownership grant; NULL if user was deleted """ - edges: [OrgMembershipSettingEdge]! + actorId: UUID + createdAt: Datetime - """A list of `OrgMembershipSetting` objects.""" - nodes: [OrgMembershipSetting]! + """The entity (org or group) this ownership grant applies to""" + entityId: UUID! + grantorId: UUID + id: UUID! - """Information to aid in pagination.""" - pageInfo: PageInfo! + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean! + updatedAt: Datetime +} +"""A connection to a list of `OrgOwnerGrant` values.""" +type OrgOwnerGrantConnection { """ - The count of *all* `OrgMembershipSetting` you could get from the connection. + A list of edges which contains the `OrgOwnerGrant` and cursor to aid in pagination. """ + edges: [OrgOwnerGrantEdge]! + + """A list of `OrgOwnerGrant` objects.""" + nodes: [OrgOwnerGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgOwnerGrant` you could get from the connection.""" totalCount: Int! } -"""A `OrgMembershipSetting` edge in the connection.""" -type OrgMembershipSettingEdge { +"""A `OrgOwnerGrant` edge in the connection.""" +type OrgOwnerGrantEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMembershipSetting` at the end of the edge.""" - node: OrgMembershipSetting -} - -""" -A filter to be used against `OrgMembershipSetting` object types. All fields are combined with a logical ‘and.’ -""" -input OrgMembershipSettingFilter { - """Filter by the object’s `allowExternalMembers` field.""" - allowExternalMembers: BooleanFilter - - """Checks for all expressions in this list.""" - and: [OrgMembershipSettingFilter!] - - """Filter by the object’s `createChildCascadeAdmins` field.""" - createChildCascadeAdmins: BooleanFilter + """The `OrgOwnerGrant` at the end of the edge.""" + node: OrgOwnerGrant +} - """Filter by the object’s `createChildCascadeMembers` field.""" - createChildCascadeMembers: BooleanFilter +""" +A filter to be used against `OrgOwnerGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgOwnerGrantFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter - """Filter by the object’s `createChildCascadeOwners` field.""" - createChildCascadeOwners: BooleanFilter + """Checks for all expressions in this list.""" + and: [OrgOwnerGrantFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `deleteMemberCascadeChildren` field.""" - deleteMemberCascadeChildren: BooleanFilter - """Filter by the object’s `entityId` field.""" entityId: UUIDFilter + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter + """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `inviteProfileAssignmentMode` field.""" - inviteProfileAssignmentMode: StringFilter - - """Filter by the object’s `limitAllocationMode` field.""" - limitAllocationMode: StringFilter + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter """Negates the expression.""" - not: OrgMembershipSettingFilter + not: OrgOwnerGrantFilter """Checks for any expressions in this list.""" - or: [OrgMembershipSettingFilter!] - - """Filter by the object’s `populateMemberEmail` field.""" - populateMemberEmail: BooleanFilter + or: [OrgOwnerGrantFilter!] """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter } -"""An input for mutations affecting `OrgMembershipSetting`""" -input OrgMembershipSettingInput { - """ - Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) - """ - allowExternalMembers: Boolean - - """ - When a child entity is created, whether to auto-add existing org-level admins as child-entity admins - """ - createChildCascadeAdmins: Boolean - - """ - When a child entity is created, whether to auto-add existing org-level members (non-admin, non-owner) as child-entity members - """ - createChildCascadeMembers: Boolean - +"""An input for mutations affecting `OrgOwnerGrant`""" +input OrgOwnerGrantInput { """ - When a child entity is created, whether to auto-add existing org-level owners as child-entity owners + The member receiving or losing the ownership grant; NULL if user was deleted """ - createChildCascadeOwners: Boolean + actorId: UUID createdAt: Datetime - createdBy: UUID - - """ - When a member is deleted, whether to cascade-remove their descendant-entity memberships - """ - deleteMemberCascadeChildren: Boolean - """References the entity these settings apply to""" + """The entity (org or group) this ownership grant applies to""" entityId: UUID! + grantorId: UUID id: UUID - """ - Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) - """ - inviteProfileAssignmentMode: String - - """ - Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) - """ - limitAllocationMode: String - - """ - Whether member_profiles.email is snapshot on join and kept synced with the user's primary email. When FALSE, the email field is left blank and never synced from the user's primary email. - """ - populateMemberEmail: Boolean + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean updatedAt: Datetime - updatedBy: UUID } -"""Methods to use when ordering `OrgMembershipSetting`.""" -enum OrgMembershipSettingOrderBy { - ALLOW_EXTERNAL_MEMBERS_ASC - ALLOW_EXTERNAL_MEMBERS_DESC +"""Methods to use when ordering `OrgOwnerGrant`.""" +enum OrgOwnerGrantOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC CREATED_AT_ASC CREATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - CREATE_CHILD_CASCADE_ADMINS_ASC - CREATE_CHILD_CASCADE_ADMINS_DESC - CREATE_CHILD_CASCADE_MEMBERS_ASC - CREATE_CHILD_CASCADE_MEMBERS_DESC - CREATE_CHILD_CASCADE_OWNERS_ASC - CREATE_CHILD_CASCADE_OWNERS_DESC - DELETE_MEMBER_CASCADE_CHILDREN_ASC - DELETE_MEMBER_CASCADE_CHILDREN_DESC ENTITY_ID_ASC ENTITY_ID_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC ID_ASC ID_DESC - INVITE_PROFILE_ASSIGNMENT_MODE_ASC - INVITE_PROFILE_ASSIGNMENT_MODE_DESC - LIMIT_ALLOCATION_MODE_ASC - LIMIT_ALLOCATION_MODE_DESC + IS_GRANT_ASC + IS_GRANT_DESC NATURAL - POPULATE_MEMBER_EMAIL_ASC - POPULATE_MEMBER_EMAIL_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC UPDATED_AT_ASC UPDATED_AT_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC } """ -Represents an update to a `OrgMembershipSetting`. Fields that are set will be updated. +Represents an update to a `OrgOwnerGrant`. Fields that are set will be updated. """ -input OrgMembershipSettingPatch { +input OrgOwnerGrantPatch { """ - Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) + The member receiving or losing the ownership grant; NULL if user was deleted """ - allowExternalMembers: Boolean + actorId: UUID + createdAt: Datetime + """The entity (org or group) this ownership grant applies to""" + entityId: UUID + grantorId: UUID + id: UUID + + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean + updatedAt: Datetime +} + +""" +Named capability bundles (roles) that group multiple capabilities into reusable profiles +""" +type OrgProfile { """ - When a child entity is created, whether to auto-add existing org-level admins as child-entity admins + Pre-computed capability bitmask aggregating all capabilities in this profile """ - createChildCascadeAdmins: Boolean + capabilities: BitString! + createdAt: Datetime + + """Human-readable description of this profile and its intended use""" + description: String + + """ + Scopes this profile to a specific entity; NULL means it is a global profile + """ + entityId: UUID + id: UUID! + + """ + The default profile is automatically assigned to new members when they join + """ + isDefault: Boolean! + + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean! + + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """Reads and enables pagination through a set of `OrgInvite`.""" + orgInvitesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgInvite`.""" + orderBy: [OrgInviteOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgInviteFilter + ): OrgInviteConnection! + + """Reads and enables pagination through a set of `OrgMembershipProfile`.""" + orgMembershipProfilesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMembershipProfileFilter + ): OrgMembershipProfileConnection! + + """Reads and enables pagination through a set of `OrgMembership`.""" + orgMembershipsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMembershipFilter + ): OrgMembershipConnection! + + """Reads and enables pagination through a set of `OrgProfileCapability`.""" + orgProfileCapabilitiesByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileCapabilityFilter + ): OrgProfileCapabilityConnection! """ - When a child entity is created, whether to auto-add existing org-level members (non-admin, non-owner) as child-entity members + Reads and enables pagination through a set of `OrgProfileDefinitionGrant`. """ - createChildCascadeMembers: Boolean + orgProfileDefinitionGrantsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - When a child entity is created, whether to auto-add existing org-level owners as child-entity owners - """ - createChildCascadeOwners: Boolean - createdAt: Datetime - createdBy: UUID + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - When a member is deleted, whether to cascade-remove their descendant-entity memberships - """ - deleteMemberCascadeChildren: Boolean + """Only read the first `n` values of the set.""" + first: Int - """References the entity these settings apply to""" - entityId: UUID - id: UUID + """Only read the last `n` values of the set.""" + last: Int - """ - Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) - """ - inviteProfileAssignmentMode: String + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) - """ - limitAllocationMode: String + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] - """ - Whether member_profiles.email is snapshot on join and kept synced with the user's primary email. When FALSE, the email field is left blank and never synced from the user's primary email. - """ - populateMemberEmail: Boolean + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileDefinitionGrantFilter + ): OrgProfileDefinitionGrantConnection! + + """Reads and enables pagination through a set of `OrgProfileGrant`.""" + orgProfileGrantsByProfileId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileGrantFilter + ): OrgProfileGrantConnection! + + """URL-safe identifier for this profile, used in API references""" + slug: String! updatedAt: Datetime - updatedBy: UUID } -"""Records of ownership transfers and grants between members""" -type OrgOwnerGrant { +"""Join table linking profiles to individual capabilities they include""" +type OrgProfileCapability { """ - The member receiving or losing the ownership grant; NULL if user was deleted + Reads a single `OrgCapability` that is related to this `OrgProfileCapability`. """ - actorId: UUID - createdAt: Datetime + capability: OrgCapability - """The entity (org or group) this ownership grant applies to""" - entityId: UUID! - grantorId: UUID + """References the capability included in this profile""" + capabilityId: UUID! + createdAt: Datetime id: UUID! - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean! + """ + Reads a single `OrgProfile` that is related to this `OrgProfileCapability`. + """ + profile: OrgProfile + + """References the profile this capability belongs to""" + profileId: UUID! updatedAt: Datetime } -"""A connection to a list of `OrgOwnerGrant` values.""" -type OrgOwnerGrantConnection { +"""A connection to a list of `OrgProfileCapability` values.""" +type OrgProfileCapabilityConnection { """ - A list of edges which contains the `OrgOwnerGrant` and cursor to aid in pagination. + A list of edges which contains the `OrgProfileCapability` and cursor to aid in pagination. """ - edges: [OrgOwnerGrantEdge]! + edges: [OrgProfileCapabilityEdge]! - """A list of `OrgOwnerGrant` objects.""" - nodes: [OrgOwnerGrant]! + """A list of `OrgProfileCapability` objects.""" + nodes: [OrgProfileCapability]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgOwnerGrant` you could get from the connection.""" + """ + The count of *all* `OrgProfileCapability` you could get from the connection. + """ totalCount: Int! } -"""A `OrgOwnerGrant` edge in the connection.""" -type OrgOwnerGrantEdge { +"""A `OrgProfileCapability` edge in the connection.""" +type OrgProfileCapabilityEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgOwnerGrant` at the end of the edge.""" - node: OrgOwnerGrant + """The `OrgProfileCapability` at the end of the edge.""" + node: OrgProfileCapability } """ -A filter to be used against `OrgOwnerGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ """ -input OrgOwnerGrantFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - +input OrgProfileCapabilityFilter { """Checks for all expressions in this list.""" - and: [OrgOwnerGrantFilter!] + and: [OrgProfileCapabilityFilter!] - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Filter by the object’s `capability` relation.""" + capability: OrgCapabilityFilter - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter - """Filter by the object’s `grantorId` field.""" - grantorId: UUIDFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `isGrant` field.""" - isGrant: BooleanFilter - """Negates the expression.""" - not: OrgOwnerGrantFilter + not: OrgProfileCapabilityFilter """Checks for any expressions in this list.""" - or: [OrgOwnerGrantFilter!] + or: [OrgProfileCapabilityFilter!] + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgOwnerGrant`""" -input OrgOwnerGrantInput { - """ - The member receiving or losing the ownership grant; NULL if user was deleted - """ - actorId: UUID +"""An input for mutations affecting `OrgProfileCapability`""" +input OrgProfileCapabilityInput { + """References the capability included in this profile""" + capabilityId: UUID! createdAt: Datetime - - """The entity (org or group) this ownership grant applies to""" - entityId: UUID! - grantorId: UUID id: UUID - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean + """References the profile this capability belongs to""" + profileId: UUID! updatedAt: Datetime } -"""Methods to use when ordering `OrgOwnerGrant`.""" -enum OrgOwnerGrantOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC +"""Methods to use when ordering `OrgProfileCapability`.""" +enum OrgProfileCapabilityOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC CREATED_AT_ASC CREATED_AT_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - GRANTOR_ID_ASC - GRANTOR_ID_DESC ID_ASC ID_DESC - IS_GRANT_ASC - IS_GRANT_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `OrgOwnerGrant`. Fields that are set will be updated. +Represents an update to a `OrgProfileCapability`. Fields that are set will be updated. """ -input OrgOwnerGrantPatch { - """ - The member receiving or losing the ownership grant; NULL if user was deleted - """ - actorId: UUID +input OrgProfileCapabilityPatch { + """References the capability included in this profile""" + capabilityId: UUID createdAt: Datetime - - """The entity (org or group) this ownership grant applies to""" - entityId: UUID - grantorId: UUID id: UUID - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean + """References the profile this capability belongs to""" + profileId: UUID updatedAt: Datetime } +"""A connection to a list of `OrgProfile` values.""" +type OrgProfileConnection { + """ + A list of edges which contains the `OrgProfile` and cursor to aid in pagination. + """ + edges: [OrgProfileEdge]! + + """A list of `OrgProfile` objects.""" + nodes: [OrgProfile]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgProfile` you could get from the connection.""" + totalCount: Int! +} + """ -Defines available permissions as named bits within a bitmask, used by the RBAC system for access control +Audit log of capability additions and removals from profile definitions """ -type OrgPermission { +type OrgProfileDefinitionGrant { """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set + Reads a single `OrgCapability` that is related to this `OrgProfileDefinitionGrant`. """ - bitnum: Int + capability: OrgCapability """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations + References the capability that was added to or removed from the profile; NULL if capability was deleted """ - bitstr: BitString! - - """Human-readable description of what this permission allows""" - description: String + capabilityId: UUID + createdAt: Datetime + grantorId: UUID id: UUID! - """Human-readable permission name (e.g. read, write, manage)""" - name: String + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean! """ - Reads and enables pagination through a set of `OrgPermissionDefaultGrant`. + Reads a single `OrgProfile` that is related to this `OrgProfileDefinitionGrant`. """ - orgPermissionDefaultGrantsByPermissionId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Only read the first `n` values of the set.""" - first: Int + profile: OrgProfile - """Only read the last `n` values of the set.""" - last: Int + """ + References the profile whose definition was modified; NULL if profile was deleted + """ + profileId: UUID + updatedAt: Datetime +} - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int +"""A connection to a list of `OrgProfileDefinitionGrant` values.""" +type OrgProfileDefinitionGrantConnection { + """ + A list of edges which contains the `OrgProfileDefinitionGrant` and cursor to aid in pagination. + """ + edges: [OrgProfileDefinitionGrantEdge]! - """The method to use when ordering `OrgPermissionDefaultGrant`.""" - orderBy: [OrgPermissionDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + """A list of `OrgProfileDefinitionGrant` objects.""" + nodes: [OrgProfileDefinitionGrant]! - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgPermissionDefaultGrantFilter - ): OrgPermissionDefaultGrantConnection! + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Reads and enables pagination through a set of `OrgPermissionDefaultPermission`. + The count of *all* `OrgProfileDefinitionGrant` you could get from the connection. """ - orgPermissionDefaultPermissionsByPermissionId( - """Read all values in the set after (below) this cursor.""" - after: Cursor + totalCount: Int! +} - """Read all values in the set before (above) this cursor.""" - before: Cursor +"""A `OrgProfileDefinitionGrant` edge in the connection.""" +type OrgProfileDefinitionGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Only read the first `n` values of the set.""" - first: Int + """The `OrgProfileDefinitionGrant` at the end of the edge.""" + node: OrgProfileDefinitionGrant +} - """Only read the last `n` values of the set.""" - last: Int +""" +A filter to be used against `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ +""" +input OrgProfileDefinitionGrantFilter { + """Checks for all expressions in this list.""" + and: [OrgProfileDefinitionGrantFilter!] - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """Filter by the object’s `capability` relation.""" + capability: OrgCapabilityFilter - """The method to use when ordering `OrgPermissionDefaultPermission`.""" - orderBy: [OrgPermissionDefaultPermissionOrderBy!] = [PRIMARY_KEY_ASC] + """A related `capability` exists.""" + capabilityExists: Boolean - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgPermissionDefaultPermissionFilter - ): OrgPermissionDefaultPermissionConnection! + """Filter by the object’s `capabilityId` field.""" + capabilityId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `grantorId` field.""" + grantorId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isGrant` field.""" + isGrant: BooleanFilter + + """Negates the expression.""" + not: OrgProfileDefinitionGrantFilter + + """Checks for any expressions in this list.""" + or: [OrgProfileDefinitionGrantFilter!] + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter + + """A related `profile` exists.""" + profileExists: Boolean + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""A connection to a list of `OrgPermission` values.""" -type OrgPermissionConnection { +"""An input for mutations affecting `OrgProfileDefinitionGrant`""" +input OrgProfileDefinitionGrantInput { """ - A list of edges which contains the `OrgPermission` and cursor to aid in pagination. + References the capability that was added to or removed from the profile; NULL if capability was deleted """ - edges: [OrgPermissionEdge]! + capabilityId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID - """A list of `OrgPermission` objects.""" - nodes: [OrgPermission]! + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean - """Information to aid in pagination.""" - pageInfo: PageInfo! + """ + References the profile whose definition was modified; NULL if profile was deleted + """ + profileId: UUID + updatedAt: Datetime +} - """The count of *all* `OrgPermission` you could get from the connection.""" - totalCount: Int! +"""Methods to use when ordering `OrgProfileDefinitionGrant`.""" +enum OrgProfileDefinitionGrantOrderBy { + CAPABILITY_ID_ASC + CAPABILITY_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + GRANTOR_ID_ASC + GRANTOR_ID_DESC + ID_ASC + ID_DESC + IS_GRANT_ASC + IS_GRANT_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Stores the default permission bitmask assigned to new members upon joining +Represents an update to a `OrgProfileDefinitionGrant`. Fields that are set will be updated. """ -type OrgPermissionDefault { - """References the entity these default permissions apply to""" - entityId: UUID! - id: UUID! - - """Default permission bitmask applied to new members""" - permissions: BitString! -} - -"""A connection to a list of `OrgPermissionDefault` values.""" -type OrgPermissionDefaultConnection { +input OrgProfileDefinitionGrantPatch { """ - A list of edges which contains the `OrgPermissionDefault` and cursor to aid in pagination. + References the capability that was added to or removed from the profile; NULL if capability was deleted """ - edges: [OrgPermissionDefaultEdge]! - - """A list of `OrgPermissionDefault` objects.""" - nodes: [OrgPermissionDefault]! + capabilityId: UUID + createdAt: Datetime + grantorId: UUID + id: UUID - """Information to aid in pagination.""" - pageInfo: PageInfo! + """True to add the capability to the profile, false to remove it""" + isGrant: Boolean """ - The count of *all* `OrgPermissionDefault` you could get from the connection. + References the profile whose definition was modified; NULL if profile was deleted """ - totalCount: Int! + profileId: UUID + updatedAt: Datetime } -"""A `OrgPermissionDefault` edge in the connection.""" -type OrgPermissionDefaultEdge { +"""A `OrgProfile` edge in the connection.""" +type OrgProfileEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgPermissionDefault` at the end of the edge.""" - node: OrgPermissionDefault + """The `OrgProfile` at the end of the edge.""" + node: OrgProfile } """ -A filter to be used against `OrgPermissionDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgProfile` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionDefaultFilter { +input OrgProfileFilter { """Checks for all expressions in this list.""" - and: [OrgPermissionDefaultFilter!] + and: [OrgProfileFilter!] + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `description` field.""" + description: StringFilter """Filter by the object’s `entityId` field.""" entityId: UUIDFilter @@ -7687,74 +11684,132 @@ input OrgPermissionDefaultFilter { """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter + + """Filter by the object’s `isSystem` field.""" + isSystem: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + """Negates the expression.""" - not: OrgPermissionDefaultFilter + not: OrgProfileFilter """Checks for any expressions in this list.""" - or: [OrgPermissionDefaultFilter!] + or: [OrgProfileFilter!] + + """Filter by the object’s `orgInvitesByProfileId` relation.""" + orgInvitesByProfileId: OrgProfileToManyOrgInviteFilter + + """`orgInvitesByProfileId` exist.""" + orgInvitesByProfileIdExist: Boolean + + """Filter by the object’s `orgMembershipProfilesByProfileId` relation.""" + orgMembershipProfilesByProfileId: OrgProfileToManyOrgMembershipProfileFilter - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter + """`orgMembershipProfilesByProfileId` exist.""" + orgMembershipProfilesByProfileIdExist: Boolean + + """Filter by the object’s `orgMembershipsByProfileId` relation.""" + orgMembershipsByProfileId: OrgProfileToManyOrgMembershipFilter + + """`orgMembershipsByProfileId` exist.""" + orgMembershipsByProfileIdExist: Boolean + + """Filter by the object’s `orgProfileCapabilitiesByProfileId` relation.""" + orgProfileCapabilitiesByProfileId: OrgProfileToManyOrgProfileCapabilityFilter + + """`orgProfileCapabilitiesByProfileId` exist.""" + orgProfileCapabilitiesByProfileIdExist: Boolean + + """ + Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. + """ + orgProfileDefinitionGrantsByProfileId: OrgProfileToManyOrgProfileDefinitionGrantFilter + + """`orgProfileDefinitionGrantsByProfileId` exist.""" + orgProfileDefinitionGrantsByProfileIdExist: Boolean + + """Filter by the object’s `orgProfileGrantsByProfileId` relation.""" + orgProfileGrantsByProfileId: OrgProfileToManyOrgProfileGrantFilter + + """`orgProfileGrantsByProfileId` exist.""" + orgProfileGrantsByProfileIdExist: Boolean + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -""" -Audit log of permission additions and removals from the defaults bitmask -""" -type OrgPermissionDefaultGrant { +"""Audit log of profile assignments and revocations for members""" +type OrgProfileGrant { createdAt: Datetime - """Scopes this audit entry to a specific entity""" - entityId: UUID! + """The entity (org or group) scope for this profile grant""" + entityId: UUID grantorId: UUID id: UUID! - """True to add the permission to defaults, false to remove it""" + """True to assign the profile, false to revoke it""" isGrant: Boolean! """ - Reads a single `OrgPermission` that is related to this `OrgPermissionDefaultGrant`. + Reads a single `OrgMembership` that is related to this `OrgProfileGrant`. + """ + membership: OrgMembership + + """ + References the membership that received or lost this profile; NULL if membership was deleted """ - permission: OrgPermission + membershipId: UUID - """References the permission being added to or removed from defaults""" - permissionId: UUID! + """Reads a single `OrgProfile` that is related to this `OrgProfileGrant`.""" + profile: OrgProfile + + """ + References the profile being assigned; NULL indicates the profile was removed + """ + profileId: UUID updatedAt: Datetime } -"""A connection to a list of `OrgPermissionDefaultGrant` values.""" -type OrgPermissionDefaultGrantConnection { +"""A connection to a list of `OrgProfileGrant` values.""" +type OrgProfileGrantConnection { """ - A list of edges which contains the `OrgPermissionDefaultGrant` and cursor to aid in pagination. + A list of edges which contains the `OrgProfileGrant` and cursor to aid in pagination. """ - edges: [OrgPermissionDefaultGrantEdge]! + edges: [OrgProfileGrantEdge]! - """A list of `OrgPermissionDefaultGrant` objects.""" - nodes: [OrgPermissionDefaultGrant]! + """A list of `OrgProfileGrant` objects.""" + nodes: [OrgProfileGrant]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `OrgPermissionDefaultGrant` you could get from the connection. + The count of *all* `OrgProfileGrant` you could get from the connection. """ totalCount: Int! } -"""A `OrgPermissionDefaultGrant` edge in the connection.""" -type OrgPermissionDefaultGrantEdge { +"""A `OrgProfileGrant` edge in the connection.""" +type OrgProfileGrantEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgPermissionDefaultGrant` at the end of the edge.""" - node: OrgPermissionDefaultGrant + """The `OrgProfileGrant` at the end of the edge.""" + node: OrgProfileGrant } """ -A filter to be used against `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionDefaultGrantFilter { +input OrgProfileGrantFilter { """Checks for all expressions in this list.""" - and: [OrgPermissionDefaultGrantFilter!] + and: [OrgProfileGrantFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -7771,41 +11826,60 @@ input OrgPermissionDefaultGrantFilter { """Filter by the object’s `isGrant` field.""" isGrant: BooleanFilter + """Filter by the object’s `membership` relation.""" + membership: OrgMembershipFilter + + """A related `membership` exists.""" + membershipExists: Boolean + + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter + """Negates the expression.""" - not: OrgPermissionDefaultGrantFilter + not: OrgProfileGrantFilter """Checks for any expressions in this list.""" - or: [OrgPermissionDefaultGrantFilter!] + or: [OrgProfileGrantFilter!] + + """Filter by the object’s `profile` relation.""" + profile: OrgProfileFilter - """Filter by the object’s `permission` relation.""" - permission: OrgPermissionFilter + """A related `profile` exists.""" + profileExists: Boolean - """Filter by the object’s `permissionId` field.""" - permissionId: UUIDFilter + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgPermissionDefaultGrant`""" -input OrgPermissionDefaultGrantInput { +"""An input for mutations affecting `OrgProfileGrant`""" +input OrgProfileGrantInput { createdAt: Datetime - """Scopes this audit entry to a specific entity""" - entityId: UUID! + """The entity (org or group) scope for this profile grant""" + entityId: UUID grantorId: UUID id: UUID - """True to add the permission to defaults, false to remove it""" + """True to assign the profile, false to revoke it""" isGrant: Boolean - """References the permission being added to or removed from defaults""" - permissionId: UUID! + """ + References the membership that received or lost this profile; NULL if membership was deleted + """ + membershipId: UUID + + """ + References the profile being assigned; NULL indicates the profile was removed + """ + profileId: UUID updatedAt: Datetime } -"""Methods to use when ordering `OrgPermissionDefaultGrant`.""" -enum OrgPermissionDefaultGrantOrderBy { +"""Methods to use when ordering `OrgProfileGrant`.""" +enum OrgProfileGrantOrderBy { CREATED_AT_ASC CREATED_AT_DESC ENTITY_ID_ASC @@ -7816,333 +11890,376 @@ enum OrgPermissionDefaultGrantOrderBy { ID_DESC IS_GRANT_ASC IS_GRANT_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC NATURAL - PERMISSION_ID_ASC - PERMISSION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `OrgPermissionDefaultGrant`. Fields that are set will be updated. +Represents an update to a `OrgProfileGrant`. Fields that are set will be updated. """ -input OrgPermissionDefaultGrantPatch { +input OrgProfileGrantPatch { createdAt: Datetime - """Scopes this audit entry to a specific entity""" + """The entity (org or group) scope for this profile grant""" entityId: UUID grantorId: UUID id: UUID - """True to add the permission to defaults, false to remove it""" + """True to assign the profile, false to revoke it""" isGrant: Boolean - """References the permission being added to or removed from defaults""" - permissionId: UUID + """ + References the membership that received or lost this profile; NULL if membership was deleted + """ + membershipId: UUID + + """ + References the profile being assigned; NULL indicates the profile was removed + """ + profileId: UUID updatedAt: Datetime } -"""An input for mutations affecting `OrgPermissionDefault`""" -input OrgPermissionDefaultInput { - """References the entity these default permissions apply to""" - entityId: UUID! +"""An input for mutations affecting `OrgProfile`""" +input OrgProfileInput { + """ + Pre-computed capability bitmask aggregating all capabilities in this profile + """ + capabilities: BitString + createdAt: Datetime + + """Human-readable description of this profile and its intended use""" + description: String + + """ + Scopes this profile to a specific entity; NULL means it is a global profile + """ + entityId: UUID id: UUID - """Default permission bitmask applied to new members""" - permissions: BitString + """ + The default profile is automatically assigned to new members when they join + """ + isDefault: Boolean + + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean + + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """URL-safe identifier for this profile, used in API references""" + slug: String! + updatedAt: Datetime } -"""Methods to use when ordering `OrgPermissionDefault`.""" -enum OrgPermissionDefaultOrderBy { +"""Methods to use when ordering `OrgProfile`.""" +enum OrgProfileOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC ENTITY_ID_ASC ENTITY_ID_DESC ID_ASC ID_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + IS_SYSTEM_ASC + IS_SYSTEM_DESC + NAME_ASC + NAME_DESC NATURAL - PERMISSIONS_ASC - PERMISSIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `OrgPermissionDefault`. Fields that are set will be updated. +Represents an update to a `OrgProfile`. Fields that are set will be updated. """ -input OrgPermissionDefaultPatch { - """References the entity these default permissions apply to""" +input OrgProfilePatch { + """ + Pre-computed capability bitmask aggregating all capabilities in this profile + """ + capabilities: BitString + createdAt: Datetime + + """Human-readable description of this profile and its intended use""" + description: String + + """ + Scopes this profile to a specific entity; NULL means it is a global profile + """ entityId: UUID id: UUID - """Default permission bitmask applied to new members""" - permissions: BitString + """ + The default profile is automatically assigned to new members when they join + """ + isDefault: Boolean + + """System profiles are built-in and cannot be deleted or renamed by users""" + isSystem: Boolean + + """Display name for this profile (e.g. Admin, Editor, Viewer)""" + name: String + + """URL-safe identifier for this profile, used in API references""" + slug: String + updatedAt: Datetime } """ -Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask +Template profiles that are automatically seeded into new entities when created """ -type OrgPermissionDefaultPermission { +type OrgProfileTemplate { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString! createdAt: Datetime - """Scopes this default permission to a specific entity""" - entityId: UUID! + """Human-readable description of this template profile""" + description: String id: UUID! - """ - Reads a single `OrgPermission` that is related to this `OrgPermissionDefaultPermission`. - """ - permission: OrgPermission + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean! - """References the permission included in the defaults bundle""" - permissionId: UUID! + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """URL-safe identifier for the template profile""" + slug: String! updatedAt: Datetime } -"""A connection to a list of `OrgPermissionDefaultPermission` values.""" -type OrgPermissionDefaultPermissionConnection { +"""A connection to a list of `OrgProfileTemplate` values.""" +type OrgProfileTemplateConnection { """ - A list of edges which contains the `OrgPermissionDefaultPermission` and cursor to aid in pagination. + A list of edges which contains the `OrgProfileTemplate` and cursor to aid in pagination. """ - edges: [OrgPermissionDefaultPermissionEdge]! + edges: [OrgProfileTemplateEdge]! - """A list of `OrgPermissionDefaultPermission` objects.""" - nodes: [OrgPermissionDefaultPermission]! + """A list of `OrgProfileTemplate` objects.""" + nodes: [OrgProfileTemplate]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `OrgPermissionDefaultPermission` you could get from the connection. + The count of *all* `OrgProfileTemplate` you could get from the connection. """ totalCount: Int! } -"""A `OrgPermissionDefaultPermission` edge in the connection.""" -type OrgPermissionDefaultPermissionEdge { +"""A `OrgProfileTemplate` edge in the connection.""" +type OrgProfileTemplateEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgPermissionDefaultPermission` at the end of the edge.""" - node: OrgPermissionDefaultPermission + """The `OrgProfileTemplate` at the end of the edge.""" + node: OrgProfileTemplate } """ -A filter to be used against `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgProfileTemplate` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionDefaultPermissionFilter { +input OrgProfileTemplateFilter { """Checks for all expressions in this list.""" - and: [OrgPermissionDefaultPermissionFilter!] + and: [OrgProfileTemplateFilter!] + + """Filter by the object’s `capabilities` field.""" + capabilities: BitStringFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Filter by the object’s `description` field.""" + description: StringFilter """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + """Negates the expression.""" - not: OrgPermissionDefaultPermissionFilter + not: OrgProfileTemplateFilter """Checks for any expressions in this list.""" - or: [OrgPermissionDefaultPermissionFilter!] - - """Filter by the object’s `permission` relation.""" - permission: OrgPermissionFilter + or: [OrgProfileTemplateFilter!] - """Filter by the object’s `permissionId` field.""" - permissionId: UUIDFilter + """Filter by the object’s `slug` field.""" + slug: StringFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `OrgPermissionDefaultPermission`""" -input OrgPermissionDefaultPermissionInput { +"""An input for mutations affecting `OrgProfileTemplate`""" +input OrgProfileTemplateInput { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString createdAt: Datetime - """Scopes this default permission to a specific entity""" - entityId: UUID! + """Human-readable description of this template profile""" + description: String id: UUID - """References the permission included in the defaults bundle""" - permissionId: UUID! + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean + + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String! + + """URL-safe identifier for the template profile""" + slug: String! updatedAt: Datetime } -"""Methods to use when ordering `OrgPermissionDefaultPermission`.""" -enum OrgPermissionDefaultPermissionOrderBy { +"""Methods to use when ordering `OrgProfileTemplate`.""" +enum OrgProfileTemplateOrderBy { + CAPABILITIES_ASC + CAPABILITIES_DESC CREATED_AT_ASC CREATED_AT_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC ID_ASC ID_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + NAME_ASC + NAME_DESC NATURAL - PERMISSION_ID_ASC - PERMISSION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `OrgPermissionDefaultPermission`. Fields that are set will be updated. +Represents an update to a `OrgProfileTemplate`. Fields that are set will be updated. """ -input OrgPermissionDefaultPermissionPatch { +input OrgProfileTemplatePatch { + """Pre-computed capability bitmask for the seeded profile""" + capabilities: BitString createdAt: Datetime - """Scopes this default permission to a specific entity""" - entityId: UUID + """Human-readable description of this template profile""" + description: String id: UUID - """References the permission included in the defaults bundle""" - permissionId: UUID - updatedAt: Datetime -} + """Whether the seeded profile should be the default for new members""" + isDefault: Boolean -"""A `OrgPermission` edge in the connection.""" -type OrgPermissionEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Display name for the template profile (e.g. Admin, Editor, Viewer)""" + name: String - """The `OrgPermission` at the end of the edge.""" - node: OrgPermission + """URL-safe identifier for the template profile""" + slug: String + updatedAt: Datetime } """ -A filter to be used against `OrgPermission` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `OrgInvite` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionFilter { - """Checks for all expressions in this list.""" - and: [OrgPermissionFilter!] - - """Filter by the object’s `bitnum` field.""" - bitnum: IntFilter - - """Filter by the object’s `bitstr` field.""" - bitstr: BitStringFilter - - """Filter by the object’s `description` field.""" - description: StringFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: OrgPermissionFilter +input OrgProfileToManyOrgInviteFilter { + """Filters to entities where every related entity matches.""" + every: OrgInviteFilter - """Checks for any expressions in this list.""" - or: [OrgPermissionFilter!] + """Filters to entities where no related entity matches.""" + none: OrgInviteFilter - """ - Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. - """ - orgPermissionDefaultGrantsByPermissionId: OrgPermissionToManyOrgPermissionDefaultGrantFilter + """Filters to entities where at least one related entity matches.""" + some: OrgInviteFilter +} - """`orgPermissionDefaultGrantsByPermissionId` exist.""" - orgPermissionDefaultGrantsByPermissionIdExist: Boolean +""" +A filter to be used against many `OrgMembership` object types. All fields are combined with a logical ‘and.’ +""" +input OrgProfileToManyOrgMembershipFilter { + """Filters to entities where every related entity matches.""" + every: OrgMembershipFilter - """ - Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. - """ - orgPermissionDefaultPermissionsByPermissionId: OrgPermissionToManyOrgPermissionDefaultPermissionFilter + """Filters to entities where no related entity matches.""" + none: OrgMembershipFilter - """`orgPermissionDefaultPermissionsByPermissionId` exist.""" - orgPermissionDefaultPermissionsByPermissionIdExist: Boolean + """Filters to entities where at least one related entity matches.""" + some: OrgMembershipFilter } -"""An input for mutations affecting `OrgPermission`""" -input OrgPermissionInput { - """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set - """ - bitnum: Int - - """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations - """ - bitstr: BitString - - """Human-readable description of what this permission allows""" - description: String - id: UUID +""" +A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ +""" +input OrgProfileToManyOrgMembershipProfileFilter { + """Filters to entities where every related entity matches.""" + every: OrgMembershipProfileFilter - """Human-readable permission name (e.g. read, write, manage)""" - name: String -} + """Filters to entities where no related entity matches.""" + none: OrgMembershipProfileFilter -"""Methods to use when ordering `OrgPermission`.""" -enum OrgPermissionOrderBy { - BITNUM_ASC - BITNUM_DESC - BITSTR_ASC - BITSTR_DESC - DESCRIPTION_ASC - DESCRIPTION_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC + """Filters to entities where at least one related entity matches.""" + some: OrgMembershipProfileFilter } """ -Represents an update to a `OrgPermission`. Fields that are set will be updated. +A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionPatch { - """ - Position of this permission in the bitmask (1-indexed), must be unique per permission set - """ - bitnum: Int - - """ - Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations - """ - bitstr: BitString - - """Human-readable description of what this permission allows""" - description: String - id: UUID +input OrgProfileToManyOrgProfileCapabilityFilter { + """Filters to entities where every related entity matches.""" + every: OrgProfileCapabilityFilter - """Human-readable permission name (e.g. read, write, manage)""" - name: String + """Filters to entities where no related entity matches.""" + none: OrgProfileCapabilityFilter + + """Filters to entities where at least one related entity matches.""" + some: OrgProfileCapabilityFilter } """ -A filter to be used against many `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionToManyOrgPermissionDefaultGrantFilter { +input OrgProfileToManyOrgProfileDefinitionGrantFilter { """Filters to entities where every related entity matches.""" - every: OrgPermissionDefaultGrantFilter + every: OrgProfileDefinitionGrantFilter """Filters to entities where no related entity matches.""" - none: OrgPermissionDefaultGrantFilter + none: OrgProfileDefinitionGrantFilter """Filters to entities where at least one related entity matches.""" - some: OrgPermissionDefaultGrantFilter + some: OrgProfileDefinitionGrantFilter } """ -A filter to be used against many `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ """ -input OrgPermissionToManyOrgPermissionDefaultPermissionFilter { +input OrgProfileToManyOrgProfileGrantFilter { """Filters to entities where every related entity matches.""" - every: OrgPermissionDefaultPermissionFilter + every: OrgProfileGrantFilter """Filters to entities where no related entity matches.""" - none: OrgPermissionDefaultPermissionFilter + none: OrgProfileGrantFilter """Filters to entities where at least one related entity matches.""" - some: OrgPermissionDefaultPermissionFilter + some: OrgProfileGrantFilter } """Information about pagination in a connection.""" @@ -8218,17 +12335,301 @@ type Query { """ offset: Int - """The method to use when ordering `AppAdminGrant`.""" - orderBy: [AppAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppAdminGrant`.""" + orderBy: [AppAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppAdminGrantFilter + ): AppAdminGrantConnection + + """Reads and enables pagination through a set of `AppCapability`.""" + appCapabilities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppCapability`.""" + orderBy: [AppCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppCapabilityFilter + ): AppCapabilityConnection + + """Reads and enables pagination through a set of `AppCapability`.""" + appCapabilitiesGetByMask( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Only read the first `n` values of the set.""" + first: Int + mask: BitString + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + ): AppCapabilityConnection + appCapabilitiesGetMask(ids: [UUID]): BitString + appCapabilitiesGetMaskByNames(names: [String]): BitString + appCapabilitiesGetPaddedMask(mask: BitString): BitString + + """ + Reads and enables pagination through a set of `AppCapabilityDefaultCapability`. + """ + appCapabilityDefaultCapabilities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppCapabilityDefaultCapability`.""" + orderBy: [AppCapabilityDefaultCapabilityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppCapabilityDefaultCapabilityFilter + ): AppCapabilityDefaultCapabilityConnection + + """ + Reads and enables pagination through a set of `AppCapabilityDefaultGrant`. + """ + appCapabilityDefaultGrants( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppCapabilityDefaultGrant`.""" + orderBy: [AppCapabilityDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppCapabilityDefaultGrantFilter + ): AppCapabilityDefaultGrantConnection + + """Reads and enables pagination through a set of `AppCapabilityDefault`.""" + appCapabilityDefaults( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppCapabilityDefault`.""" + orderBy: [AppCapabilityDefaultOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppCapabilityDefaultFilter + ): AppCapabilityDefaultConnection + + """Reads and enables pagination through a set of `AppClaimedInvite`.""" + appClaimedInvites( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppClaimedInvite`.""" + orderBy: [AppClaimedInviteOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppClaimedInviteFilter + ): AppClaimedInviteConnection + + """Reads and enables pagination through a set of `AppGrant`.""" + appGrants( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppGrant`.""" + orderBy: [AppGrantOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppGrantFilter + ): AppGrantConnection + + """Reads and enables pagination through a set of `AppInvite`.""" + appInvites( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppInvite`.""" + orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppInviteFilter + ): AppInviteConnection + + """Reads and enables pagination through a set of `AppMembershipDefault`.""" + appMembershipDefaults( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppMembershipDefault`.""" + orderBy: [AppMembershipDefaultOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppMembershipDefaultFilter + ): AppMembershipDefaultConnection + + """Reads and enables pagination through a set of `AppMembershipProfile`.""" + appMembershipProfiles( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppAdminGrantFilter - ): AppAdminGrantConnection + where: AppMembershipProfileFilter + ): AppMembershipProfileConnection - """Reads and enables pagination through a set of `AppClaimedInvite`.""" - appClaimedInvites( + """Reads and enables pagination through a set of `AppMembership`.""" + appMemberships( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8247,17 +12648,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppClaimedInvite`.""" - orderBy: [AppClaimedInviteOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppClaimedInviteFilter - ): AppClaimedInviteConnection + where: AppMembershipFilter + ): AppMembershipConnection - """Reads and enables pagination through a set of `AppGrant`.""" - appGrants( + """Reads and enables pagination through a set of `AppOwnerGrant`.""" + appOwnerGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8276,17 +12677,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppGrant`.""" - orderBy: [AppGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppOwnerGrant`.""" + orderBy: [AppOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppGrantFilter - ): AppGrantConnection + where: AppOwnerGrantFilter + ): AppOwnerGrantConnection - """Reads and enables pagination through a set of `AppInvite`.""" - appInvites( + """Reads and enables pagination through a set of `AppProfileCapability`.""" + appProfileCapabilities( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8305,17 +12706,19 @@ type Query { """ offset: Int - """The method to use when ordering `AppInvite`.""" - orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppInviteFilter - ): AppInviteConnection + where: AppProfileCapabilityFilter + ): AppProfileCapabilityConnection - """Reads and enables pagination through a set of `AppMembershipDefault`.""" - appMembershipDefaults( + """ + Reads and enables pagination through a set of `AppProfileDefinitionGrant`. + """ + appProfileDefinitionGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8334,17 +12737,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppMembershipDefault`.""" - orderBy: [AppMembershipDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppMembershipDefaultFilter - ): AppMembershipDefaultConnection + where: AppProfileDefinitionGrantFilter + ): AppProfileDefinitionGrantConnection - """Reads and enables pagination through a set of `AppMembership`.""" - appMemberships( + """Reads and enables pagination through a set of `AppProfileGrant`.""" + appProfileGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8363,17 +12766,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppMembershipFilter - ): AppMembershipConnection + where: AppProfileGrantFilter + ): AppProfileGrantConnection - """Reads and enables pagination through a set of `AppOwnerGrant`.""" - appOwnerGrants( + """Reads and enables pagination through a set of `AppProfileTemplate`.""" + appProfileTemplates( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8392,19 +12795,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppOwnerGrant`.""" - orderBy: [AppOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppProfileTemplate`.""" + orderBy: [AppProfileTemplateOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppOwnerGrantFilter - ): AppOwnerGrantConnection + where: AppProfileTemplateFilter + ): AppProfileTemplateConnection - """ - Reads and enables pagination through a set of `AppPermissionDefaultGrant`. - """ - appPermissionDefaultGrants( + """Reads and enables pagination through a set of `AppProfile`.""" + appProfiles( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8423,19 +12824,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppPermissionDefaultGrant`.""" - orderBy: [AppPermissionDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppProfile`.""" + orderBy: [AppProfileOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionDefaultGrantFilter - ): AppPermissionDefaultGrantConnection + where: AppProfileFilter + ): AppProfileConnection - """ - Reads and enables pagination through a set of `AppPermissionDefaultPermission`. - """ - appPermissionDefaultPermissions( + """Reads and enables pagination through a set of `MembershipType`.""" + membershipTypes( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8454,17 +12853,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppPermissionDefaultPermission`.""" - orderBy: [AppPermissionDefaultPermissionOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionDefaultPermissionFilter - ): AppPermissionDefaultPermissionConnection + where: MembershipTypeFilter + ): MembershipTypeConnection - """Reads and enables pagination through a set of `AppPermissionDefault`.""" - appPermissionDefaults( + """Reads and enables pagination through a set of `OrgAdminGrant`.""" + orgAdminGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8483,17 +12882,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppPermissionDefault`.""" - orderBy: [AppPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgAdminGrant`.""" + orderBy: [OrgAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionDefaultFilter - ): AppPermissionDefaultConnection + where: OrgAdminGrantFilter + ): OrgAdminGrantConnection - """Reads and enables pagination through a set of `AppPermission`.""" - appPermissions( + """Reads and enables pagination through a set of `OrgCapability`.""" + orgCapabilities( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8512,17 +12911,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppPermission`.""" - orderBy: [AppPermissionOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgCapability`.""" + orderBy: [OrgCapabilityOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionFilter - ): AppPermissionConnection + where: OrgCapabilityFilter + ): OrgCapabilityConnection - """Reads and enables pagination through a set of `AppPermission`.""" - appPermissionsGetByMask( + """Reads and enables pagination through a set of `OrgCapability`.""" + orgCapabilitiesGetByMask( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8535,13 +12934,15 @@ type Query { based pagination. May not be used with `last`. """ offset: Int - ): AppPermissionConnection - appPermissionsGetMask(ids: [UUID]): BitString - appPermissionsGetMaskByNames(names: [String]): BitString - appPermissionsGetPaddedMask(mask: BitString): BitString + ): OrgCapabilityConnection + orgCapabilitiesGetMask(ids: [UUID]): BitString + orgCapabilitiesGetMaskByNames(names: [String]): BitString + orgCapabilitiesGetPaddedMask(mask: BitString): BitString - """Reads and enables pagination through a set of `MembershipType`.""" - membershipTypes( + """ + Reads and enables pagination through a set of `OrgCapabilityDefaultCapability`. + """ + orgCapabilityDefaultCapabilities( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8560,17 +12961,19 @@ type Query { """ offset: Int - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgCapabilityDefaultCapability`.""" + orderBy: [OrgCapabilityDefaultCapabilityOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: MembershipTypeFilter - ): MembershipTypeConnection + where: OrgCapabilityDefaultCapabilityFilter + ): OrgCapabilityDefaultCapabilityConnection - """Reads and enables pagination through a set of `OrgAdminGrant`.""" - orgAdminGrants( + """ + Reads and enables pagination through a set of `OrgCapabilityDefaultGrant`. + """ + orgCapabilityDefaultGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8589,14 +12992,43 @@ type Query { """ offset: Int - """The method to use when ordering `OrgAdminGrant`.""" - orderBy: [OrgAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgCapabilityDefaultGrant`.""" + orderBy: [OrgCapabilityDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgAdminGrantFilter - ): OrgAdminGrantConnection + where: OrgCapabilityDefaultGrantFilter + ): OrgCapabilityDefaultGrantConnection + + """Reads and enables pagination through a set of `OrgCapabilityDefault`.""" + orgCapabilityDefaults( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgCapabilityDefault`.""" + orderBy: [OrgCapabilityDefaultOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgCapabilityDefaultFilter + ): OrgCapabilityDefaultConnection """Reads and enables pagination through a set of `OrgChartEdgeGrant`.""" orgChartEdgeGrants( @@ -8869,6 +13301,35 @@ type Query { where: OrgMembershipDefaultFilter ): OrgMembershipDefaultConnection + """Reads and enables pagination through a set of `OrgMembershipProfile`.""" + orgMembershipProfiles( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMembershipProfileFilter + ): OrgMembershipProfileConnection + """Reads and enables pagination through a set of `OrgMembershipSetting`.""" orgMembershipSettings( """Read all values in the set after (below) this cursor.""" @@ -8956,10 +13417,8 @@ type Query { where: OrgOwnerGrantFilter ): OrgOwnerGrantConnection - """ - Reads and enables pagination through a set of `OrgPermissionDefaultGrant`. - """ - orgPermissionDefaultGrants( + """Reads and enables pagination through a set of `OrgProfileCapability`.""" + orgProfileCapabilities( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -8978,19 +13437,19 @@ type Query { """ offset: Int - """The method to use when ordering `OrgPermissionDefaultGrant`.""" - orderBy: [OrgPermissionDefaultGrantOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgPermissionDefaultGrantFilter - ): OrgPermissionDefaultGrantConnection + where: OrgProfileCapabilityFilter + ): OrgProfileCapabilityConnection """ - Reads and enables pagination through a set of `OrgPermissionDefaultPermission`. + Reads and enables pagination through a set of `OrgProfileDefinitionGrant`. """ - orgPermissionDefaultPermissions( + orgProfileDefinitionGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -9009,17 +13468,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgPermissionDefaultPermission`.""" - orderBy: [OrgPermissionDefaultPermissionOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgPermissionDefaultPermissionFilter - ): OrgPermissionDefaultPermissionConnection + where: OrgProfileDefinitionGrantFilter + ): OrgProfileDefinitionGrantConnection - """Reads and enables pagination through a set of `OrgPermissionDefault`.""" - orgPermissionDefaults( + """Reads and enables pagination through a set of `OrgProfileGrant`.""" + orgProfileGrants( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -9038,17 +13497,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgPermissionDefault`.""" - orderBy: [OrgPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgPermissionDefaultFilter - ): OrgPermissionDefaultConnection + where: OrgProfileGrantFilter + ): OrgProfileGrantConnection - """Reads and enables pagination through a set of `OrgPermission`.""" - orgPermissions( + """Reads and enables pagination through a set of `OrgProfileTemplate`.""" + orgProfileTemplates( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -9067,33 +13526,43 @@ type Query { """ offset: Int - """The method to use when ordering `OrgPermission`.""" - orderBy: [OrgPermissionOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgProfileTemplate`.""" + orderBy: [OrgProfileTemplateOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgPermissionFilter - ): OrgPermissionConnection + where: OrgProfileTemplateFilter + ): OrgProfileTemplateConnection - """Reads and enables pagination through a set of `OrgPermission`.""" - orgPermissionsGetByMask( + """Reads and enables pagination through a set of `OrgProfile`.""" + orgProfiles( """Read all values in the set after (below) this cursor.""" after: Cursor + """Read all values in the set before (above) this cursor.""" + before: Cursor + """Only read the first `n` values of the set.""" first: Int - mask: BitString + + """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 - ): OrgPermissionConnection - orgPermissionsGetMask(ids: [UUID]): BitString - orgPermissionsGetMaskByNames(names: [String]): BitString - orgPermissionsGetPaddedMask(mask: BitString): BitString + + """The method to use when ordering `OrgProfile`.""" + orderBy: [OrgProfileOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgProfileFilter + ): OrgProfileConnection } """ @@ -9292,45 +13761,201 @@ input UUIDFilter { """ distinctFrom: UUID - """Equal to the specified value.""" - equalTo: UUID + """Equal to the specified value.""" + equalTo: UUID + + """Greater than the specified value.""" + greaterThan: UUID + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: UUID + + """Included in the specified list.""" + in: [UUID!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: UUID + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: UUID + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: UUID + + """Not equal to the specified value.""" + notEqualTo: UUID + + """Not included in the specified list.""" + notIn: [UUID!] +} + +"""All input for the `updateAppAdminGrant` mutation.""" +input UpdateAppAdminGrantInput { + """ + An object where the defined keys will be set on the `AppAdminGrant` being updated. + """ + appAdminGrantPatch: AppAdminGrantPatch! + + """ + 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 update `AppAdminGrant` mutation.""" +type UpdateAppAdminGrantPayload { + """The `AppAdminGrant` that was updated by this mutation.""" + appAdminGrant: AppAdminGrant + + """An edge for our `AppAdminGrant`. May be used by Relay 1.""" + appAdminGrantEdge( + """The method to use when ordering `AppAdminGrant`.""" + orderBy: [AppAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppAdminGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppCapabilityDefaultCapability` mutation.""" +input UpdateAppCapabilityDefaultCapabilityInput { + """ + An object where the defined keys will be set on the `AppCapabilityDefaultCapability` being updated. + """ + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch! + + """ + 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 update `AppCapabilityDefaultCapability` mutation.""" +type UpdateAppCapabilityDefaultCapabilityPayload { + """ + The `AppCapabilityDefaultCapability` that was updated by this mutation. + """ + appCapabilityDefaultCapability: AppCapabilityDefaultCapability + + """ + An edge for our `AppCapabilityDefaultCapability`. May be used by Relay 1. + """ + appCapabilityDefaultCapabilityEdge( + """The method to use when ordering `AppCapabilityDefaultCapability`.""" + orderBy: [AppCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultCapabilityEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppCapabilityDefaultGrant` mutation.""" +input UpdateAppCapabilityDefaultGrantInput { + """ + An object where the defined keys will be set on the `AppCapabilityDefaultGrant` being updated. + """ + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch! + + """ + 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 update `AppCapabilityDefaultGrant` mutation.""" +type UpdateAppCapabilityDefaultGrantPayload { + """The `AppCapabilityDefaultGrant` that was updated by this mutation.""" + appCapabilityDefaultGrant: AppCapabilityDefaultGrant - """Greater than the specified value.""" - greaterThan: UUID + """An edge for our `AppCapabilityDefaultGrant`. May be used by Relay 1.""" + appCapabilityDefaultGrantEdge( + """The method to use when ordering `AppCapabilityDefaultGrant`.""" + orderBy: [AppCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultGrantEdge - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: UUID + """ + 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 - """Included in the specified list.""" - in: [UUID!] + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} +"""All input for the `updateAppCapabilityDefault` mutation.""" +input UpdateAppCapabilityDefaultInput { """ - Is null (if `true` is specified) or is not null (if `false` is specified). + An object where the defined keys will be set on the `AppCapabilityDefault` being updated. """ - isNull: Boolean + appCapabilityDefaultPatch: AppCapabilityDefaultPatch! - """Less than the specified value.""" - lessThan: UUID + """ + 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! +} - """Less than or equal to the specified value.""" - lessThanOrEqualTo: UUID +"""The output of our update `AppCapabilityDefault` mutation.""" +type UpdateAppCapabilityDefaultPayload { + """The `AppCapabilityDefault` that was updated by this mutation.""" + appCapabilityDefault: AppCapabilityDefault - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: UUID + """An edge for our `AppCapabilityDefault`. May be used by Relay 1.""" + appCapabilityDefaultEdge( + """The method to use when ordering `AppCapabilityDefault`.""" + orderBy: [AppCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityDefaultEdge - """Not equal to the specified value.""" - notEqualTo: UUID + """ + 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 - """Not included in the specified list.""" - notIn: [UUID!] + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""All input for the `updateAppAdminGrant` mutation.""" -input UpdateAppAdminGrantInput { +"""All input for the `updateAppCapability` mutation.""" +input UpdateAppCapabilityInput { """ - An object where the defined keys will be set on the `AppAdminGrant` being updated. + An object where the defined keys will be set on the `AppCapability` being updated. """ - appAdminGrantPatch: AppAdminGrantPatch! + appCapabilityPatch: AppCapabilityPatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -9340,16 +13965,16 @@ input UpdateAppAdminGrantInput { id: UUID! } -"""The output of our update `AppAdminGrant` mutation.""" -type UpdateAppAdminGrantPayload { - """The `AppAdminGrant` that was updated by this mutation.""" - appAdminGrant: AppAdminGrant +"""The output of our update `AppCapability` mutation.""" +type UpdateAppCapabilityPayload { + """The `AppCapability` that was updated by this mutation.""" + appCapability: AppCapability - """An edge for our `AppAdminGrant`. May be used by Relay 1.""" - appAdminGrantEdge( - """The method to use when ordering `AppAdminGrant`.""" - orderBy: [AppAdminGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppAdminGrantEdge + """An edge for our `AppCapability`. May be used by Relay 1.""" + appCapabilityEdge( + """The method to use when ordering `AppCapability`.""" + orderBy: [AppCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppCapabilityEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -9553,6 +14178,44 @@ type UpdateAppMembershipPayload { query: Query } +"""All input for the `updateAppMembershipProfile` mutation.""" +input UpdateAppMembershipProfileInput { + """ + An object where the defined keys will be set on the `AppMembershipProfile` being updated. + """ + appMembershipProfilePatch: AppMembershipProfilePatch! + + """ + 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 update `AppMembershipProfile` mutation.""" +type UpdateAppMembershipProfilePayload { + """The `AppMembershipProfile` that was updated by this mutation.""" + appMembershipProfile: AppMembershipProfile + + """An edge for our `AppMembershipProfile`. May be used by Relay 1.""" + appMembershipProfileEdge( + """The method to use when ordering `AppMembershipProfile`.""" + orderBy: [AppMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipProfileEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateAppOwnerGrant` mutation.""" input UpdateAppOwnerGrantInput { """ @@ -9591,12 +14254,12 @@ type UpdateAppOwnerGrantPayload { query: Query } -"""All input for the `updateAppPermissionDefaultGrant` mutation.""" -input UpdateAppPermissionDefaultGrantInput { +"""All input for the `updateAppProfileCapability` mutation.""" +input UpdateAppProfileCapabilityInput { """ - An object where the defined keys will be set on the `AppPermissionDefaultGrant` being updated. + An object where the defined keys will be set on the `AppProfileCapability` being updated. """ - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch! + appProfileCapabilityPatch: AppProfileCapabilityPatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -9606,16 +14269,16 @@ input UpdateAppPermissionDefaultGrantInput { id: UUID! } -"""The output of our update `AppPermissionDefaultGrant` mutation.""" -type UpdateAppPermissionDefaultGrantPayload { - """The `AppPermissionDefaultGrant` that was updated by this mutation.""" - appPermissionDefaultGrant: AppPermissionDefaultGrant +"""The output of our update `AppProfileCapability` mutation.""" +type UpdateAppProfileCapabilityPayload { + """The `AppProfileCapability` that was updated by this mutation.""" + appProfileCapability: AppProfileCapability - """An edge for our `AppPermissionDefaultGrant`. May be used by Relay 1.""" - appPermissionDefaultGrantEdge( - """The method to use when ordering `AppPermissionDefaultGrant`.""" - orderBy: [AppPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultGrantEdge + """An edge for our `AppProfileCapability`. May be used by Relay 1.""" + appProfileCapabilityEdge( + """The method to use when ordering `AppProfileCapability`.""" + orderBy: [AppProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileCapabilityEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -9629,12 +14292,12 @@ type UpdateAppPermissionDefaultGrantPayload { query: Query } -"""All input for the `updateAppPermissionDefault` mutation.""" -input UpdateAppPermissionDefaultInput { +"""All input for the `updateAppProfileDefinitionGrant` mutation.""" +input UpdateAppProfileDefinitionGrantInput { """ - An object where the defined keys will be set on the `AppPermissionDefault` being updated. + An object where the defined keys will be set on the `AppProfileDefinitionGrant` being updated. """ - appPermissionDefaultPatch: AppPermissionDefaultPatch! + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -9644,16 +14307,16 @@ input UpdateAppPermissionDefaultInput { id: UUID! } -"""The output of our update `AppPermissionDefault` mutation.""" -type UpdateAppPermissionDefaultPayload { - """The `AppPermissionDefault` that was updated by this mutation.""" - appPermissionDefault: AppPermissionDefault +"""The output of our update `AppProfileDefinitionGrant` mutation.""" +type UpdateAppProfileDefinitionGrantPayload { + """The `AppProfileDefinitionGrant` that was updated by this mutation.""" + appProfileDefinitionGrant: AppProfileDefinitionGrant - """An edge for our `AppPermissionDefault`. May be used by Relay 1.""" - appPermissionDefaultEdge( - """The method to use when ordering `AppPermissionDefault`.""" - orderBy: [AppPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultEdge + """An edge for our `AppProfileDefinitionGrant`. May be used by Relay 1.""" + appProfileDefinitionGrantEdge( + """The method to use when ordering `AppProfileDefinitionGrant`.""" + orderBy: [AppProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileDefinitionGrantEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -9667,12 +14330,12 @@ type UpdateAppPermissionDefaultPayload { query: Query } -"""All input for the `updateAppPermissionDefaultPermission` mutation.""" -input UpdateAppPermissionDefaultPermissionInput { +"""All input for the `updateAppProfileGrant` mutation.""" +input UpdateAppProfileGrantInput { """ - An object where the defined keys will be set on the `AppPermissionDefaultPermission` being updated. + An object where the defined keys will be set on the `AppProfileGrant` being updated. """ - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch! + appProfileGrantPatch: AppProfileGrantPatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -9682,20 +14345,54 @@ input UpdateAppPermissionDefaultPermissionInput { id: UUID! } -"""The output of our update `AppPermissionDefaultPermission` mutation.""" -type UpdateAppPermissionDefaultPermissionPayload { +"""The output of our update `AppProfileGrant` mutation.""" +type UpdateAppProfileGrantPayload { + """The `AppProfileGrant` that was updated by this mutation.""" + appProfileGrant: AppProfileGrant + + """An edge for our `AppProfileGrant`. May be used by Relay 1.""" + appProfileGrantEdge( + """The method to use when ordering `AppProfileGrant`.""" + orderBy: [AppProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppProfile` mutation.""" +input UpdateAppProfileInput { """ - The `AppPermissionDefaultPermission` that was updated by this mutation. + An object where the defined keys will be set on the `AppProfile` being updated. """ - appPermissionDefaultPermission: AppPermissionDefaultPermission + appProfilePatch: AppProfilePatch! """ - An edge for our `AppPermissionDefaultPermission`. May be used by Relay 1. + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - appPermissionDefaultPermissionEdge( - """The method to use when ordering `AppPermissionDefaultPermission`.""" - orderBy: [AppPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultPermissionEdge + clientMutationId: String + id: UUID! +} + +"""The output of our update `AppProfile` mutation.""" +type UpdateAppProfilePayload { + """The `AppProfile` that was updated by this mutation.""" + appProfile: AppProfile + + """An edge for our `AppProfile`. May be used by Relay 1.""" + appProfileEdge( + """The method to use when ordering `AppProfile`.""" + orderBy: [AppProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -9709,12 +14406,12 @@ type UpdateAppPermissionDefaultPermissionPayload { query: Query } -"""All input for the `updateAppPermission` mutation.""" -input UpdateAppPermissionInput { +"""All input for the `updateAppProfileTemplate` mutation.""" +input UpdateAppProfileTemplateInput { """ - An object where the defined keys will be set on the `AppPermission` being updated. + An object where the defined keys will be set on the `AppProfileTemplate` being updated. """ - appPermissionPatch: AppPermissionPatch! + appProfileTemplatePatch: AppProfileTemplatePatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -9724,16 +14421,16 @@ input UpdateAppPermissionInput { id: UUID! } -"""The output of our update `AppPermission` mutation.""" -type UpdateAppPermissionPayload { - """The `AppPermission` that was updated by this mutation.""" - appPermission: AppPermission +"""The output of our update `AppProfileTemplate` mutation.""" +type UpdateAppProfileTemplatePayload { + """The `AppProfileTemplate` that was updated by this mutation.""" + appProfileTemplate: AppProfileTemplate - """An edge for our `AppPermission`. May be used by Relay 1.""" - appPermissionEdge( - """The method to use when ordering `AppPermission`.""" - orderBy: [AppPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppPermissionEdge + """An edge for our `AppProfileTemplate`. May be used by Relay 1.""" + appProfileTemplateEdge( + """The method to use when ordering `AppProfileTemplate`.""" + orderBy: [AppProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppProfileTemplateEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -9827,6 +14524,162 @@ type UpdateOrgAdminGrantPayload { query: Query } +"""All input for the `updateOrgCapabilityDefaultCapability` mutation.""" +input UpdateOrgCapabilityDefaultCapabilityInput { + """ + 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 `OrgCapabilityDefaultCapability` being updated. + """ + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch! +} + +"""The output of our update `OrgCapabilityDefaultCapability` mutation.""" +type UpdateOrgCapabilityDefaultCapabilityPayload { + """ + 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 `OrgCapabilityDefaultCapability` that was updated by this mutation. + """ + orgCapabilityDefaultCapability: OrgCapabilityDefaultCapability + + """ + An edge for our `OrgCapabilityDefaultCapability`. May be used by Relay 1. + """ + orgCapabilityDefaultCapabilityEdge( + """The method to use when ordering `OrgCapabilityDefaultCapability`.""" + orderBy: [OrgCapabilityDefaultCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultCapabilityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateOrgCapabilityDefaultGrant` mutation.""" +input UpdateOrgCapabilityDefaultGrantInput { + """ + 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 `OrgCapabilityDefaultGrant` being updated. + """ + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch! +} + +"""The output of our update `OrgCapabilityDefaultGrant` mutation.""" +type UpdateOrgCapabilityDefaultGrantPayload { + """ + 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 `OrgCapabilityDefaultGrant` that was updated by this mutation.""" + orgCapabilityDefaultGrant: OrgCapabilityDefaultGrant + + """An edge for our `OrgCapabilityDefaultGrant`. May be used by Relay 1.""" + orgCapabilityDefaultGrantEdge( + """The method to use when ordering `OrgCapabilityDefaultGrant`.""" + orderBy: [OrgCapabilityDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateOrgCapabilityDefault` mutation.""" +input UpdateOrgCapabilityDefaultInput { + """ + 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 `OrgCapabilityDefault` being updated. + """ + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch! +} + +"""The output of our update `OrgCapabilityDefault` mutation.""" +type UpdateOrgCapabilityDefaultPayload { + """ + 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 `OrgCapabilityDefault` that was updated by this mutation.""" + orgCapabilityDefault: OrgCapabilityDefault + + """An edge for our `OrgCapabilityDefault`. May be used by Relay 1.""" + orgCapabilityDefaultEdge( + """The method to use when ordering `OrgCapabilityDefault`.""" + orderBy: [OrgCapabilityDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateOrgCapability` mutation.""" +input UpdateOrgCapabilityInput { + """ + 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 `OrgCapability` being updated. + """ + orgCapabilityPatch: OrgCapabilityPatch! +} + +"""The output of our update `OrgCapability` mutation.""" +type UpdateOrgCapabilityPayload { + """ + 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 `OrgCapability` that was updated by this mutation.""" + orgCapability: OrgCapability + + """An edge for our `OrgCapability`. May be used by Relay 1.""" + orgCapabilityEdge( + """The method to use when ordering `OrgCapability`.""" + orderBy: [OrgCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgCapabilityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateOrgChartEdgeGrant` mutation.""" input UpdateOrgChartEdgeGrantInput { """ @@ -10169,6 +15022,44 @@ type UpdateOrgMembershipPayload { query: Query } +"""All input for the `updateOrgMembershipProfile` mutation.""" +input UpdateOrgMembershipProfileInput { + """ + 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 `OrgMembershipProfile` being updated. + """ + orgMembershipProfilePatch: OrgMembershipProfilePatch! +} + +"""The output of our update `OrgMembershipProfile` mutation.""" +type UpdateOrgMembershipProfilePayload { + """ + 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 `OrgMembershipProfile` that was updated by this mutation.""" + orgMembershipProfile: OrgMembershipProfile + + """An edge for our `OrgMembershipProfile`. May be used by Relay 1.""" + orgMembershipProfileEdge( + """The method to use when ordering `OrgMembershipProfile`.""" + orderBy: [OrgMembershipProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipProfileEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateOrgMembershipSetting` mutation.""" input UpdateOrgMembershipSettingInput { """ @@ -10245,8 +15136,8 @@ type UpdateOrgOwnerGrantPayload { query: Query } -"""All input for the `updateOrgPermissionDefaultGrant` mutation.""" -input UpdateOrgPermissionDefaultGrantInput { +"""All input for the `updateOrgProfileCapability` mutation.""" +input UpdateOrgProfileCapabilityInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10255,27 +15146,27 @@ input UpdateOrgPermissionDefaultGrantInput { id: UUID! """ - An object where the defined keys will be set on the `OrgPermissionDefaultGrant` being updated. + An object where the defined keys will be set on the `OrgProfileCapability` being updated. """ - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch! + orgProfileCapabilityPatch: OrgProfileCapabilityPatch! } -"""The output of our update `OrgPermissionDefaultGrant` mutation.""" -type UpdateOrgPermissionDefaultGrantPayload { +"""The output of our update `OrgProfileCapability` mutation.""" +type UpdateOrgProfileCapabilityPayload { """ 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 `OrgPermissionDefaultGrant` that was updated by this mutation.""" - orgPermissionDefaultGrant: OrgPermissionDefaultGrant + """The `OrgProfileCapability` that was updated by this mutation.""" + orgProfileCapability: OrgProfileCapability - """An edge for our `OrgPermissionDefaultGrant`. May be used by Relay 1.""" - orgPermissionDefaultGrantEdge( - """The method to use when ordering `OrgPermissionDefaultGrant`.""" - orderBy: [OrgPermissionDefaultGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultGrantEdge + """An edge for our `OrgProfileCapability`. May be used by Relay 1.""" + orgProfileCapabilityEdge( + """The method to use when ordering `OrgProfileCapability`.""" + orderBy: [OrgProfileCapabilityOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileCapabilityEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -10283,8 +15174,8 @@ type UpdateOrgPermissionDefaultGrantPayload { query: Query } -"""All input for the `updateOrgPermissionDefault` mutation.""" -input UpdateOrgPermissionDefaultInput { +"""All input for the `updateOrgProfileDefinitionGrant` mutation.""" +input UpdateOrgProfileDefinitionGrantInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10293,27 +15184,27 @@ input UpdateOrgPermissionDefaultInput { id: UUID! """ - An object where the defined keys will be set on the `OrgPermissionDefault` being updated. + An object where the defined keys will be set on the `OrgProfileDefinitionGrant` being updated. """ - orgPermissionDefaultPatch: OrgPermissionDefaultPatch! + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch! } -"""The output of our update `OrgPermissionDefault` mutation.""" -type UpdateOrgPermissionDefaultPayload { +"""The output of our update `OrgProfileDefinitionGrant` mutation.""" +type UpdateOrgProfileDefinitionGrantPayload { """ 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 `OrgPermissionDefault` that was updated by this mutation.""" - orgPermissionDefault: OrgPermissionDefault + """The `OrgProfileDefinitionGrant` that was updated by this mutation.""" + orgProfileDefinitionGrant: OrgProfileDefinitionGrant - """An edge for our `OrgPermissionDefault`. May be used by Relay 1.""" - orgPermissionDefaultEdge( - """The method to use when ordering `OrgPermissionDefault`.""" - orderBy: [OrgPermissionDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultEdge + """An edge for our `OrgProfileDefinitionGrant`. May be used by Relay 1.""" + orgProfileDefinitionGrantEdge( + """The method to use when ordering `OrgProfileDefinitionGrant`.""" + orderBy: [OrgProfileDefinitionGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileDefinitionGrantEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -10321,8 +15212,8 @@ type UpdateOrgPermissionDefaultPayload { query: Query } -"""All input for the `updateOrgPermissionDefaultPermission` mutation.""" -input UpdateOrgPermissionDefaultPermissionInput { +"""All input for the `updateOrgProfileGrant` mutation.""" +input UpdateOrgProfileGrantInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10331,31 +15222,65 @@ input UpdateOrgPermissionDefaultPermissionInput { id: UUID! """ - An object where the defined keys will be set on the `OrgPermissionDefaultPermission` being updated. + An object where the defined keys will be set on the `OrgProfileGrant` being updated. """ - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch! + orgProfileGrantPatch: OrgProfileGrantPatch! } -"""The output of our update `OrgPermissionDefaultPermission` mutation.""" -type UpdateOrgPermissionDefaultPermissionPayload { +"""The output of our update `OrgProfileGrant` mutation.""" +type UpdateOrgProfileGrantPayload { """ 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 `OrgProfileGrant` that was updated by this mutation.""" + orgProfileGrant: OrgProfileGrant + + """An edge for our `OrgProfileGrant`. May be used by Relay 1.""" + orgProfileGrantEdge( + """The method to use when ordering `OrgProfileGrant`.""" + orderBy: [OrgProfileGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileGrantEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateOrgProfile` mutation.""" +input UpdateOrgProfileInput { + """ + 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 `OrgPermissionDefaultPermission` that was updated by this mutation. + An object where the defined keys will be set on the `OrgProfile` being updated. """ - orgPermissionDefaultPermission: OrgPermissionDefaultPermission + orgProfilePatch: OrgProfilePatch! +} +"""The output of our update `OrgProfile` mutation.""" +type UpdateOrgProfilePayload { """ - An edge for our `OrgPermissionDefaultPermission`. May be used by Relay 1. + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - orgPermissionDefaultPermissionEdge( - """The method to use when ordering `OrgPermissionDefaultPermission`.""" - orderBy: [OrgPermissionDefaultPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultPermissionEdge + clientMutationId: String + + """The `OrgProfile` that was updated by this mutation.""" + orgProfile: OrgProfile + + """An edge for our `OrgProfile`. May be used by Relay 1.""" + orgProfileEdge( + """The method to use when ordering `OrgProfile`.""" + orderBy: [OrgProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -10363,8 +15288,8 @@ type UpdateOrgPermissionDefaultPermissionPayload { query: Query } -"""All input for the `updateOrgPermission` mutation.""" -input UpdateOrgPermissionInput { +"""All input for the `updateOrgProfileTemplate` mutation.""" +input UpdateOrgProfileTemplateInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -10373,27 +15298,27 @@ input UpdateOrgPermissionInput { id: UUID! """ - An object where the defined keys will be set on the `OrgPermission` being updated. + An object where the defined keys will be set on the `OrgProfileTemplate` being updated. """ - orgPermissionPatch: OrgPermissionPatch! + orgProfileTemplatePatch: OrgProfileTemplatePatch! } -"""The output of our update `OrgPermission` mutation.""" -type UpdateOrgPermissionPayload { +"""The output of our update `OrgProfileTemplate` mutation.""" +type UpdateOrgProfileTemplatePayload { """ 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 `OrgPermission` that was updated by this mutation.""" - orgPermission: OrgPermission + """The `OrgProfileTemplate` that was updated by this mutation.""" + orgProfileTemplate: OrgProfileTemplate - """An edge for our `OrgPermission`. May be used by Relay 1.""" - orgPermissionEdge( - """The method to use when ordering `OrgPermission`.""" - orderBy: [OrgPermissionOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgPermissionEdge + """An edge for our `OrgProfileTemplate`. May be used by Relay 1.""" + orgProfileTemplateEdge( + """The method to use when ordering `OrgProfileTemplate`.""" + orderBy: [OrgProfileTemplateOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgProfileTemplateEdge """ Our root query field type. Allows us to run any query from our mutation payload. diff --git a/sdk/constructive-sdk/schemas/api.graphql b/sdk/constructive-sdk/schemas/api.graphql index 1b2693f715..c2ae817b9b 100644 --- a/sdk/constructive-sdk/schemas/api.graphql +++ b/sdk/constructive-sdk/schemas/api.graphql @@ -1,26 +1,117 @@ -"""All input for the `acceptDatabaseTransfer` mutation.""" -input AcceptDatabaseTransferInput { - """ - 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 - transferId: UUID +""" +API surfaces exposed by this scope; publication makes a surface bindable from other scopes +""" +type Api { + """Anonymous role the API executes as""" + anonRole: String + + """Reads and enables pagination through a set of `ApiSchema`.""" + apiSchemas( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `ApiSchema`.""" + orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ApiSchemaFilter + ): ApiSchemaConnection! + + """Reads a single `ApiSetting` that is related to this `Api`.""" + apiSetting: ApiSetting + + """Module-specific configuration for this API surface""" + config: JSON + + """Reads and enables pagination through a set of `CorsSetting`.""" + corsSettings( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `CorsSetting`.""" + orderBy: [CorsSettingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: CorsSettingFilter + ): CorsSettingConnection! + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Database this API surface serves""" + dbname: String + id: UUID! + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean! + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime } -"""The output of our `acceptDatabaseTransfer` mutation.""" -type AcceptDatabaseTransferPayload { +"""A connection to a list of `Api` values.""" +type ApiConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `Api` and cursor to aid in pagination. """ - clientMutationId: String + edges: [ApiEdge]! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: Boolean + """A list of `Api` objects.""" + nodes: [Api]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Api` you could get from the connection.""" + totalCount: Int! +} + +"""A `Api` edge in the connection.""" +type ApiEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Api` at the end of the edge.""" + node: Api } enum ApiExposureLevel { @@ -71,10 +162,153 @@ input ApiExposureLevelFilter { notIn: [ApiExposureLevel!] } +""" +A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ +""" +input ApiFilter { + """Checks for all expressions in this list.""" + and: [ApiFilter!] + + """Filter by the object’s `anonRole` field.""" + anonRole: StringFilter + + """Filter by the object’s `apiSchemas` relation.""" + apiSchemas: ApiToManyApiSchemaFilter + + """`apiSchemas` exist.""" + apiSchemasExist: Boolean + + """Filter by the object’s `apiSetting` relation.""" + apiSetting: ApiSettingFilter + + """A related `apiSetting` exists.""" + apiSettingExists: Boolean + + """Filter by the object’s `config` field.""" + config: JSONFilter + + """Filter by the object’s `corsSettings` relation.""" + corsSettings: ApiToManyCorsSettingFilter + + """`corsSettings` exist.""" + corsSettingsExist: Boolean + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `dbname` field.""" + dbname: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isPublished` field.""" + isPublished: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: ApiFilter + + """Checks for any expressions in this list.""" + or: [ApiFilter!] + + """Filter by the object’s `roleName` field.""" + roleName: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `Api`""" +input ApiInput { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""Methods to use when ordering `Api`.""" +enum ApiOrderBy { + ANON_ROLE_ASC + ANON_ROLE_DESC + CONFIG_ASC + CONFIG_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + DBNAME_ASC + DBNAME_DESC + ID_ASC + ID_DESC + IS_PUBLISHED_ASC + IS_PUBLISHED_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ROLE_NAME_ASC + ROLE_NAME_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +"""Represents an update to a `Api`. Fields that are set will be updated.""" +input ApiPatch { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + """Join table linking API surfaces to the metaschema schemas they expose""" type ApiSchema { - """Reads a single `Apis` that is related to this `ApiSchema`.""" - api: Apis + """Reads a single `Api` that is related to this `ApiSchema`.""" + api: Api """API surface that exposes this schema""" apiId: UUID! @@ -126,7 +360,7 @@ input ApiSchemaFilter { and: [ApiSchemaFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -211,8 +445,8 @@ input ApiSchemaPatch { Per-API feature flag overrides; NULL columns inherit from database_settings """ type ApiSetting { - """Reads a single `Apis` that is related to this `ApiSetting`.""" - api: Apis + """Reads a single `Api` that is related to this `ApiSetting`.""" + api: Api """API surface these settings override for""" apiId: UUID! @@ -328,7 +562,7 @@ input ApiSettingFilter { and: [ApiSettingFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -606,49 +840,39 @@ input ApiSettingPatch { } """ -API surfaces exposed by this scope; publication makes a surface bindable from other scopes +A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ """ -type Apis { - """Anonymous role the API executes as""" - anonRole: String - - """Reads and enables pagination through a set of `ApiSchema`.""" - apiSchemasByApiId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int +input ApiToManyApiSchemaFilter { + """Filters to entities where every related entity matches.""" + every: ApiSchemaFilter - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """Filters to entities where no related entity matches.""" + none: ApiSchemaFilter - """The method to use when ordering `ApiSchema`.""" - orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + """Filters to entities where at least one related entity matches.""" + some: ApiSchemaFilter +} - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ApiSchemaFilter - ): ApiSchemaConnection! +""" +A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ +""" +input ApiToManyCorsSettingFilter { + """Filters to entities where every related entity matches.""" + every: CorsSettingFilter - """Reads a single `ApiSetting` that is related to this `Apis`.""" - apiSettingByApiId: ApiSetting + """Filters to entities where no related entity matches.""" + none: CorsSettingFilter - """Module-specific configuration for this API surface""" - config: JSON + """Filters to entities where at least one related entity matches.""" + some: CorsSettingFilter +} - """Reads and enables pagination through a set of `CorsSetting`.""" - corsSettingsByApiId( +""" +App aggregates: thin identity rows whose components are global catalog references +""" +type App { + """Reads and enables pagination through a set of `AppComponent`.""" + appComponents( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -667,90 +891,313 @@ type Apis { """ offset: Int - """The method to use when ordering `CorsSetting`.""" - orderBy: [CorsSettingOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppComponent`.""" + orderBy: [AppComponentOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: CorsSettingFilter - ): CorsSettingConnection! + where: AppComponentFilter + ): AppComponentConnection! + + """Module-specific configuration for this app""" + config: JSON createdAt: Datetime """Database that owns this resource (database-scoped isolation)""" databaseId: UUID! - """Database this API surface serves""" - dbname: String + """Human-readable app description""" + description: String id: UUID! - """Whether other scopes may see and route to this API surface""" + """Whether other scopes may see and reference this app""" isPublished: Boolean! - """Owner-local API surface name""" + """Owner-local app name""" name: String! - """Authenticated role the API executes as""" - roleName: String + """App lifecycle status: active, suspended, archived""" + status: String! + + """Human-readable app title""" + title: String + updatedAt: Datetime +} + +""" +App component rows binding an app to typed catalog rows (exactly one typed component reference per row) +""" +type AppComponent { + """Reads a single `App` that is related to this `AppComponent`.""" + app: App + + """App this component belongs to""" + appId: UUID! + + """ + Typed catalog api row of the component surface; must be owner-matched or visible cross-scope + """ + componentApiId: UUID + + """ + Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope + """ + componentDomainId: UUID + + """ + Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope + """ + componentInstallationId: UUID + + """ + Typed catalog site row of the component surface; must be owner-matched or visible cross-scope + """ + componentSiteId: UUID + + """ + Which kind of catalog row this component binds (api, site, domain, installation) + """ + componentType: String + + """Component-specific configuration inside this app""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + id: UUID! updatedAt: Datetime } -"""A connection to a list of `Apis` values.""" -type ApisConnection { +"""A connection to a list of `AppComponent` values.""" +type AppComponentConnection { """ - A list of edges which contains the `Apis` and cursor to aid in pagination. + A list of edges which contains the `AppComponent` and cursor to aid in pagination. """ - edges: [ApisEdge]! + edges: [AppComponentEdge]! - """A list of `Apis` objects.""" - nodes: [Apis]! + """A list of `AppComponent` objects.""" + nodes: [AppComponent]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `Apis` you could get from the connection.""" + """The count of *all* `AppComponent` you could get from the connection.""" totalCount: Int! } -"""A `Apis` edge in the connection.""" -type ApisEdge { +"""A `AppComponent` edge in the connection.""" +type AppComponentEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `Apis` at the end of the edge.""" - node: Apis + """The `AppComponent` at the end of the edge.""" + node: AppComponent } """ -A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppComponent` object types. All fields are combined with a logical ‘and.’ """ -input ApisFilter { +input AppComponentFilter { """Checks for all expressions in this list.""" - and: [ApisFilter!] + and: [AppComponentFilter!] - """Filter by the object’s `anonRole` field.""" - anonRole: StringFilter + """Filter by the object’s `app` relation.""" + app: AppFilter - """Filter by the object’s `apiSchemasByApiId` relation.""" - apiSchemasByApiId: ApisToManyApiSchemaFilter + """Filter by the object’s `appId` field.""" + appId: UUIDFilter - """`apiSchemasByApiId` exist.""" - apiSchemasByApiIdExist: Boolean + """Filter by the object’s `componentApiId` field.""" + componentApiId: UUIDFilter - """Filter by the object’s `apiSettingByApiId` relation.""" - apiSettingByApiId: ApiSettingFilter + """Filter by the object’s `componentDomainId` field.""" + componentDomainId: UUIDFilter - """A related `apiSettingByApiId` exists.""" - apiSettingByApiIdExists: Boolean + """Filter by the object’s `componentInstallationId` field.""" + componentInstallationId: UUIDFilter + + """Filter by the object’s `componentSiteId` field.""" + componentSiteId: UUIDFilter + + """Filter by the object’s `componentType` field.""" + componentType: StringFilter """Filter by the object’s `config` field.""" config: JSONFilter - """Filter by the object’s `corsSettingsByApiId` relation.""" - corsSettingsByApiId: ApisToManyCorsSettingFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: AppComponentFilter + + """Checks for any expressions in this list.""" + or: [AppComponentFilter!] + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `AppComponent`""" +input AppComponentInput { + """App this component belongs to""" + appId: UUID! + + """ + Typed catalog api row of the component surface; must be owner-matched or visible cross-scope + """ + componentApiId: UUID + + """ + Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope + """ + componentDomainId: UUID + + """ + Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope + """ + componentInstallationId: UUID + + """ + Typed catalog site row of the component surface; must be owner-matched or visible cross-scope + """ + componentSiteId: UUID + + """ + Which kind of catalog row this component binds (api, site, domain, installation) + """ + componentType: String + + """Component-specific configuration inside this app""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + id: UUID + updatedAt: Datetime +} + +"""Methods to use when ordering `AppComponent`.""" +enum AppComponentOrderBy { + APP_ID_ASC + APP_ID_DESC + COMPONENT_API_ID_ASC + COMPONENT_API_ID_DESC + COMPONENT_DOMAIN_ID_ASC + COMPONENT_DOMAIN_ID_DESC + COMPONENT_INSTALLATION_ID_ASC + COMPONENT_INSTALLATION_ID_DESC + COMPONENT_SITE_ID_ASC + COMPONENT_SITE_ID_DESC + COMPONENT_TYPE_ASC + COMPONENT_TYPE_DESC + CONFIG_ASC + CONFIG_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `AppComponent`. Fields that are set will be updated. +""" +input AppComponentPatch { + """App this component belongs to""" + appId: UUID + + """ + Typed catalog api row of the component surface; must be owner-matched or visible cross-scope + """ + componentApiId: UUID + + """ + Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope + """ + componentDomainId: UUID + + """ + Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope + """ + componentInstallationId: UUID + + """ + Typed catalog site row of the component surface; must be owner-matched or visible cross-scope + """ + componentSiteId: UUID + + """ + Which kind of catalog row this component binds (api, site, domain, installation) + """ + componentType: String + + """Component-specific configuration inside this app""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + id: UUID + updatedAt: Datetime +} + +"""A connection to a list of `App` values.""" +type AppConnection { + """ + A list of edges which contains the `App` and cursor to aid in pagination. + """ + edges: [AppEdge]! + + """A list of `App` objects.""" + nodes: [App]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `App` you could get from the connection.""" + totalCount: Int! +} + +"""A `App` edge in the connection.""" +type AppEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `App` at the end of the edge.""" + node: App +} + +""" +A filter to be used against `App` object types. All fields are combined with a logical ‘and.’ +""" +input AppFilter { + """Checks for all expressions in this list.""" + and: [AppFilter!] + + """Filter by the object’s `appComponents` relation.""" + appComponents: AppToManyAppComponentFilter + + """`appComponents` exist.""" + appComponentsExist: Boolean - """`corsSettingsByApiId` exist.""" - corsSettingsByApiIdExist: Boolean + """Filter by the object’s `config` field.""" + config: JSONFilter """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -758,8 +1205,8 @@ input ApisFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `dbname` field.""" - dbname: StringFilter + """Filter by the object’s `description` field.""" + description: StringFilter """Filter by the object’s `id` field.""" id: UUIDFilter @@ -771,57 +1218,58 @@ input ApisFilter { name: StringFilter """Negates the expression.""" - not: ApisFilter + not: AppFilter """Checks for any expressions in this list.""" - or: [ApisFilter!] + or: [AppFilter!] - """Filter by the object’s `roleName` field.""" - roleName: StringFilter + """Filter by the object’s `status` field.""" + status: StringFilter + + """Filter by the object’s `title` field.""" + title: StringFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter } -"""An input for mutations affecting `Apis`""" -input ApisInput { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" +"""An input for mutations affecting `App`""" +input AppInput { + """Module-specific configuration for this app""" config: JSON createdAt: Datetime """Database that owns this resource (database-scoped isolation)""" databaseId: UUID! - """Database this API surface serves""" - dbname: String + """Human-readable app description""" + description: String id: UUID - """Whether other scopes may see and route to this API surface""" + """Whether other scopes may see and reference this app""" isPublished: Boolean - """Owner-local API surface name""" + """Owner-local app name""" name: String! - """Authenticated role the API executes as""" - roleName: String + """App lifecycle status: active, suspended, archived""" + status: String + + """Human-readable app title""" + title: String updatedAt: Datetime } -"""Methods to use when ordering `Apis`.""" -enum ApisOrderBy { - ANON_ROLE_ASC - ANON_ROLE_DESC +"""Methods to use when ordering `App`.""" +enum AppOrderBy { CONFIG_ASC CONFIG_DESC CREATED_AT_ASC CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DBNAME_ASC - DBNAME_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC ID_ASC ID_DESC IS_PUBLISHED_ASC @@ -831,65 +1279,53 @@ enum ApisOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - ROLE_NAME_ASC - ROLE_NAME_DESC + STATUS_ASC + STATUS_DESC + TITLE_ASC + TITLE_DESC UPDATED_AT_ASC UPDATED_AT_DESC } -"""Represents an update to a `Apis`. Fields that are set will be updated.""" -input ApisPatch { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" +"""Represents an update to a `App`. Fields that are set will be updated.""" +input AppPatch { + """Module-specific configuration for this app""" config: JSON createdAt: Datetime """Database that owns this resource (database-scoped isolation)""" databaseId: UUID - """Database this API surface serves""" - dbname: String + """Human-readable app description""" + description: String id: UUID - """Whether other scopes may see and route to this API surface""" + """Whether other scopes may see and reference this app""" isPublished: Boolean - """Owner-local API surface name""" + """Owner-local app name""" name: String - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -""" -A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ -""" -input ApisToManyApiSchemaFilter { - """Filters to entities where every related entity matches.""" - every: ApiSchemaFilter - - """Filters to entities where no related entity matches.""" - none: ApiSchemaFilter + """App lifecycle status: active, suspended, archived""" + status: String - """Filters to entities where at least one related entity matches.""" - some: ApiSchemaFilter + """Human-readable app title""" + title: String + updatedAt: Datetime } """ -A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `AppComponent` object types. All fields are combined with a logical ‘and.’ """ -input ApisToManyCorsSettingFilter { +input AppToManyAppComponentFilter { """Filters to entities where every related entity matches.""" - every: CorsSettingFilter + every: AppComponentFilter """Filters to entities where no related entity matches.""" - none: CorsSettingFilter + none: AppComponentFilter """Filters to entities where at least one related entity matches.""" - some: CorsSettingFilter + some: AppComponentFilter } """All input for the `applyRls` mutation.""" @@ -922,130 +1358,95 @@ type ApplyRlsPayload { query: Query } -type AstMigration { - actionId: UUID - actionName: String - actorId: UUID - createdAt: Datetime - databaseId: UUID - deploy: JSON - deploys: String - id: Int - name: String - payload: JSON - requires: [String] - revert: JSON - verify: JSON -} +"""All input for the `appsInstallApp` mutation.""" +input AppsInstallAppInput { + apex: String -"""A connection to a list of `AstMigration` values.""" -type AstMigrationConnection { """ - A list of edges which contains the `AstMigration` and cursor to aid in pagination. + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - edges: [AstMigrationEdge]! + clientMutationId: String + config: JSON + definitionIds: [UUID] + hostname: String + label: String + name: String + namespaceId: UUID + params: JSON + routePath: String + slug: String + title: String +} - """A list of `AstMigration` objects.""" - nodes: [AstMigration]! +"""The output of our `appsInstallApp` mutation.""" +type AppsInstallAppPayload { + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge - """Information to aid in pagination.""" - pageInfo: PageInfo! + """ + 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 count of *all* `AstMigration` you could get from the connection.""" - totalCount: Int! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: App } -"""A `AstMigration` edge in the connection.""" -type AstMigrationEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `AstMigration` at the end of the edge.""" - node: AstMigration +"""All input for the `appsUninstallApp` mutation.""" +input AppsUninstallAppInput { + """ + 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 + targetAppId: UUID } -""" -A filter to be used against `AstMigration` object types. All fields are combined with a logical ‘and.’ -""" -input AstMigrationFilter { - """Filter by the object’s `actionId` field.""" - actionId: UUIDFilter - - """Filter by the object’s `actionName` field.""" - actionName: StringFilter - - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - - """Checks for all expressions in this list.""" - and: [AstMigrationFilter!] - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `deploy` field.""" - deploy: JSONFilter - - """Filter by the object’s `deploys` field.""" - deploys: StringFilter - - """Filter by the object’s `id` field.""" - id: IntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: AstMigrationFilter - - """Checks for any expressions in this list.""" - or: [AstMigrationFilter!] - - """Filter by the object’s `payload` field.""" - payload: JSONFilter - - """Filter by the object’s `requires` field.""" - requires: StringListFilter +"""The output of our `appsUninstallApp` mutation.""" +type AppsUninstallAppPayload { + """ + 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 - """Filter by the object’s `revert` field.""" - revert: JSONFilter + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Filter by the object’s `verify` field.""" - verify: JSONFilter +"""All input for the `appsUpgradeApp` mutation.""" +input AppsUpgradeAppInput { + """ + 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 + newParams: JSON + targetAppId: UUID } -"""Methods to use when ordering `AstMigration`.""" -enum AstMigrationOrderBy { - ACTION_ID_ASC - ACTION_ID_DESC - ACTION_NAME_ASC - ACTION_NAME_DESC - ACTOR_ID_ASC - ACTOR_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - DEPLOYS_ASC - DEPLOYS_DESC - DEPLOY_ASC - DEPLOY_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - NATURAL - PAYLOAD_ASC - PAYLOAD_DESC - REQUIRES_ASC - REQUIRES_DESC - REVERT_ASC - REVERT_DESC - VERIFY_ASC - VERIFY_DESC +"""The output of our `appsUpgradeApp` mutation.""" +type AppsUpgradeAppPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } """ @@ -1139,31 +1540,6 @@ input BooleanFilter { notIn: [Boolean!] } -"""All input for the `cancelDatabaseTransfer` mutation.""" -input CancelDatabaseTransferInput { - """ - 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 - transferId: UUID -} - -"""The output of our `cancelDatabaseTransfer` mutation.""" -type CancelDatabaseTransferPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: Boolean -} - type CheckConstraint { category: ObjectCategory! createdAt: Datetime @@ -1568,8 +1944,8 @@ type CorsSetting { """Array of allowed CORS origins (e.g. https://example.com)""" allowedOrigins: [String]! - """Reads a single `Apis` that is related to this `CorsSetting`.""" - api: Apis + """Reads a single `Api` that is related to this `CorsSetting`.""" + api: Api """ Optional API surface for per-API override; NULL means scope-wide default @@ -1620,7 +1996,7 @@ input CorsSettingFilter { and: [CorsSettingFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """A related `api` exists.""" apiExists: Boolean @@ -1702,6 +2078,41 @@ input CorsSettingPatch { updatedAt: Datetime } +"""All input for the create `Api` mutation.""" +input CreateApiInput { + """The `Api` to be created by this mutation.""" + api: ApiInput! + + """ + 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 output of our create `Api` mutation.""" +type CreateApiPayload { + """The `Api` that was created by this mutation.""" + api: Api + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `ApiSchema` mutation.""" input CreateApiSchemaInput { """The `ApiSchema` to be created by this mutation.""" @@ -1772,10 +2183,10 @@ type CreateApiSettingPayload { query: Query } -"""All input for the create `Apis` mutation.""" -input CreateApisInput { - """The `Apis` to be created by this mutation.""" - apis: ApisInput! +"""All input for the create `AppComponent` mutation.""" +input CreateAppComponentInput { + """The `AppComponent` to be created by this mutation.""" + appComponent: AppComponentInput! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -1784,16 +2195,51 @@ input CreateApisInput { clientMutationId: String } -"""The output of our create `Apis` mutation.""" -type CreateApisPayload { - """The `Apis` that was created by this mutation.""" - apis: Apis +"""The output of our create `AppComponent` mutation.""" +type CreateAppComponentPayload { + """The `AppComponent` that was created by this mutation.""" + appComponent: AppComponent - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge + """An edge for our `AppComponent`. May be used by Relay 1.""" + appComponentEdge( + """The method to use when ordering `AppComponent`.""" + orderBy: [AppComponentOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppComponentEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `App` mutation.""" +input CreateAppInput { + """The `App` to be created by this mutation.""" + app: AppInput! + + """ + 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 output of our create `App` mutation.""" +type CreateAppPayload { + """The `App` that was created by this mutation.""" + app: App + + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -2227,6 +2673,111 @@ type CreateDomainVerificationPayload { query: Query } +"""All input for the create `EmailIdentity` mutation.""" +input CreateEmailIdentityInput { + """ + 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 `EmailIdentity` to be created by this mutation.""" + emailIdentity: EmailIdentityInput! +} + +"""The output of our create `EmailIdentity` mutation.""" +type CreateEmailIdentityPayload { + """ + 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 `EmailIdentity` that was created by this mutation.""" + emailIdentity: EmailIdentity + + """An edge for our `EmailIdentity`. May be used by Relay 1.""" + emailIdentityEdge( + """The method to use when ordering `EmailIdentity`.""" + orderBy: [EmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `EmailProviderAccount` mutation.""" +input CreateEmailProviderAccountInput { + """ + 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 `EmailProviderAccount` to be created by this mutation.""" + emailProviderAccount: EmailProviderAccountInput! +} + +"""The output of our create `EmailProviderAccount` mutation.""" +type CreateEmailProviderAccountPayload { + """ + 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 `EmailProviderAccount` that was created by this mutation.""" + emailProviderAccount: EmailProviderAccount + + """An edge for our `EmailProviderAccount`. May be used by Relay 1.""" + emailProviderAccountEdge( + """The method to use when ordering `EmailProviderAccount`.""" + orderBy: [EmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `EmailSiteIdentity` mutation.""" +input CreateEmailSiteIdentityInput { + """ + 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 `EmailSiteIdentity` to be created by this mutation.""" + emailSiteIdentity: EmailSiteIdentityInput! +} + +"""The output of our create `EmailSiteIdentity` mutation.""" +type CreateEmailSiteIdentityPayload { + """ + 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 `EmailSiteIdentity` that was created by this mutation.""" + emailSiteIdentity: EmailSiteIdentity + + """An edge for our `EmailSiteIdentity`. May be used by Relay 1.""" + emailSiteIdentityEdge( + """The method to use when ordering `EmailSiteIdentity`.""" + orderBy: [EmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `EmbeddingChunk` mutation.""" input CreateEmbeddingChunkInput { """ @@ -2789,6 +3340,41 @@ type CreatePartitionPayload { query: Query } +"""All input for the create `PlatformApi` mutation.""" +input CreatePlatformApiInput { + """ + 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 `PlatformApi` to be created by this mutation.""" + platformApi: PlatformApiInput! +} + +"""The output of our create `PlatformApi` mutation.""" +type CreatePlatformApiPayload { + """ + 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 `PlatformApi` that was created by this mutation.""" + platformApi: PlatformApi + + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `PlatformApiSchema` mutation.""" input CreatePlatformApiSchemaInput { """ @@ -2859,41 +3445,6 @@ type CreatePlatformApiSettingPayload { query: Query } -"""All input for the create `PlatformApis` mutation.""" -input CreatePlatformApisInput { - """ - 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 `PlatformApis` to be created by this mutation.""" - platformApis: PlatformApisInput! -} - -"""The output of our create `PlatformApis` mutation.""" -type CreatePlatformApisPayload { - """ - 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 `PlatformApis` that was created by this mutation.""" - platformApis: PlatformApis - - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the create `PlatformCorsSetting` mutation.""" input CreatePlatformCorsSettingInput { """ @@ -3034,6 +3585,113 @@ type CreatePlatformDomainVerificationPayload { query: Query } +"""All input for the create `PlatformEmailIdentity` mutation.""" +input CreatePlatformEmailIdentityInput { + """ + 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 `PlatformEmailIdentity` to be created by this mutation.""" + platformEmailIdentity: PlatformEmailIdentityInput! +} + +"""The output of our create `PlatformEmailIdentity` mutation.""" +type CreatePlatformEmailIdentityPayload { + """ + 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 `PlatformEmailIdentity` that was created by this mutation.""" + platformEmailIdentity: PlatformEmailIdentity + + """An edge for our `PlatformEmailIdentity`. May be used by Relay 1.""" + platformEmailIdentityEdge( + """The method to use when ordering `PlatformEmailIdentity`.""" + orderBy: [PlatformEmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlatformEmailProviderAccount` mutation.""" +input CreatePlatformEmailProviderAccountInput { + """ + 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 `PlatformEmailProviderAccount` to be created by this mutation.""" + platformEmailProviderAccount: PlatformEmailProviderAccountInput! +} + +"""The output of our create `PlatformEmailProviderAccount` mutation.""" +type CreatePlatformEmailProviderAccountPayload { + """ + 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 `PlatformEmailProviderAccount` that was created by this mutation.""" + platformEmailProviderAccount: PlatformEmailProviderAccount + + """ + An edge for our `PlatformEmailProviderAccount`. May be used by Relay 1. + """ + platformEmailProviderAccountEdge( + """The method to use when ordering `PlatformEmailProviderAccount`.""" + orderBy: [PlatformEmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlatformEmailSiteIdentity` mutation.""" +input CreatePlatformEmailSiteIdentityInput { + """ + 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 `PlatformEmailSiteIdentity` to be created by this mutation.""" + platformEmailSiteIdentity: PlatformEmailSiteIdentityInput! +} + +"""The output of our create `PlatformEmailSiteIdentity` mutation.""" +type CreatePlatformEmailSiteIdentityPayload { + """ + 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 `PlatformEmailSiteIdentity` that was created by this mutation.""" + platformEmailSiteIdentity: PlatformEmailSiteIdentity + + """An edge for our `PlatformEmailSiteIdentity`. May be used by Relay 1.""" + platformEmailSiteIdentityEdge( + """The method to use when ordering `PlatformEmailSiteIdentity`.""" + orderBy: [PlatformEmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `PlatformManagedDomain` mutation.""" input CreatePlatformManagedDomainInput { """ @@ -5795,7 +6453,7 @@ type DatabaseProvisionModule { id: UUID! """ - JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) + JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) """ modules: JSON! @@ -7016,6 +7674,39 @@ input DefaultPrivilegePatch { schemaId: UUID } +"""All input for the `deleteApi` mutation.""" +input DeleteApiInput { + """ + 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 `Api` mutation.""" +type DeleteApiPayload { + """The `Api` that was deleted by this mutation.""" + api: Api + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteApiSchema` mutation.""" input DeleteApiSchemaInput { """ @@ -7082,8 +7773,41 @@ type DeleteApiSettingPayload { query: Query } -"""All input for the `deleteApis` mutation.""" -input DeleteApisInput { +"""All input for the `deleteAppComponent` mutation.""" +input DeleteAppComponentInput { + """ + 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 `AppComponent` mutation.""" +type DeleteAppComponentPayload { + """The `AppComponent` that was deleted by this mutation.""" + appComponent: AppComponent + + """An edge for our `AppComponent`. May be used by Relay 1.""" + appComponentEdge( + """The method to use when ordering `AppComponent`.""" + orderBy: [AppComponentOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppComponentEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteApp` mutation.""" +input DeleteAppInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -7092,16 +7816,16 @@ input DeleteApisInput { id: UUID! } -"""The output of our delete `Apis` mutation.""" -type DeleteApisPayload { - """The `Apis` that was deleted by this mutation.""" - apis: Apis +"""The output of our delete `App` mutation.""" +type DeleteAppPayload { + """The `App` that was deleted by this mutation.""" + app: App - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -7511,6 +8235,105 @@ type DeleteDomainVerificationPayload { query: Query } +"""All input for the `deleteEmailIdentity` mutation.""" +input DeleteEmailIdentityInput { + """ + 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 `EmailIdentity` mutation.""" +type DeleteEmailIdentityPayload { + """ + 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 `EmailIdentity` that was deleted by this mutation.""" + emailIdentity: EmailIdentity + + """An edge for our `EmailIdentity`. May be used by Relay 1.""" + emailIdentityEdge( + """The method to use when ordering `EmailIdentity`.""" + orderBy: [EmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteEmailProviderAccount` mutation.""" +input DeleteEmailProviderAccountInput { + """ + 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 `EmailProviderAccount` mutation.""" +type DeleteEmailProviderAccountPayload { + """ + 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 `EmailProviderAccount` that was deleted by this mutation.""" + emailProviderAccount: EmailProviderAccount + + """An edge for our `EmailProviderAccount`. May be used by Relay 1.""" + emailProviderAccountEdge( + """The method to use when ordering `EmailProviderAccount`.""" + orderBy: [EmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteEmailSiteIdentity` mutation.""" +input DeleteEmailSiteIdentityInput { + """ + 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 `EmailSiteIdentity` mutation.""" +type DeleteEmailSiteIdentityPayload { + """ + 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 `EmailSiteIdentity` that was deleted by this mutation.""" + emailSiteIdentity: EmailSiteIdentity + + """An edge for our `EmailSiteIdentity`. May be used by Relay 1.""" + emailSiteIdentityEdge( + """The method to use when ordering `EmailSiteIdentity`.""" + orderBy: [EmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteEmbeddingChunk` mutation.""" input DeleteEmbeddingChunkInput { """ @@ -8043,8 +8866,8 @@ type DeletePartitionPayload { query: Query } -"""All input for the `deletePlatformApiSchema` mutation.""" -input DeletePlatformApiSchemaInput { +"""All input for the `deletePlatformApi` mutation.""" +input DeletePlatformApiInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8053,22 +8876,22 @@ input DeletePlatformApiSchemaInput { id: UUID! } -"""The output of our delete `PlatformApiSchema` mutation.""" -type DeletePlatformApiSchemaPayload { +"""The output of our delete `PlatformApi` mutation.""" +type DeletePlatformApiPayload { """ 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 `PlatformApiSchema` that was deleted by this mutation.""" - platformApiSchema: PlatformApiSchema + """The `PlatformApi` that was deleted by this mutation.""" + platformApi: PlatformApi - """An edge for our `PlatformApiSchema`. May be used by Relay 1.""" - platformApiSchemaEdge( - """The method to use when ordering `PlatformApiSchema`.""" - orderBy: [PlatformApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApiSchemaEdge + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -8076,8 +8899,8 @@ type DeletePlatformApiSchemaPayload { query: Query } -"""All input for the `deletePlatformApiSetting` mutation.""" -input DeletePlatformApiSettingInput { +"""All input for the `deletePlatformApiSchema` mutation.""" +input DeletePlatformApiSchemaInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8086,22 +8909,22 @@ input DeletePlatformApiSettingInput { id: UUID! } -"""The output of our delete `PlatformApiSetting` mutation.""" -type DeletePlatformApiSettingPayload { +"""The output of our delete `PlatformApiSchema` mutation.""" +type DeletePlatformApiSchemaPayload { """ 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 `PlatformApiSetting` that was deleted by this mutation.""" - platformApiSetting: PlatformApiSetting + """The `PlatformApiSchema` that was deleted by this mutation.""" + platformApiSchema: PlatformApiSchema - """An edge for our `PlatformApiSetting`. May be used by Relay 1.""" - platformApiSettingEdge( - """The method to use when ordering `PlatformApiSetting`.""" - orderBy: [PlatformApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApiSettingEdge + """An edge for our `PlatformApiSchema`. May be used by Relay 1.""" + platformApiSchemaEdge( + """The method to use when ordering `PlatformApiSchema`.""" + orderBy: [PlatformApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiSchemaEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -8109,8 +8932,8 @@ type DeletePlatformApiSettingPayload { query: Query } -"""All input for the `deletePlatformApis` mutation.""" -input DeletePlatformApisInput { +"""All input for the `deletePlatformApiSetting` mutation.""" +input DeletePlatformApiSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8119,22 +8942,22 @@ input DeletePlatformApisInput { id: UUID! } -"""The output of our delete `PlatformApis` mutation.""" -type DeletePlatformApisPayload { +"""The output of our delete `PlatformApiSetting` mutation.""" +type DeletePlatformApiSettingPayload { """ 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 `PlatformApis` that was deleted by this mutation.""" - platformApis: PlatformApis + """The `PlatformApiSetting` that was deleted by this mutation.""" + platformApiSetting: PlatformApiSetting - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge + """An edge for our `PlatformApiSetting`. May be used by Relay 1.""" + platformApiSettingEdge( + """The method to use when ordering `PlatformApiSetting`.""" + orderBy: [PlatformApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiSettingEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -8274,6 +9097,107 @@ type DeletePlatformDomainVerificationPayload { query: Query } +"""All input for the `deletePlatformEmailIdentity` mutation.""" +input DeletePlatformEmailIdentityInput { + """ + 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 `PlatformEmailIdentity` mutation.""" +type DeletePlatformEmailIdentityPayload { + """ + 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 `PlatformEmailIdentity` that was deleted by this mutation.""" + platformEmailIdentity: PlatformEmailIdentity + + """An edge for our `PlatformEmailIdentity`. May be used by Relay 1.""" + platformEmailIdentityEdge( + """The method to use when ordering `PlatformEmailIdentity`.""" + orderBy: [PlatformEmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlatformEmailProviderAccount` mutation.""" +input DeletePlatformEmailProviderAccountInput { + """ + 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 `PlatformEmailProviderAccount` mutation.""" +type DeletePlatformEmailProviderAccountPayload { + """ + 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 `PlatformEmailProviderAccount` that was deleted by this mutation.""" + platformEmailProviderAccount: PlatformEmailProviderAccount + + """ + An edge for our `PlatformEmailProviderAccount`. May be used by Relay 1. + """ + platformEmailProviderAccountEdge( + """The method to use when ordering `PlatformEmailProviderAccount`.""" + orderBy: [PlatformEmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlatformEmailSiteIdentity` mutation.""" +input DeletePlatformEmailSiteIdentityInput { + """ + 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 `PlatformEmailSiteIdentity` mutation.""" +type DeletePlatformEmailSiteIdentityPayload { + """ + 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 `PlatformEmailSiteIdentity` that was deleted by this mutation.""" + platformEmailSiteIdentity: PlatformEmailSiteIdentity + + """An edge for our `PlatformEmailSiteIdentity`. May be used by Relay 1.""" + platformEmailSiteIdentityEdge( + """The method to use when ordering `PlatformEmailSiteIdentity`.""" + orderBy: [PlatformEmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deletePlatformManagedDomain` mutation.""" input DeletePlatformManagedDomainInput { """ @@ -10925,6 +11849,821 @@ type DomainsAssignSubdomainPayload { result: Domain } +""" +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through +""" +type EmailIdentity { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Reads and enables pagination through a set of `EmailSiteIdentity`.""" + emailSiteIdentities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailSiteIdentity`.""" + orderBy: [EmailSiteIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailSiteIdentityFilter + ): EmailSiteIdentityConnection! + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String! + + """Display name shown beside the from address""" + fromName: String + id: UUID! + + """Whether this identity may be resolved for a send""" + isActive: Boolean! + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean! + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String! + + """ + Reads a single `EmailProviderAccount` that is related to this `EmailIdentity`. + """ + providerAccount: EmailProviderAccount + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String! + updatedAt: Datetime +} + +"""A connection to a list of `EmailIdentity` values.""" +type EmailIdentityConnection { + """ + A list of edges which contains the `EmailIdentity` and cursor to aid in pagination. + """ + edges: [EmailIdentityEdge]! + + """A list of `EmailIdentity` objects.""" + nodes: [EmailIdentity]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `EmailIdentity` you could get from the connection.""" + totalCount: Int! +} + +"""A `EmailIdentity` edge in the connection.""" +type EmailIdentityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `EmailIdentity` at the end of the edge.""" + node: EmailIdentity +} + +""" +A filter to be used against `EmailIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input EmailIdentityFilter { + """Checks for all expressions in this list.""" + and: [EmailIdentityFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `emailSiteIdentities` relation.""" + emailSiteIdentities: EmailIdentityToManyEmailSiteIdentityFilter + + """`emailSiteIdentities` exist.""" + emailSiteIdentitiesExist: Boolean + + """Filter by the object’s `fromAddress` field.""" + fromAddress: StringFilter + + """Filter by the object’s `fromName` field.""" + fromName: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: EmailIdentityFilter + + """Checks for any expressions in this list.""" + or: [EmailIdentityFilter!] + + """Filter by the object’s `providerAccount` relation.""" + providerAccount: EmailProviderAccountFilter + + """A related `providerAccount` exists.""" + providerAccountExists: Boolean + + """Filter by the object’s `providerAccountId` field.""" + providerAccountId: UUIDFilter + + """Filter by the object’s `replyToAddress` field.""" + replyToAddress: StringFilter + + """Filter by the object’s `supportAddress` field.""" + supportAddress: StringFilter + + """Filter by the object’s `transportMode` field.""" + transportMode: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `EmailIdentity`""" +input EmailIdentityInput { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String! + + """Display name shown beside the from address""" + fromName: String + id: UUID + + """Whether this identity may be resolved for a send""" + isActive: Boolean + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String! + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String + updatedAt: Datetime +} + +"""Methods to use when ordering `EmailIdentity`.""" +enum EmailIdentityOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + FROM_ADDRESS_ASC + FROM_ADDRESS_DESC + FROM_NAME_ASC + FROM_NAME_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROVIDER_ACCOUNT_ID_ASC + PROVIDER_ACCOUNT_ID_DESC + REPLY_TO_ADDRESS_ASC + REPLY_TO_ADDRESS_DESC + SUPPORT_ADDRESS_ASC + SUPPORT_ADDRESS_DESC + TRANSPORT_MODE_ASC + TRANSPORT_MODE_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `EmailIdentity`. Fields that are set will be updated. +""" +input EmailIdentityPatch { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String + + """Display name shown beside the from address""" + fromName: String + id: UUID + + """Whether this identity may be resolved for a send""" + isActive: Boolean + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String + updatedAt: Datetime +} + +""" +A filter to be used against many `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input EmailIdentityToManyEmailSiteIdentityFilter { + """Filters to entities where every related entity matches.""" + every: EmailSiteIdentityFilter + + """Filters to entities where no related entity matches.""" + none: EmailSiteIdentityFilter + + """Filters to entities where at least one related entity matches.""" + some: EmailSiteIdentityFilter +} + +""" +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) +""" +type EmailProviderAccount { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String + createdAt: Datetime + + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String! + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Reads and enables pagination through a set of `EmailIdentity`.""" + emailIdentitiesByProviderAccountId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailIdentity`.""" + orderBy: [EmailIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailIdentityFilter + ): EmailIdentityConnection! + id: UUID! + + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean! + + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String! + + """ + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK + """ + provider: String! + + """ + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name + """ + providerAccountName: String + + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String + + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String + + """SMTP port""" + smtpPort: Int + + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean + + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String +} + +"""A connection to a list of `EmailProviderAccount` values.""" +type EmailProviderAccountConnection { + """ + A list of edges which contains the `EmailProviderAccount` and cursor to aid in pagination. + """ + edges: [EmailProviderAccountEdge]! + + """A list of `EmailProviderAccount` objects.""" + nodes: [EmailProviderAccount]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `EmailProviderAccount` you could get from the connection. + """ + totalCount: Int! +} + +"""A `EmailProviderAccount` edge in the connection.""" +type EmailProviderAccountEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `EmailProviderAccount` at the end of the edge.""" + node: EmailProviderAccount +} + +""" +A filter to be used against `EmailProviderAccount` object types. All fields are combined with a logical ‘and.’ +""" +input EmailProviderAccountFilter { + """Checks for all expressions in this list.""" + and: [EmailProviderAccountFilter!] + + """Filter by the object’s `apiBaseUrl` field.""" + apiBaseUrl: StringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `credentialsSecretName` field.""" + credentialsSecretName: StringFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `emailIdentitiesByProviderAccountId` relation.""" + emailIdentitiesByProviderAccountId: EmailProviderAccountToManyEmailIdentityFilter + + """`emailIdentitiesByProviderAccountId` exist.""" + emailIdentitiesByProviderAccountIdExist: Boolean + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: EmailProviderAccountFilter + + """Checks for any expressions in this list.""" + or: [EmailProviderAccountFilter!] + + """Filter by the object’s `provider` field.""" + provider: StringFilter + + """Filter by the object’s `providerAccountName` field.""" + providerAccountName: StringFilter + + """Filter by the object’s `region` field.""" + region: StringFilter + + """Filter by the object’s `smtpHost` field.""" + smtpHost: StringFilter + + """Filter by the object’s `smtpPort` field.""" + smtpPort: IntFilter + + """Filter by the object’s `smtpSecure` field.""" + smtpSecure: BooleanFilter + + """Filter by the object’s `smtpUser` field.""" + smtpUser: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `webhookSigningSecretName` field.""" + webhookSigningSecretName: StringFilter +} + +"""An input for mutations affecting `EmailProviderAccount`""" +input EmailProviderAccountInput { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String + createdAt: Datetime + + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String! + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + id: UUID + + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean + + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String! + + """ + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK + """ + provider: String! + + """ + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name + """ + providerAccountName: String + + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String + + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String + + """SMTP port""" + smtpPort: Int + + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean + + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String +} + +"""Methods to use when ordering `EmailProviderAccount`.""" +enum EmailProviderAccountOrderBy { + API_BASE_URL_ASC + API_BASE_URL_DESC + CREATED_AT_ASC + CREATED_AT_DESC + CREDENTIALS_SECRET_NAME_ASC + CREDENTIALS_SECRET_NAME_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROVIDER_ACCOUNT_NAME_ASC + PROVIDER_ACCOUNT_NAME_DESC + PROVIDER_ASC + PROVIDER_DESC + REGION_ASC + REGION_DESC + SMTP_HOST_ASC + SMTP_HOST_DESC + SMTP_PORT_ASC + SMTP_PORT_DESC + SMTP_SECURE_ASC + SMTP_SECURE_DESC + SMTP_USER_ASC + SMTP_USER_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + WEBHOOK_SIGNING_SECRET_NAME_ASC + WEBHOOK_SIGNING_SECRET_NAME_DESC +} + +""" +Represents an update to a `EmailProviderAccount`. Fields that are set will be updated. +""" +input EmailProviderAccountPatch { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String + createdAt: Datetime + + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + id: UUID + + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean + + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String + + """ + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK + """ + provider: String + + """ + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name + """ + providerAccountName: String + + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String + + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String + + """SMTP port""" + smtpPort: Int + + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean + + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String +} + +""" +A filter to be used against many `EmailIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input EmailProviderAccountToManyEmailIdentityFilter { + """Filters to entities where every related entity matches.""" + every: EmailIdentityFilter + + """Filters to entities where no related entity matches.""" + none: EmailIdentityFilter + + """Filters to entities where at least one related entity matches.""" + some: EmailIdentityFilter +} + +""" +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. +""" +type EmailSiteIdentity { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """ + Reads a single `EmailIdentity` that is related to this `EmailSiteIdentity`. + """ + emailIdentity: EmailIdentity + + """Identity this site sends as""" + emailIdentityId: UUID! + id: UUID! + + """Reads a single `Site` that is related to this `EmailSiteIdentity`.""" + site: Site + + """Site whose mail is sent as the bound identity""" + siteId: UUID! + updatedAt: Datetime +} + +"""A connection to a list of `EmailSiteIdentity` values.""" +type EmailSiteIdentityConnection { + """ + A list of edges which contains the `EmailSiteIdentity` and cursor to aid in pagination. + """ + edges: [EmailSiteIdentityEdge]! + + """A list of `EmailSiteIdentity` objects.""" + nodes: [EmailSiteIdentity]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `EmailSiteIdentity` you could get from the connection. + """ + totalCount: Int! +} + +"""A `EmailSiteIdentity` edge in the connection.""" +type EmailSiteIdentityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `EmailSiteIdentity` at the end of the edge.""" + node: EmailSiteIdentity +} + +""" +A filter to be used against `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input EmailSiteIdentityFilter { + """Checks for all expressions in this list.""" + and: [EmailSiteIdentityFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `emailIdentity` relation.""" + emailIdentity: EmailIdentityFilter + + """Filter by the object’s `emailIdentityId` field.""" + emailIdentityId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: EmailSiteIdentityFilter + + """Checks for any expressions in this list.""" + or: [EmailSiteIdentityFilter!] + + """Filter by the object’s `site` relation.""" + site: SiteFilter + + """Filter by the object’s `siteId` field.""" + siteId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `EmailSiteIdentity`""" +input EmailSiteIdentityInput { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Identity this site sends as""" + emailIdentityId: UUID! + id: UUID + + """Site whose mail is sent as the bound identity""" + siteId: UUID! + updatedAt: Datetime +} + +"""Methods to use when ordering `EmailSiteIdentity`.""" +enum EmailSiteIdentityOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + EMAIL_IDENTITY_ID_ASC + EMAIL_IDENTITY_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SITE_ID_ASC + SITE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `EmailSiteIdentity`. Fields that are set will be updated. +""" +input EmailSiteIdentityPatch { + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + + """Identity this site sends as""" + emailIdentityId: UUID + id: UUID + + """Site whose mail is sent as the bound identity""" + siteId: UUID + updatedAt: Datetime +} + type EmbeddingChunk { chunkOverlap: Int! chunkSize: Int! @@ -14318,24 +16057,38 @@ type MetaUniqueConstraint { The root mutation type which contains root level fields which mutate data. """ type Mutation { - acceptDatabaseTransfer( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: AcceptDatabaseTransferInput! - ): AcceptDatabaseTransferPayload applyRls( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: ApplyRlsInput! ): ApplyRlsPayload - cancelDatabaseTransfer( + appsInstallApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: AppsInstallAppInput! + ): AppsInstallAppPayload + appsUninstallApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: AppsUninstallAppInput! + ): AppsUninstallAppPayload + appsUpgradeApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: AppsUpgradeAppInput! + ): AppsUpgradeAppPayload + + """Creates a single `Api`.""" + createApi( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CancelDatabaseTransferInput! - ): CancelDatabaseTransferPayload + input: CreateApiInput! + ): CreateApiPayload """Creates a single `ApiSchema`.""" createApiSchema( @@ -14353,13 +16106,21 @@ type Mutation { input: CreateApiSettingInput! ): CreateApiSettingPayload - """Creates a single `Apis`.""" - createApis( + """Creates a single `App`.""" + createApp( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppInput! + ): CreateAppPayload + + """Creates a single `AppComponent`.""" + createAppComponent( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateApisInput! - ): CreateApisPayload + input: CreateAppComponentInput! + ): CreateAppComponentPayload """Creates a single `CheckConstraint`.""" createCheckConstraint( @@ -14457,6 +16218,30 @@ type Mutation { input: CreateDomainVerificationInput! ): CreateDomainVerificationPayload + """Creates a single `EmailIdentity`.""" + createEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateEmailIdentityInput! + ): CreateEmailIdentityPayload + + """Creates a single `EmailProviderAccount`.""" + createEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateEmailProviderAccountInput! + ): CreateEmailProviderAccountPayload + + """Creates a single `EmailSiteIdentity`.""" + createEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateEmailSiteIdentityInput! + ): CreateEmailSiteIdentityPayload + """Creates a single `EmbeddingChunk`.""" createEmbeddingChunk( """ @@ -14585,6 +16370,14 @@ type Mutation { input: CreatePartitionInput! ): CreatePartitionPayload + """Creates a single `PlatformApi`.""" + createPlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformApiInput! + ): CreatePlatformApiPayload + """Creates a single `PlatformApiSchema`.""" createPlatformApiSchema( """ @@ -14601,14 +16394,6 @@ type Mutation { input: CreatePlatformApiSettingInput! ): CreatePlatformApiSettingPayload - """Creates a single `PlatformApis`.""" - createPlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreatePlatformApisInput! - ): CreatePlatformApisPayload - """Creates a single `PlatformCorsSetting`.""" createPlatformCorsSetting( """ @@ -14641,6 +16426,30 @@ type Mutation { input: CreatePlatformDomainVerificationInput! ): CreatePlatformDomainVerificationPayload + """Creates a single `PlatformEmailIdentity`.""" + createPlatformEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformEmailIdentityInput! + ): CreatePlatformEmailIdentityPayload + + """Creates a single `PlatformEmailProviderAccount`.""" + createPlatformEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformEmailProviderAccountInput! + ): CreatePlatformEmailProviderAccountPayload + + """Creates a single `PlatformEmailSiteIdentity`.""" + createPlatformEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformEmailSiteIdentityInput! + ): CreatePlatformEmailSiteIdentityPayload + """Creates a single `PlatformManagedDomain`.""" createPlatformManagedDomain( """ @@ -14961,6 +16770,14 @@ type Mutation { input: CreateWebauthnSettingInput! ): CreateWebauthnSettingPayload + """Deletes a single `Api` using a unique key.""" + deleteApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteApiInput! + ): DeleteApiPayload + """Deletes a single `ApiSchema` using a unique key.""" deleteApiSchema( """ @@ -14977,13 +16794,21 @@ type Mutation { input: DeleteApiSettingInput! ): DeleteApiSettingPayload - """Deletes a single `Apis` using a unique key.""" - deleteApis( + """Deletes a single `App` using a unique key.""" + deleteApp( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeleteApisInput! - ): DeleteApisPayload + input: DeleteAppInput! + ): DeleteAppPayload + + """Deletes a single `AppComponent` using a unique key.""" + deleteAppComponent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppComponentInput! + ): DeleteAppComponentPayload """Deletes a single `CheckConstraint` using a unique key.""" deleteCheckConstraint( @@ -15081,6 +16906,30 @@ type Mutation { input: DeleteDomainVerificationInput! ): DeleteDomainVerificationPayload + """Deletes a single `EmailIdentity` using a unique key.""" + deleteEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteEmailIdentityInput! + ): DeleteEmailIdentityPayload + + """Deletes a single `EmailProviderAccount` using a unique key.""" + deleteEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteEmailProviderAccountInput! + ): DeleteEmailProviderAccountPayload + + """Deletes a single `EmailSiteIdentity` using a unique key.""" + deleteEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteEmailSiteIdentityInput! + ): DeleteEmailSiteIdentityPayload + """Deletes a single `EmbeddingChunk` using a unique key.""" deleteEmbeddingChunk( """ @@ -15209,6 +17058,14 @@ type Mutation { input: DeletePartitionInput! ): DeletePartitionPayload + """Deletes a single `PlatformApi` using a unique key.""" + deletePlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformApiInput! + ): DeletePlatformApiPayload + """Deletes a single `PlatformApiSchema` using a unique key.""" deletePlatformApiSchema( """ @@ -15225,14 +17082,6 @@ type Mutation { input: DeletePlatformApiSettingInput! ): DeletePlatformApiSettingPayload - """Deletes a single `PlatformApis` using a unique key.""" - deletePlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeletePlatformApisInput! - ): DeletePlatformApisPayload - """Deletes a single `PlatformCorsSetting` using a unique key.""" deletePlatformCorsSetting( """ @@ -15265,6 +17114,30 @@ type Mutation { input: DeletePlatformDomainVerificationInput! ): DeletePlatformDomainVerificationPayload + """Deletes a single `PlatformEmailIdentity` using a unique key.""" + deletePlatformEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformEmailIdentityInput! + ): DeletePlatformEmailIdentityPayload + + """Deletes a single `PlatformEmailProviderAccount` using a unique key.""" + deletePlatformEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformEmailProviderAccountInput! + ): DeletePlatformEmailProviderAccountPayload + + """Deletes a single `PlatformEmailSiteIdentity` using a unique key.""" + deletePlatformEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformEmailSiteIdentityInput! + ): DeletePlatformEmailSiteIdentityPayload + """Deletes a single `PlatformManagedDomain` using a unique key.""" deletePlatformManagedDomain( """ @@ -15615,12 +17488,6 @@ type Mutation { """ input: ProvisionBucketInput! ): ProvisionBucketPayload - rejectDatabaseTransfer( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: RejectDatabaseTransferInput! - ): RejectDatabaseTransferPayload """ Requests a database and returns a ticket (database_provision_module row) to poll. @@ -15650,6 +17517,14 @@ type Mutation { input: SitesProvisionStaticSiteInput! ): SitesProvisionStaticSitePayload + """Updates a single `Api` using a unique key and a patch.""" + updateApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateApiInput! + ): UpdateApiPayload + """Updates a single `ApiSchema` using a unique key and a patch.""" updateApiSchema( """ @@ -15666,13 +17541,21 @@ type Mutation { input: UpdateApiSettingInput! ): UpdateApiSettingPayload - """Updates a single `Apis` using a unique key and a patch.""" - updateApis( + """Updates a single `App` using a unique key and a patch.""" + updateApp( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdateApisInput! - ): UpdateApisPayload + input: UpdateAppInput! + ): UpdateAppPayload + + """Updates a single `AppComponent` using a unique key and a patch.""" + updateAppComponent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppComponentInput! + ): UpdateAppComponentPayload """Updates a single `CheckConstraint` using a unique key and a patch.""" updateCheckConstraint( @@ -15770,6 +17653,32 @@ type Mutation { input: UpdateDomainVerificationInput! ): UpdateDomainVerificationPayload + """Updates a single `EmailIdentity` using a unique key and a patch.""" + updateEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateEmailIdentityInput! + ): UpdateEmailIdentityPayload + + """ + Updates a single `EmailProviderAccount` using a unique key and a patch. + """ + updateEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateEmailProviderAccountInput! + ): UpdateEmailProviderAccountPayload + + """Updates a single `EmailSiteIdentity` using a unique key and a patch.""" + updateEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateEmailSiteIdentityInput! + ): UpdateEmailSiteIdentityPayload + """Updates a single `EmbeddingChunk` using a unique key and a patch.""" updateEmbeddingChunk( """ @@ -15902,6 +17811,14 @@ type Mutation { input: UpdatePartitionInput! ): UpdatePartitionPayload + """Updates a single `PlatformApi` using a unique key and a patch.""" + updatePlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformApiInput! + ): UpdatePlatformApiPayload + """Updates a single `PlatformApiSchema` using a unique key and a patch.""" updatePlatformApiSchema( """ @@ -15918,14 +17835,6 @@ type Mutation { input: UpdatePlatformApiSettingInput! ): UpdatePlatformApiSettingPayload - """Updates a single `PlatformApis` using a unique key and a patch.""" - updatePlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdatePlatformApisInput! - ): UpdatePlatformApisPayload - """Updates a single `PlatformCorsSetting` using a unique key and a patch.""" updatePlatformCorsSetting( """ @@ -15960,6 +17869,36 @@ type Mutation { input: UpdatePlatformDomainVerificationInput! ): UpdatePlatformDomainVerificationPayload + """ + Updates a single `PlatformEmailIdentity` using a unique key and a patch. + """ + updatePlatformEmailIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformEmailIdentityInput! + ): UpdatePlatformEmailIdentityPayload + + """ + Updates a single `PlatformEmailProviderAccount` using a unique key and a patch. + """ + updatePlatformEmailProviderAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformEmailProviderAccountInput! + ): UpdatePlatformEmailProviderAccountPayload + + """ + Updates a single `PlatformEmailSiteIdentity` using a unique key and a patch. + """ + updatePlatformEmailSiteIdentity( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformEmailSiteIdentityInput! + ): UpdatePlatformEmailSiteIdentityPayload + """ Updates a single `PlatformManagedDomain` using a unique key and a patch. """ @@ -16416,10 +18355,10 @@ input NodeTypeRegistryPatch { enum ObjectCategory { APP AUTH + CAPABILITIES CORE MEMBERSHIPS MODULE - PERMISSIONS } """ @@ -16875,12 +18814,237 @@ input PartitionPatch { updatedAt: Datetime } +""" +API surfaces exposed by this scope; publication makes a surface bindable from other scopes +""" +type PlatformApi { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database this API surface serves""" + dbname: String + id: UUID! + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean! + + """Owner-local API surface name""" + name: String! + + """Reads and enables pagination through a set of `PlatformApiSchema`.""" + platformApiSchemasByApiId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformApiSchema`.""" + orderBy: [PlatformApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformApiSchemaFilter + ): PlatformApiSchemaConnection! + + """ + Reads a single `PlatformApiSetting` that is related to this `PlatformApi`. + """ + platformApiSettingByApiId: PlatformApiSetting + + """ + Reads a single `PlatformCorsSetting` that is related to this `PlatformApi`. + """ + platformCorsSettingByApiId: PlatformCorsSetting + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""A connection to a list of `PlatformApi` values.""" +type PlatformApiConnection { + """ + A list of edges which contains the `PlatformApi` and cursor to aid in pagination. + """ + edges: [PlatformApiEdge]! + + """A list of `PlatformApi` objects.""" + nodes: [PlatformApi]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `PlatformApi` you could get from the connection.""" + totalCount: Int! +} + +"""A `PlatformApi` edge in the connection.""" +type PlatformApiEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformApi` at the end of the edge.""" + node: PlatformApi +} + +""" +A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformApiFilter { + """Checks for all expressions in this list.""" + and: [PlatformApiFilter!] + + """Filter by the object’s `anonRole` field.""" + anonRole: StringFilter + + """Filter by the object’s `config` field.""" + config: JSONFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `dbname` field.""" + dbname: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isPublished` field.""" + isPublished: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: PlatformApiFilter + + """Checks for any expressions in this list.""" + or: [PlatformApiFilter!] + + """Filter by the object’s `platformApiSchemasByApiId` relation.""" + platformApiSchemasByApiId: PlatformApiToManyPlatformApiSchemaFilter + + """`platformApiSchemasByApiId` exist.""" + platformApiSchemasByApiIdExist: Boolean + + """Filter by the object’s `platformApiSettingByApiId` relation.""" + platformApiSettingByApiId: PlatformApiSettingFilter + + """A related `platformApiSettingByApiId` exists.""" + platformApiSettingByApiIdExists: Boolean + + """Filter by the object’s `platformCorsSettingByApiId` relation.""" + platformCorsSettingByApiId: PlatformCorsSettingFilter + + """A related `platformCorsSettingByApiId` exists.""" + platformCorsSettingByApiIdExists: Boolean + + """Filter by the object’s `roleName` field.""" + roleName: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `PlatformApi`""" +input PlatformApiInput { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""Methods to use when ordering `PlatformApi`.""" +enum PlatformApiOrderBy { + ANON_ROLE_ASC + ANON_ROLE_DESC + CONFIG_ASC + CONFIG_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DBNAME_ASC + DBNAME_DESC + ID_ASC + ID_DESC + IS_PUBLISHED_ASC + IS_PUBLISHED_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ROLE_NAME_ASC + ROLE_NAME_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `PlatformApi`. Fields that are set will be updated. +""" +input PlatformApiPatch { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + """Join table linking API surfaces to the metaschema schemas they expose""" type PlatformApiSchema { """ - Reads a single `PlatformApis` that is related to this `PlatformApiSchema`. + Reads a single `PlatformApi` that is related to this `PlatformApiSchema`. """ - api: PlatformApis + api: PlatformApi """API surface that exposes this schema""" apiId: UUID! @@ -16931,7 +19095,7 @@ input PlatformApiSchemaFilter { and: [PlatformApiSchemaFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -17006,9 +19170,9 @@ Per-API feature flag overrides; NULL columns inherit from database_settings """ type PlatformApiSetting { """ - Reads a single `PlatformApis` that is related to this `PlatformApiSetting`. + Reads a single `PlatformApi` that is related to this `PlatformApiSetting`. """ - api: PlatformApis + api: PlatformApi """API surface these settings override for""" apiId: UUID! @@ -17123,7 +19287,7 @@ input PlatformApiSettingFilter { and: [PlatformApiSettingFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -17389,235 +19553,10 @@ input PlatformApiSettingPatch { updatedAt: Datetime } -""" -API surfaces exposed by this scope; publication makes a surface bindable from other scopes -""" -type PlatformApis { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database this API surface serves""" - dbname: String - id: UUID! - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean! - - """Owner-local API surface name""" - name: String! - - """Reads and enables pagination through a set of `PlatformApiSchema`.""" - platformApiSchemasByApiId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """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 - - """The method to use when ordering `PlatformApiSchema`.""" - orderBy: [PlatformApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: PlatformApiSchemaFilter - ): PlatformApiSchemaConnection! - - """ - Reads a single `PlatformApiSetting` that is related to this `PlatformApis`. - """ - platformApiSettingByApiId: PlatformApiSetting - - """ - Reads a single `PlatformCorsSetting` that is related to this `PlatformApis`. - """ - platformCorsSettingByApiId: PlatformCorsSetting - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -"""A connection to a list of `PlatformApis` values.""" -type PlatformApisConnection { - """ - A list of edges which contains the `PlatformApis` and cursor to aid in pagination. - """ - edges: [PlatformApisEdge]! - - """A list of `PlatformApis` objects.""" - nodes: [PlatformApis]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `PlatformApis` you could get from the connection.""" - totalCount: Int! -} - -"""A `PlatformApis` edge in the connection.""" -type PlatformApisEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `PlatformApis` at the end of the edge.""" - node: PlatformApis -} - -""" -A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ -""" -input PlatformApisFilter { - """Checks for all expressions in this list.""" - and: [PlatformApisFilter!] - - """Filter by the object’s `anonRole` field.""" - anonRole: StringFilter - - """Filter by the object’s `config` field.""" - config: JSONFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `dbname` field.""" - dbname: StringFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `isPublished` field.""" - isPublished: BooleanFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: PlatformApisFilter - - """Checks for any expressions in this list.""" - or: [PlatformApisFilter!] - - """Filter by the object’s `platformApiSchemasByApiId` relation.""" - platformApiSchemasByApiId: PlatformApisToManyPlatformApiSchemaFilter - - """`platformApiSchemasByApiId` exist.""" - platformApiSchemasByApiIdExist: Boolean - - """Filter by the object’s `platformApiSettingByApiId` relation.""" - platformApiSettingByApiId: PlatformApiSettingFilter - - """A related `platformApiSettingByApiId` exists.""" - platformApiSettingByApiIdExists: Boolean - - """Filter by the object’s `platformCorsSettingByApiId` relation.""" - platformCorsSettingByApiId: PlatformCorsSettingFilter - - """A related `platformCorsSettingByApiId` exists.""" - platformCorsSettingByApiIdExists: Boolean - - """Filter by the object’s `roleName` field.""" - roleName: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter -} - -"""An input for mutations affecting `PlatformApis`""" -input PlatformApisInput { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database this API surface serves""" - dbname: String - id: UUID - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean - - """Owner-local API surface name""" - name: String! - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -"""Methods to use when ordering `PlatformApis`.""" -enum PlatformApisOrderBy { - ANON_ROLE_ASC - ANON_ROLE_DESC - CONFIG_ASC - CONFIG_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DBNAME_ASC - DBNAME_DESC - ID_ASC - ID_DESC - IS_PUBLISHED_ASC - IS_PUBLISHED_DESC - NAME_ASC - NAME_DESC - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ROLE_NAME_ASC - ROLE_NAME_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC -} - -""" -Represents an update to a `PlatformApis`. Fields that are set will be updated. -""" -input PlatformApisPatch { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database this API surface serves""" - dbname: String - id: UUID - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean - - """Owner-local API surface name""" - name: String - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - """ A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ """ -input PlatformApisToManyPlatformApiSchemaFilter { +input PlatformApiToManyPlatformApiSchemaFilter { """Filters to entities where every related entity matches.""" every: PlatformApiSchemaFilter @@ -17636,9 +19575,9 @@ type PlatformCorsSetting { allowedOrigins: [String]! """ - Reads a single `PlatformApis` that is related to this `PlatformCorsSetting`. + Reads a single `PlatformApi` that is related to this `PlatformCorsSetting`. """ - api: PlatformApis + api: PlatformApi """ Optional API surface for per-API override; NULL means scope-wide default @@ -17688,7 +19627,7 @@ input PlatformCorsSettingFilter { and: [PlatformCorsSettingFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """A related `api` exists.""" apiExists: Boolean @@ -18254,384 +20193,1167 @@ enum PlatformDomainOrderBy { } """ -Represents an update to a `PlatformDomain`. Fields that are set will be updated. +Represents an update to a `PlatformDomain`. Fields that are set will be updated. +""" +input PlatformDomainPatch { + """Module-specific configuration for this hostname""" + config: JSON + createdAt: Datetime + + """Lowercase fully-qualified hostname; wildcards use the *.parent form""" + hostname: String + id: UUID + + """Whether other scopes may see and bind under this hostname""" + isPublished: Boolean + + """Whether this hostname is a *.parent wildcard claim""" + isWildcard: Boolean + + """ + Whether the platform drives this hostname's DNS verification and certificate lifecycle + """ + managed: Boolean + + """ + Parent hostname a wildcard claim covers (example.com for *.example.com) + """ + parentHostname: String + + """When the certificate last became ready""" + tlsReadyAt: Datetime + + """Name of the TLS secret serving this hostname""" + tlsSecretName: String + + """Certificate lifecycle state for this hostname""" + tlsStatus: String + updatedAt: Datetime + + """Ownership verification state of this hostname""" + verificationStatus: String + + """When ownership verification last succeeded""" + verifiedAt: Datetime +} + +""" +A filter to be used against many `PlatformDomainEvent` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformDomainToManyPlatformDomainEventFilter { + """Filters to entities where every related entity matches.""" + every: PlatformDomainEventFilter + + """Filters to entities where no related entity matches.""" + none: PlatformDomainEventFilter + + """Filters to entities where at least one related entity matches.""" + some: PlatformDomainEventFilter +} + +""" +A filter to be used against many `PlatformDomainVerification` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformDomainToManyPlatformDomainVerificationFilter { + """Filters to entities where every related entity matches.""" + every: PlatformDomainVerificationFilter + + """Filters to entities where no related entity matches.""" + none: PlatformDomainVerificationFilter + + """Filters to entities where at least one related entity matches.""" + some: PlatformDomainVerificationFilter +} + +"""Ownership verification challenges issued for a domain""" +type PlatformDomainVerification { + """How many times this challenge has been probed""" + attempts: Int! + createdAt: Datetime + + """ + Reads a single `PlatformDomain` that is related to this `PlatformDomainVerification`. + """ + domain: PlatformDomain + + """Scoped domain this verification challenge belongs to""" + domainId: UUID + + """Last verification error, if any""" + error: String + + """When this challenge expires""" + expiresAt: Datetime + id: UUID! + + """When this challenge was last probed""" + lastCheckedAt: Datetime + + """ + Reads a single `PlatformManagedDomain` that is related to this `PlatformDomainVerification`. + """ + managedDomain: PlatformManagedDomain + + """Managed hostname this verification challenge belongs to""" + managedDomainId: UUID + + """Verification method (dns-txt, http-token, …)""" + method: String! + + """DNS record name the challenge expects""" + recordName: String + + """DNS record type the challenge expects""" + recordType: String + + """DNS record value the challenge expects""" + recordValue: String + + """Challenge state""" + status: String! + updatedAt: Datetime + + """When this challenge succeeded""" + verifiedAt: Datetime +} + +"""A connection to a list of `PlatformDomainVerification` values.""" +type PlatformDomainVerificationConnection { + """ + A list of edges which contains the `PlatformDomainVerification` and cursor to aid in pagination. + """ + edges: [PlatformDomainVerificationEdge]! + + """A list of `PlatformDomainVerification` objects.""" + nodes: [PlatformDomainVerification]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformDomainVerification` you could get from the connection. + """ + totalCount: Int! +} + +"""A `PlatformDomainVerification` edge in the connection.""" +type PlatformDomainVerificationEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformDomainVerification` at the end of the edge.""" + node: PlatformDomainVerification +} + +""" +A filter to be used against `PlatformDomainVerification` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformDomainVerificationFilter { + """Checks for all expressions in this list.""" + and: [PlatformDomainVerificationFilter!] + + """Filter by the object’s `attempts` field.""" + attempts: IntFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `domain` relation.""" + domain: PlatformDomainFilter + + """A related `domain` exists.""" + domainExists: Boolean + + """Filter by the object’s `domainId` field.""" + domainId: UUIDFilter + + """Filter by the object’s `error` field.""" + error: StringFilter + + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `lastCheckedAt` field.""" + lastCheckedAt: DatetimeFilter + + """Filter by the object’s `managedDomain` relation.""" + managedDomain: PlatformManagedDomainFilter + + """A related `managedDomain` exists.""" + managedDomainExists: Boolean + + """Filter by the object’s `managedDomainId` field.""" + managedDomainId: UUIDFilter + + """Filter by the object’s `method` field.""" + method: StringFilter + + """Negates the expression.""" + not: PlatformDomainVerificationFilter + + """Checks for any expressions in this list.""" + or: [PlatformDomainVerificationFilter!] + + """Filter by the object’s `recordName` field.""" + recordName: StringFilter + + """Filter by the object’s `recordType` field.""" + recordType: StringFilter + + """Filter by the object’s `recordValue` field.""" + recordValue: StringFilter + + """Filter by the object’s `status` field.""" + status: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `verifiedAt` field.""" + verifiedAt: DatetimeFilter +} + +"""An input for mutations affecting `PlatformDomainVerification`""" +input PlatformDomainVerificationInput { + """How many times this challenge has been probed""" + attempts: Int + createdAt: Datetime + + """Scoped domain this verification challenge belongs to""" + domainId: UUID + + """Last verification error, if any""" + error: String + + """When this challenge expires""" + expiresAt: Datetime + id: UUID + + """When this challenge was last probed""" + lastCheckedAt: Datetime + + """Managed hostname this verification challenge belongs to""" + managedDomainId: UUID + + """Verification method (dns-txt, http-token, …)""" + method: String! + + """DNS record name the challenge expects""" + recordName: String + + """DNS record type the challenge expects""" + recordType: String + + """DNS record value the challenge expects""" + recordValue: String + + """Challenge state""" + status: String + updatedAt: Datetime + + """When this challenge succeeded""" + verifiedAt: Datetime +} + +"""Methods to use when ordering `PlatformDomainVerification`.""" +enum PlatformDomainVerificationOrderBy { + ATTEMPTS_ASC + ATTEMPTS_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DOMAIN_ID_ASC + DOMAIN_ID_DESC + ERROR_ASC + ERROR_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC + ID_ASC + ID_DESC + LAST_CHECKED_AT_ASC + LAST_CHECKED_AT_DESC + MANAGED_DOMAIN_ID_ASC + MANAGED_DOMAIN_ID_DESC + METHOD_ASC + METHOD_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + RECORD_NAME_ASC + RECORD_NAME_DESC + RECORD_TYPE_ASC + RECORD_TYPE_DESC + RECORD_VALUE_ASC + RECORD_VALUE_DESC + STATUS_ASC + STATUS_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + VERIFIED_AT_ASC + VERIFIED_AT_DESC +} + +""" +Represents an update to a `PlatformDomainVerification`. Fields that are set will be updated. +""" +input PlatformDomainVerificationPatch { + """How many times this challenge has been probed""" + attempts: Int + createdAt: Datetime + + """Scoped domain this verification challenge belongs to""" + domainId: UUID + + """Last verification error, if any""" + error: String + + """When this challenge expires""" + expiresAt: Datetime + id: UUID + + """When this challenge was last probed""" + lastCheckedAt: Datetime + + """Managed hostname this verification challenge belongs to""" + managedDomainId: UUID + + """Verification method (dns-txt, http-token, …)""" + method: String + + """DNS record name the challenge expects""" + recordName: String + + """DNS record type the challenge expects""" + recordType: String + + """DNS record value the challenge expects""" + recordValue: String + + """Challenge state""" + status: String + updatedAt: Datetime + + """When this challenge succeeded""" + verifiedAt: Datetime +} + +"""All input for the `platformDomainsAssignSubdomain` mutation.""" +input PlatformDomainsAssignSubdomainInput { + apex: String + + """ + 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 + label: String + maxAttempts: Int +} + +"""The output of our `platformDomainsAssignSubdomain` mutation.""" +type PlatformDomainsAssignSubdomainPayload { + """ + 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 + + """An edge for our `PlatformDomain`. May be used by Relay 1.""" + platformDomainEdge( + """The method to use when ordering `PlatformDomain`.""" + orderBy: [PlatformDomainOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformDomainEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformDomain +} + +""" +Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through +""" +type PlatformEmailIdentity { + createdAt: Datetime + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String! + + """Display name shown beside the from address""" + fromName: String + id: UUID! + + """Whether this identity may be resolved for a send""" + isActive: Boolean! + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean! + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String! + + """ + Reads and enables pagination through a set of `PlatformEmailSiteIdentity`. + """ + platformEmailSiteIdentitiesByEmailIdentityId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformEmailSiteIdentity`.""" + orderBy: [PlatformEmailSiteIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformEmailSiteIdentityFilter + ): PlatformEmailSiteIdentityConnection! + + """ + Reads a single `PlatformEmailProviderAccount` that is related to this `PlatformEmailIdentity`. + """ + providerAccount: PlatformEmailProviderAccount + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String! + updatedAt: Datetime +} + +"""A connection to a list of `PlatformEmailIdentity` values.""" +type PlatformEmailIdentityConnection { + """ + A list of edges which contains the `PlatformEmailIdentity` and cursor to aid in pagination. + """ + edges: [PlatformEmailIdentityEdge]! + + """A list of `PlatformEmailIdentity` objects.""" + nodes: [PlatformEmailIdentity]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformEmailIdentity` you could get from the connection. + """ + totalCount: Int! +} + +"""A `PlatformEmailIdentity` edge in the connection.""" +type PlatformEmailIdentityEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformEmailIdentity` at the end of the edge.""" + node: PlatformEmailIdentity +} + +""" +A filter to be used against `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformEmailIdentityFilter { + """Checks for all expressions in this list.""" + and: [PlatformEmailIdentityFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `fromAddress` field.""" + fromAddress: StringFilter + + """Filter by the object’s `fromName` field.""" + fromName: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `isDefault` field.""" + isDefault: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: PlatformEmailIdentityFilter + + """Checks for any expressions in this list.""" + or: [PlatformEmailIdentityFilter!] + + """ + Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. + """ + platformEmailSiteIdentitiesByEmailIdentityId: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter + + """`platformEmailSiteIdentitiesByEmailIdentityId` exist.""" + platformEmailSiteIdentitiesByEmailIdentityIdExist: Boolean + + """Filter by the object’s `providerAccount` relation.""" + providerAccount: PlatformEmailProviderAccountFilter + + """A related `providerAccount` exists.""" + providerAccountExists: Boolean + + """Filter by the object’s `providerAccountId` field.""" + providerAccountId: UUIDFilter + + """Filter by the object’s `replyToAddress` field.""" + replyToAddress: StringFilter + + """Filter by the object’s `supportAddress` field.""" + supportAddress: StringFilter + + """Filter by the object’s `transportMode` field.""" + transportMode: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `PlatformEmailIdentity`""" +input PlatformEmailIdentityInput { + createdAt: Datetime + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String! + + """Display name shown beside the from address""" + fromName: String + id: UUID + + """Whether this identity may be resolved for a send""" + isActive: Boolean + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String! + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String + updatedAt: Datetime +} + +"""Methods to use when ordering `PlatformEmailIdentity`.""" +enum PlatformEmailIdentityOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + FROM_ADDRESS_ASC + FROM_ADDRESS_DESC + FROM_NAME_ASC + FROM_NAME_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_DEFAULT_ASC + IS_DEFAULT_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROVIDER_ACCOUNT_ID_ASC + PROVIDER_ACCOUNT_ID_DESC + REPLY_TO_ADDRESS_ASC + REPLY_TO_ADDRESS_DESC + SUPPORT_ADDRESS_ASC + SUPPORT_ADDRESS_DESC + TRANSPORT_MODE_ASC + TRANSPORT_MODE_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `PlatformEmailIdentity`. Fields that are set will be updated. +""" +input PlatformEmailIdentityPatch { + createdAt: Datetime + + """ + Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. + """ + fromAddress: String + + """Display name shown beside the from address""" + fromName: String + id: UUID + + """Whether this identity may be resolved for a send""" + isActive: Boolean + + """ + The scope default identity, used when no site binding resolves. At most one per scope key. + """ + isDefault: Boolean + + """Operator-facing name for this identity (e.g. transactional, support)""" + name: String + + """ + Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. + """ + providerAccountId: UUID + + """Reply-To address when replies should not go to the from address""" + replyToAddress: String + + """Support address rendered in message bodies and footers""" + supportAddress: String + + """ + own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback + """ + transportMode: String + updatedAt: Datetime +} + +""" +A filter to be used against many `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter { + """Filters to entities where every related entity matches.""" + every: PlatformEmailSiteIdentityFilter + + """Filters to entities where no related entity matches.""" + none: PlatformEmailSiteIdentityFilter + + """Filters to entities where at least one related entity matches.""" + some: PlatformEmailSiteIdentityFilter +} + +""" +A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) +""" +type PlatformEmailProviderAccount { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String + createdAt: Datetime + + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String! + id: UUID! + + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean! + + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String! + + """Reads and enables pagination through a set of `PlatformEmailIdentity`.""" + platformEmailIdentitiesByProviderAccountId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformEmailIdentity`.""" + orderBy: [PlatformEmailIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformEmailIdentityFilter + ): PlatformEmailIdentityConnection! + + """ + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK + """ + provider: String! + + """ + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name + """ + providerAccountName: String + + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String + + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String + + """SMTP port""" + smtpPort: Int + + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean + + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String +} + +"""A connection to a list of `PlatformEmailProviderAccount` values.""" +type PlatformEmailProviderAccountConnection { + """ + A list of edges which contains the `PlatformEmailProviderAccount` and cursor to aid in pagination. + """ + edges: [PlatformEmailProviderAccountEdge]! + + """A list of `PlatformEmailProviderAccount` objects.""" + nodes: [PlatformEmailProviderAccount]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `PlatformEmailProviderAccount` you could get from the connection. + """ + totalCount: Int! +} + +"""A `PlatformEmailProviderAccount` edge in the connection.""" +type PlatformEmailProviderAccountEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformEmailProviderAccount` at the end of the edge.""" + node: PlatformEmailProviderAccount +} + +""" +A filter to be used against `PlatformEmailProviderAccount` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformEmailProviderAccountFilter { + """Checks for all expressions in this list.""" + and: [PlatformEmailProviderAccountFilter!] + + """Filter by the object’s `apiBaseUrl` field.""" + apiBaseUrl: StringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `credentialsSecretName` field.""" + credentialsSecretName: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: PlatformEmailProviderAccountFilter + + """Checks for any expressions in this list.""" + or: [PlatformEmailProviderAccountFilter!] + + """ + Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. + """ + platformEmailIdentitiesByProviderAccountId: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter + + """`platformEmailIdentitiesByProviderAccountId` exist.""" + platformEmailIdentitiesByProviderAccountIdExist: Boolean + + """Filter by the object’s `provider` field.""" + provider: StringFilter + + """Filter by the object’s `providerAccountName` field.""" + providerAccountName: StringFilter + + """Filter by the object’s `region` field.""" + region: StringFilter + + """Filter by the object’s `smtpHost` field.""" + smtpHost: StringFilter + + """Filter by the object’s `smtpPort` field.""" + smtpPort: IntFilter + + """Filter by the object’s `smtpSecure` field.""" + smtpSecure: BooleanFilter + + """Filter by the object’s `smtpUser` field.""" + smtpUser: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `webhookSigningSecretName` field.""" + webhookSigningSecretName: StringFilter +} + +"""An input for mutations affecting `PlatformEmailProviderAccount`""" +input PlatformEmailProviderAccountInput { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String + createdAt: Datetime + + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String! + id: UUID + + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean + + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String! + + """ + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK + """ + provider: String! + + """ + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name + """ + providerAccountName: String + + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String + + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String + + """SMTP port""" + smtpPort: Int + + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean + + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String +} + +"""Methods to use when ordering `PlatformEmailProviderAccount`.""" +enum PlatformEmailProviderAccountOrderBy { + API_BASE_URL_ASC + API_BASE_URL_DESC + CREATED_AT_ASC + CREATED_AT_DESC + CREDENTIALS_SECRET_NAME_ASC + CREDENTIALS_SECRET_NAME_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PROVIDER_ACCOUNT_NAME_ASC + PROVIDER_ACCOUNT_NAME_DESC + PROVIDER_ASC + PROVIDER_DESC + REGION_ASC + REGION_DESC + SMTP_HOST_ASC + SMTP_HOST_DESC + SMTP_PORT_ASC + SMTP_PORT_DESC + SMTP_SECURE_ASC + SMTP_SECURE_DESC + SMTP_USER_ASC + SMTP_USER_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + WEBHOOK_SIGNING_SECRET_NAME_ASC + WEBHOOK_SIGNING_SECRET_NAME_DESC +} + +""" +Represents an update to a `PlatformEmailProviderAccount`. Fields that are set will be updated. """ -input PlatformDomainPatch { - """Module-specific configuration for this hostname""" - config: JSON +input PlatformEmailProviderAccountPatch { + """ + Provider API base URL when it is not the provider default (e.g. Mailgun EU) + """ + apiBaseUrl: String createdAt: Datetime - """Lowercase fully-qualified hostname; wildcards use the *.parent form""" - hostname: String + """ + Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. + """ + credentialsSecretName: String id: UUID - """Whether other scopes may see and bind under this hostname""" - isPublished: Boolean + """ + Whether identities may send through this account. Disabling one row stops every identity that references it. + """ + isActive: Boolean - """Whether this hostname is a *.parent wildcard claim""" - isWildcard: Boolean + """Operator-facing name for this account (e.g. transactional, marketing)""" + name: String """ - Whether the platform drives this hostname's DNS verification and certificate lifecycle + integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK """ - managed: Boolean + provider: String """ - Parent hostname a wildcard claim covers (example.com for *.example.com) + Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name """ - parentHostname: String + providerAccountName: String - """When the certificate last became ready""" - tlsReadyAt: Datetime + """Provider region for region-addressed providers (e.g. SES us-east-1)""" + region: String - """Name of the TLS secret serving this hostname""" - tlsSecretName: String + """SMTP host (provider = smtp, or a provider addressed over SMTP)""" + smtpHost: String - """Certificate lifecycle state for this hostname""" - tlsStatus: String - updatedAt: Datetime + """SMTP port""" + smtpPort: Int - """Ownership verification state of this hostname""" - verificationStatus: String + """Whether the SMTP connection uses implicit TLS""" + smtpSecure: Boolean - """When ownership verification last succeeded""" - verifiedAt: Datetime + """ + SMTP username; the password is a secret, addressed by credentials_secret_name + """ + smtpUser: String + updatedAt: Datetime + + """ + Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. + """ + webhookSigningSecretName: String } """ -A filter to be used against many `PlatformDomainEvent` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ """ -input PlatformDomainToManyPlatformDomainEventFilter { +input PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter { """Filters to entities where every related entity matches.""" - every: PlatformDomainEventFilter + every: PlatformEmailIdentityFilter """Filters to entities where no related entity matches.""" - none: PlatformDomainEventFilter + none: PlatformEmailIdentityFilter """Filters to entities where at least one related entity matches.""" - some: PlatformDomainEventFilter + some: PlatformEmailIdentityFilter } """ -A filter to be used against many `PlatformDomainVerification` object types. All fields are combined with a logical ‘and.’ +Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. """ -input PlatformDomainToManyPlatformDomainVerificationFilter { - """Filters to entities where every related entity matches.""" - every: PlatformDomainVerificationFilter - - """Filters to entities where no related entity matches.""" - none: PlatformDomainVerificationFilter - - """Filters to entities where at least one related entity matches.""" - some: PlatformDomainVerificationFilter -} - -"""Ownership verification challenges issued for a domain""" -type PlatformDomainVerification { - """How many times this challenge has been probed""" - attempts: Int! +type PlatformEmailSiteIdentity { createdAt: Datetime """ - Reads a single `PlatformDomain` that is related to this `PlatformDomainVerification`. + Reads a single `PlatformEmailIdentity` that is related to this `PlatformEmailSiteIdentity`. """ - domain: PlatformDomain + emailIdentity: PlatformEmailIdentity - """Scoped domain this verification challenge belongs to""" - domainId: UUID - - """Last verification error, if any""" - error: String - - """When this challenge expires""" - expiresAt: Datetime + """Identity this site sends as""" + emailIdentityId: UUID! id: UUID! - """When this challenge was last probed""" - lastCheckedAt: Datetime - """ - Reads a single `PlatformManagedDomain` that is related to this `PlatformDomainVerification`. + Reads a single `PlatformSite` that is related to this `PlatformEmailSiteIdentity`. """ - managedDomain: PlatformManagedDomain - - """Managed hostname this verification challenge belongs to""" - managedDomainId: UUID - - """Verification method (dns-txt, http-token, …)""" - method: String! - - """DNS record name the challenge expects""" - recordName: String - - """DNS record type the challenge expects""" - recordType: String - - """DNS record value the challenge expects""" - recordValue: String + site: PlatformSite - """Challenge state""" - status: String! + """Site whose mail is sent as the bound identity""" + siteId: UUID! updatedAt: Datetime - - """When this challenge succeeded""" - verifiedAt: Datetime } -"""A connection to a list of `PlatformDomainVerification` values.""" -type PlatformDomainVerificationConnection { +"""A connection to a list of `PlatformEmailSiteIdentity` values.""" +type PlatformEmailSiteIdentityConnection { """ - A list of edges which contains the `PlatformDomainVerification` and cursor to aid in pagination. + A list of edges which contains the `PlatformEmailSiteIdentity` and cursor to aid in pagination. """ - edges: [PlatformDomainVerificationEdge]! + edges: [PlatformEmailSiteIdentityEdge]! - """A list of `PlatformDomainVerification` objects.""" - nodes: [PlatformDomainVerification]! + """A list of `PlatformEmailSiteIdentity` objects.""" + nodes: [PlatformEmailSiteIdentity]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `PlatformDomainVerification` you could get from the connection. + The count of *all* `PlatformEmailSiteIdentity` you could get from the connection. """ totalCount: Int! } -"""A `PlatformDomainVerification` edge in the connection.""" -type PlatformDomainVerificationEdge { +"""A `PlatformEmailSiteIdentity` edge in the connection.""" +type PlatformEmailSiteIdentityEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `PlatformDomainVerification` at the end of the edge.""" - node: PlatformDomainVerification + """The `PlatformEmailSiteIdentity` at the end of the edge.""" + node: PlatformEmailSiteIdentity } """ -A filter to be used against `PlatformDomainVerification` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ """ -input PlatformDomainVerificationFilter { +input PlatformEmailSiteIdentityFilter { """Checks for all expressions in this list.""" - and: [PlatformDomainVerificationFilter!] - - """Filter by the object’s `attempts` field.""" - attempts: IntFilter + and: [PlatformEmailSiteIdentityFilter!] """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter - """Filter by the object’s `domain` relation.""" - domain: PlatformDomainFilter - - """A related `domain` exists.""" - domainExists: Boolean - - """Filter by the object’s `domainId` field.""" - domainId: UUIDFilter - - """Filter by the object’s `error` field.""" - error: StringFilter + """Filter by the object’s `emailIdentity` relation.""" + emailIdentity: PlatformEmailIdentityFilter - """Filter by the object’s `expiresAt` field.""" - expiresAt: DatetimeFilter + """Filter by the object’s `emailIdentityId` field.""" + emailIdentityId: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `lastCheckedAt` field.""" - lastCheckedAt: DatetimeFilter - - """Filter by the object’s `managedDomain` relation.""" - managedDomain: PlatformManagedDomainFilter - - """A related `managedDomain` exists.""" - managedDomainExists: Boolean - - """Filter by the object’s `managedDomainId` field.""" - managedDomainId: UUIDFilter - - """Filter by the object’s `method` field.""" - method: StringFilter - """Negates the expression.""" - not: PlatformDomainVerificationFilter + not: PlatformEmailSiteIdentityFilter """Checks for any expressions in this list.""" - or: [PlatformDomainVerificationFilter!] - - """Filter by the object’s `recordName` field.""" - recordName: StringFilter - - """Filter by the object’s `recordType` field.""" - recordType: StringFilter + or: [PlatformEmailSiteIdentityFilter!] - """Filter by the object’s `recordValue` field.""" - recordValue: StringFilter + """Filter by the object’s `site` relation.""" + site: PlatformSiteFilter - """Filter by the object’s `status` field.""" - status: StringFilter + """Filter by the object’s `siteId` field.""" + siteId: UUIDFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter - - """Filter by the object’s `verifiedAt` field.""" - verifiedAt: DatetimeFilter } -"""An input for mutations affecting `PlatformDomainVerification`""" -input PlatformDomainVerificationInput { - """How many times this challenge has been probed""" - attempts: Int +"""An input for mutations affecting `PlatformEmailSiteIdentity`""" +input PlatformEmailSiteIdentityInput { createdAt: Datetime - """Scoped domain this verification challenge belongs to""" - domainId: UUID - - """Last verification error, if any""" - error: String - - """When this challenge expires""" - expiresAt: Datetime + """Identity this site sends as""" + emailIdentityId: UUID! id: UUID - """When this challenge was last probed""" - lastCheckedAt: Datetime - - """Managed hostname this verification challenge belongs to""" - managedDomainId: UUID - - """Verification method (dns-txt, http-token, …)""" - method: String! - - """DNS record name the challenge expects""" - recordName: String - - """DNS record type the challenge expects""" - recordType: String - - """DNS record value the challenge expects""" - recordValue: String - - """Challenge state""" - status: String + """Site whose mail is sent as the bound identity""" + siteId: UUID! updatedAt: Datetime - - """When this challenge succeeded""" - verifiedAt: Datetime } -"""Methods to use when ordering `PlatformDomainVerification`.""" -enum PlatformDomainVerificationOrderBy { - ATTEMPTS_ASC - ATTEMPTS_DESC +"""Methods to use when ordering `PlatformEmailSiteIdentity`.""" +enum PlatformEmailSiteIdentityOrderBy { CREATED_AT_ASC CREATED_AT_DESC - DOMAIN_ID_ASC - DOMAIN_ID_DESC - ERROR_ASC - ERROR_DESC - EXPIRES_AT_ASC - EXPIRES_AT_DESC + EMAIL_IDENTITY_ID_ASC + EMAIL_IDENTITY_ID_DESC ID_ASC ID_DESC - LAST_CHECKED_AT_ASC - LAST_CHECKED_AT_DESC - MANAGED_DOMAIN_ID_ASC - MANAGED_DOMAIN_ID_DESC - METHOD_ASC - METHOD_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - RECORD_NAME_ASC - RECORD_NAME_DESC - RECORD_TYPE_ASC - RECORD_TYPE_DESC - RECORD_VALUE_ASC - RECORD_VALUE_DESC - STATUS_ASC - STATUS_DESC + SITE_ID_ASC + SITE_ID_DESC UPDATED_AT_ASC UPDATED_AT_DESC - VERIFIED_AT_ASC - VERIFIED_AT_DESC } """ -Represents an update to a `PlatformDomainVerification`. Fields that are set will be updated. +Represents an update to a `PlatformEmailSiteIdentity`. Fields that are set will be updated. """ -input PlatformDomainVerificationPatch { - """How many times this challenge has been probed""" - attempts: Int +input PlatformEmailSiteIdentityPatch { createdAt: Datetime - """Scoped domain this verification challenge belongs to""" - domainId: UUID - - """Last verification error, if any""" - error: String - - """When this challenge expires""" - expiresAt: Datetime + """Identity this site sends as""" + emailIdentityId: UUID id: UUID - """When this challenge was last probed""" - lastCheckedAt: Datetime - - """Managed hostname this verification challenge belongs to""" - managedDomainId: UUID - - """Verification method (dns-txt, http-token, …)""" - method: String - - """DNS record name the challenge expects""" - recordName: String - - """DNS record type the challenge expects""" - recordType: String - - """DNS record value the challenge expects""" - recordValue: String - - """Challenge state""" - status: String + """Site whose mail is sent as the bound identity""" + siteId: UUID updatedAt: Datetime - - """When this challenge succeeded""" - verifiedAt: Datetime -} - -"""All input for the `platformDomainsAssignSubdomain` mutation.""" -input PlatformDomainsAssignSubdomainInput { - apex: String - - """ - 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 - label: String - maxAttempts: Int -} - -"""The output of our `platformDomainsAssignSubdomain` mutation.""" -type PlatformDomainsAssignSubdomainPayload { - """ - 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 - - """An edge for our `PlatformDomain`. May be used by Relay 1.""" - platformDomainEdge( - """The method to use when ordering `PlatformDomain`.""" - orderBy: [PlatformDomainOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformDomainEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: PlatformDomain } """ @@ -19246,6 +21968,11 @@ type PlatformSite { """Owner-local site surface name""" name: String! + """ + Reads a single `PlatformEmailSiteIdentity` that is related to this `PlatformSite`. + """ + platformEmailSiteIdentityBySiteId: PlatformEmailSiteIdentity + """Reads and enables pagination through a set of `PlatformPage`.""" platformPagesBySiteId( """Read all values in the set after (below) this cursor.""" @@ -20075,6 +22802,12 @@ input PlatformSiteFilter { """Checks for any expressions in this list.""" or: [PlatformSiteFilter!] + """Filter by the object’s `platformEmailSiteIdentityBySiteId` relation.""" + platformEmailSiteIdentityBySiteId: PlatformEmailSiteIdentityFilter + + """A related `platformEmailSiteIdentityBySiteId` exists.""" + platformEmailSiteIdentityBySiteIdExists: Boolean + """Filter by the object’s `platformPagesBySiteId` relation.""" platformPagesBySiteId: PlatformSiteToManyPlatformPageFilter @@ -21976,8 +24709,37 @@ type Query { where: ApiSettingFilter ): ApiSettingConnection - """Reads and enables pagination through a set of `Apis`.""" - apises( + """Reads and enables pagination through a set of `Api`.""" + apis( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ApiFilter + ): ApiConnection + + """Reads and enables pagination through a set of `AppComponent`.""" + appComponents( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -21996,18 +24758,18 @@ type Query { """ offset: Int - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `AppComponent`.""" + orderBy: [AppComponentOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: ApisFilter - ): ApisConnection + where: AppComponentFilter + ): AppComponentConnection applyRegistryDefaults(data: JSON, nodeType: String): JSON - """Reads and enables pagination through a set of `AstMigration`.""" - astMigrations( + """Reads and enables pagination through a set of `App`.""" + apps( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -22026,14 +24788,14 @@ type Query { """ offset: Int - """The method to use when ordering `AstMigration`.""" - orderBy: [AstMigrationOrderBy!] = [NATURAL] + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AstMigrationFilter - ): AstMigrationConnection + where: AppFilter + ): AppConnection """Reads and enables pagination through a set of `CheckConstraint`.""" checkConstraints( @@ -22383,6 +25145,93 @@ type Query { where: DomainFilter ): DomainConnection + """Reads and enables pagination through a set of `EmailIdentity`.""" + emailIdentities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailIdentity`.""" + orderBy: [EmailIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailIdentityFilter + ): EmailIdentityConnection + + """Reads and enables pagination through a set of `EmailProviderAccount`.""" + emailProviderAccounts( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailProviderAccount`.""" + orderBy: [EmailProviderAccountOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailProviderAccountFilter + ): EmailProviderAccountConnection + + """Reads and enables pagination through a set of `EmailSiteIdentity`.""" + emailSiteIdentities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailSiteIdentity`.""" + orderBy: [EmailSiteIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailSiteIdentityFilter + ): EmailSiteIdentityConnection + """Reads and enables pagination through a set of `EmbeddingChunk`.""" embeddingChunks( """Read all values in the set after (below) this cursor.""" @@ -22907,8 +25756,8 @@ type Query { where: PlatformApiSettingFilter ): PlatformApiSettingConnection - """Reads and enables pagination through a set of `PlatformApis`.""" - platformApises( + """Reads and enables pagination through a set of `PlatformApi`.""" + platformApis( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -22927,14 +25776,14 @@ type Query { """ offset: Int - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: PlatformApisFilter - ): PlatformApisConnection + where: PlatformApiFilter + ): PlatformApiConnection """Reads and enables pagination through a set of `PlatformCorsSetting`.""" platformCorsSettings( @@ -23054,6 +25903,97 @@ type Query { where: PlatformDomainFilter ): PlatformDomainConnection + """Reads and enables pagination through a set of `PlatformEmailIdentity`.""" + platformEmailIdentities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformEmailIdentity`.""" + orderBy: [PlatformEmailIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformEmailIdentityFilter + ): PlatformEmailIdentityConnection + + """ + Reads and enables pagination through a set of `PlatformEmailProviderAccount`. + """ + platformEmailProviderAccounts( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformEmailProviderAccount`.""" + orderBy: [PlatformEmailProviderAccountOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformEmailProviderAccountFilter + ): PlatformEmailProviderAccountConnection + + """ + Reads and enables pagination through a set of `PlatformEmailSiteIdentity`. + """ + platformEmailSiteIdentities( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `PlatformEmailSiteIdentity`.""" + orderBy: [PlatformEmailSiteIdentityOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformEmailSiteIdentityFilter + ): PlatformEmailSiteIdentityConnection + """Reads and enables pagination through a set of `PlatformManagedDomain`.""" platformManagedDomains( """Read all values in the set after (below) this cursor.""" @@ -23841,35 +26781,6 @@ type Query { where: SpatialRelationFilter ): SpatialRelationConnection - """Reads and enables pagination through a set of `SqlAction`.""" - sqlActions( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """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 - - """The method to use when ordering `SqlAction`.""" - orderBy: [SqlActionOrderBy!] = [NATURAL] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: SqlActionFilter - ): SqlActionConnection - """Reads and enables pagination through a set of `TableBehavior`.""" tableBehaviors( """Read all values in the set after (below) this cursor.""" @@ -24250,31 +27161,6 @@ type Query { ): WebauthnSettingConnection } -"""All input for the `rejectDatabaseTransfer` mutation.""" -input RejectDatabaseTransferInput { - """ - 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 - transferId: UUID -} - -"""The output of our `rejectDatabaseTransfer` mutation.""" -type RejectDatabaseTransferPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: Boolean -} - """All input for the `requestDatabase` mutation.""" input RequestDatabaseInput { """ @@ -26009,6 +28895,9 @@ type Site { """Human-readable site description""" description: String + + """Reads a single `EmailSiteIdentity` that is related to this `Site`.""" + emailSiteIdentity: EmailSiteIdentity id: UUID! """ @@ -26864,6 +29753,12 @@ input SiteFilter { """Filter by the object’s `description` field.""" description: StringFilter + """Filter by the object’s `emailSiteIdentity` relation.""" + emailSiteIdentity: EmailSiteIdentityFilter + + """A related `emailSiteIdentity` exists.""" + emailSiteIdentityExists: Boolean + """Filter by the object’s `id` field.""" id: UUIDFilter @@ -28223,129 +31118,6 @@ input SpatialRelationPatch { updatedAt: Datetime } -type SqlAction { - actionId: UUID - actionName: String - actorId: UUID - content: String - createdAt: Datetime - databaseId: UUID - deploy: String - deps: [String] - id: Int - name: String - payload: JSON - revert: String - verify: String -} - -"""A connection to a list of `SqlAction` values.""" -type SqlActionConnection { - """ - A list of edges which contains the `SqlAction` and cursor to aid in pagination. - """ - edges: [SqlActionEdge]! - - """A list of `SqlAction` objects.""" - nodes: [SqlAction]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `SqlAction` you could get from the connection.""" - totalCount: Int! -} - -"""A `SqlAction` edge in the connection.""" -type SqlActionEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `SqlAction` at the end of the edge.""" - node: SqlAction -} - -""" -A filter to be used against `SqlAction` object types. All fields are combined with a logical ‘and.’ -""" -input SqlActionFilter { - """Filter by the object’s `actionId` field.""" - actionId: UUIDFilter - - """Filter by the object’s `actionName` field.""" - actionName: StringFilter - - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - - """Checks for all expressions in this list.""" - and: [SqlActionFilter!] - - """Filter by the object’s `content` field.""" - content: StringFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `deploy` field.""" - deploy: StringFilter - - """Filter by the object’s `deps` field.""" - deps: StringListFilter - - """Filter by the object’s `id` field.""" - id: IntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: SqlActionFilter - - """Checks for any expressions in this list.""" - or: [SqlActionFilter!] - - """Filter by the object’s `revert` field.""" - revert: StringFilter - - """Filter by the object’s `verify` field.""" - verify: StringFilter -} - -"""Methods to use when ordering `SqlAction`.""" -enum SqlActionOrderBy { - ACTION_ID_ASC - ACTION_ID_DESC - ACTION_NAME_ASC - ACTION_NAME_DESC - ACTOR_ID_ASC - ACTOR_ID_DESC - CONTENT_ASC - CONTENT_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - DEPLOY_ASC - DEPLOY_DESC - DEPS_ASC - DEPS_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - NATURAL - PAYLOAD_ASC - PAYLOAD_DESC - REVERT_ASC - REVERT_DESC - VERIFY_ASC - VERIFY_DESC -} - """ A filter to be used against String fields. All fields are combined with a logical ‘and.’ """ @@ -30902,6 +33674,44 @@ input UniqueConstraintToManyUniqueConstraintBehaviorFilter { some: UniqueConstraintBehaviorFilter } +"""All input for the `updateApi` mutation.""" +input UpdateApiInput { + """ + An object where the defined keys will be set on the `Api` being updated. + """ + apiPatch: ApiPatch! + + """ + 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 update `Api` mutation.""" +type UpdateApiPayload { + """The `Api` that was updated by this mutation.""" + api: Api + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateApiSchema` mutation.""" input UpdateApiSchemaInput { """ @@ -30978,12 +33788,50 @@ type UpdateApiSettingPayload { query: Query } -"""All input for the `updateApis` mutation.""" -input UpdateApisInput { +"""All input for the `updateAppComponent` mutation.""" +input UpdateAppComponentInput { + """ + An object where the defined keys will be set on the `AppComponent` being updated. + """ + appComponentPatch: AppComponentPatch! + + """ + 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 update `AppComponent` mutation.""" +type UpdateAppComponentPayload { + """The `AppComponent` that was updated by this mutation.""" + appComponent: AppComponent + + """An edge for our `AppComponent`. May be used by Relay 1.""" + appComponentEdge( + """The method to use when ordering `AppComponent`.""" + orderBy: [AppComponentOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppComponentEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateApp` mutation.""" +input UpdateAppInput { """ - An object where the defined keys will be set on the `Apis` being updated. + An object where the defined keys will be set on the `App` being updated. """ - apisPatch: ApisPatch! + appPatch: AppPatch! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -30993,16 +33841,16 @@ input UpdateApisInput { id: UUID! } -"""The output of our update `Apis` mutation.""" -type UpdateApisPayload { - """The `Apis` that was updated by this mutation.""" - apis: Apis +"""The output of our update `App` mutation.""" +type UpdateAppPayload { + """The `App` that was updated by this mutation.""" + app: App - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge + """An edge for our `App`. May be used by Relay 1.""" + appEdge( + """The method to use when ordering `App`.""" + orderBy: [AppOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -31472,6 +34320,120 @@ type UpdateDomainVerificationPayload { query: Query } +"""All input for the `updateEmailIdentity` mutation.""" +input UpdateEmailIdentityInput { + """ + 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 + + """ + An object where the defined keys will be set on the `EmailIdentity` being updated. + """ + emailIdentityPatch: EmailIdentityPatch! + id: UUID! +} + +"""The output of our update `EmailIdentity` mutation.""" +type UpdateEmailIdentityPayload { + """ + 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 `EmailIdentity` that was updated by this mutation.""" + emailIdentity: EmailIdentity + + """An edge for our `EmailIdentity`. May be used by Relay 1.""" + emailIdentityEdge( + """The method to use when ordering `EmailIdentity`.""" + orderBy: [EmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateEmailProviderAccount` mutation.""" +input UpdateEmailProviderAccountInput { + """ + 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 + + """ + An object where the defined keys will be set on the `EmailProviderAccount` being updated. + """ + emailProviderAccountPatch: EmailProviderAccountPatch! + id: UUID! +} + +"""The output of our update `EmailProviderAccount` mutation.""" +type UpdateEmailProviderAccountPayload { + """ + 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 `EmailProviderAccount` that was updated by this mutation.""" + emailProviderAccount: EmailProviderAccount + + """An edge for our `EmailProviderAccount`. May be used by Relay 1.""" + emailProviderAccountEdge( + """The method to use when ordering `EmailProviderAccount`.""" + orderBy: [EmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateEmailSiteIdentity` mutation.""" +input UpdateEmailSiteIdentityInput { + """ + 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 + + """ + An object where the defined keys will be set on the `EmailSiteIdentity` being updated. + """ + emailSiteIdentityPatch: EmailSiteIdentityPatch! + id: UUID! +} + +"""The output of our update `EmailSiteIdentity` mutation.""" +type UpdateEmailSiteIdentityPayload { + """ + 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 `EmailSiteIdentity` that was updated by this mutation.""" + emailSiteIdentity: EmailSiteIdentity + + """An edge for our `EmailSiteIdentity`. May be used by Relay 1.""" + emailSiteIdentityEdge( + """The method to use when ordering `EmailSiteIdentity`.""" + orderBy: [EmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateEmbeddingChunk` mutation.""" input UpdateEmbeddingChunkInput { """ @@ -32084,6 +35046,44 @@ type UpdatePartitionPayload { query: Query } +"""All input for the `updatePlatformApi` mutation.""" +input UpdatePlatformApiInput { + """ + 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 `PlatformApi` being updated. + """ + platformApiPatch: PlatformApiPatch! +} + +"""The output of our update `PlatformApi` mutation.""" +type UpdatePlatformApiPayload { + """ + 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 `PlatformApi` that was updated by this mutation.""" + platformApi: PlatformApi + + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updatePlatformApiSchema` mutation.""" input UpdatePlatformApiSchemaInput { """ @@ -32160,44 +35160,6 @@ type UpdatePlatformApiSettingPayload { query: Query } -"""All input for the `updatePlatformApis` mutation.""" -input UpdatePlatformApisInput { - """ - 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 `PlatformApis` being updated. - """ - platformApisPatch: PlatformApisPatch! -} - -"""The output of our update `PlatformApis` mutation.""" -type UpdatePlatformApisPayload { - """ - 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 `PlatformApis` that was updated by this mutation.""" - platformApis: PlatformApis - - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the `updatePlatformCorsSetting` mutation.""" input UpdatePlatformCorsSettingInput { """ @@ -32350,6 +35312,122 @@ type UpdatePlatformDomainVerificationPayload { query: Query } +"""All input for the `updatePlatformEmailIdentity` mutation.""" +input UpdatePlatformEmailIdentityInput { + """ + 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 `PlatformEmailIdentity` being updated. + """ + platformEmailIdentityPatch: PlatformEmailIdentityPatch! +} + +"""The output of our update `PlatformEmailIdentity` mutation.""" +type UpdatePlatformEmailIdentityPayload { + """ + 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 `PlatformEmailIdentity` that was updated by this mutation.""" + platformEmailIdentity: PlatformEmailIdentity + + """An edge for our `PlatformEmailIdentity`. May be used by Relay 1.""" + platformEmailIdentityEdge( + """The method to use when ordering `PlatformEmailIdentity`.""" + orderBy: [PlatformEmailIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlatformEmailProviderAccount` mutation.""" +input UpdatePlatformEmailProviderAccountInput { + """ + 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 `PlatformEmailProviderAccount` being updated. + """ + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch! +} + +"""The output of our update `PlatformEmailProviderAccount` mutation.""" +type UpdatePlatformEmailProviderAccountPayload { + """ + 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 `PlatformEmailProviderAccount` that was updated by this mutation.""" + platformEmailProviderAccount: PlatformEmailProviderAccount + + """ + An edge for our `PlatformEmailProviderAccount`. May be used by Relay 1. + """ + platformEmailProviderAccountEdge( + """The method to use when ordering `PlatformEmailProviderAccount`.""" + orderBy: [PlatformEmailProviderAccountOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailProviderAccountEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlatformEmailSiteIdentity` mutation.""" +input UpdatePlatformEmailSiteIdentityInput { + """ + 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 `PlatformEmailSiteIdentity` being updated. + """ + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch! +} + +"""The output of our update `PlatformEmailSiteIdentity` mutation.""" +type UpdatePlatformEmailSiteIdentityPayload { + """ + 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 `PlatformEmailSiteIdentity` that was updated by this mutation.""" + platformEmailSiteIdentity: PlatformEmailSiteIdentity + + """An edge for our `PlatformEmailSiteIdentity`. May be used by Relay 1.""" + platformEmailSiteIdentityEdge( + """The method to use when ordering `PlatformEmailSiteIdentity`.""" + orderBy: [PlatformEmailSiteIdentityOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformEmailSiteIdentityEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updatePlatformManagedDomain` mutation.""" input UpdatePlatformManagedDomainInput { """ diff --git a/sdk/constructive-sdk/schemas/auth.graphql b/sdk/constructive-sdk/schemas/auth.graphql index a939ca8e28..5e5386d6eb 100644 --- a/sdk/constructive-sdk/schemas/auth.graphql +++ b/sdk/constructive-sdk/schemas/auth.graphql @@ -2838,6 +2838,12 @@ type Mutation { """ input: SignInCrossOriginInput! ): SignInCrossOriginPayload + signInMagicLink( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SignInMagicLinkInput! + ): SignInMagicLinkPayload signInSmsOtp( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -2856,6 +2862,12 @@ type Mutation { """ input: SignUpInput! ): SignUpPayload + signUpMagicLink( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SignUpMagicLinkInput! + ): SignUpMagicLinkPayload signUpSms( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3085,7 +3097,9 @@ type PageInfo { User phone numbers with country code, verification, and primary-number management """ type PhoneNumber { - """Country calling code (e.g. +1, +44)""" + """ + Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. + """ cc: String! createdAt: Datetime id: UUID! @@ -3101,7 +3115,9 @@ type PhoneNumber { """ name: String - """The phone number without country code""" + """ + The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. + """ number: String! """Reads a single `User` that is related to this `PhoneNumber`.""" @@ -3182,7 +3198,9 @@ input PhoneNumberFilter { """An input for mutations affecting `PhoneNumber`""" input PhoneNumberInput { - """Country calling code (e.g. +1, +44)""" + """ + Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. + """ cc: String! createdAt: Datetime id: UUID @@ -3198,7 +3216,9 @@ input PhoneNumberInput { """ name: String - """The phone number without country code""" + """ + The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. + """ number: String! ownerId: UUID updatedAt: Datetime @@ -3233,7 +3253,9 @@ enum PhoneNumberOrderBy { Represents an update to a `PhoneNumber`. Fields that are set will be updated. """ input PhoneNumberPatch { - """Country calling code (e.g. +1, +44)""" + """ + Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. + """ cc: String createdAt: Datetime id: UUID @@ -3249,7 +3271,9 @@ input PhoneNumberPatch { """ name: String - """The phone number without country code""" + """ + The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. + """ number: String ownerId: UUID updatedAt: Datetime @@ -3607,11 +3631,11 @@ enum PrincipalOrderBy { } """ -Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. +Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. """ type PrincipalScopeOverride { """ - Optional permission mask; AND-masked with parent permissions during cascade. NULL means no extra mask. + Optional capability mask; AND-masked with parent capabilities during cascade. NULL means no extra mask. """ allowedMask: BitString createdAt: Datetime @@ -4549,6 +4573,40 @@ input SignInInput { rememberMe: Boolean } +"""All input for the `signInMagicLink` mutation.""" +input SignInMagicLinkInput { + """ + 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 + credentialKind: String + deviceToken: String + rememberMe: Boolean + token: String +} + +"""The output of our `signInMagicLink` mutation.""" +type SignInMagicLinkPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: SignInMagicLinkRecord +} + +type SignInMagicLinkRecord { + accessToken: String + accessTokenExpiresAt: Datetime + userId: UUID +} + """The output of our `signIn` mutation.""" type SignInPayload { """ @@ -4648,6 +4706,40 @@ input SignUpInput { rememberMe: Boolean } +"""All input for the `signUpMagicLink` mutation.""" +input SignUpMagicLinkInput { + """ + 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 + credentialKind: String + deviceToken: String + rememberMe: Boolean + token: String +} + +"""The output of our `signUpMagicLink` mutation.""" +type SignUpMagicLinkPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: SignUpMagicLinkRecord +} + +type SignUpMagicLinkRecord { + accessToken: String + accessTokenExpiresAt: Datetime + userId: UUID +} + """The output of our `signUp` mutation.""" type SignUpPayload { """ diff --git a/sdk/constructive-sdk/schemas/compute.graphql b/sdk/constructive-sdk/schemas/compute.graphql index 9b31ae0f4f..fab3a1298c 100644 --- a/sdk/constructive-sdk/schemas/compute.graphql +++ b/sdk/constructive-sdk/schemas/compute.graphql @@ -352,6 +352,250 @@ input ConstructiveInternalTypeImageFilter { notIn: [ConstructiveInternalTypeImage!] } +""" +Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store +""" +type ContentPreset { + """Whether this preset is selectable at provision time""" + active: Boolean! + + """ + Infra store commit for the current definition (stamped by the versioned trigger on every write) + """ + commitId: UUID + + """Timestamp of preset creation""" + createdAt: Datetime! + + """ + The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store + """ + definition: JSON! + + """Human-readable description of the preset""" + description: String + + """Unique preset identifier""" + id: UUID! + + """ + What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) + """ + kind: String! + + """Human-readable preset name""" + label: String + + """ + Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] + """ + slug: String! + + """ + Infra Merkle store holding this preset's history (stamped by the versioned trigger) + """ + storeId: UUID + + """Timestamp of last modification""" + updatedAt: Datetime! +} + +"""A connection to a list of `ContentPreset` values.""" +type ContentPresetConnection { + """ + A list of edges which contains the `ContentPreset` and cursor to aid in pagination. + """ + edges: [ContentPresetEdge]! + + """A list of `ContentPreset` objects.""" + nodes: [ContentPreset]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `ContentPreset` you could get from the connection.""" + totalCount: Int! +} + +"""A `ContentPreset` edge in the connection.""" +type ContentPresetEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ContentPreset` at the end of the edge.""" + node: ContentPreset +} + +""" +A filter to be used against `ContentPreset` object types. All fields are combined with a logical ‘and.’ +""" +input ContentPresetFilter { + """Filter by the object’s `active` field.""" + active: BooleanFilter + + """Checks for all expressions in this list.""" + and: [ContentPresetFilter!] + + """Filter by the object’s `commitId` field.""" + commitId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `definition` field.""" + definition: JSONFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `kind` field.""" + kind: StringFilter + + """Filter by the object’s `label` field.""" + label: StringFilter + + """Negates the expression.""" + not: ContentPresetFilter + + """Checks for any expressions in this list.""" + or: [ContentPresetFilter!] + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `storeId` field.""" + storeId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `ContentPreset`""" +input ContentPresetInput { + """Whether this preset is selectable at provision time""" + active: Boolean + + """ + Infra store commit for the current definition (stamped by the versioned trigger on every write) + """ + commitId: UUID + + """Timestamp of preset creation""" + createdAt: Datetime + + """ + The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store + """ + definition: JSON! + + """Human-readable description of the preset""" + description: String + + """Unique preset identifier""" + id: UUID + + """ + What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) + """ + kind: String! + + """Human-readable preset name""" + label: String + + """ + Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] + """ + slug: String! + + """ + Infra Merkle store holding this preset's history (stamped by the versioned trigger) + """ + storeId: UUID + + """Timestamp of last modification""" + updatedAt: Datetime +} + +"""Methods to use when ordering `ContentPreset`.""" +enum ContentPresetOrderBy { + ACTIVE_ASC + ACTIVE_DESC + COMMIT_ID_ASC + COMMIT_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DEFINITION_ASC + DEFINITION_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + ID_ASC + ID_DESC + KIND_ASC + KIND_DESC + LABEL_ASC + LABEL_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC + STORE_ID_ASC + STORE_ID_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `ContentPreset`. Fields that are set will be updated. +""" +input ContentPresetPatch { + """Whether this preset is selectable at provision time""" + active: Boolean + + """ + Infra store commit for the current definition (stamped by the versioned trigger on every write) + """ + commitId: UUID + + """Timestamp of preset creation""" + createdAt: Datetime + + """ + The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store + """ + definition: JSON + + """Human-readable description of the preset""" + description: String + + """Unique preset identifier""" + id: UUID + + """ + What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) + """ + kind: String + + """Human-readable preset name""" + label: String + + """ + Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] + """ + slug: String + + """ + Infra Merkle store holding this preset's history (stamped by the versioned trigger) + """ + storeId: UUID + + """Timestamp of last modification""" + updatedAt: Datetime +} + """All input for the `copyGraph` mutation.""" input CopyGraphInput { """ @@ -379,6 +623,41 @@ type CopyGraphPayload { result: UUID } +"""All input for the create `ContentPreset` mutation.""" +input CreateContentPresetInput { + """ + 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 `ContentPreset` to be created by this mutation.""" + contentPreset: ContentPresetInput! +} + +"""The output of our create `ContentPreset` mutation.""" +type CreateContentPresetPayload { + """ + 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 `ContentPreset` that was created by this mutation.""" + contentPreset: ContentPreset + + """An edge for our `ContentPreset`. May be used by Relay 1.""" + contentPresetEdge( + """The method to use when ordering `ContentPreset`.""" + orderBy: [ContentPresetOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `DbPreset` mutation.""" input CreateDbPresetInput { """ @@ -2705,6 +2984,41 @@ input DbPresetPatch { updatedAt: Datetime } +"""All input for the `deleteContentPreset` mutation.""" +input DeleteContentPresetInput { + """ + 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 preset identifier""" + id: UUID! +} + +"""The output of our delete `ContentPreset` mutation.""" +type DeleteContentPresetPayload { + """ + 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 `ContentPreset` that was deleted by this mutation.""" + contentPreset: ContentPreset + + """An edge for our `ContentPreset`. May be used by Relay 1.""" + contentPresetEdge( + """The method to use when ordering `ContentPreset`.""" + orderBy: [ContentPresetOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteDbPreset` mutation.""" input DeleteDbPresetInput { """ @@ -5154,7 +5468,7 @@ Function definitions — registered cloud functions with routing, queue, and ret """ type FunctionDefinition { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String]! @@ -5335,7 +5649,7 @@ type FunctionDefinition { queueName: String! """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String]! @@ -5349,6 +5663,11 @@ type FunctionDefinition { """ requiredModels: [String]! + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String]! + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -5572,6 +5891,9 @@ input FunctionDefinitionFilter { """Filter by the object’s `requiredModels` field.""" requiredModels: StringListFilter + """Filter by the object’s `requiredModules` field.""" + requiredModules: StringListFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -5612,7 +5934,7 @@ input FunctionDefinitionFilter { """An input for mutations affecting `FunctionDefinition`""" input FunctionDefinitionInput { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -5713,7 +6035,7 @@ input FunctionDefinitionInput { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -5727,6 +6049,11 @@ input FunctionDefinitionInput { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -5837,6 +6164,8 @@ enum FunctionDefinitionOrderBy { REQUIRED_CONFIGS_DESC REQUIRED_MODELS_ASC REQUIRED_MODELS_DESC + REQUIRED_MODULES_ASC + REQUIRED_MODULES_DESC REQUIRED_SECRETS_ASC REQUIRED_SECRETS_DESC RESOURCES_ASC @@ -5866,7 +6195,7 @@ Represents an update to a `FunctionDefinition`. Fields that are set will be upda """ input FunctionDefinitionPatch { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -5967,7 +6296,7 @@ input FunctionDefinitionPatch { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -5981,6 +6310,11 @@ input FunctionDefinitionPatch { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -6112,6 +6446,11 @@ type FunctionDeployment { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -6413,6 +6752,9 @@ input FunctionDeploymentFilter { """Checks for any expressions in this list.""" or: [FunctionDeploymentFilter!] + """Filter by the object’s `realm` field.""" + realm: StringFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -6482,6 +6824,11 @@ input FunctionDeploymentInput { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -6551,6 +6898,8 @@ enum FunctionDeploymentOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC RESOURCES_ASC RESOURCES_DESC REVISION_ASC @@ -6614,6 +6963,11 @@ input FunctionDeploymentPatch { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -9719,6 +10073,36 @@ type InfraInsertNodeAtPathPayload { result: UUID } +"""All input for the `infraInsertNodesAtPaths` mutation.""" +input InfraInsertNodesAtPathsInput { + """ + 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 + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `infraInsertNodesAtPaths` mutation.""" +type InfraInsertNodesAtPathsPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children """ @@ -9991,6 +10375,44 @@ input InfraRefPatch { storeId: UUID } +"""All input for the `infraSetAndCommit` mutation.""" +input InfraSetAndCommitInput { + """ + 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 + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `infraSetAndCommit` mutation.""" +type InfraSetAndCommitPayload { + """ + 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 + + """An edge for our `InfraCommit`. May be used by Relay 1.""" + infraCommitEdge( + """The method to use when ordering `InfraCommit`.""" + orderBy: [InfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): InfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: InfraCommit +} + """All input for the `infraSetDataAtPath` mutation.""" input InfraSetDataAtPathInput { """ @@ -10019,6 +10441,41 @@ type InfraSetDataAtPathPayload { result: UUID } +"""All input for the `infraSetManyAndCommit` mutation.""" +input InfraSetManyAndCommitInput { + """ + 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 + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `infraSetManyAndCommit` mutation.""" +type InfraSetManyAndCommitPayload { + """ + 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 + + """An edge for our `InfraCommit`. May be used by Relay 1.""" + infraCommitEdge( + """The method to use when ordering `InfraCommit`.""" + orderBy: [InfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): InfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: InfraCommit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ @@ -10204,6 +10661,36 @@ type InsertNodeAtPathPayload { result: UUID } +"""All input for the `insertNodesAtPaths` mutation.""" +input InsertNodesAtPathsInput { + """ + 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 + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `insertNodesAtPaths` mutation.""" +type InsertNodesAtPathsPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ A filter to be used against Int fields. All fields are combined with a logical ‘and.’ """ @@ -10984,8 +11471,16 @@ type Mutation { """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CopyGraphInput! - ): CopyGraphPayload + input: CopyGraphInput! + ): CopyGraphPayload + + """Creates a single `ContentPreset`.""" + createContentPreset( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateContentPresetInput! + ): CreateContentPresetPayload """Creates a single `DbPreset`.""" createDbPreset( @@ -11433,6 +11928,14 @@ type Mutation { input: CreateWebhookEventInput! ): CreateWebhookEventPayload + """Deletes a single `ContentPreset` using a unique key.""" + deleteContentPreset( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteContentPresetInput! + ): DeleteContentPresetPayload + """Deletes a single `DbPreset` using a unique key.""" deleteDbPreset( """ @@ -11908,12 +12411,30 @@ type Mutation { """ input: InfraInsertNodeAtPathInput! ): InfraInsertNodeAtPathPayload + infraInsertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraInsertNodesAtPathsInput! + ): InfraInsertNodesAtPathsPayload + infraSetAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraSetAndCommitInput! + ): InfraSetAndCommitPayload infraSetDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: InfraSetDataAtPathInput! ): InfraSetDataAtPathPayload + infraSetManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraSetManyAndCommitInput! + ): InfraSetManyAndCommitPayload initEmptyRepo( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -11926,6 +12447,12 @@ type Mutation { """ input: InsertNodeAtPathInput! ): InsertNodeAtPathPayload + insertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InsertNodesAtPathsInput! + ): InsertNodesAtPathsPayload platformInfraInitEmptyRepo( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -11938,12 +12465,30 @@ type Mutation { """ input: PlatformInfraInsertNodeAtPathInput! ): PlatformInfraInsertNodeAtPathPayload + platformInfraInsertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraInsertNodesAtPathsInput! + ): PlatformInfraInsertNodesAtPathsPayload + platformInfraSetAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetAndCommitInput! + ): PlatformInfraSetAndCommitPayload platformInfraSetDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: PlatformInfraSetDataAtPathInput! ): PlatformInfraSetDataAtPathPayload + platformInfraSetManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetManyAndCommitInput! + ): PlatformInfraSetManyAndCommitPayload platformResourceInstallationsInstall( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -12011,12 +12556,24 @@ type Mutation { """ input: SaveGraphInput! ): SaveGraphPayload + setAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetAndCommitInput! + ): SetAndCommitPayload setDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SetDataAtPathInput! ): SetDataAtPathPayload + setManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetManyAndCommitInput! + ): SetManyAndCommitPayload startExecution( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -12024,6 +12581,14 @@ type Mutation { input: StartExecutionInput! ): StartExecutionPayload + """Updates a single `ContentPreset` using a unique key and a patch.""" + updateContentPreset( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateContentPresetInput! + ): UpdateContentPresetPayload + """Updates a single `DbPreset` using a unique key and a patch.""" updateDbPreset( """ @@ -13624,7 +14189,7 @@ Function definitions — registered cloud functions with routing, queue, and ret """ type PlatformFunctionDefinition { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String]! @@ -13845,7 +14410,7 @@ type PlatformFunctionDefinition { queueName: String! """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String]! @@ -13859,6 +14424,11 @@ type PlatformFunctionDefinition { """ requiredModels: [String]! + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String]! + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14074,6 +14644,9 @@ input PlatformFunctionDefinitionFilter { """Filter by the object’s `requiredModels` field.""" requiredModels: StringListFilter + """Filter by the object’s `requiredModules` field.""" + requiredModules: StringListFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -14111,7 +14684,7 @@ input PlatformFunctionDefinitionFilter { """An input for mutations affecting `PlatformFunctionDefinition`""" input PlatformFunctionDefinitionInput { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -14214,7 +14787,7 @@ input PlatformFunctionDefinitionInput { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -14228,6 +14801,11 @@ input PlatformFunctionDefinitionInput { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14343,6 +14921,8 @@ enum PlatformFunctionDefinitionOrderBy { REQUIRED_CONFIGS_DESC REQUIRED_MODELS_ASC REQUIRED_MODELS_DESC + REQUIRED_MODULES_ASC + REQUIRED_MODULES_DESC REQUIRED_SECRETS_ASC REQUIRED_SECRETS_DESC RESOURCES_ASC @@ -14374,7 +14954,7 @@ Represents an update to a `PlatformFunctionDefinition`. Fields that are set will """ input PlatformFunctionDefinitionPatch { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -14477,7 +15057,7 @@ input PlatformFunctionDefinitionPatch { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -14491,6 +15071,11 @@ input PlatformFunctionDefinitionPatch { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14624,6 +15209,11 @@ type PlatformFunctionDeployment { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -14908,6 +15498,9 @@ input PlatformFunctionDeploymentFilter { """Checks for any expressions in this list.""" or: [PlatformFunctionDeploymentFilter!] + """Filter by the object’s `realm` field.""" + realm: StringFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -14974,6 +15567,11 @@ input PlatformFunctionDeploymentInput { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -15041,6 +15639,8 @@ enum PlatformFunctionDeploymentOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC RESOURCES_ASC RESOURCES_DESC REVISION_ASC @@ -15101,6 +15701,11 @@ input PlatformFunctionDeploymentPatch { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -16222,6 +16827,36 @@ type PlatformInfraInsertNodeAtPathPayload { result: UUID } +"""All input for the `platformInfraInsertNodesAtPaths` mutation.""" +input PlatformInfraInsertNodesAtPathsInput { + """ + 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 + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `platformInfraInsertNodesAtPaths` mutation.""" +type PlatformInfraInsertNodesAtPathsPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children """ @@ -16498,6 +17133,44 @@ input PlatformInfraRefPatch { storeId: UUID } +"""All input for the `platformInfraSetAndCommit` mutation.""" +input PlatformInfraSetAndCommitInput { + """ + 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 + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetAndCommit` mutation.""" +type PlatformInfraSetAndCommitPayload { + """ + 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 + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """All input for the `platformInfraSetDataAtPath` mutation.""" input PlatformInfraSetDataAtPathInput { """ @@ -16526,6 +17199,41 @@ type PlatformInfraSetDataAtPathPayload { result: UUID } +"""All input for the `platformInfraSetManyAndCommit` mutation.""" +input PlatformInfraSetManyAndCommitInput { + """ + 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 + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetManyAndCommit` mutation.""" +type PlatformInfraSetManyAndCommitPayload { + """ + 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 + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ @@ -20743,6 +21451,35 @@ type Query { """ _meta: MetaSchema + """Reads and enables pagination through a set of `ContentPreset`.""" + contentPresets( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `ContentPreset`.""" + orderBy: [ContentPresetOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ContentPresetFilter + ): ContentPresetConnection + """Reads and enables pagination through a set of `DbPreset`.""" dbPresets( """Read all values in the set after (below) this cursor.""" @@ -25741,6 +26478,44 @@ type SaveGraphPayload { result: UUID } +"""All input for the `setAndCommit` mutation.""" +input SetAndCommitInput { + """ + 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 + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setAndCommit` mutation.""" +type SetAndCommitPayload { + """ + 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 + + """An edge for our `FunctionGraphCommit`. May be used by Relay 1.""" + functionGraphCommitEdge( + """The method to use when ordering `FunctionGraphCommit`.""" + orderBy: [FunctionGraphCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: FunctionGraphCommit +} + """All input for the `setDataAtPath` mutation.""" input SetDataAtPathInput { """ @@ -25769,6 +26544,41 @@ type SetDataAtPathPayload { result: UUID } +"""All input for the `setManyAndCommit` mutation.""" +input SetManyAndCommitInput { + """ + 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 + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setManyAndCommit` mutation.""" +type SetManyAndCommitPayload { + """ + 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 + + """An edge for our `FunctionGraphCommit`. May be used by Relay 1.""" + functionGraphCommitEdge( + """The method to use when ordering `FunctionGraphCommit`.""" + orderBy: [FunctionGraphCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: FunctionGraphCommit +} + """All input for the `startExecution` mutation.""" input StartExecutionInput { """ @@ -26108,6 +26918,46 @@ input UUIDListFilter { overlaps: [UUID] } +"""All input for the `updateContentPreset` mutation.""" +input UpdateContentPresetInput { + """ + 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 + + """ + An object where the defined keys will be set on the `ContentPreset` being updated. + """ + contentPresetPatch: ContentPresetPatch! + + """Unique preset identifier""" + id: UUID! +} + +"""The output of our update `ContentPreset` mutation.""" +type UpdateContentPresetPayload { + """ + 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 `ContentPreset` that was updated by this mutation.""" + contentPreset: ContentPreset + + """An edge for our `ContentPreset`. May be used by Relay 1.""" + contentPresetEdge( + """The method to use when ordering `ContentPreset`.""" + orderBy: [ContentPresetOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateDbPreset` mutation.""" input UpdateDbPresetInput { """ diff --git a/sdk/constructive-sdk/schemas/modules.graphql b/sdk/constructive-sdk/schemas/modules.graphql index f2eb2bbb56..ee97e6316d 100644 --- a/sdk/constructive-sdk/schemas/modules.graphql +++ b/sdk/constructive-sdk/schemas/modules.graphql @@ -3,7 +3,7 @@ type AgentModule { agentTableName: String! apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID hasAgents: Boolean! @@ -82,8 +82,8 @@ input AgentModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -191,7 +191,7 @@ input AgentModuleInput { agentTableName: String apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID hasAgents: Boolean @@ -235,8 +235,8 @@ enum AgentModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -312,7 +312,7 @@ input AgentModulePatch { agentTableName: String apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID hasAgents: Boolean @@ -363,7 +363,7 @@ type ApiSurfaceModule { corsSettingsTableId: UUID! corsSettingsTableName: String! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID! @@ -450,8 +450,8 @@ input ApiSurfaceModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -503,7 +503,7 @@ input ApiSurfaceModuleInput { corsSettingsTableId: UUID corsSettingsTableName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -540,8 +540,8 @@ enum ApiSurfaceModuleOrderBy { CORS_SETTINGS_TABLE_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -582,7 +582,7 @@ input ApiSurfaceModulePatch { corsSettingsTableId: UUID corsSettingsTableName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -606,7 +606,7 @@ type AppModule { catalogModule: CatalogModule catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID! @@ -681,8 +681,8 @@ input AppModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -736,7 +736,7 @@ input AppModuleInput { appsTableName: String catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -767,8 +767,8 @@ enum AppModuleOrderBy { CATALOG_MODULE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -809,7 +809,7 @@ input AppModulePatch { appsTableName: String catalogModuleId: UUID databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -878,8 +878,8 @@ type BillingModule { balancesTableId: UUID! balancesTableName: String! databaseId: UUID! + defaultCapabilities: [String] defaultMeterCatalog: JSON - defaultPermissions: [String] id: UUID! ledgerTableId: UUID! ledgerTableName: String! @@ -949,12 +949,12 @@ input BillingModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter + """Filter by the object’s `defaultMeterCatalog` field.""" defaultMeterCatalog: JSONFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter - """Filter by the object’s `id` field.""" id: UUIDFilter @@ -1034,8 +1034,8 @@ input BillingModuleInput { balancesTableId: UUID balancesTableName: String databaseId: UUID! + defaultCapabilities: [String] defaultMeterCatalog: JSON - defaultPermissions: [String] id: UUID ledgerTableId: UUID ledgerTableName: String @@ -1070,10 +1070,10 @@ enum BillingModuleOrderBy { BALANCES_TABLE_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DEFAULT_METER_CATALOG_ASC DEFAULT_METER_CATALOG_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC ID_ASC ID_DESC LEDGER_TABLE_ID_ASC @@ -1131,8 +1131,8 @@ input BillingModulePatch { balancesTableId: UUID balancesTableName: String databaseId: UUID + defaultCapabilities: [String] defaultMeterCatalog: JSON - defaultPermissions: [String] id: UUID ledgerTableId: UUID ledgerTableName: String @@ -1161,16 +1161,22 @@ type BillingProviderModule { apiName: String billingCustomersTableId: UUID! billingCustomersTableName: String! + billingInvoicesTableId: UUID! + billingInvoicesTableName: String! billingPricesTableId: UUID! billingPricesTableName: String! billingProductsTableId: UUID! billingProductsTableName: String! + billingRefundsTableId: UUID! + billingRefundsTableName: String! billingSubscriptionsTableId: UUID! billingSubscriptionsTableName: String! billingWebhookEventsTableId: UUID! billingWebhookEventsTableName: String! databaseId: UUID! id: UUID! + listPendingUsageSyncFunction: String! + markUsageSyncedFunction: String! prefix: String pricesTableId: UUID privateApiName: String @@ -1178,8 +1184,10 @@ type BillingProviderModule { processBillingEventFunction: String! productsTableId: UUID provider: String! + recordRefundFunction: String! schemaId: UUID! subscriptionsTableId: UUID + upsertInvoiceFunction: String! } """A connection to a list of `BillingProviderModule` values.""" @@ -1226,6 +1234,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `billingCustomersTableName` field.""" billingCustomersTableName: StringFilter + """Filter by the object’s `billingInvoicesTableId` field.""" + billingInvoicesTableId: UUIDFilter + + """Filter by the object’s `billingInvoicesTableName` field.""" + billingInvoicesTableName: StringFilter + """Filter by the object’s `billingPricesTableId` field.""" billingPricesTableId: UUIDFilter @@ -1238,6 +1252,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `billingProductsTableName` field.""" billingProductsTableName: StringFilter + """Filter by the object’s `billingRefundsTableId` field.""" + billingRefundsTableId: UUIDFilter + + """Filter by the object’s `billingRefundsTableName` field.""" + billingRefundsTableName: StringFilter + """Filter by the object’s `billingSubscriptionsTableId` field.""" billingSubscriptionsTableId: UUIDFilter @@ -1256,6 +1276,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `listPendingUsageSyncFunction` field.""" + listPendingUsageSyncFunction: StringFilter + + """Filter by the object’s `markUsageSyncedFunction` field.""" + markUsageSyncedFunction: StringFilter + """Negates the expression.""" not: BillingProviderModuleFilter @@ -1283,11 +1309,17 @@ input BillingProviderModuleFilter { """Filter by the object’s `provider` field.""" provider: StringFilter + """Filter by the object’s `recordRefundFunction` field.""" + recordRefundFunction: StringFilter + """Filter by the object’s `schemaId` field.""" schemaId: UUIDFilter """Filter by the object’s `subscriptionsTableId` field.""" subscriptionsTableId: UUIDFilter + + """Filter by the object’s `upsertInvoiceFunction` field.""" + upsertInvoiceFunction: StringFilter } """An input for mutations affecting `BillingProviderModule`""" @@ -1295,16 +1327,22 @@ input BillingProviderModuleInput { apiName: String billingCustomersTableId: UUID billingCustomersTableName: String + billingInvoicesTableId: UUID + billingInvoicesTableName: String billingPricesTableId: UUID billingPricesTableName: String billingProductsTableId: UUID billingProductsTableName: String + billingRefundsTableId: UUID + billingRefundsTableName: String billingSubscriptionsTableId: UUID billingSubscriptionsTableName: String billingWebhookEventsTableId: UUID billingWebhookEventsTableName: String databaseId: UUID! id: UUID + listPendingUsageSyncFunction: String + markUsageSyncedFunction: String prefix: String pricesTableId: UUID privateApiName: String @@ -1312,8 +1350,10 @@ input BillingProviderModuleInput { processBillingEventFunction: String productsTableId: UUID provider: String + recordRefundFunction: String schemaId: UUID subscriptionsTableId: UUID + upsertInvoiceFunction: String } """Methods to use when ordering `BillingProviderModule`.""" @@ -1324,6 +1364,10 @@ enum BillingProviderModuleOrderBy { BILLING_CUSTOMERS_TABLE_ID_DESC BILLING_CUSTOMERS_TABLE_NAME_ASC BILLING_CUSTOMERS_TABLE_NAME_DESC + BILLING_INVOICES_TABLE_ID_ASC + BILLING_INVOICES_TABLE_ID_DESC + BILLING_INVOICES_TABLE_NAME_ASC + BILLING_INVOICES_TABLE_NAME_DESC BILLING_PRICES_TABLE_ID_ASC BILLING_PRICES_TABLE_ID_DESC BILLING_PRICES_TABLE_NAME_ASC @@ -1332,6 +1376,10 @@ enum BillingProviderModuleOrderBy { BILLING_PRODUCTS_TABLE_ID_DESC BILLING_PRODUCTS_TABLE_NAME_ASC BILLING_PRODUCTS_TABLE_NAME_DESC + BILLING_REFUNDS_TABLE_ID_ASC + BILLING_REFUNDS_TABLE_ID_DESC + BILLING_REFUNDS_TABLE_NAME_ASC + BILLING_REFUNDS_TABLE_NAME_DESC BILLING_SUBSCRIPTIONS_TABLE_ID_ASC BILLING_SUBSCRIPTIONS_TABLE_ID_DESC BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC @@ -1344,6 +1392,10 @@ enum BillingProviderModuleOrderBy { DATABASE_ID_DESC ID_ASC ID_DESC + LIST_PENDING_USAGE_SYNC_FUNCTION_ASC + LIST_PENDING_USAGE_SYNC_FUNCTION_DESC + MARK_USAGE_SYNCED_FUNCTION_ASC + MARK_USAGE_SYNCED_FUNCTION_DESC NATURAL PREFIX_ASC PREFIX_DESC @@ -1361,10 +1413,14 @@ enum BillingProviderModuleOrderBy { PRODUCTS_TABLE_ID_DESC PROVIDER_ASC PROVIDER_DESC + RECORD_REFUND_FUNCTION_ASC + RECORD_REFUND_FUNCTION_DESC SCHEMA_ID_ASC SCHEMA_ID_DESC SUBSCRIPTIONS_TABLE_ID_ASC SUBSCRIPTIONS_TABLE_ID_DESC + UPSERT_INVOICE_FUNCTION_ASC + UPSERT_INVOICE_FUNCTION_DESC } """ @@ -1374,16 +1430,22 @@ input BillingProviderModulePatch { apiName: String billingCustomersTableId: UUID billingCustomersTableName: String + billingInvoicesTableId: UUID + billingInvoicesTableName: String billingPricesTableId: UUID billingPricesTableName: String billingProductsTableId: UUID billingProductsTableName: String + billingRefundsTableId: UUID + billingRefundsTableName: String billingSubscriptionsTableId: UUID billingSubscriptionsTableName: String billingWebhookEventsTableId: UUID billingWebhookEventsTableName: String databaseId: UUID id: UUID + listPendingUsageSyncFunction: String + markUsageSyncedFunction: String prefix: String pricesTableId: UUID privateApiName: String @@ -1391,8 +1453,10 @@ input BillingProviderModulePatch { processBillingEventFunction: String productsTableId: UUID provider: String + recordRefundFunction: String schemaId: UUID subscriptionsTableId: UUID + upsertInvoiceFunction: String } """ @@ -2544,6 +2608,293 @@ input BooleanFilter { notIn: [Boolean!] } +type CapabilitiesModule { + actorTableId: UUID! + apiName: String + bitlen: Int! + + """Reads and enables pagination through a set of `DataCapabilitiesField`.""" + dataCapabilitiesFields( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `DataCapabilitiesField`.""" + orderBy: [DataCapabilitiesFieldOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: DataCapabilitiesFieldFilter + ): DataCapabilitiesFieldConnection! + databaseId: UUID! + defaultTableId: UUID! + defaultTableName: String! + entityField: String + entityTableId: UUID + getByMask: String! + getMask: String! + getMaskByName: String! + getPaddedMask: String! + id: UUID! + prefix: String! + privateApiName: String + privateSchemaId: UUID! + privateSchemaName: String + publicSchemaName: String + schemaId: UUID! + scope: String! + tableId: UUID! + tableName: String! +} + +"""A connection to a list of `CapabilitiesModule` values.""" +type CapabilitiesModuleConnection { + """ + A list of edges which contains the `CapabilitiesModule` and cursor to aid in pagination. + """ + edges: [CapabilitiesModuleEdge]! + + """A list of `CapabilitiesModule` objects.""" + nodes: [CapabilitiesModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `CapabilitiesModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `CapabilitiesModule` edge in the connection.""" +type CapabilitiesModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `CapabilitiesModule` at the end of the edge.""" + node: CapabilitiesModule +} + +""" +A filter to be used against `CapabilitiesModule` object types. All fields are combined with a logical ‘and.’ +""" +input CapabilitiesModuleFilter { + """Filter by the object’s `actorTableId` field.""" + actorTableId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [CapabilitiesModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `bitlen` field.""" + bitlen: IntFilter + + """Filter by the object’s `dataCapabilitiesFields` relation.""" + dataCapabilitiesFields: CapabilitiesModuleToManyDataCapabilitiesFieldFilter + + """`dataCapabilitiesFields` exist.""" + dataCapabilitiesFieldsExist: Boolean + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `defaultTableId` field.""" + defaultTableId: UUIDFilter + + """Filter by the object’s `defaultTableName` field.""" + defaultTableName: StringFilter + + """Filter by the object’s `entityField` field.""" + entityField: StringFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `getByMask` field.""" + getByMask: StringFilter + + """Filter by the object’s `getMask` field.""" + getMask: StringFilter + + """Filter by the object’s `getMaskByName` field.""" + getMaskByName: StringFilter + + """Filter by the object’s `getPaddedMask` field.""" + getPaddedMask: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: CapabilitiesModuleFilter + + """Checks for any expressions in this list.""" + or: [CapabilitiesModuleFilter!] + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter + + """Filter by the object’s `tableName` field.""" + tableName: StringFilter +} + +"""An input for mutations affecting `CapabilitiesModule`""" +input CapabilitiesModuleInput { + actorTableId: UUID + apiName: String + bitlen: Int + databaseId: UUID! + defaultTableId: UUID + defaultTableName: String + entityField: String + entityTableId: UUID + getByMask: String + getMask: String + getMaskByName: String + getPaddedMask: String + id: UUID + prefix: String + privateApiName: String + privateSchemaId: UUID + privateSchemaName: String + publicSchemaName: String + schemaId: UUID + scope: String! + tableId: UUID + tableName: String +} + +"""Methods to use when ordering `CapabilitiesModule`.""" +enum CapabilitiesModuleOrderBy { + ACTOR_TABLE_ID_ASC + ACTOR_TABLE_ID_DESC + API_NAME_ASC + API_NAME_DESC + BITLEN_ASC + BITLEN_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + DEFAULT_TABLE_ID_ASC + DEFAULT_TABLE_ID_DESC + DEFAULT_TABLE_NAME_ASC + DEFAULT_TABLE_NAME_DESC + ENTITY_FIELD_ASC + ENTITY_FIELD_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + GET_BY_MASK_ASC + GET_BY_MASK_DESC + GET_MASK_ASC + GET_MASK_BY_NAME_ASC + GET_MASK_BY_NAME_DESC + GET_MASK_DESC + GET_PADDED_MASK_ASC + GET_PADDED_MASK_DESC + ID_ASC + ID_DESC + NATURAL + PREFIX_ASC + PREFIX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + SCOPE_ASC + SCOPE_DESC + TABLE_ID_ASC + TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC +} + +""" +Represents an update to a `CapabilitiesModule`. Fields that are set will be updated. +""" +input CapabilitiesModulePatch { + actorTableId: UUID + apiName: String + bitlen: Int + databaseId: UUID + defaultTableId: UUID + defaultTableName: String + entityField: String + entityTableId: UUID + getByMask: String + getMask: String + getMaskByName: String + getPaddedMask: String + id: UUID + prefix: String + privateApiName: String + privateSchemaId: UUID + privateSchemaName: String + publicSchemaName: String + schemaId: UUID + scope: String + tableId: UUID + tableName: String +} + +""" +A filter to be used against many `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ +""" +input CapabilitiesModuleToManyDataCapabilitiesFieldFilter { + """Filters to entities where every related entity matches.""" + every: DataCapabilitiesFieldFilter + + """Filters to entities where no related entity matches.""" + none: DataCapabilitiesFieldFilter + + """Filters to entities where at least one related entity matches.""" + some: DataCapabilitiesFieldFilter +} + type CatalogModule { apiName: String @@ -2608,10 +2959,12 @@ type CatalogModule { ): AppModuleConnection! appsTableId: UUID! appsTableName: String! + bindingsTableId: UUID! + bindingsTableName: String! bucketsTableId: UUID! bucketsTableName: String! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] """Reads and enables pagination through a set of `DomainModule`.""" domainModules( @@ -2791,6 +3144,12 @@ input CatalogModuleFilter { """Filter by the object’s `appsTableName` field.""" appsTableName: StringFilter + """Filter by the object’s `bindingsTableId` field.""" + bindingsTableId: UUIDFilter + + """Filter by the object’s `bindingsTableName` field.""" + bindingsTableName: StringFilter + """Filter by the object’s `bucketsTableId` field.""" bucketsTableId: UUIDFilter @@ -2800,8 +3159,8 @@ input CatalogModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `domainModules` relation.""" domainModules: CatalogModuleToManyDomainModuleFilter @@ -2925,10 +3284,12 @@ input CatalogModuleInput { apisTableName: String appsTableId: UUID appsTableName: String + bindingsTableId: UUID + bindingsTableName: String bucketsTableId: UUID bucketsTableName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] domainsTableId: UUID domainsTableName: String entityTableId: UUID @@ -2973,14 +3334,18 @@ enum CatalogModuleOrderBy { APPS_TABLE_ID_DESC APPS_TABLE_NAME_ASC APPS_TABLE_NAME_DESC + BINDINGS_TABLE_ID_ASC + BINDINGS_TABLE_ID_DESC + BINDINGS_TABLE_NAME_ASC + BINDINGS_TABLE_NAME_DESC BUCKETS_TABLE_ID_ASC BUCKETS_TABLE_ID_DESC BUCKETS_TABLE_NAME_ASC BUCKETS_TABLE_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DOMAINS_TABLE_ID_ASC DOMAINS_TABLE_ID_DESC DOMAINS_TABLE_NAME_ASC @@ -3055,10 +3420,12 @@ input CatalogModulePatch { apisTableName: String appsTableId: UUID appsTableName: String + bindingsTableId: UUID + bindingsTableName: String bucketsTableId: UUID bucketsTableName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] domainsTableId: UUID domainsTableName: String entityTableId: UUID @@ -3670,6 +4037,212 @@ type ConstructBlueprintPayload { result: UUID } +type ContentPresetModule { + apiName: String + contentPresetsTableId: UUID! + createdAt: Datetime! + databaseId: UUID! + entityTableId: UUID + id: UUID! + + """ + Reads a single `MerkleStoreModule` that is related to this `ContentPresetModule`. + """ + merkleStoreModule: MerkleStoreModule + merkleStoreModuleId: UUID! + policies: JSON + prefix: String! + privateApiName: String + privateSchemaId: UUID! + privateSchemaName: String + provisions: JSON + publicSchemaId: UUID! + publicSchemaName: String + scope: String! + storeName: String! +} + +"""A connection to a list of `ContentPresetModule` values.""" +type ContentPresetModuleConnection { + """ + A list of edges which contains the `ContentPresetModule` and cursor to aid in pagination. + """ + edges: [ContentPresetModuleEdge]! + + """A list of `ContentPresetModule` objects.""" + nodes: [ContentPresetModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `ContentPresetModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `ContentPresetModule` edge in the connection.""" +type ContentPresetModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ContentPresetModule` at the end of the edge.""" + node: ContentPresetModule +} + +""" +A filter to be used against `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ +""" +input ContentPresetModuleFilter { + """Checks for all expressions in this list.""" + and: [ContentPresetModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `contentPresetsTableId` field.""" + contentPresetsTableId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `merkleStoreModule` relation.""" + merkleStoreModule: MerkleStoreModuleFilter + + """Filter by the object’s `merkleStoreModuleId` field.""" + merkleStoreModuleId: UUIDFilter + + """Negates the expression.""" + not: ContentPresetModuleFilter + + """Checks for any expressions in this list.""" + or: [ContentPresetModuleFilter!] + + """Filter by the object’s `policies` field.""" + policies: JSONFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter + + """Filter by the object’s `publicSchemaId` field.""" + publicSchemaId: UUIDFilter + + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `storeName` field.""" + storeName: StringFilter +} + +"""An input for mutations affecting `ContentPresetModule`""" +input ContentPresetModuleInput { + apiName: String + contentPresetsTableId: UUID + createdAt: Datetime + databaseId: UUID! + entityTableId: UUID + id: UUID + merkleStoreModuleId: UUID! + policies: JSON + prefix: String! + privateApiName: String + privateSchemaId: UUID + privateSchemaName: String + provisions: JSON + publicSchemaId: UUID + publicSchemaName: String + scope: String! + storeName: String! +} + +"""Methods to use when ordering `ContentPresetModule`.""" +enum ContentPresetModuleOrderBy { + API_NAME_ASC + API_NAME_DESC + CONTENT_PRESETS_TABLE_ID_ASC + CONTENT_PRESETS_TABLE_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + ID_ASC + ID_DESC + MERKLE_STORE_MODULE_ID_ASC + MERKLE_STORE_MODULE_ID_DESC + NATURAL + POLICIES_ASC + POLICIES_DESC + PREFIX_ASC + PREFIX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + PROVISIONS_ASC + PROVISIONS_DESC + PUBLIC_SCHEMA_ID_ASC + PUBLIC_SCHEMA_ID_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + SCOPE_ASC + SCOPE_DESC + STORE_NAME_ASC + STORE_NAME_DESC +} + +""" +Represents an update to a `ContentPresetModule`. Fields that are set will be updated. +""" +input ContentPresetModulePatch { + apiName: String + contentPresetsTableId: UUID + createdAt: Datetime + databaseId: UUID + entityTableId: UUID + id: UUID + merkleStoreModuleId: UUID + policies: JSON + prefix: String + privateApiName: String + privateSchemaId: UUID + privateSchemaName: String + provisions: JSON + publicSchemaId: UUID + publicSchemaName: String + scope: String + storeName: String +} + """All input for the `copyTemplateToBlueprint` mutation.""" input CopyTemplateToBlueprintInput { """ @@ -3979,6 +4552,41 @@ type CreateBlueprintTemplatePayload { query: Query } +"""All input for the create `CapabilitiesModule` mutation.""" +input CreateCapabilitiesModuleInput { + """The `CapabilitiesModule` to be created by this mutation.""" + capabilitiesModule: CapabilitiesModuleInput! + + """ + 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 output of our create `CapabilitiesModule` mutation.""" +type CreateCapabilitiesModulePayload { + """The `CapabilitiesModule` that was created by this mutation.""" + capabilitiesModule: CapabilitiesModule + + """An edge for our `CapabilitiesModule`. May be used by Relay 1.""" + capabilitiesModuleEdge( + """The method to use when ordering `CapabilitiesModule`.""" + orderBy: [CapabilitiesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): CapabilitiesModuleEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `CatalogModule` mutation.""" input CreateCatalogModuleInput { """The `CatalogModule` to be created by this mutation.""" @@ -4119,6 +4727,41 @@ type CreateConnectedAccountsModulePayload { query: Query } +"""All input for the create `ContentPresetModule` mutation.""" +input CreateContentPresetModuleInput { + """ + 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 `ContentPresetModule` to be created by this mutation.""" + contentPresetModule: ContentPresetModuleInput! +} + +"""The output of our create `ContentPresetModule` mutation.""" +type CreateContentPresetModulePayload { + """ + 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 `ContentPresetModule` that was created by this mutation.""" + contentPresetModule: ContentPresetModule + + """An edge for our `ContentPresetModule`. May be used by Relay 1.""" + contentPresetModuleEdge( + """The method to use when ordering `ContentPresetModule`.""" + orderBy: [ContentPresetModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `CryptoAddressesModule` mutation.""" input CreateCryptoAddressesModuleInput { """ @@ -4189,6 +4832,41 @@ type CreateCryptoAuthModulePayload { query: Query } +"""All input for the create `DataCapabilitiesField` mutation.""" +input CreateDataCapabilitiesFieldInput { + """ + 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 `DataCapabilitiesField` to be created by this mutation.""" + dataCapabilitiesField: DataCapabilitiesFieldInput! +} + +"""The output of our create `DataCapabilitiesField` mutation.""" +type CreateDataCapabilitiesFieldPayload { + """ + 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 `DataCapabilitiesField` that was created by this mutation.""" + dataCapabilitiesField: DataCapabilitiesField + + """An edge for our `DataCapabilitiesField`. May be used by Relay 1.""" + dataCapabilitiesFieldEdge( + """The method to use when ordering `DataCapabilitiesField`.""" + orderBy: [DataCapabilitiesFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): DataCapabilitiesFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `DatabaseProvisionModule` mutation.""" input CreateDatabaseProvisionModuleInput { """ @@ -4539,6 +5217,41 @@ type CreateDomainModulePayload { query: Query } +"""All input for the create `EmailSenderModule` mutation.""" +input CreateEmailSenderModuleInput { + """ + 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 `EmailSenderModule` to be created by this mutation.""" + emailSenderModule: EmailSenderModuleInput! +} + +"""The output of our create `EmailSenderModule` mutation.""" +type CreateEmailSenderModulePayload { + """ + 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 `EmailSenderModule` that was created by this mutation.""" + emailSenderModule: EmailSenderModule + + """An edge for our `EmailSenderModule`. May be used by Relay 1.""" + emailSenderModuleEdge( + """The method to use when ordering `EmailSenderModule`.""" + orderBy: [EmailSenderModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSenderModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `EmailsModule` mutation.""" input CreateEmailsModuleInput { """ @@ -4644,6 +5357,41 @@ type CreateEventsModulePayload { query: Query } +"""All input for the create `FileRefField` mutation.""" +input CreateFileRefFieldInput { + """ + 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 `FileRefField` to be created by this mutation.""" + fileRefField: FileRefFieldInput! +} + +"""The output of our create `FileRefField` mutation.""" +type CreateFileRefFieldPayload { + """ + 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 `FileRefField` that was created by this mutation.""" + fileRefField: FileRefField + + """An edge for our `FileRefField`. May be used by Relay 1.""" + fileRefFieldEdge( + """The method to use when ordering `FileRefField`.""" + orderBy: [FileRefFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): FileRefFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `FunctionDeploymentModule` mutation.""" input CreateFunctionDeploymentModuleInput { """ @@ -5379,34 +6127,34 @@ type CreateNotificationsModulePayload { query: Query } -"""All input for the create `PagesModule` mutation.""" -input CreatePagesModuleInput { +"""All input for the create `OauthRequestsModule` mutation.""" +input CreateOauthRequestsModuleInput { """ 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 `PagesModule` to be created by this mutation.""" - pagesModule: PagesModuleInput! + """The `OauthRequestsModule` to be created by this mutation.""" + oauthRequestsModule: OauthRequestsModuleInput! } -"""The output of our create `PagesModule` mutation.""" -type CreatePagesModulePayload { +"""The output of our create `OauthRequestsModule` mutation.""" +type CreateOauthRequestsModulePayload { """ 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 `PagesModule` that was created by this mutation.""" - pagesModule: PagesModule + """The `OauthRequestsModule` that was created by this mutation.""" + oauthRequestsModule: OauthRequestsModule - """An edge for our `PagesModule`. May be used by Relay 1.""" - pagesModuleEdge( - """The method to use when ordering `PagesModule`.""" - orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PagesModuleEdge + """An edge for our `OauthRequestsModule`. May be used by Relay 1.""" + oauthRequestsModuleEdge( + """The method to use when ordering `OauthRequestsModule`.""" + orderBy: [OauthRequestsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): OauthRequestsModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -5414,34 +6162,34 @@ type CreatePagesModulePayload { query: Query } -"""All input for the create `PermissionsModule` mutation.""" -input CreatePermissionsModuleInput { +"""All input for the create `PagesModule` mutation.""" +input CreatePagesModuleInput { """ 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 `PermissionsModule` to be created by this mutation.""" - permissionsModule: PermissionsModuleInput! + """The `PagesModule` to be created by this mutation.""" + pagesModule: PagesModuleInput! } -"""The output of our create `PermissionsModule` mutation.""" -type CreatePermissionsModulePayload { +"""The output of our create `PagesModule` mutation.""" +type CreatePagesModulePayload { """ 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 `PermissionsModule` that was created by this mutation.""" - permissionsModule: PermissionsModule + """The `PagesModule` that was created by this mutation.""" + pagesModule: PagesModule - """An edge for our `PermissionsModule`. May be used by Relay 1.""" - permissionsModuleEdge( - """The method to use when ordering `PermissionsModule`.""" - orderBy: [PermissionsModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PermissionsModuleEdge + """An edge for our `PagesModule`. May be used by Relay 1.""" + pagesModuleEdge( + """The method to use when ordering `PagesModule`.""" + orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PagesModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -5834,6 +6582,41 @@ type CreateRouteModulePayload { ): RouteModuleEdge } +"""All input for the create `ScopeTypesModule` mutation.""" +input CreateScopeTypesModuleInput { + """ + 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 `ScopeTypesModule` to be created by this mutation.""" + scopeTypesModule: ScopeTypesModuleInput! +} + +"""The output of our create `ScopeTypesModule` mutation.""" +type CreateScopeTypesModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was created by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the create `SecureTableProvision` mutation.""" input CreateSecureTableProvisionInput { """ @@ -6184,6 +6967,41 @@ type CreateUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the create `UserSettingsSecurityModule` mutation.""" +input CreateUserSettingsSecurityModuleInput { + """ + 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 `UserSettingsSecurityModule` to be created by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModuleInput! +} + +"""The output of our create `UserSettingsSecurityModule` mutation.""" +type CreateUserSettingsSecurityModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was created by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the create `UserStateModule` mutation.""" input CreateUserStateModuleInput { """ @@ -6678,6 +7496,163 @@ input CryptoAuthModulePatch { """A location in a connection that can be used for resuming pagination.""" scalar Cursor +type DataCapabilitiesField { + """ + Reads a single `CapabilitiesModule` that is related to this `DataCapabilitiesField`. + """ + capabilitiesModule: CapabilitiesModule + capabilitiesModuleId: UUID! + databaseId: UUID! + fieldId: UUID! + fromFieldId: UUID + id: UUID! + mappingFieldId: UUID + mappingKeyFieldId: UUID + mappingTableId: UUID + mode: String! + subsetGuard: Boolean! + tableId: UUID! +} + +"""A connection to a list of `DataCapabilitiesField` values.""" +type DataCapabilitiesFieldConnection { + """ + A list of edges which contains the `DataCapabilitiesField` and cursor to aid in pagination. + """ + edges: [DataCapabilitiesFieldEdge]! + + """A list of `DataCapabilitiesField` objects.""" + nodes: [DataCapabilitiesField]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `DataCapabilitiesField` you could get from the connection. + """ + totalCount: Int! +} + +"""A `DataCapabilitiesField` edge in the connection.""" +type DataCapabilitiesFieldEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `DataCapabilitiesField` at the end of the edge.""" + node: DataCapabilitiesField +} + +""" +A filter to be used against `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ +""" +input DataCapabilitiesFieldFilter { + """Checks for all expressions in this list.""" + and: [DataCapabilitiesFieldFilter!] + + """Filter by the object’s `capabilitiesModule` relation.""" + capabilitiesModule: CapabilitiesModuleFilter + + """Filter by the object’s `capabilitiesModuleId` field.""" + capabilitiesModuleId: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `fieldId` field.""" + fieldId: UUIDFilter + + """Filter by the object’s `fromFieldId` field.""" + fromFieldId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `mappingFieldId` field.""" + mappingFieldId: UUIDFilter + + """Filter by the object’s `mappingKeyFieldId` field.""" + mappingKeyFieldId: UUIDFilter + + """Filter by the object’s `mappingTableId` field.""" + mappingTableId: UUIDFilter + + """Filter by the object’s `mode` field.""" + mode: StringFilter + + """Negates the expression.""" + not: DataCapabilitiesFieldFilter + + """Checks for any expressions in this list.""" + or: [DataCapabilitiesFieldFilter!] + + """Filter by the object’s `subsetGuard` field.""" + subsetGuard: BooleanFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter +} + +"""An input for mutations affecting `DataCapabilitiesField`""" +input DataCapabilitiesFieldInput { + capabilitiesModuleId: UUID! + databaseId: UUID! + fieldId: UUID! + fromFieldId: UUID + id: UUID + mappingFieldId: UUID + mappingKeyFieldId: UUID + mappingTableId: UUID + mode: String + subsetGuard: Boolean + tableId: UUID! +} + +"""Methods to use when ordering `DataCapabilitiesField`.""" +enum DataCapabilitiesFieldOrderBy { + CAPABILITIES_MODULE_ID_ASC + CAPABILITIES_MODULE_ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + FIELD_ID_ASC + FIELD_ID_DESC + FROM_FIELD_ID_ASC + FROM_FIELD_ID_DESC + ID_ASC + ID_DESC + MAPPING_FIELD_ID_ASC + MAPPING_FIELD_ID_DESC + MAPPING_KEY_FIELD_ID_ASC + MAPPING_KEY_FIELD_ID_DESC + MAPPING_TABLE_ID_ASC + MAPPING_TABLE_ID_DESC + MODE_ASC + MODE_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SUBSET_GUARD_ASC + SUBSET_GUARD_DESC + TABLE_ID_ASC + TABLE_ID_DESC +} + +""" +Represents an update to a `DataCapabilitiesField`. Fields that are set will be updated. +""" +input DataCapabilitiesFieldPatch { + capabilitiesModuleId: UUID + databaseId: UUID + fieldId: UUID + fromFieldId: UUID + id: UUID + mappingFieldId: UUID + mappingKeyFieldId: UUID + mappingTableId: UUID + mode: String + subsetGuard: Boolean + tableId: UUID +} + """ Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. """ @@ -6719,7 +7694,7 @@ type DatabaseProvisionModule { id: UUID! """ - JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) + JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) """ modules: JSON! @@ -6882,7 +7857,7 @@ input DatabaseProvisionModuleInput { id: UUID """ - JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) + JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) """ modules: JSON @@ -6993,7 +7968,7 @@ input DatabaseProvisionModulePatch { id: UUID """ - JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) + JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) """ modules: JSON @@ -7023,7 +7998,7 @@ type DatabaseSettingsModule { databaseId: UUID! databaseSettingsTableId: UUID! databaseSettingsTableName: String! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID! @@ -7089,8 +8064,8 @@ input DatabaseSettingsModuleFilter { """Filter by the object’s `databaseSettingsTableName` field.""" databaseSettingsTableName: StringFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -7153,7 +8128,7 @@ input DatabaseSettingsModuleInput { databaseId: UUID! databaseSettingsTableId: UUID databaseSettingsTableName: String - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -7182,8 +8157,8 @@ enum DatabaseSettingsModuleOrderBy { DATABASE_SETTINGS_TABLE_ID_DESC DATABASE_SETTINGS_TABLE_NAME_ASC DATABASE_SETTINGS_TABLE_NAME_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -7229,7 +8204,7 @@ input DatabaseSettingsModulePatch { databaseId: UUID databaseSettingsTableId: UUID databaseSettingsTableName: String - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -7926,7 +8901,7 @@ type DbUsageModule { collectDbQueryStatsFunction: String! collectDbTableStatsFunction: String! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String id: UUID! interval: String! @@ -7996,8 +8971,8 @@ input DbUsageModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -8078,7 +9053,7 @@ input DbUsageModuleInput { collectDbQueryStatsFunction: String collectDbTableStatsFunction: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String id: UUID interval: String @@ -8113,8 +9088,8 @@ enum DbUsageModuleOrderBy { COLLECT_DB_TABLE_STATS_FUNCTION_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ID_ASC @@ -8172,7 +9147,7 @@ input DbUsageModulePatch { collectDbQueryStatsFunction: String collectDbTableStatsFunction: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String id: UUID interval: String @@ -8545,6 +9520,39 @@ type DeleteBlueprintTemplatePayload { query: Query } +"""All input for the `deleteCapabilitiesModule` mutation.""" +input DeleteCapabilitiesModuleInput { + """ + 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 `CapabilitiesModule` mutation.""" +type DeleteCapabilitiesModulePayload { + """The `CapabilitiesModule` that was deleted by this mutation.""" + capabilitiesModule: CapabilitiesModule + + """An edge for our `CapabilitiesModule`. May be used by Relay 1.""" + capabilitiesModuleEdge( + """The method to use when ordering `CapabilitiesModule`.""" + orderBy: [CapabilitiesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): CapabilitiesModuleEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteCatalogModule` mutation.""" input DeleteCatalogModuleInput { """ @@ -8677,6 +9685,39 @@ type DeleteConnectedAccountsModulePayload { query: Query } +"""All input for the `deleteContentPresetModule` mutation.""" +input DeleteContentPresetModuleInput { + """ + 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 `ContentPresetModule` mutation.""" +type DeleteContentPresetModulePayload { + """ + 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 `ContentPresetModule` that was deleted by this mutation.""" + contentPresetModule: ContentPresetModule + + """An edge for our `ContentPresetModule`. May be used by Relay 1.""" + contentPresetModuleEdge( + """The method to use when ordering `ContentPresetModule`.""" + orderBy: [ContentPresetModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteCryptoAddressesModule` mutation.""" input DeleteCryptoAddressesModuleInput { """ @@ -8743,6 +9784,39 @@ type DeleteCryptoAuthModulePayload { query: Query } +"""All input for the `deleteDataCapabilitiesField` mutation.""" +input DeleteDataCapabilitiesFieldInput { + """ + 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 `DataCapabilitiesField` mutation.""" +type DeleteDataCapabilitiesFieldPayload { + """ + 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 `DataCapabilitiesField` that was deleted by this mutation.""" + dataCapabilitiesField: DataCapabilitiesField + + """An edge for our `DataCapabilitiesField`. May be used by Relay 1.""" + dataCapabilitiesFieldEdge( + """The method to use when ordering `DataCapabilitiesField`.""" + orderBy: [DataCapabilitiesFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): DataCapabilitiesFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteDatabaseProvisionModule` mutation.""" input DeleteDatabaseProvisionModuleInput { """ @@ -9073,6 +10147,39 @@ type DeleteDomainModulePayload { query: Query } +"""All input for the `deleteEmailSenderModule` mutation.""" +input DeleteEmailSenderModuleInput { + """ + 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 `EmailSenderModule` mutation.""" +type DeleteEmailSenderModulePayload { + """ + 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 `EmailSenderModule` that was deleted by this mutation.""" + emailSenderModule: EmailSenderModule + + """An edge for our `EmailSenderModule`. May be used by Relay 1.""" + emailSenderModuleEdge( + """The method to use when ordering `EmailSenderModule`.""" + orderBy: [EmailSenderModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSenderModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteEmailsModule` mutation.""" input DeleteEmailsModuleInput { """ @@ -9174,6 +10281,39 @@ type DeleteEventsModulePayload { query: Query } +"""All input for the `deleteFileRefField` mutation.""" +input DeleteFileRefFieldInput { + """ + 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 `FileRefField` mutation.""" +type DeleteFileRefFieldPayload { + """ + 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 `FileRefField` that was deleted by this mutation.""" + fileRefField: FileRefField + + """An edge for our `FileRefField`. May be used by Relay 1.""" + fileRefFieldEdge( + """The method to use when ordering `FileRefField`.""" + orderBy: [FileRefFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): FileRefFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `deleteFunctionDeploymentModule` mutation.""" input DeleteFunctionDeploymentModuleInput { """ @@ -9867,8 +11007,8 @@ type DeleteNotificationsModulePayload { query: Query } -"""All input for the `deletePagesModule` mutation.""" -input DeletePagesModuleInput { +"""All input for the `deleteOauthRequestsModule` mutation.""" +input DeleteOauthRequestsModuleInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -9877,22 +11017,22 @@ input DeletePagesModuleInput { id: UUID! } -"""The output of our delete `PagesModule` mutation.""" -type DeletePagesModulePayload { +"""The output of our delete `OauthRequestsModule` mutation.""" +type DeleteOauthRequestsModulePayload { """ 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 `PagesModule` that was deleted by this mutation.""" - pagesModule: PagesModule + """The `OauthRequestsModule` that was deleted by this mutation.""" + oauthRequestsModule: OauthRequestsModule - """An edge for our `PagesModule`. May be used by Relay 1.""" - pagesModuleEdge( - """The method to use when ordering `PagesModule`.""" - orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PagesModuleEdge + """An edge for our `OauthRequestsModule`. May be used by Relay 1.""" + oauthRequestsModuleEdge( + """The method to use when ordering `OauthRequestsModule`.""" + orderBy: [OauthRequestsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): OauthRequestsModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -9900,8 +11040,8 @@ type DeletePagesModulePayload { query: Query } -"""All input for the `deletePermissionsModule` mutation.""" -input DeletePermissionsModuleInput { +"""All input for the `deletePagesModule` mutation.""" +input DeletePagesModuleInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -9910,22 +11050,22 @@ input DeletePermissionsModuleInput { id: UUID! } -"""The output of our delete `PermissionsModule` mutation.""" -type DeletePermissionsModulePayload { +"""The output of our delete `PagesModule` mutation.""" +type DeletePagesModulePayload { """ 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 `PermissionsModule` that was deleted by this mutation.""" - permissionsModule: PermissionsModule + """The `PagesModule` that was deleted by this mutation.""" + pagesModule: PagesModule - """An edge for our `PermissionsModule`. May be used by Relay 1.""" - permissionsModuleEdge( - """The method to use when ordering `PermissionsModule`.""" - orderBy: [PermissionsModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PermissionsModuleEdge + """An edge for our `PagesModule`. May be used by Relay 1.""" + pagesModuleEdge( + """The method to use when ordering `PagesModule`.""" + orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PagesModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -10298,6 +11438,39 @@ type DeleteRouteModulePayload { ): RouteModuleEdge } +"""All input for the `deleteScopeTypesModule` mutation.""" +input DeleteScopeTypesModuleInput { + """ + 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 `ScopeTypesModule` mutation.""" +type DeleteScopeTypesModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was deleted by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the `deleteSecureTableProvision` mutation.""" input DeleteSecureTableProvisionInput { """ @@ -10630,6 +11803,39 @@ type DeleteUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the `deleteUserSettingsSecurityModule` mutation.""" +input DeleteUserSettingsSecurityModuleInput { + """ + 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 `UserSettingsSecurityModule` mutation.""" +type DeleteUserSettingsSecurityModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was deleted by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the `deleteUserStateModule` mutation.""" input DeleteUserStateModuleInput { """ @@ -11076,7 +12282,7 @@ type DomainModule { catalogModule: CatalogModule catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] domainEventsTableId: UUID! domainEventsTableName: String! domainVerificationsTableId: UUID! @@ -11176,8 +12382,8 @@ input DomainModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `domainEventsTableId` field.""" domainEventsTableId: UUIDFilter @@ -11257,7 +12463,7 @@ input DomainModuleInput { apiName: String catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] domainEventsTableId: UUID domainEventsTableName: String domainVerificationsTableId: UUID @@ -11288,8 +12494,8 @@ enum DomainModuleOrderBy { CATALOG_MODULE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DOMAINS_TABLE_ID_ASC DOMAINS_TABLE_ID_DESC DOMAINS_TABLE_NAME_ASC @@ -11342,7 +12548,7 @@ input DomainModulePatch { apiName: String catalogModuleId: UUID databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] domainEventsTableId: UUID domainEventsTableName: String domainVerificationsTableId: UUID @@ -11379,6 +12585,239 @@ input DomainModuleToManyRouteModuleFilter { some: RouteModuleFilter } +type EmailSenderModule { + apiName: String + databaseId: UUID! + defaultCapabilities: [String] + emailIdentitiesTableId: UUID! + emailIdentitiesTableName: String! + emailProviderAccountsTableId: UUID! + emailProviderAccountsTableName: String! + emailSiteIdentitiesTableId: UUID + emailSiteIdentitiesTableName: String! + entityField: String + entityTableId: UUID + id: UUID! + policies: JSON + prefix: String! + privateApiName: String + provisions: JSON + publicSchemaName: String + schemaId: UUID! + scope: String! + + """ + Reads a single `SiteSurfaceModule` that is related to this `EmailSenderModule`. + """ + siteSurfaceModule: SiteSurfaceModule + siteSurfaceModuleId: UUID +} + +"""A connection to a list of `EmailSenderModule` values.""" +type EmailSenderModuleConnection { + """ + A list of edges which contains the `EmailSenderModule` and cursor to aid in pagination. + """ + edges: [EmailSenderModuleEdge]! + + """A list of `EmailSenderModule` objects.""" + nodes: [EmailSenderModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `EmailSenderModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `EmailSenderModule` edge in the connection.""" +type EmailSenderModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `EmailSenderModule` at the end of the edge.""" + node: EmailSenderModule +} + +""" +A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ +""" +input EmailSenderModuleFilter { + """Checks for all expressions in this list.""" + and: [EmailSenderModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter + + """Filter by the object’s `emailIdentitiesTableId` field.""" + emailIdentitiesTableId: UUIDFilter + + """Filter by the object’s `emailIdentitiesTableName` field.""" + emailIdentitiesTableName: StringFilter + + """Filter by the object’s `emailProviderAccountsTableId` field.""" + emailProviderAccountsTableId: UUIDFilter + + """Filter by the object’s `emailProviderAccountsTableName` field.""" + emailProviderAccountsTableName: StringFilter + + """Filter by the object’s `emailSiteIdentitiesTableId` field.""" + emailSiteIdentitiesTableId: UUIDFilter + + """Filter by the object’s `emailSiteIdentitiesTableName` field.""" + emailSiteIdentitiesTableName: StringFilter + + """Filter by the object’s `entityField` field.""" + entityField: StringFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: EmailSenderModuleFilter + + """Checks for any expressions in this list.""" + or: [EmailSenderModuleFilter!] + + """Filter by the object’s `policies` field.""" + policies: JSONFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `privateApiName` field.""" + privateApiName: StringFilter + + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter + + """Filter by the object’s `publicSchemaName` field.""" + publicSchemaName: StringFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter + + """Filter by the object’s `siteSurfaceModule` relation.""" + siteSurfaceModule: SiteSurfaceModuleFilter + + """A related `siteSurfaceModule` exists.""" + siteSurfaceModuleExists: Boolean + + """Filter by the object’s `siteSurfaceModuleId` field.""" + siteSurfaceModuleId: UUIDFilter +} + +"""An input for mutations affecting `EmailSenderModule`""" +input EmailSenderModuleInput { + apiName: String + databaseId: UUID! + defaultCapabilities: [String] + emailIdentitiesTableId: UUID + emailIdentitiesTableName: String + emailProviderAccountsTableId: UUID + emailProviderAccountsTableName: String + emailSiteIdentitiesTableId: UUID + emailSiteIdentitiesTableName: String + entityField: String + entityTableId: UUID + id: UUID + policies: JSON + prefix: String + privateApiName: String + provisions: JSON + publicSchemaName: String + schemaId: UUID + scope: String! + siteSurfaceModuleId: UUID +} + +"""Methods to use when ordering `EmailSenderModule`.""" +enum EmailSenderModuleOrderBy { + API_NAME_ASC + API_NAME_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC + EMAIL_IDENTITIES_TABLE_ID_ASC + EMAIL_IDENTITIES_TABLE_ID_DESC + EMAIL_IDENTITIES_TABLE_NAME_ASC + EMAIL_IDENTITIES_TABLE_NAME_DESC + EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_ASC + EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_DESC + EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_ASC + EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_DESC + EMAIL_SITE_IDENTITIES_TABLE_ID_ASC + EMAIL_SITE_IDENTITIES_TABLE_ID_DESC + EMAIL_SITE_IDENTITIES_TABLE_NAME_ASC + EMAIL_SITE_IDENTITIES_TABLE_NAME_DESC + ENTITY_FIELD_ASC + ENTITY_FIELD_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + ID_ASC + ID_DESC + NATURAL + POLICIES_ASC + POLICIES_DESC + PREFIX_ASC + PREFIX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_API_NAME_ASC + PRIVATE_API_NAME_DESC + PROVISIONS_ASC + PROVISIONS_DESC + PUBLIC_SCHEMA_NAME_ASC + PUBLIC_SCHEMA_NAME_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + SCOPE_ASC + SCOPE_DESC + SITE_SURFACE_MODULE_ID_ASC + SITE_SURFACE_MODULE_ID_DESC +} + +""" +Represents an update to a `EmailSenderModule`. Fields that are set will be updated. +""" +input EmailSenderModulePatch { + apiName: String + databaseId: UUID + defaultCapabilities: [String] + emailIdentitiesTableId: UUID + emailIdentitiesTableName: String + emailProviderAccountsTableId: UUID + emailProviderAccountsTableName: String + emailSiteIdentitiesTableId: UUID + emailSiteIdentitiesTableName: String + entityField: String + entityTableId: UUID + id: UUID + policies: JSON + prefix: String + privateApiName: String + provisions: JSON + publicSchemaName: String + schemaId: UUID + scope: String + siteSurfaceModuleId: UUID +} + type EmailsModule { apiName: String databaseId: UUID! @@ -11513,7 +12952,7 @@ input EmailsModulePatch { """ 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). + and installs the required modules (capabilities, 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). @@ -11540,7 +12979,7 @@ type EntityTypeProvision { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) with entity-scoped RLS and a job trigger dispatching function:provision tasks. - Registers manage_functions + invoke_functions permission bits on first provision. + Registers manage_functions + invoke_functions capability bits on first provision. Example: functions := '[{}]'::jsonb """ functions: JSON @@ -11551,9 +12990,9 @@ type EntityTypeProvision { Each element recognizes (all optional): - key (text) module discriminator. Defaults to 'default'. - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - Registers manage_graphs + execute_graphs permission bits on first provision. + Registers manage_graphs + execute_graphs capability bits on first provision. Graph module requires a merkle_store_module_id dependency, so entity_type_provision - only registers permissions here. The graph module itself must be provisioned + only registers capabilities here. The graph module itself must be provisioned separately with the merkle store dependency resolved. Example: graphs := '[{}]'::jsonb """ @@ -11598,8 +13037,11 @@ type EntityTypeProvision { """ 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. + Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + When true, creates profile tables and applies profiles security. A membership may hold + any number of profiles: the membership_profiles assignment table holds every profile a + membership holds and the membership mask is granted | bit_or(held profile masks), with + memberships.profile_id kept as a pointer at one held profile. """ hasProfiles: Boolean! @@ -11630,7 +13072,7 @@ type EntityTypeProvision { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - Registers manage_namespaces permission bit on first provision. + Registers manage_namespaces capability bit on first provision. Example: namespaces := '[{}]'::jsonb """ namespaces: JSON @@ -11663,7 +13105,7 @@ type EntityTypeProvision { outGraphsTableId: UUID """ - Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). Populated by the trigger. Useful for verifying which modules were provisioned. """ outInstalledModules: [String] @@ -11717,7 +13159,7 @@ type EntityTypeProvision { """ 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), + Drives entity table name (prefix || 's' by default), module labels (capabilities_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. """ @@ -11732,8 +13174,8 @@ type EntityTypeProvision { 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 + - INSERT: create_entity capability on the parent entity + - UPDATE: admin_entity capability on the entity itself - DELETE: owner of the entity can delete it """ skipEntityPolicies: Boolean! @@ -11753,7 +13195,7 @@ type EntityTypeProvision { - download_url_expiry_seconds (integer) presigned GET URL expiry override - default_max_file_size (bigint) global max file size in bytes for this module - allowed_origins (text[]) default CORS origins for all buckets in this module - - restrict_reads (boolean) require read_files permission for SELECT on files + - restrict_reads (boolean) require read_files capability for SELECT on files - has_path_shares (boolean) enable virtual filesystem + path share policies - has_versioning (boolean) enable file version chains - has_content_hash (boolean) enable content hash for dedup @@ -11781,7 +13223,7 @@ type EntityTypeProvision { """ 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[] + Uses the same vocabulary as metaschema_modules_private.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). @@ -11992,7 +13434,7 @@ input EntityTypeProvisionInput { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) with entity-scoped RLS and a job trigger dispatching function:provision tasks. - Registers manage_functions + invoke_functions permission bits on first provision. + Registers manage_functions + invoke_functions capability bits on first provision. Example: functions := '[{}]'::jsonb """ functions: JSON @@ -12003,9 +13445,9 @@ input EntityTypeProvisionInput { Each element recognizes (all optional): - key (text) module discriminator. Defaults to 'default'. - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - Registers manage_graphs + execute_graphs permission bits on first provision. + Registers manage_graphs + execute_graphs capability bits on first provision. Graph module requires a merkle_store_module_id dependency, so entity_type_provision - only registers permissions here. The graph module itself must be provisioned + only registers capabilities here. The graph module itself must be provisioned separately with the merkle store dependency resolved. Example: graphs := '[{}]'::jsonb """ @@ -12050,8 +13492,11 @@ input EntityTypeProvisionInput { """ 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. + Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + When true, creates profile tables and applies profiles security. A membership may hold + any number of profiles: the membership_profiles assignment table holds every profile a + membership holds and the membership mask is granted | bit_or(held profile masks), with + memberships.profile_id kept as a pointer at one held profile. """ hasProfiles: Boolean @@ -12082,7 +13527,7 @@ input EntityTypeProvisionInput { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - Registers manage_namespaces permission bit on first provision. + Registers manage_namespaces capability bit on first provision. Example: namespaces := '[{}]'::jsonb """ namespaces: JSON @@ -12115,7 +13560,7 @@ input EntityTypeProvisionInput { outGraphsTableId: UUID """ - Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). Populated by the trigger. Useful for verifying which modules were provisioned. """ outInstalledModules: [String] @@ -12169,7 +13614,7 @@ input EntityTypeProvisionInput { """ 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), + Drives entity table name (prefix || 's' by default), module labels (capabilities_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. """ @@ -12184,8 +13629,8 @@ input EntityTypeProvisionInput { 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 + - INSERT: create_entity capability on the parent entity + - UPDATE: admin_entity capability on the entity itself - DELETE: owner of the entity can delete it """ skipEntityPolicies: Boolean @@ -12205,7 +13650,7 @@ input EntityTypeProvisionInput { - download_url_expiry_seconds (integer) presigned GET URL expiry override - default_max_file_size (bigint) global max file size in bytes for this module - allowed_origins (text[]) default CORS origins for all buckets in this module - - restrict_reads (boolean) require read_files permission for SELECT on files + - restrict_reads (boolean) require read_files capability for SELECT on files - has_path_shares (boolean) enable virtual filesystem + path share policies - has_versioning (boolean) enable file version chains - has_content_hash (boolean) enable content hash for dedup @@ -12233,7 +13678,7 @@ input EntityTypeProvisionInput { """ 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[] + Uses the same vocabulary as metaschema_modules_private.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). @@ -12372,7 +13817,7 @@ input EntityTypeProvisionPatch { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) with entity-scoped RLS and a job trigger dispatching function:provision tasks. - Registers manage_functions + invoke_functions permission bits on first provision. + Registers manage_functions + invoke_functions capability bits on first provision. Example: functions := '[{}]'::jsonb """ functions: JSON @@ -12383,9 +13828,9 @@ input EntityTypeProvisionPatch { Each element recognizes (all optional): - key (text) module discriminator. Defaults to 'default'. - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - Registers manage_graphs + execute_graphs permission bits on first provision. + Registers manage_graphs + execute_graphs capability bits on first provision. Graph module requires a merkle_store_module_id dependency, so entity_type_provision - only registers permissions here. The graph module itself must be provisioned + only registers capabilities here. The graph module itself must be provisioned separately with the merkle store dependency resolved. Example: graphs := '[{}]'::jsonb """ @@ -12430,8 +13875,11 @@ input EntityTypeProvisionPatch { """ 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. + Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + When true, creates profile tables and applies profiles security. A membership may hold + any number of profiles: the membership_profiles assignment table holds every profile a + membership holds and the membership mask is granted | bit_or(held profile masks), with + memberships.profile_id kept as a pointer at one held profile. """ hasProfiles: Boolean @@ -12462,7 +13910,7 @@ input EntityTypeProvisionPatch { - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - Registers manage_namespaces permission bit on first provision. + Registers manage_namespaces capability bit on first provision. Example: namespaces := '[{}]'::jsonb """ namespaces: JSON @@ -12495,7 +13943,7 @@ input EntityTypeProvisionPatch { outGraphsTableId: UUID """ - Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). Populated by the trigger. Useful for verifying which modules were provisioned. """ outInstalledModules: [String] @@ -12549,7 +13997,7 @@ input EntityTypeProvisionPatch { """ 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), + Drives entity table name (prefix || 's' by default), module labels (capabilities_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. """ @@ -12564,8 +14012,8 @@ input EntityTypeProvisionPatch { 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 + - INSERT: create_entity capability on the parent entity + - UPDATE: admin_entity capability on the entity itself - DELETE: owner of the entity can delete it """ skipEntityPolicies: Boolean @@ -12585,7 +14033,7 @@ input EntityTypeProvisionPatch { - download_url_expiry_seconds (integer) presigned GET URL expiry override - default_max_file_size (bigint) global max file size in bytes for this module - allowed_origins (text[]) default CORS origins for all buckets in this module - - restrict_reads (boolean) require read_files permission for SELECT on files + - restrict_reads (boolean) require read_files capability for SELECT on files - has_path_shares (boolean) enable virtual filesystem + path share policies - has_versioning (boolean) enable file version chains - has_content_hash (boolean) enable content hash for dedup @@ -12613,7 +14061,7 @@ input EntityTypeProvisionPatch { """ 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[] + Uses the same vocabulary as metaschema_modules_private.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). @@ -12651,7 +14099,7 @@ type EventsModule { actorTableId: UUID! apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID eventAggregatesTableId: UUID! @@ -12660,6 +14108,7 @@ type EventsModule { eventTypesTableName: String! eventsTableId: UUID! eventsTableName: String! + expireGrants: String! grantAchievement: String! id: UUID! interval: String! @@ -12676,9 +14125,11 @@ type EventsModule { privateSchemaId: UUID! privateSchemaName: String publicSchemaName: String + recomputeCapabilities: String! recordEvent: String! removeEvent: String! retention: String + revokeAchievement: String! schemaId: UUID! scope: String! stepsRequired: String! @@ -12688,7 +14139,9 @@ type EventsModule { tgEventBool: String! tgEventToggle: String! tgEventToggleBool: String! + tgLevelGrantSync: String! tgUpdateAggregates: String! + trustLadder: JSON upsertAggregate: String! } @@ -12740,8 +14193,8 @@ input EventsModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -12767,6 +14220,9 @@ input EventsModuleFilter { """Filter by the object’s `eventsTableName` field.""" eventsTableName: StringFilter + """Filter by the object’s `expireGrants` field.""" + expireGrants: StringFilter + """Filter by the object’s `grantAchievement` field.""" grantAchievement: StringFilter @@ -12821,6 +14277,9 @@ input EventsModuleFilter { """Filter by the object’s `publicSchemaName` field.""" publicSchemaName: StringFilter + """Filter by the object’s `recomputeCapabilities` field.""" + recomputeCapabilities: StringFilter + """Filter by the object’s `recordEvent` field.""" recordEvent: StringFilter @@ -12830,6 +14289,9 @@ input EventsModuleFilter { """Filter by the object’s `retention` field.""" retention: StringFilter + """Filter by the object’s `revokeAchievement` field.""" + revokeAchievement: StringFilter + """Filter by the object’s `schemaId` field.""" schemaId: UUIDFilter @@ -12857,9 +14319,15 @@ input EventsModuleFilter { """Filter by the object’s `tgEventToggleBool` field.""" tgEventToggleBool: StringFilter + """Filter by the object’s `tgLevelGrantSync` field.""" + tgLevelGrantSync: StringFilter + """Filter by the object’s `tgUpdateAggregates` field.""" tgUpdateAggregates: StringFilter + """Filter by the object’s `trustLadder` field.""" + trustLadder: JSONFilter + """Filter by the object’s `upsertAggregate` field.""" upsertAggregate: StringFilter } @@ -12871,7 +14339,7 @@ input EventsModuleInput { actorTableId: UUID apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID eventAggregatesTableId: UUID @@ -12880,6 +14348,7 @@ input EventsModuleInput { eventTypesTableName: String eventsTableId: UUID eventsTableName: String + expireGrants: String grantAchievement: String id: UUID interval: String @@ -12896,9 +14365,11 @@ input EventsModuleInput { privateSchemaId: UUID privateSchemaName: String publicSchemaName: String + recomputeCapabilities: String recordEvent: String removeEvent: String retention: String + revokeAchievement: String schemaId: UUID scope: String! stepsRequired: String @@ -12908,7 +14379,9 @@ input EventsModuleInput { tgEventBool: String tgEventToggle: String tgEventToggleBool: String + tgLevelGrantSync: String tgUpdateAggregates: String + trustLadder: JSON upsertAggregate: String } @@ -12924,8 +14397,8 @@ enum EventsModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -12942,6 +14415,8 @@ enum EventsModuleOrderBy { EVENT_TYPES_TABLE_ID_DESC EVENT_TYPES_TABLE_NAME_ASC EVENT_TYPES_TABLE_NAME_DESC + EXPIRE_GRANTS_ASC + EXPIRE_GRANTS_DESC GRANT_ACHIEVEMENT_ASC GRANT_ACHIEVEMENT_DESC ID_ASC @@ -12977,12 +14452,16 @@ enum EventsModuleOrderBy { PRIVATE_SCHEMA_NAME_DESC PUBLIC_SCHEMA_NAME_ASC PUBLIC_SCHEMA_NAME_DESC + RECOMPUTE_CAPABILITIES_ASC + RECOMPUTE_CAPABILITIES_DESC RECORD_EVENT_ASC RECORD_EVENT_DESC REMOVE_EVENT_ASC REMOVE_EVENT_DESC RETENTION_ASC RETENTION_DESC + REVOKE_ACHIEVEMENT_ASC + REVOKE_ACHIEVEMENT_DESC SCHEMA_ID_ASC SCHEMA_ID_DESC SCOPE_ASC @@ -13001,8 +14480,12 @@ enum EventsModuleOrderBy { TG_EVENT_TOGGLE_BOOL_ASC TG_EVENT_TOGGLE_BOOL_DESC TG_EVENT_TOGGLE_DESC + TG_LEVEL_GRANT_SYNC_ASC + TG_LEVEL_GRANT_SYNC_DESC TG_UPDATE_AGGREGATES_ASC TG_UPDATE_AGGREGATES_DESC + TRUST_LADDER_ASC + TRUST_LADDER_DESC UPSERT_AGGREGATE_ASC UPSERT_AGGREGATE_DESC } @@ -13016,7 +14499,7 @@ input EventsModulePatch { actorTableId: UUID apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID eventAggregatesTableId: UUID @@ -13025,6 +14508,7 @@ input EventsModulePatch { eventTypesTableName: String eventsTableId: UUID eventsTableName: String + expireGrants: String grantAchievement: String id: UUID interval: String @@ -13041,9 +14525,11 @@ input EventsModulePatch { privateSchemaId: UUID privateSchemaName: String publicSchemaName: String + recomputeCapabilities: String recordEvent: String removeEvent: String retention: String + revokeAchievement: String schemaId: UUID scope: String stepsRequired: String @@ -13053,14 +14539,154 @@ input EventsModulePatch { tgEventBool: String tgEventToggle: String tgEventToggleBool: String + tgLevelGrantSync: String tgUpdateAggregates: String + trustLadder: JSON upsertAggregate: String } +type FileRefField { + bucketKey: String + bucketTags: [String] + databaseId: UUID! + enforceFk: Boolean! + fieldId: UUID! + id: UUID! + isPublic: Boolean + + """Reads a single `StorageModule` that is related to this `FileRefField`.""" + storageModule: StorageModule + storageModuleId: UUID! + tableId: UUID! +} + +"""A connection to a list of `FileRefField` values.""" +type FileRefFieldConnection { + """ + A list of edges which contains the `FileRefField` and cursor to aid in pagination. + """ + edges: [FileRefFieldEdge]! + + """A list of `FileRefField` objects.""" + nodes: [FileRefField]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `FileRefField` you could get from the connection.""" + totalCount: Int! +} + +"""A `FileRefField` edge in the connection.""" +type FileRefFieldEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `FileRefField` at the end of the edge.""" + node: FileRefField +} + +""" +A filter to be used against `FileRefField` object types. All fields are combined with a logical ‘and.’ +""" +input FileRefFieldFilter { + """Checks for all expressions in this list.""" + and: [FileRefFieldFilter!] + + """Filter by the object’s `bucketKey` field.""" + bucketKey: StringFilter + + """Filter by the object’s `bucketTags` field.""" + bucketTags: StringListFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `enforceFk` field.""" + enforceFk: BooleanFilter + + """Filter by the object’s `fieldId` field.""" + fieldId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isPublic` field.""" + isPublic: BooleanFilter + + """Negates the expression.""" + not: FileRefFieldFilter + + """Checks for any expressions in this list.""" + or: [FileRefFieldFilter!] + + """Filter by the object’s `storageModule` relation.""" + storageModule: StorageModuleFilter + + """Filter by the object’s `storageModuleId` field.""" + storageModuleId: UUIDFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter +} + +"""An input for mutations affecting `FileRefField`""" +input FileRefFieldInput { + bucketKey: String + bucketTags: [String] + databaseId: UUID! + enforceFk: Boolean + fieldId: UUID! + id: UUID + isPublic: Boolean + storageModuleId: UUID! + tableId: UUID! +} + +"""Methods to use when ordering `FileRefField`.""" +enum FileRefFieldOrderBy { + BUCKET_KEY_ASC + BUCKET_KEY_DESC + BUCKET_TAGS_ASC + BUCKET_TAGS_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ENFORCE_FK_ASC + ENFORCE_FK_DESC + FIELD_ID_ASC + FIELD_ID_DESC + ID_ASC + ID_DESC + IS_PUBLIC_ASC + IS_PUBLIC_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + STORAGE_MODULE_ID_ASC + STORAGE_MODULE_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC +} + +""" +Represents an update to a `FileRefField`. Fields that are set will be updated. +""" +input FileRefFieldPatch { + bucketKey: String + bucketTags: [String] + databaseId: UUID + enforceFk: Boolean + fieldId: UUID + id: UUID + isPublic: Boolean + storageModuleId: UUID + tableId: UUID +} + type FunctionDeploymentModule { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] deploymentEventsTableId: UUID! deploymentEventsTableName: String! deploymentsTableId: UUID! @@ -13132,8 +14758,8 @@ input FunctionDeploymentModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `deploymentEventsTableId` field.""" deploymentEventsTableId: UUIDFilter @@ -13212,7 +14838,7 @@ input FunctionDeploymentModuleFilter { input FunctionDeploymentModuleInput { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] deploymentEventsTableId: UUID deploymentEventsTableName: String deploymentsTableId: UUID @@ -13239,8 +14865,8 @@ enum FunctionDeploymentModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DEPLOYMENTS_TABLE_ID_ASC DEPLOYMENTS_TABLE_ID_DESC DEPLOYMENTS_TABLE_NAME_ASC @@ -13288,7 +14914,7 @@ Represents an update to a `FunctionDeploymentModule`. Fields that are set will b input FunctionDeploymentModulePatch { apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] deploymentEventsTableId: UUID deploymentEventsTableName: String deploymentsTableId: UUID @@ -13314,7 +14940,7 @@ type FunctionInvocationModule { attemptsTableId: UUID! attemptsTableName: String! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionLogsTableId: UUID! @@ -13409,8 +15035,8 @@ input FunctionInvocationModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -13479,7 +15105,7 @@ input FunctionInvocationModuleInput { attemptsTableId: UUID attemptsTableName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionLogsTableId: UUID @@ -13508,8 +15134,8 @@ enum FunctionInvocationModuleOrderBy { ATTEMPTS_TABLE_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -13555,7 +15181,7 @@ input FunctionInvocationModulePatch { attemptsTableId: UUID attemptsTableName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionLogsTableId: UUID @@ -13594,7 +15220,7 @@ type FunctionModule { bindingsTableName: String capabilityBindingsTableId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] definitionsTableId: UUID! definitionsTableName: String! entityField: String @@ -13750,8 +15376,8 @@ input FunctionModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `definitionsTableId` field.""" definitionsTableId: UUIDFilter @@ -13833,7 +15459,7 @@ input FunctionModuleInput { bindingsTableName: String capabilityBindingsTableId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] definitionsTableId: UUID definitionsTableName: String entityField: String @@ -13864,8 +15490,8 @@ enum FunctionModuleOrderBy { CAPABILITY_BINDINGS_TABLE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DEFINITIONS_TABLE_ID_ASC DEFINITIONS_TABLE_ID_DESC DEFINITIONS_TABLE_NAME_ASC @@ -13912,7 +15538,7 @@ input FunctionModulePatch { bindingsTableName: String capabilityBindingsTableId: UUID databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] definitionsTableId: UUID definitionsTableName: String entityField: String @@ -13977,7 +15603,7 @@ type GraphExecutionModule { apiName: String createdAt: Datetime! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionsTableId: UUID! @@ -14048,8 +15674,8 @@ input GraphExecutionModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -14123,7 +15749,7 @@ input GraphExecutionModuleInput { apiName: String createdAt: Datetime databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionsTableId: UUID @@ -14153,8 +15779,8 @@ enum GraphExecutionModuleOrderBy { CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -14205,7 +15831,7 @@ input GraphExecutionModulePatch { apiName: String createdAt: Datetime databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID executionsTableId: UUID @@ -14231,7 +15857,7 @@ type GraphModule { apiName: String createdAt: Datetime! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID @@ -14324,8 +15950,8 @@ input GraphModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -14390,7 +16016,7 @@ input GraphModuleInput { apiName: String createdAt: Datetime databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID graphsTableId: UUID @@ -14415,8 +16041,8 @@ enum GraphModuleOrderBy { CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -14457,7 +16083,7 @@ input GraphModulePatch { apiName: String createdAt: Datetime databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID graphsTableId: UUID @@ -14495,7 +16121,7 @@ type HierarchyModule { chartEdgesTableName: String! createdAt: Datetime! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID! getManagersFunction: String! @@ -14567,8 +16193,8 @@ input HierarchyModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -14633,7 +16259,7 @@ input HierarchyModuleInput { chartEdgesTableName: String createdAt: Datetime databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID! getManagersFunction: String @@ -14666,8 +16292,8 @@ enum HierarchyModuleOrderBy { CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -14715,7 +16341,7 @@ input HierarchyModulePatch { chartEdgesTableName: String createdAt: Datetime databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID getManagersFunction: String @@ -14737,7 +16363,7 @@ input HierarchyModulePatch { type HttpRouteModule { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID @@ -14814,8 +16440,8 @@ input HttpRouteModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -14900,7 +16526,7 @@ input HttpRouteModuleFilter { input HttpRouteModuleInput { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID functionModuleId: UUID @@ -14927,8 +16553,8 @@ enum HttpRouteModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -14976,7 +16602,7 @@ Represents an update to a `HttpRouteModule`. Fields that are set will be updated input HttpRouteModulePatch { apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID functionModuleId: UUID @@ -16839,6 +18465,7 @@ type LimitsModule { limitCreditsTableId: UUID limitDecrementFunction: String! limitDecrementTrigger: String! + limitDefaults: JSON limitIncrementFunction: String! limitIncrementTrigger: String! limitUpdateTrigger: String! @@ -16955,6 +18582,9 @@ input LimitsModuleFilter { """Filter by the object’s `limitDecrementTrigger` field.""" limitDecrementTrigger: StringFilter + """Filter by the object’s `limitDefaults` field.""" + limitDefaults: JSONFilter + """Filter by the object’s `limitIncrementFunction` field.""" limitIncrementFunction: StringFilter @@ -17031,6 +18661,7 @@ input LimitsModuleInput { limitCreditsTableId: UUID limitDecrementFunction: String limitDecrementTrigger: String + limitDefaults: JSON limitIncrementFunction: String limitIncrementTrigger: String limitUpdateTrigger: String @@ -17094,6 +18725,8 @@ enum LimitsModuleOrderBy { LIMIT_DECREMENT_FUNCTION_DESC LIMIT_DECREMENT_TRIGGER_ASC LIMIT_DECREMENT_TRIGGER_DESC + LIMIT_DEFAULTS_ASC + LIMIT_DEFAULTS_DESC LIMIT_INCREMENT_FUNCTION_ASC LIMIT_INCREMENT_FUNCTION_DESC LIMIT_INCREMENT_TRIGGER_ASC @@ -17155,6 +18788,7 @@ input LimitsModulePatch { limitCreditsTableId: UUID limitDecrementFunction: String limitDecrementTrigger: String + limitDefaults: JSON limitIncrementFunction: String limitIncrementTrigger: String limitUpdateTrigger: String @@ -17281,9 +18915,12 @@ type MembershipsModule { adminGrantsTableId: UUID! adminGrantsTableName: String! apiName: String + capabilitiesTableId: UUID! + capabilityDefaultCapabilitiesTableId: UUID + capabilityDefaultGrantsTableId: UUID databaseId: UUID! + defaultCapabilitiesTableId: UUID! defaultLimitsTableId: UUID! - defaultPermissionsTableId: UUID! entityField: String entityIdsByMask: String entityIdsByPerm: String @@ -17306,9 +18943,6 @@ type MembershipsModule { membershipsTableName: String! ownerGrantsTableId: UUID! ownerGrantsTableName: String! - permissionDefaultGrantsTableId: UUID - permissionDefaultPermissionsTableId: UUID - permissionsTableId: UUID! prefix: String! privateApiName: String privateSchemaId: UUID! @@ -17372,15 +19006,24 @@ input MembershipsModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter + """Filter by the object’s `capabilitiesTableId` field.""" + capabilitiesTableId: UUIDFilter + + """Filter by the object’s `capabilityDefaultCapabilitiesTableId` field.""" + capabilityDefaultCapabilitiesTableId: UUIDFilter + + """Filter by the object’s `capabilityDefaultGrantsTableId` field.""" + capabilityDefaultGrantsTableId: UUIDFilter + """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter + """Filter by the object’s `defaultCapabilitiesTableId` field.""" + defaultCapabilitiesTableId: UUIDFilter + """Filter by the object’s `defaultLimitsTableId` field.""" defaultLimitsTableId: UUIDFilter - """Filter by the object’s `defaultPermissionsTableId` field.""" - defaultPermissionsTableId: UUIDFilter - """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -17453,15 +19096,6 @@ input MembershipsModuleFilter { """Filter by the object’s `ownerGrantsTableName` field.""" ownerGrantsTableName: StringFilter - """Filter by the object’s `permissionDefaultGrantsTableId` field.""" - permissionDefaultGrantsTableId: UUIDFilter - - """Filter by the object’s `permissionDefaultPermissionsTableId` field.""" - permissionDefaultPermissionsTableId: UUIDFilter - - """Filter by the object’s `permissionsTableId` field.""" - permissionsTableId: UUIDFilter - """Filter by the object’s `prefix` field.""" prefix: StringFilter @@ -17495,9 +19129,12 @@ input MembershipsModuleInput { adminGrantsTableId: UUID adminGrantsTableName: String apiName: String + capabilitiesTableId: UUID + capabilityDefaultCapabilitiesTableId: UUID + capabilityDefaultGrantsTableId: UUID databaseId: UUID! + defaultCapabilitiesTableId: UUID defaultLimitsTableId: UUID - defaultPermissionsTableId: UUID entityField: String entityIdsByMask: String entityIdsByPerm: String @@ -17520,9 +19157,6 @@ input MembershipsModuleInput { membershipsTableName: String ownerGrantsTableId: UUID ownerGrantsTableName: String - permissionDefaultGrantsTableId: UUID - permissionDefaultPermissionsTableId: UUID - permissionsTableId: UUID prefix: String privateApiName: String privateSchemaId: UUID @@ -17547,12 +19181,18 @@ enum MembershipsModuleOrderBy { ADMIN_GRANTS_TABLE_NAME_DESC API_NAME_ASC API_NAME_DESC + CAPABILITIES_TABLE_ID_ASC + CAPABILITIES_TABLE_ID_DESC + CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_ASC + CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_DESC + CAPABILITY_DEFAULT_GRANTS_TABLE_ID_ASC + CAPABILITY_DEFAULT_GRANTS_TABLE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC + DEFAULT_CAPABILITIES_TABLE_ID_ASC + DEFAULT_CAPABILITIES_TABLE_ID_DESC DEFAULT_LIMITS_TABLE_ID_ASC DEFAULT_LIMITS_TABLE_ID_DESC - DEFAULT_PERMISSIONS_TABLE_ID_ASC - DEFAULT_PERMISSIONS_TABLE_ID_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_IDS_BY_MASK_ASC @@ -17598,12 +19238,6 @@ enum MembershipsModuleOrderBy { OWNER_GRANTS_TABLE_ID_DESC OWNER_GRANTS_TABLE_NAME_ASC OWNER_GRANTS_TABLE_NAME_DESC - PERMISSIONS_TABLE_ID_ASC - PERMISSIONS_TABLE_ID_DESC - PERMISSION_DEFAULT_GRANTS_TABLE_ID_ASC - PERMISSION_DEFAULT_GRANTS_TABLE_ID_DESC - PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_ASC - PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_DESC PREFIX_ASC PREFIX_DESC PRIMARY_KEY_ASC @@ -17634,9 +19268,12 @@ input MembershipsModulePatch { adminGrantsTableId: UUID adminGrantsTableName: String apiName: String + capabilitiesTableId: UUID + capabilityDefaultCapabilitiesTableId: UUID + capabilityDefaultGrantsTableId: UUID databaseId: UUID + defaultCapabilitiesTableId: UUID defaultLimitsTableId: UUID - defaultPermissionsTableId: UUID entityField: String entityIdsByMask: String entityIdsByPerm: String @@ -17659,9 +19296,6 @@ input MembershipsModulePatch { membershipsTableName: String ownerGrantsTableId: UUID ownerGrantsTableName: String - permissionDefaultGrantsTableId: UUID - permissionDefaultPermissionsTableId: UUID - permissionsTableId: UUID prefix: String privateApiName: String privateSchemaId: UUID @@ -17674,7 +19308,37 @@ input MembershipsModulePatch { type MerkleStoreModule { apiName: String + capabilityKey: String commitTableId: UUID! + + """Reads and enables pagination through a set of `ContentPresetModule`.""" + contentPresetModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `ContentPresetModule`.""" + orderBy: [ContentPresetModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ContentPresetModuleFilter + ): ContentPresetModuleConnection! createdAt: Datetime! databaseId: UUID! @@ -17768,7 +19432,6 @@ type MerkleStoreModule { """ where: PagesModuleFilter ): PagesModuleConnection! - permissionKey: String prefix: String! privateApiName: String privateSchemaId: UUID! @@ -17847,9 +19510,18 @@ input MerkleStoreModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter + """Filter by the object’s `capabilityKey` field.""" + capabilityKey: StringFilter + """Filter by the object’s `commitTableId` field.""" commitTableId: UUIDFilter + """Filter by the object’s `contentPresetModules` relation.""" + contentPresetModules: MerkleStoreModuleToManyContentPresetModuleFilter + + """`contentPresetModules` exist.""" + contentPresetModulesExist: Boolean + """Filter by the object’s `createdAt` field.""" createdAt: DatetimeFilter @@ -17892,9 +19564,6 @@ input MerkleStoreModuleFilter { """`pagesModules` exist.""" pagesModulesExist: Boolean - """Filter by the object’s `permissionKey` field.""" - permissionKey: StringFilter - """Filter by the object’s `prefix` field.""" prefix: StringFilter @@ -17932,6 +19601,7 @@ input MerkleStoreModuleFilter { """An input for mutations affecting `MerkleStoreModule`""" input MerkleStoreModuleInput { apiName: String + capabilityKey: String commitTableId: UUID createdAt: Datetime databaseId: UUID! @@ -17939,7 +19609,6 @@ input MerkleStoreModuleInput { functionPrefix: String id: UUID objectTableId: UUID - permissionKey: String prefix: String privateApiName: String privateSchemaId: UUID @@ -17955,6 +19624,8 @@ input MerkleStoreModuleInput { enum MerkleStoreModuleOrderBy { API_NAME_ASC API_NAME_DESC + CAPABILITY_KEY_ASC + CAPABILITY_KEY_DESC COMMIT_TABLE_ID_ASC COMMIT_TABLE_ID_DESC CREATED_AT_ASC @@ -17970,8 +19641,6 @@ enum MerkleStoreModuleOrderBy { NATURAL OBJECT_TABLE_ID_ASC OBJECT_TABLE_ID_DESC - PERMISSION_KEY_ASC - PERMISSION_KEY_DESC PREFIX_ASC PREFIX_DESC PRIMARY_KEY_ASC @@ -17999,6 +19668,7 @@ Represents an update to a `MerkleStoreModule`. Fields that are set will be updat """ input MerkleStoreModulePatch { apiName: String + capabilityKey: String commitTableId: UUID createdAt: Datetime databaseId: UUID @@ -18006,7 +19676,6 @@ input MerkleStoreModulePatch { functionPrefix: String id: UUID objectTableId: UUID - permissionKey: String prefix: String privateApiName: String privateSchemaId: UUID @@ -18018,6 +19687,20 @@ input MerkleStoreModulePatch { storeTableId: UUID } +""" +A filter to be used against many `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ +""" +input MerkleStoreModuleToManyContentPresetModuleFilter { + """Filters to entities where every related entity matches.""" + every: ContentPresetModuleFilter + + """Filters to entities where no related entity matches.""" + none: ContentPresetModuleFilter + + """Filters to entities where at least one related entity matches.""" + some: ContentPresetModuleFilter +} + """ A filter to be used against many `DbPresetModule` object types. All fields are combined with a logical ‘and.’ """ @@ -18469,6 +20152,14 @@ type Mutation { input: CreateBlueprintTemplateInput! ): CreateBlueprintTemplatePayload + """Creates a single `CapabilitiesModule`.""" + createCapabilitiesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateCapabilitiesModuleInput! + ): CreateCapabilitiesModulePayload + """Creates a single `CatalogModule`.""" createCatalogModule( """ @@ -18501,6 +20192,14 @@ type Mutation { input: CreateConnectedAccountsModuleInput! ): CreateConnectedAccountsModulePayload + """Creates a single `ContentPresetModule`.""" + createContentPresetModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateContentPresetModuleInput! + ): CreateContentPresetModulePayload + """Creates a single `CryptoAddressesModule`.""" createCryptoAddressesModule( """ @@ -18517,6 +20216,14 @@ type Mutation { input: CreateCryptoAuthModuleInput! ): CreateCryptoAuthModulePayload + """Creates a single `DataCapabilitiesField`.""" + createDataCapabilitiesField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateDataCapabilitiesFieldInput! + ): CreateDataCapabilitiesFieldPayload + """Creates a single `DatabaseProvisionModule`.""" createDatabaseProvisionModule( """ @@ -18597,6 +20304,14 @@ type Mutation { input: CreateDomainModuleInput! ): CreateDomainModulePayload + """Creates a single `EmailSenderModule`.""" + createEmailSenderModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateEmailSenderModuleInput! + ): CreateEmailSenderModulePayload + """Creates a single `EmailsModule`.""" createEmailsModule( """ @@ -18621,6 +20336,14 @@ type Mutation { input: CreateEventsModuleInput! ): CreateEventsModulePayload + """Creates a single `FileRefField`.""" + createFileRefField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateFileRefFieldInput! + ): CreateFileRefFieldPayload + """Creates a single `FunctionDeploymentModule`.""" createFunctionDeploymentModule( """ @@ -18789,21 +20512,21 @@ type Mutation { input: CreateNotificationsModuleInput! ): CreateNotificationsModulePayload - """Creates a single `PagesModule`.""" - createPagesModule( + """Creates a single `OauthRequestsModule`.""" + createOauthRequestsModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreatePagesModuleInput! - ): CreatePagesModulePayload + input: CreateOauthRequestsModuleInput! + ): CreateOauthRequestsModulePayload - """Creates a single `PermissionsModule`.""" - createPermissionsModule( + """Creates a single `PagesModule`.""" + createPagesModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreatePermissionsModuleInput! - ): CreatePermissionsModulePayload + input: CreatePagesModuleInput! + ): CreatePagesModulePayload """Creates a single `PhoneNumbersModule`.""" createPhoneNumbersModule( @@ -18893,6 +20616,14 @@ type Mutation { input: CreateRouteModuleInput! ): CreateRouteModulePayload + """Creates a single `ScopeTypesModule`.""" + createScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateScopeTypesModuleInput! + ): CreateScopeTypesModulePayload + """Creates a single `SecureTableProvision`.""" createSecureTableProvision( """ @@ -18973,6 +20704,14 @@ type Mutation { input: CreateUserSettingsModuleInput! ): CreateUserSettingsModulePayload + """Creates a single `UserSettingsSecurityModule`.""" + createUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateUserSettingsSecurityModuleInput! + ): CreateUserSettingsSecurityModulePayload + """Creates a single `UserStateModule`.""" createUserStateModule( """ @@ -19077,6 +20816,14 @@ type Mutation { input: DeleteBlueprintTemplateInput! ): DeleteBlueprintTemplatePayload + """Deletes a single `CapabilitiesModule` using a unique key.""" + deleteCapabilitiesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteCapabilitiesModuleInput! + ): DeleteCapabilitiesModulePayload + """Deletes a single `CatalogModule` using a unique key.""" deleteCatalogModule( """ @@ -19109,6 +20856,14 @@ type Mutation { input: DeleteConnectedAccountsModuleInput! ): DeleteConnectedAccountsModulePayload + """Deletes a single `ContentPresetModule` using a unique key.""" + deleteContentPresetModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteContentPresetModuleInput! + ): DeleteContentPresetModulePayload + """Deletes a single `CryptoAddressesModule` using a unique key.""" deleteCryptoAddressesModule( """ @@ -19125,6 +20880,14 @@ type Mutation { input: DeleteCryptoAuthModuleInput! ): DeleteCryptoAuthModulePayload + """Deletes a single `DataCapabilitiesField` using a unique key.""" + deleteDataCapabilitiesField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteDataCapabilitiesFieldInput! + ): DeleteDataCapabilitiesFieldPayload + """Deletes a single `DatabaseProvisionModule` using a unique key.""" deleteDatabaseProvisionModule( """ @@ -19205,6 +20968,14 @@ type Mutation { input: DeleteDomainModuleInput! ): DeleteDomainModulePayload + """Deletes a single `EmailSenderModule` using a unique key.""" + deleteEmailSenderModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteEmailSenderModuleInput! + ): DeleteEmailSenderModulePayload + """Deletes a single `EmailsModule` using a unique key.""" deleteEmailsModule( """ @@ -19229,6 +21000,14 @@ type Mutation { input: DeleteEventsModuleInput! ): DeleteEventsModulePayload + """Deletes a single `FileRefField` using a unique key.""" + deleteFileRefField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteFileRefFieldInput! + ): DeleteFileRefFieldPayload + """Deletes a single `FunctionDeploymentModule` using a unique key.""" deleteFunctionDeploymentModule( """ @@ -19397,21 +21176,21 @@ type Mutation { input: DeleteNotificationsModuleInput! ): DeleteNotificationsModulePayload - """Deletes a single `PagesModule` using a unique key.""" - deletePagesModule( + """Deletes a single `OauthRequestsModule` using a unique key.""" + deleteOauthRequestsModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeletePagesModuleInput! - ): DeletePagesModulePayload + input: DeleteOauthRequestsModuleInput! + ): DeleteOauthRequestsModulePayload - """Deletes a single `PermissionsModule` using a unique key.""" - deletePermissionsModule( + """Deletes a single `PagesModule` using a unique key.""" + deletePagesModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: DeletePermissionsModuleInput! - ): DeletePermissionsModulePayload + input: DeletePagesModuleInput! + ): DeletePagesModulePayload """Deletes a single `PhoneNumbersModule` using a unique key.""" deletePhoneNumbersModule( @@ -19501,6 +21280,14 @@ type Mutation { input: DeleteRouteModuleInput! ): DeleteRouteModulePayload + """Deletes a single `ScopeTypesModule` using a unique key.""" + deleteScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteScopeTypesModuleInput! + ): DeleteScopeTypesModulePayload + """Deletes a single `SecureTableProvision` using a unique key.""" deleteSecureTableProvision( """ @@ -19581,6 +21368,14 @@ type Mutation { input: DeleteUserSettingsModuleInput! ): DeleteUserSettingsModulePayload + """Deletes a single `UserSettingsSecurityModule` using a unique key.""" + deleteUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteUserSettingsSecurityModuleInput! + ): DeleteUserSettingsSecurityModulePayload + """Deletes a single `UserStateModule` using a unique key.""" deleteUserStateModule( """ @@ -19634,76 +21429,6 @@ type Mutation { input: ProvisionBucketInput! ): ProvisionBucketPayload - """ - Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - """ - provisionCheckConstraint( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionCheckConstraintInput! - ): ProvisionCheckConstraintPayload - - """ - 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. - """ - provisionFullTextSearch( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionFullTextSearchInput! - ): ProvisionFullTextSearchPayload - - """ - 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. - """ - provisionIndex( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionIndexInput! - ): ProvisionIndexPayload - - """ - 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). - """ - provisionRelation( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionRelationInput! - ): ProvisionRelationPayload - - """ - 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 - - """ - 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). - """ - provisionTable( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionTableInput! - ): ProvisionTablePayload - - """ - 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. - """ - provisionUniqueConstraint( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionUniqueConstraintInput! - ): ProvisionUniqueConstraintPayload - """Updates a single `AgentModule` using a unique key and a patch.""" updateAgentModule( """ @@ -19772,6 +21497,14 @@ type Mutation { input: UpdateBlueprintTemplateInput! ): UpdateBlueprintTemplatePayload + """Updates a single `CapabilitiesModule` using a unique key and a patch.""" + updateCapabilitiesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateCapabilitiesModuleInput! + ): UpdateCapabilitiesModulePayload + """Updates a single `CatalogModule` using a unique key and a patch.""" updateCatalogModule( """ @@ -19808,6 +21541,14 @@ type Mutation { input: UpdateConnectedAccountsModuleInput! ): UpdateConnectedAccountsModulePayload + """Updates a single `ContentPresetModule` using a unique key and a patch.""" + updateContentPresetModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateContentPresetModuleInput! + ): UpdateContentPresetModulePayload + """ Updates a single `CryptoAddressesModule` using a unique key and a patch. """ @@ -19826,6 +21567,16 @@ type Mutation { input: UpdateCryptoAuthModuleInput! ): UpdateCryptoAuthModulePayload + """ + Updates a single `DataCapabilitiesField` using a unique key and a patch. + """ + updateDataCapabilitiesField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateDataCapabilitiesFieldInput! + ): UpdateDataCapabilitiesFieldPayload + """ Updates a single `DatabaseProvisionModule` using a unique key and a patch. """ @@ -19912,6 +21663,14 @@ type Mutation { input: UpdateDomainModuleInput! ): UpdateDomainModulePayload + """Updates a single `EmailSenderModule` using a unique key and a patch.""" + updateEmailSenderModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateEmailSenderModuleInput! + ): UpdateEmailSenderModulePayload + """Updates a single `EmailsModule` using a unique key and a patch.""" updateEmailsModule( """ @@ -19936,6 +21695,14 @@ type Mutation { input: UpdateEventsModuleInput! ): UpdateEventsModulePayload + """Updates a single `FileRefField` using a unique key and a patch.""" + updateFileRefField( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateFileRefFieldInput! + ): UpdateFileRefFieldPayload + """ Updates a single `FunctionDeploymentModule` using a unique key and a patch. """ @@ -20118,21 +21885,21 @@ type Mutation { input: UpdateNotificationsModuleInput! ): UpdateNotificationsModulePayload - """Updates a single `PagesModule` using a unique key and a patch.""" - updatePagesModule( + """Updates a single `OauthRequestsModule` using a unique key and a patch.""" + updateOauthRequestsModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdatePagesModuleInput! - ): UpdatePagesModulePayload + input: UpdateOauthRequestsModuleInput! + ): UpdateOauthRequestsModulePayload - """Updates a single `PermissionsModule` using a unique key and a patch.""" - updatePermissionsModule( + """Updates a single `PagesModule` using a unique key and a patch.""" + updatePagesModule( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: UpdatePermissionsModuleInput! - ): UpdatePermissionsModulePayload + input: UpdatePagesModuleInput! + ): UpdatePagesModulePayload """Updates a single `PhoneNumbersModule` using a unique key and a patch.""" updatePhoneNumbersModule( @@ -20224,6 +21991,14 @@ type Mutation { input: UpdateRouteModuleInput! ): UpdateRouteModulePayload + """Updates a single `ScopeTypesModule` using a unique key and a patch.""" + updateScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateScopeTypesModuleInput! + ): UpdateScopeTypesModulePayload + """ Updates a single `SecureTableProvision` using a unique key and a patch. """ @@ -20310,6 +22085,16 @@ type Mutation { input: UpdateUserSettingsModuleInput! ): UpdateUserSettingsModulePayload + """ + Updates a single `UserSettingsSecurityModule` using a unique key and a patch. + """ + updateUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateUserSettingsSecurityModuleInput! + ): UpdateUserSettingsSecurityModulePayload + """Updates a single `UserStateModule` using a unique key and a patch.""" updateUserStateModule( """ @@ -20356,7 +22141,7 @@ type Mutation { type NamespaceModule { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID @@ -20505,8 +22290,8 @@ input NamespaceModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -20585,7 +22370,7 @@ input NamespaceModuleFilter { input NamespaceModuleInput { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -20610,8 +22395,8 @@ enum NamespaceModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -20655,7 +22440,7 @@ Represents an update to a `NamespaceModule`. Fields that are set will be updated input NamespaceModulePatch { apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -20720,7 +22505,7 @@ type NotificationsModule { apiName: String channelsTableId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] deliveryLogTableId: UUID entityField: String hasChannels: Boolean! @@ -20787,8 +22572,8 @@ input NotificationsModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `deliveryLogTableId` field.""" deliveryLogTableId: UUIDFilter @@ -20862,7 +22647,7 @@ input NotificationsModuleInput { apiName: String channelsTableId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] deliveryLogTableId: UUID entityField: String hasChannels: Boolean @@ -20893,8 +22678,8 @@ enum NotificationsModuleOrderBy { CHANNELS_TABLE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DELIVERY_LOG_TABLE_ID_ASC DELIVERY_LOG_TABLE_ID_DESC ENTITY_FIELD_ASC @@ -20947,7 +22732,7 @@ input NotificationsModulePatch { apiName: String channelsTableId: UUID databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] deliveryLogTableId: UUID entityField: String hasChannels: Boolean @@ -20970,356 +22755,284 @@ input NotificationsModulePatch { userSettingsTableId: UUID } -"""Information about pagination in a connection.""" -type PageInfo { - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor - - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! - - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! - - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor -} - -type PagesModule { - apiName: String - createdAt: Datetime! - databaseId: UUID! - entityTableId: UUID - id: UUID! - - """ - Reads a single `MerkleStoreModule` that is related to this `PagesModule`. - """ - merkleStoreModule: MerkleStoreModule - merkleStoreModuleId: UUID! - pagesTableId: UUID! - policies: JSON - prefix: String! - privateApiName: String - privateSchemaId: UUID! - privateSchemaName: String - provisions: JSON - publicSchemaId: UUID! - publicSchemaName: String - scope: String! - - """ - Reads a single `SiteSurfaceModule` that is related to this `PagesModule`. - """ - siteSurfaceModule: SiteSurfaceModule - siteSurfaceModuleId: UUID - sitesTableId: UUID! - storeNamePrefix: String! -} - -"""A connection to a list of `PagesModule` values.""" -type PagesModuleConnection { - """ - A list of edges which contains the `PagesModule` and cursor to aid in pagination. - """ - edges: [PagesModuleEdge]! - - """A list of `PagesModule` objects.""" - nodes: [PagesModule]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `PagesModule` you could get from the connection.""" - totalCount: Int! -} - -"""A `PagesModule` edge in the connection.""" -type PagesModuleEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `PagesModule` at the end of the edge.""" - node: PagesModule -} - -""" -A filter to be used against `PagesModule` object types. All fields are combined with a logical ‘and.’ -""" -input PagesModuleFilter { - """Checks for all expressions in this list.""" - and: [PagesModuleFilter!] - - """Filter by the object’s `apiName` field.""" - apiName: StringFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `entityTableId` field.""" - entityTableId: UUIDFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `merkleStoreModule` relation.""" - merkleStoreModule: MerkleStoreModuleFilter - - """Filter by the object’s `merkleStoreModuleId` field.""" - merkleStoreModuleId: UUIDFilter - - """Negates the expression.""" - not: PagesModuleFilter - - """Checks for any expressions in this list.""" - or: [PagesModuleFilter!] - - """Filter by the object’s `pagesTableId` field.""" - pagesTableId: UUIDFilter - - """Filter by the object’s `policies` field.""" - policies: JSONFilter - - """Filter by the object’s `prefix` field.""" - prefix: StringFilter - - """Filter by the object’s `privateApiName` field.""" - privateApiName: StringFilter - - """Filter by the object’s `privateSchemaId` field.""" - privateSchemaId: UUIDFilter - - """Filter by the object’s `privateSchemaName` field.""" - privateSchemaName: StringFilter - - """Filter by the object’s `provisions` field.""" - provisions: JSONFilter - - """Filter by the object’s `publicSchemaId` field.""" - publicSchemaId: UUIDFilter - - """Filter by the object’s `publicSchemaName` field.""" - publicSchemaName: StringFilter - - """Filter by the object’s `scope` field.""" - scope: StringFilter - - """Filter by the object’s `siteSurfaceModule` relation.""" - siteSurfaceModule: SiteSurfaceModuleFilter - - """A related `siteSurfaceModule` exists.""" - siteSurfaceModuleExists: Boolean - - """Filter by the object’s `siteSurfaceModuleId` field.""" - siteSurfaceModuleId: UUIDFilter - - """Filter by the object’s `sitesTableId` field.""" - sitesTableId: UUIDFilter - - """Filter by the object’s `storeNamePrefix` field.""" - storeNamePrefix: StringFilter -} - -"""An input for mutations affecting `PagesModule`""" -input PagesModuleInput { - apiName: String - createdAt: Datetime - databaseId: UUID! - entityTableId: UUID - id: UUID - merkleStoreModuleId: UUID! - pagesTableId: UUID - policies: JSON - prefix: String! - privateApiName: String - privateSchemaId: UUID - privateSchemaName: String - provisions: JSON - publicSchemaId: UUID - publicSchemaName: String - scope: String! - siteSurfaceModuleId: UUID - sitesTableId: UUID - storeNamePrefix: String -} - -"""Methods to use when ordering `PagesModule`.""" -enum PagesModuleOrderBy { - API_NAME_ASC - API_NAME_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - ENTITY_TABLE_ID_ASC - ENTITY_TABLE_ID_DESC - ID_ASC - ID_DESC - MERKLE_STORE_MODULE_ID_ASC - MERKLE_STORE_MODULE_ID_DESC - NATURAL - PAGES_TABLE_ID_ASC - PAGES_TABLE_ID_DESC - POLICIES_ASC - POLICIES_DESC - PREFIX_ASC - PREFIX_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - PRIVATE_API_NAME_ASC - PRIVATE_API_NAME_DESC - PRIVATE_SCHEMA_ID_ASC - PRIVATE_SCHEMA_ID_DESC - PRIVATE_SCHEMA_NAME_ASC - PRIVATE_SCHEMA_NAME_DESC - PROVISIONS_ASC - PROVISIONS_DESC - PUBLIC_SCHEMA_ID_ASC - PUBLIC_SCHEMA_ID_DESC - PUBLIC_SCHEMA_NAME_ASC - PUBLIC_SCHEMA_NAME_DESC - SCOPE_ASC - SCOPE_DESC - SITES_TABLE_ID_ASC - SITES_TABLE_ID_DESC - SITE_SURFACE_MODULE_ID_ASC - SITE_SURFACE_MODULE_ID_DESC - STORE_NAME_PREFIX_ASC - STORE_NAME_PREFIX_DESC -} - """ -Represents an update to a `PagesModule`. Fields that are set will be updated. +Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + pending identity links table (a verified identity parked under a single-use ticket), + both private, plus the five SECURITY DEFINER procedures that are their only surface. + Sibling of identity_providers_module (durable provider configuration) rather than part + of it: this is ephemeral, purged flow state with its own retention. """ -input PagesModulePatch { - apiName: String - createdAt: Datetime - databaseId: UUID - entityTableId: UUID - id: UUID - merkleStoreModuleId: UUID - pagesTableId: UUID - policies: JSON - prefix: String - privateApiName: String - privateSchemaId: UUID - privateSchemaName: String - provisions: JSON - publicSchemaId: UUID - publicSchemaName: String - scope: String - siteSurfaceModuleId: UUID - sitesTableId: UUID - storeNamePrefix: String -} - -type PermissionsModule { - actorTableId: UUID! - apiName: String - bitlen: Int! +type OauthRequestsModule { databaseId: UUID! - defaultTableId: UUID! - defaultTableName: String! entityField: String entityTableId: UUID - getByMask: String! - getMask: String! - getMaskByName: String! - getPaddedMask: String! id: UUID! + oauthAuthorizationRequestsTableId: UUID! + oauthAuthorizationRequestsTableName: String! + pendingIdentityLinksTableId: UUID! + pendingIdentityLinksTableName: String! prefix: String! - privateApiName: String privateSchemaId: UUID! privateSchemaName: String - publicSchemaName: String - schemaId: UUID! scope: String! - tableId: UUID! - tableName: String! } -"""A connection to a list of `PermissionsModule` values.""" -type PermissionsModuleConnection { +"""A connection to a list of `OauthRequestsModule` values.""" +type OauthRequestsModuleConnection { """ - A list of edges which contains the `PermissionsModule` and cursor to aid in pagination. + A list of edges which contains the `OauthRequestsModule` and cursor to aid in pagination. """ - edges: [PermissionsModuleEdge]! + edges: [OauthRequestsModuleEdge]! - """A list of `PermissionsModule` objects.""" - nodes: [PermissionsModule]! + """A list of `OauthRequestsModule` objects.""" + nodes: [OauthRequestsModule]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `PermissionsModule` you could get from the connection. + The count of *all* `OauthRequestsModule` you could get from the connection. """ totalCount: Int! } -"""A `PermissionsModule` edge in the connection.""" -type PermissionsModuleEdge { +"""A `OauthRequestsModule` edge in the connection.""" +type OauthRequestsModuleEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `PermissionsModule` at the end of the edge.""" - node: PermissionsModule + """The `OauthRequestsModule` at the end of the edge.""" + node: OauthRequestsModule } """ -A filter to be used against `PermissionsModule` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OauthRequestsModule` object types. All fields are combined with a logical ‘and.’ """ -input PermissionsModuleFilter { - """Filter by the object’s `actorTableId` field.""" - actorTableId: UUIDFilter - +input OauthRequestsModuleFilter { """Checks for all expressions in this list.""" - and: [PermissionsModuleFilter!] - - """Filter by the object’s `apiName` field.""" - apiName: StringFilter - - """Filter by the object’s `bitlen` field.""" - bitlen: IntFilter + and: [OauthRequestsModuleFilter!] """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultTableId` field.""" - defaultTableId: UUIDFilter - - """Filter by the object’s `defaultTableName` field.""" - defaultTableName: StringFilter - """Filter by the object’s `entityField` field.""" entityField: StringFilter """Filter by the object’s `entityTableId` field.""" entityTableId: UUIDFilter - """Filter by the object’s `getByMask` field.""" - getByMask: StringFilter + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Filter by the object’s `getMask` field.""" - getMask: StringFilter + """Negates the expression.""" + not: OauthRequestsModuleFilter - """Filter by the object’s `getMaskByName` field.""" - getMaskByName: StringFilter + """Filter by the object’s `oauthAuthorizationRequestsTableId` field.""" + oauthAuthorizationRequestsTableId: UUIDFilter - """Filter by the object’s `getPaddedMask` field.""" - getPaddedMask: StringFilter + """Filter by the object’s `oauthAuthorizationRequestsTableName` field.""" + oauthAuthorizationRequestsTableName: StringFilter + + """Checks for any expressions in this list.""" + or: [OauthRequestsModuleFilter!] + + """Filter by the object’s `pendingIdentityLinksTableId` field.""" + pendingIdentityLinksTableId: UUIDFilter + + """Filter by the object’s `pendingIdentityLinksTableName` field.""" + pendingIdentityLinksTableName: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `scope` field.""" + scope: StringFilter +} + +"""An input for mutations affecting `OauthRequestsModule`""" +input OauthRequestsModuleInput { + databaseId: UUID! + entityField: String + entityTableId: UUID + id: UUID + oauthAuthorizationRequestsTableId: UUID + oauthAuthorizationRequestsTableName: String + pendingIdentityLinksTableId: UUID + pendingIdentityLinksTableName: String + prefix: String + privateSchemaId: UUID + privateSchemaName: String + scope: String! +} + +"""Methods to use when ordering `OauthRequestsModule`.""" +enum OauthRequestsModuleOrderBy { + DATABASE_ID_ASC + DATABASE_ID_DESC + ENTITY_FIELD_ASC + ENTITY_FIELD_DESC + ENTITY_TABLE_ID_ASC + ENTITY_TABLE_ID_DESC + ID_ASC + ID_DESC + NATURAL + OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_ASC + OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_DESC + OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_ASC + OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_DESC + PENDING_IDENTITY_LINKS_TABLE_ID_ASC + PENDING_IDENTITY_LINKS_TABLE_ID_DESC + PENDING_IDENTITY_LINKS_TABLE_NAME_ASC + PENDING_IDENTITY_LINKS_TABLE_NAME_DESC + PREFIX_ASC + PREFIX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + SCOPE_ASC + SCOPE_DESC +} + +""" +Represents an update to a `OauthRequestsModule`. Fields that are set will be updated. +""" +input OauthRequestsModulePatch { + databaseId: UUID + entityField: String + entityTableId: UUID + id: UUID + oauthAuthorizationRequestsTableId: UUID + oauthAuthorizationRequestsTableName: String + pendingIdentityLinksTableId: UUID + pendingIdentityLinksTableName: String + prefix: String + privateSchemaId: UUID + privateSchemaName: String + scope: String +} + +"""Information about pagination in a connection.""" +type PageInfo { + """When paginating forwards, the cursor to continue.""" + endCursor: Cursor + + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + + """When paginating backwards, the cursor to continue.""" + startCursor: Cursor +} + +type PagesModule { + apiName: String + createdAt: Datetime! + databaseId: UUID! + entityTableId: UUID + id: UUID! + + """ + Reads a single `MerkleStoreModule` that is related to this `PagesModule`. + """ + merkleStoreModule: MerkleStoreModule + merkleStoreModuleId: UUID! + pagesTableId: UUID! + policies: JSON + prefix: String! + privateApiName: String + privateSchemaId: UUID! + privateSchemaName: String + provisions: JSON + publicSchemaId: UUID! + publicSchemaName: String + scope: String! + + """ + Reads a single `SiteSurfaceModule` that is related to this `PagesModule`. + """ + siteSurfaceModule: SiteSurfaceModule + siteSurfaceModuleId: UUID + sitesTableId: UUID! + storeNamePrefix: String! +} + +"""A connection to a list of `PagesModule` values.""" +type PagesModuleConnection { + """ + A list of edges which contains the `PagesModule` and cursor to aid in pagination. + """ + edges: [PagesModuleEdge]! + + """A list of `PagesModule` objects.""" + nodes: [PagesModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `PagesModule` you could get from the connection.""" + totalCount: Int! +} + +"""A `PagesModule` edge in the connection.""" +type PagesModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PagesModule` at the end of the edge.""" + node: PagesModule +} + +""" +A filter to be used against `PagesModule` object types. All fields are combined with a logical ‘and.’ +""" +input PagesModuleFilter { + """Checks for all expressions in this list.""" + and: [PagesModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `entityTableId` field.""" + entityTableId: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `merkleStoreModule` relation.""" + merkleStoreModule: MerkleStoreModuleFilter + + """Filter by the object’s `merkleStoreModuleId` field.""" + merkleStoreModuleId: UUIDFilter + """Negates the expression.""" - not: PermissionsModuleFilter + not: PagesModuleFilter """Checks for any expressions in this list.""" - or: [PermissionsModuleFilter!] + or: [PagesModuleFilter!] + + """Filter by the object’s `pagesTableId` field.""" + pagesTableId: UUIDFilter + + """Filter by the object’s `policies` field.""" + policies: JSONFilter """Filter by the object’s `prefix` field.""" prefix: StringFilter @@ -21333,77 +23046,76 @@ input PermissionsModuleFilter { """Filter by the object’s `privateSchemaName` field.""" privateSchemaName: StringFilter + """Filter by the object’s `provisions` field.""" + provisions: JSONFilter + + """Filter by the object’s `publicSchemaId` field.""" + publicSchemaId: UUIDFilter + """Filter by the object’s `publicSchemaName` field.""" publicSchemaName: StringFilter - """Filter by the object’s `schemaId` field.""" - schemaId: UUIDFilter - """Filter by the object’s `scope` field.""" scope: StringFilter - """Filter by the object’s `tableId` field.""" - tableId: UUIDFilter + """Filter by the object’s `siteSurfaceModule` relation.""" + siteSurfaceModule: SiteSurfaceModuleFilter - """Filter by the object’s `tableName` field.""" - tableName: StringFilter + """A related `siteSurfaceModule` exists.""" + siteSurfaceModuleExists: Boolean + + """Filter by the object’s `siteSurfaceModuleId` field.""" + siteSurfaceModuleId: UUIDFilter + + """Filter by the object’s `sitesTableId` field.""" + sitesTableId: UUIDFilter + + """Filter by the object’s `storeNamePrefix` field.""" + storeNamePrefix: StringFilter } -"""An input for mutations affecting `PermissionsModule`""" -input PermissionsModuleInput { - actorTableId: UUID +"""An input for mutations affecting `PagesModule`""" +input PagesModuleInput { apiName: String - bitlen: Int + createdAt: Datetime databaseId: UUID! - defaultTableId: UUID - defaultTableName: String - entityField: String entityTableId: UUID - getByMask: String - getMask: String - getMaskByName: String - getPaddedMask: String id: UUID - prefix: String + merkleStoreModuleId: UUID! + pagesTableId: UUID + policies: JSON + prefix: String! privateApiName: String privateSchemaId: UUID privateSchemaName: String + provisions: JSON + publicSchemaId: UUID publicSchemaName: String - schemaId: UUID scope: String! - tableId: UUID - tableName: String + siteSurfaceModuleId: UUID + sitesTableId: UUID + storeNamePrefix: String } -"""Methods to use when ordering `PermissionsModule`.""" -enum PermissionsModuleOrderBy { - ACTOR_TABLE_ID_ASC - ACTOR_TABLE_ID_DESC +"""Methods to use when ordering `PagesModule`.""" +enum PagesModuleOrderBy { API_NAME_ASC API_NAME_DESC - BITLEN_ASC - BITLEN_DESC + CREATED_AT_ASC + CREATED_AT_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_TABLE_ID_ASC - DEFAULT_TABLE_ID_DESC - DEFAULT_TABLE_NAME_ASC - DEFAULT_TABLE_NAME_DESC - ENTITY_FIELD_ASC - ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC ENTITY_TABLE_ID_DESC - GET_BY_MASK_ASC - GET_BY_MASK_DESC - GET_MASK_ASC - GET_MASK_BY_NAME_ASC - GET_MASK_BY_NAME_DESC - GET_MASK_DESC - GET_PADDED_MASK_ASC - GET_PADDED_MASK_DESC ID_ASC ID_DESC + MERKLE_STORE_MODULE_ID_ASC + MERKLE_STORE_MODULE_ID_DESC NATURAL + PAGES_TABLE_ID_ASC + PAGES_TABLE_ID_DESC + POLICIES_ASC + POLICIES_DESC PREFIX_ASC PREFIX_DESC PRIMARY_KEY_ASC @@ -21414,44 +23126,45 @@ enum PermissionsModuleOrderBy { PRIVATE_SCHEMA_ID_DESC PRIVATE_SCHEMA_NAME_ASC PRIVATE_SCHEMA_NAME_DESC + PROVISIONS_ASC + PROVISIONS_DESC + PUBLIC_SCHEMA_ID_ASC + PUBLIC_SCHEMA_ID_DESC PUBLIC_SCHEMA_NAME_ASC PUBLIC_SCHEMA_NAME_DESC - SCHEMA_ID_ASC - SCHEMA_ID_DESC SCOPE_ASC SCOPE_DESC - TABLE_ID_ASC - TABLE_ID_DESC - TABLE_NAME_ASC - TABLE_NAME_DESC + SITES_TABLE_ID_ASC + SITES_TABLE_ID_DESC + SITE_SURFACE_MODULE_ID_ASC + SITE_SURFACE_MODULE_ID_DESC + STORE_NAME_PREFIX_ASC + STORE_NAME_PREFIX_DESC } """ -Represents an update to a `PermissionsModule`. Fields that are set will be updated. +Represents an update to a `PagesModule`. Fields that are set will be updated. """ -input PermissionsModulePatch { - actorTableId: UUID +input PagesModulePatch { apiName: String - bitlen: Int + createdAt: Datetime databaseId: UUID - defaultTableId: UUID - defaultTableName: String - entityField: String entityTableId: UUID - getByMask: String - getMask: String - getMaskByName: String - getPaddedMask: String id: UUID + merkleStoreModuleId: UUID + pagesTableId: UUID + policies: JSON prefix: String privateApiName: String privateSchemaId: UUID privateSchemaName: String + provisions: JSON + publicSchemaId: UUID publicSchemaName: String - schemaId: UUID scope: String - tableId: UUID - tableName: String + siteSurfaceModuleId: UUID + sitesTableId: UUID + storeNamePrefix: String } type PhoneNumbersModule { @@ -22028,22 +23741,24 @@ input PrincipalAuthModulePatch { type ProfilesModule { actorTableId: UUID! apiName: String + capabilitiesTableId: UUID! databaseId: UUID! entityField: String entityTableId: UUID id: UUID! + membershipProfilesTableId: UUID! + membershipProfilesTableName: String! membershipsTableId: UUID! - permissionsTableId: UUID! prefix: String! privateApiName: String privateSchemaId: UUID! privateSchemaName: String + profileCapabilitiesTableId: UUID! + profileCapabilitiesTableName: String! profileDefinitionGrantsTableId: UUID! profileDefinitionGrantsTableName: String! profileGrantsTableId: UUID! profileGrantsTableName: String! - profilePermissionsTableId: UUID! - profilePermissionsTableName: String! profileTemplatesTableId: UUID! profileTemplatesTableName: String! publicSchemaName: String @@ -22092,6 +23807,9 @@ input ProfilesModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter + """Filter by the object’s `capabilitiesTableId` field.""" + capabilitiesTableId: UUIDFilter + """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter @@ -22104,6 +23822,12 @@ input ProfilesModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `membershipProfilesTableId` field.""" + membershipProfilesTableId: UUIDFilter + + """Filter by the object’s `membershipProfilesTableName` field.""" + membershipProfilesTableName: StringFilter + """Filter by the object’s `membershipsTableId` field.""" membershipsTableId: UUIDFilter @@ -22113,9 +23837,6 @@ input ProfilesModuleFilter { """Checks for any expressions in this list.""" or: [ProfilesModuleFilter!] - """Filter by the object’s `permissionsTableId` field.""" - permissionsTableId: UUIDFilter - """Filter by the object’s `prefix` field.""" prefix: StringFilter @@ -22128,6 +23849,12 @@ input ProfilesModuleFilter { """Filter by the object’s `privateSchemaName` field.""" privateSchemaName: StringFilter + """Filter by the object’s `profileCapabilitiesTableId` field.""" + profileCapabilitiesTableId: UUIDFilter + + """Filter by the object’s `profileCapabilitiesTableName` field.""" + profileCapabilitiesTableName: StringFilter + """Filter by the object’s `profileDefinitionGrantsTableId` field.""" profileDefinitionGrantsTableId: UUIDFilter @@ -22140,12 +23867,6 @@ input ProfilesModuleFilter { """Filter by the object’s `profileGrantsTableName` field.""" profileGrantsTableName: StringFilter - """Filter by the object’s `profilePermissionsTableId` field.""" - profilePermissionsTableId: UUIDFilter - - """Filter by the object’s `profilePermissionsTableName` field.""" - profilePermissionsTableName: StringFilter - """Filter by the object’s `profileTemplatesTableId` field.""" profileTemplatesTableId: UUIDFilter @@ -22172,22 +23893,24 @@ input ProfilesModuleFilter { input ProfilesModuleInput { actorTableId: UUID apiName: String + capabilitiesTableId: UUID databaseId: UUID! entityField: String entityTableId: UUID id: UUID + membershipProfilesTableId: UUID + membershipProfilesTableName: String membershipsTableId: UUID - permissionsTableId: UUID prefix: String privateApiName: String privateSchemaId: UUID privateSchemaName: String + profileCapabilitiesTableId: UUID + profileCapabilitiesTableName: String profileDefinitionGrantsTableId: UUID profileDefinitionGrantsTableName: String profileGrantsTableId: UUID profileGrantsTableName: String - profilePermissionsTableId: UUID - profilePermissionsTableName: String profileTemplatesTableId: UUID profileTemplatesTableName: String publicSchemaName: String @@ -22203,6 +23926,8 @@ enum ProfilesModuleOrderBy { ACTOR_TABLE_ID_DESC API_NAME_ASC API_NAME_DESC + CAPABILITIES_TABLE_ID_ASC + CAPABILITIES_TABLE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC ENTITY_FIELD_ASC @@ -22213,9 +23938,11 @@ enum ProfilesModuleOrderBy { ID_DESC MEMBERSHIPS_TABLE_ID_ASC MEMBERSHIPS_TABLE_ID_DESC + MEMBERSHIP_PROFILES_TABLE_ID_ASC + MEMBERSHIP_PROFILES_TABLE_ID_DESC + MEMBERSHIP_PROFILES_TABLE_NAME_ASC + MEMBERSHIP_PROFILES_TABLE_NAME_DESC NATURAL - PERMISSIONS_TABLE_ID_ASC - PERMISSIONS_TABLE_ID_DESC PREFIX_ASC PREFIX_DESC PRIMARY_KEY_ASC @@ -22226,6 +23953,10 @@ enum ProfilesModuleOrderBy { PRIVATE_SCHEMA_ID_DESC PRIVATE_SCHEMA_NAME_ASC PRIVATE_SCHEMA_NAME_DESC + PROFILE_CAPABILITIES_TABLE_ID_ASC + PROFILE_CAPABILITIES_TABLE_ID_DESC + PROFILE_CAPABILITIES_TABLE_NAME_ASC + PROFILE_CAPABILITIES_TABLE_NAME_DESC PROFILE_DEFINITION_GRANTS_TABLE_ID_ASC PROFILE_DEFINITION_GRANTS_TABLE_ID_DESC PROFILE_DEFINITION_GRANTS_TABLE_NAME_ASC @@ -22234,10 +23965,6 @@ enum ProfilesModuleOrderBy { PROFILE_GRANTS_TABLE_ID_DESC PROFILE_GRANTS_TABLE_NAME_ASC PROFILE_GRANTS_TABLE_NAME_DESC - PROFILE_PERMISSIONS_TABLE_ID_ASC - PROFILE_PERMISSIONS_TABLE_ID_DESC - PROFILE_PERMISSIONS_TABLE_NAME_ASC - PROFILE_PERMISSIONS_TABLE_NAME_DESC PROFILE_TEMPLATES_TABLE_ID_ASC PROFILE_TEMPLATES_TABLE_ID_DESC PROFILE_TEMPLATES_TABLE_NAME_ASC @@ -22260,22 +23987,24 @@ Represents an update to a `ProfilesModule`. Fields that are set will be updated. input ProfilesModulePatch { actorTableId: UUID apiName: String + capabilitiesTableId: UUID databaseId: UUID entityField: String entityTableId: UUID id: UUID + membershipProfilesTableId: UUID + membershipProfilesTableName: String membershipsTableId: UUID - permissionsTableId: UUID prefix: String privateApiName: String privateSchemaId: UUID privateSchemaName: String + profileCapabilitiesTableId: UUID + profileCapabilitiesTableName: String profileDefinitionGrantsTableId: UUID profileDefinitionGrantsTableName: String profileGrantsTableId: UUID profileGrantsTableName: String - profilePermissionsTableId: UUID - profilePermissionsTableName: String profileTemplatesTableId: UUID profileTemplatesTableName: String publicSchemaName: String @@ -22316,237 +24045,6 @@ type ProvisionBucketPayload { success: Boolean! } -"""All input for the `provisionCheckConstraint` mutation.""" -input ProvisionCheckConstraintInput { - """ - 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 - databaseId: UUID - definition: JSON - tableId: UUID -} - -"""The output of our `provisionCheckConstraint` mutation.""" -type ProvisionCheckConstraintPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - -"""All input for the `provisionFullTextSearch` mutation.""" -input ProvisionFullTextSearchInput { - """ - 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 - databaseId: UUID - definition: JSON - tableId: UUID -} - -"""The output of our `provisionFullTextSearch` mutation.""" -type ProvisionFullTextSearchPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} - -"""All input for the `provisionIndex` mutation.""" -input ProvisionIndexInput { - """ - 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 - databaseId: UUID - definition: JSON - tableId: UUID -} - -"""The output of our `provisionIndex` mutation.""" -type ProvisionIndexPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} - -"""All input for the `provisionRelation` mutation.""" -input ProvisionRelationInput { - apiRequired: Boolean - - """ - 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 - createIndex: Boolean - databaseId: UUID - deleteAction: String - exposeInApi: Boolean - fieldName: String - grants: JSON - isRequired: Boolean - junctionSchemaId: UUID - junctionTableId: UUID - junctionTableName: String - nodes: JSON - policies: JSON - relationType: String - sourceFieldName: String - sourceTableId: UUID - targetFieldName: String - targetTableId: UUID - useCompositeKey: Boolean -} - -"""The output of our `provisionRelation` mutation.""" -type ProvisionRelationPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: [ProvisionRelationRecord] -} - -type ProvisionRelationRecord { - outFieldId: UUID - outJunctionTableId: UUID - outSourceFieldId: UUID - outTargetFieldId: UUID -} - -"""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 - databaseId: UUID - name: String - operator: String - paramName: String - sourceFieldId: UUID - sourceTableId: UUID - targetFieldId: UUID - targetTableId: UUID -} - -"""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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} - -"""All input for the `provisionTable` mutation.""" -input ProvisionTableInput { - """ - 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 - databaseId: UUID - description: String - fields: JSON - fullTextSearches: JSON - grants: JSON - indexes: JSON - nodes: JSON - policies: JSON - schemaId: UUID - tableId: UUID - tableName: String - uniqueConstraints: JSON - useRls: Boolean -} - -"""The output of our `provisionTable` mutation.""" -type ProvisionTablePayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: [ProvisionTableRecord] -} - -type ProvisionTableRecord { - outFields: [UUID] - outTableId: UUID -} - -"""All input for the `provisionUniqueConstraint` mutation.""" -input ProvisionUniqueConstraintInput { - """ - 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 - databaseId: UUID - definition: JSON - tableId: UUID -} - -"""The output of our `provisionUniqueConstraint` mutation.""" -type ProvisionUniqueConstraintPayload { - """ - 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 - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """The root query type which gives access points into the data universe.""" type Query { """ @@ -22786,6 +24284,35 @@ type Query { where: BlueprintFilter ): BlueprintConnection + """Reads and enables pagination through a set of `CapabilitiesModule`.""" + capabilitiesModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `CapabilitiesModule`.""" + orderBy: [CapabilitiesModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: CapabilitiesModuleFilter + ): CapabilitiesModuleConnection + """Reads and enables pagination through a set of `CatalogModule`.""" catalogModules( """Read all values in the set after (below) this cursor.""" @@ -22906,6 +24433,35 @@ type Query { where: ConnectedAccountsModuleFilter ): ConnectedAccountsModuleConnection + """Reads and enables pagination through a set of `ContentPresetModule`.""" + contentPresetModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `ContentPresetModule`.""" + orderBy: [ContentPresetModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ContentPresetModuleFilter + ): ContentPresetModuleConnection + """Reads and enables pagination through a set of `CryptoAddressesModule`.""" cryptoAddressesModules( """Read all values in the set after (below) this cursor.""" @@ -22964,6 +24520,35 @@ type Query { where: CryptoAuthModuleFilter ): CryptoAuthModuleConnection + """Reads and enables pagination through a set of `DataCapabilitiesField`.""" + dataCapabilitiesFields( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `DataCapabilitiesField`.""" + orderBy: [DataCapabilitiesFieldOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: DataCapabilitiesFieldFilter + ): DataCapabilitiesFieldConnection + """ Reads and enables pagination through a set of `DatabaseProvisionModule`. """ @@ -23260,6 +24845,35 @@ type Query { where: DomainModuleFilter ): DomainModuleConnection + """Reads and enables pagination through a set of `EmailSenderModule`.""" + emailSenderModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailSenderModule`.""" + orderBy: [EmailSenderModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailSenderModuleFilter + ): EmailSenderModuleConnection + """Reads and enables pagination through a set of `EmailsModule`.""" emailsModules( """Read all values in the set after (below) this cursor.""" @@ -23347,6 +24961,35 @@ type Query { where: EventsModuleFilter ): EventsModuleConnection + """Reads and enables pagination through a set of `FileRefField`.""" + fileRefFields( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `FileRefField`.""" + orderBy: [FileRefFieldOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: FileRefFieldFilter + ): FileRefFieldConnection + """ Reads and enables pagination through a set of `FunctionDeploymentModule`. """ @@ -23964,8 +25607,8 @@ type Query { where: NotificationsModuleFilter ): NotificationsModuleConnection - """Reads and enables pagination through a set of `PagesModule`.""" - pagesModules( + """Reads and enables pagination through a set of `OauthRequestsModule`.""" + oauthRequestsModules( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -23984,17 +25627,17 @@ type Query { """ offset: Int - """The method to use when ordering `PagesModule`.""" - orderBy: [PagesModuleOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OauthRequestsModule`.""" + orderBy: [OauthRequestsModuleOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: PagesModuleFilter - ): PagesModuleConnection + where: OauthRequestsModuleFilter + ): OauthRequestsModuleConnection - """Reads and enables pagination through a set of `PermissionsModule`.""" - permissionsModules( + """Reads and enables pagination through a set of `PagesModule`.""" + pagesModules( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -24013,14 +25656,14 @@ type Query { """ offset: Int - """The method to use when ordering `PermissionsModule`.""" - orderBy: [PermissionsModuleOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PagesModule`.""" + orderBy: [PagesModuleOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: PermissionsModuleFilter - ): PermissionsModuleConnection + where: PagesModuleFilter + ): PagesModuleConnection """Reads and enables pagination through a set of `PhoneNumbersModule`.""" phoneNumbersModules( @@ -24254,16 +25897,6 @@ type Query { where: RelationProvisionFilter ): RelationProvisionConnection - """ - 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, fieldName: String, tableId: UUID): UUID - - """ - 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. - """ - resolveBlueprintTable(databaseId: UUID, defaultSchemaId: UUID, schemaName: String, tableMap: JSON, tableName: String): UUID - """Reads and enables pagination through a set of `ResourceModule`.""" resourceModules( """Read all values in the set after (below) this cursor.""" @@ -24351,6 +25984,35 @@ type Query { where: RouteModuleFilter ): RouteModuleConnection + """Reads and enables pagination through a set of `ScopeTypesModule`.""" + scopeTypesModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ScopeTypesModuleFilter + ): ScopeTypesModuleConnection + """Reads and enables pagination through a set of `SecureTableProvision`.""" secureTableProvisions( """Read all values in the set after (below) this cursor.""" @@ -24641,6 +26303,37 @@ type Query { where: UserSettingsModuleFilter ): UserSettingsModuleConnection + """ + Reads and enables pagination through a set of `UserSettingsSecurityModule`. + """ + userSettingsSecurityModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: UserSettingsSecurityModuleFilter + ): UserSettingsSecurityModuleConnection + """Reads and enables pagination through a set of `UserStateModule`.""" userStateModules( """Read all values in the set after (below) this cursor.""" @@ -24793,7 +26486,7 @@ type RateLimitMetersModule { apiName: String checkRateLimitFunction: String! databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] id: UUID! prefix: String privateApiName: String @@ -24853,8 +26546,8 @@ input RateLimitMetersModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `id` field.""" id: UUIDFilter @@ -24907,7 +26600,7 @@ input RateLimitMetersModuleInput { apiName: String checkRateLimitFunction: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] id: UUID prefix: String privateApiName: String @@ -24931,8 +26624,8 @@ enum RateLimitMetersModuleOrderBy { CHECK_RATE_LIMIT_FUNCTION_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ID_ASC ID_DESC NATURAL @@ -24971,7 +26664,7 @@ input RateLimitMetersModulePatch { apiName: String checkRateLimitFunction: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] id: UUID prefix: String privateApiName: String @@ -25986,7 +27679,7 @@ input RelationProvisionPatch { type ResourceModule { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID @@ -26100,8 +27793,8 @@ input ResourceModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -26231,7 +27924,7 @@ input ResourceModuleFilter { input ResourceModuleInput { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -26273,8 +27966,8 @@ enum ResourceModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -26352,7 +28045,7 @@ Represents an update to a `ResourceModule`. Fields that are set will be updated. input ResourceModulePatch { apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -26568,12 +28261,14 @@ input RlsModulePatch { type RouteModule { apiName: String + appLinksFunctionName: String """Reads a single `CatalogModule` that is related to this `RouteModule`.""" catalogModule: CatalogModule catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + deepLinkFunctionName: String + defaultCapabilities: [String] """Reads a single `DomainModule` that is related to this `RouteModule`.""" domainModule: DomainModule @@ -26635,6 +28330,9 @@ input RouteModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter + """Filter by the object’s `appLinksFunctionName` field.""" + appLinksFunctionName: StringFilter + """Filter by the object’s `catalogModule` relation.""" catalogModule: CatalogModuleFilter @@ -26647,8 +28345,11 @@ input RouteModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `deepLinkFunctionName` field.""" + deepLinkFunctionName: StringFilter + + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `domainModule` relation.""" domainModule: DomainModuleFilter @@ -26726,9 +28427,11 @@ input RouteModuleFilter { """An input for mutations affecting `RouteModule`""" input RouteModuleInput { apiName: String + appLinksFunctionName: String catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + deepLinkFunctionName: String + defaultCapabilities: [String] domainModuleId: UUID entityField: String entityTableId: UUID @@ -26755,12 +28458,16 @@ input RouteModuleInput { enum RouteModuleOrderBy { API_NAME_ASC API_NAME_DESC + APP_LINKS_FUNCTION_NAME_ASC + APP_LINKS_FUNCTION_NAME_DESC CATALOG_MODULE_ID_ASC CATALOG_MODULE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEEP_LINK_FUNCTION_NAME_ASC + DEEP_LINK_FUNCTION_NAME_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DOMAIN_MODULE_ID_ASC DOMAIN_MODULE_ID_DESC ENTITY_FIELD_ASC @@ -26811,9 +28518,11 @@ Represents an update to a `RouteModule`. Fields that are set will be updated. """ input RouteModulePatch { apiName: String + appLinksFunctionName: String catalogModuleId: UUID databaseId: UUID - defaultPermissions: [String] + deepLinkFunctionName: String + defaultCapabilities: [String] domainModuleId: UUID entityField: String entityTableId: UUID @@ -26836,6 +28545,108 @@ input RouteModulePatch { scope: String } +type ScopeTypesModule { + databaseId: UUID! + id: UUID! + privateSchemaName: String + schemaId: UUID! + scopeTypesTableId: UUID! +} + +"""A connection to a list of `ScopeTypesModule` values.""" +type ScopeTypesModuleConnection { + """ + A list of edges which contains the `ScopeTypesModule` and cursor to aid in pagination. + """ + edges: [ScopeTypesModuleEdge]! + + """A list of `ScopeTypesModule` objects.""" + nodes: [ScopeTypesModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `ScopeTypesModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `ScopeTypesModule` edge in the connection.""" +type ScopeTypesModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ScopeTypesModule` at the end of the edge.""" + node: ScopeTypesModule +} + +""" +A filter to be used against `ScopeTypesModule` object types. All fields are combined with a logical ‘and.’ +""" +input ScopeTypesModuleFilter { + """Checks for all expressions in this list.""" + and: [ScopeTypesModuleFilter!] + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: ScopeTypesModuleFilter + + """Checks for any expressions in this list.""" + or: [ScopeTypesModuleFilter!] + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `scopeTypesTableId` field.""" + scopeTypesTableId: UUIDFilter +} + +"""An input for mutations affecting `ScopeTypesModule`""" +input ScopeTypesModuleInput { + databaseId: UUID! + id: UUID + privateSchemaName: String + schemaId: UUID + scopeTypesTableId: UUID +} + +"""Methods to use when ordering `ScopeTypesModule`.""" +enum ScopeTypesModuleOrderBy { + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + SCOPE_TYPES_TABLE_ID_ASC + SCOPE_TYPES_TABLE_ID_DESC +} + +""" +Represents an update to a `ScopeTypesModule`. Fields that are set will be updated. +""" +input ScopeTypesModulePatch { + databaseId: UUID + id: UUID + privateSchemaName: String + schemaId: UUID + scopeTypesTableId: UUID +} + """ 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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. """ @@ -27388,7 +29199,36 @@ type SiteSurfaceModule { catalogModule: CatalogModule catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] + + """Reads and enables pagination through a set of `EmailSenderModule`.""" + emailSenderModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `EmailSenderModule`.""" + orderBy: [EmailSenderModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EmailSenderModuleFilter + ): EmailSenderModuleConnection! entityField: String entityTableId: UUID id: UUID! @@ -27498,8 +29338,14 @@ input SiteSurfaceModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter + + """Filter by the object’s `emailSenderModules` relation.""" + emailSenderModules: SiteSurfaceModuleToManyEmailSenderModuleFilter + + """`emailSenderModules` exist.""" + emailSenderModulesExist: Boolean """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -27603,7 +29449,7 @@ input SiteSurfaceModuleInput { apiName: String catalogModuleId: UUID databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -27642,8 +29488,8 @@ enum SiteSurfaceModuleOrderBy { CATALOG_MODULE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -27712,7 +29558,7 @@ input SiteSurfaceModulePatch { apiName: String catalogModuleId: UUID databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID id: UUID @@ -27743,6 +29589,20 @@ input SiteSurfaceModulePatch { sitesTableName: String } +""" +A filter to be used against many `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ +""" +input SiteSurfaceModuleToManyEmailSenderModuleFilter { + """Filters to entities where every related entity matches.""" + every: EmailSenderModuleFilter + + """Filters to entities where no related entity matches.""" + none: EmailSenderModuleFilter + + """Filters to entities where at least one related entity matches.""" + some: EmailSenderModuleFilter +} + """ A filter to be used against many `PagesModule` object types. All fields are combined with a logical ‘and.’ """ @@ -27988,13 +29848,42 @@ type StorageModule { catalogModuleId: UUID confirmUploadDelay: Interval! databaseId: UUID! + defaultCapabilities: [String] defaultMaxFileSize: BigInt - defaultPermissions: [String] downloadUrlExpirySeconds: Int endpoint: String entityField: String entityTableId: UUID fileEventsTableId: UUID + + """Reads and enables pagination through a set of `FileRefField`.""" + fileRefFields( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `FileRefField`.""" + orderBy: [FileRefFieldOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: FileRefFieldFilter + ): FileRefFieldConnection! filesTableId: UUID! filesTableName: String! hasAuditLog: Boolean! @@ -28109,12 +29998,12 @@ input StorageModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter + """Filter by the object’s `defaultMaxFileSize` field.""" defaultMaxFileSize: BigIntFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter - """Filter by the object’s `downloadUrlExpirySeconds` field.""" downloadUrlExpirySeconds: IntFilter @@ -28130,6 +30019,12 @@ input StorageModuleFilter { """Filter by the object’s `fileEventsTableId` field.""" fileEventsTableId: UUIDFilter + """Filter by the object’s `fileRefFields` relation.""" + fileRefFields: StorageModuleToManyFileRefFieldFilter + + """`fileRefFields` exist.""" + fileRefFieldsExist: Boolean + """Filter by the object’s `filesTableId` field.""" filesTableId: UUIDFilter @@ -28231,8 +30126,8 @@ input StorageModuleInput { catalogModuleId: UUID confirmUploadDelay: IntervalInput databaseId: UUID! + defaultCapabilities: [String] defaultMaxFileSize: BigInt - defaultPermissions: [String] downloadUrlExpirySeconds: Int endpoint: String entityField: String @@ -28284,10 +30179,10 @@ enum StorageModuleOrderBy { CONFIRM_UPLOAD_DELAY_DESC DATABASE_ID_ASC DATABASE_ID_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC DEFAULT_MAX_FILE_SIZE_ASC DEFAULT_MAX_FILE_SIZE_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC DOWNLOAD_URL_EXPIRY_SECONDS_ASC DOWNLOAD_URL_EXPIRY_SECONDS_DESC ENDPOINT_ASC @@ -28367,8 +30262,8 @@ input StorageModulePatch { catalogModuleId: UUID confirmUploadDelay: IntervalInput databaseId: UUID + defaultCapabilities: [String] defaultMaxFileSize: BigInt - defaultPermissions: [String] downloadUrlExpirySeconds: Int endpoint: String entityField: String @@ -28402,6 +30297,20 @@ input StorageModulePatch { uploadUrlExpirySeconds: Int } +""" +A filter to be used against many `FileRefField` object types. All fields are combined with a logical ‘and.’ +""" +input StorageModuleToManyFileRefFieldFilter { + """Filters to entities where every related entity matches.""" + every: FileRefFieldFilter + + """Filters to entities where no related entity matches.""" + none: FileRefFieldFilter + + """Filters to entities where at least one related entity matches.""" + some: FileRefFieldFilter +} + """ A filter to be used against many `HttpRouteModule` object types. All fields are combined with a logical ‘and.’ """ @@ -29253,6 +31162,44 @@ type UpdateBlueprintTemplatePayload { query: Query } +"""All input for the `updateCapabilitiesModule` mutation.""" +input UpdateCapabilitiesModuleInput { + """ + An object where the defined keys will be set on the `CapabilitiesModule` being updated. + """ + capabilitiesModulePatch: CapabilitiesModulePatch! + + """ + 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 update `CapabilitiesModule` mutation.""" +type UpdateCapabilitiesModulePayload { + """The `CapabilitiesModule` that was updated by this mutation.""" + capabilitiesModule: CapabilitiesModule + + """An edge for our `CapabilitiesModule`. May be used by Relay 1.""" + capabilitiesModuleEdge( + """The method to use when ordering `CapabilitiesModule`.""" + orderBy: [CapabilitiesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): CapabilitiesModuleEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateCatalogModule` mutation.""" input UpdateCatalogModuleInput { """ @@ -29405,6 +31352,44 @@ type UpdateConnectedAccountsModulePayload { query: Query } +"""All input for the `updateContentPresetModule` mutation.""" +input UpdateContentPresetModuleInput { + """ + 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 + + """ + An object where the defined keys will be set on the `ContentPresetModule` being updated. + """ + contentPresetModulePatch: ContentPresetModulePatch! + id: UUID! +} + +"""The output of our update `ContentPresetModule` mutation.""" +type UpdateContentPresetModulePayload { + """ + 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 `ContentPresetModule` that was updated by this mutation.""" + contentPresetModule: ContentPresetModule + + """An edge for our `ContentPresetModule`. May be used by Relay 1.""" + contentPresetModuleEdge( + """The method to use when ordering `ContentPresetModule`.""" + orderBy: [ContentPresetModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ContentPresetModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateCryptoAddressesModule` mutation.""" input UpdateCryptoAddressesModuleInput { """ @@ -29481,6 +31466,44 @@ type UpdateCryptoAuthModulePayload { query: Query } +"""All input for the `updateDataCapabilitiesField` mutation.""" +input UpdateDataCapabilitiesFieldInput { + """ + 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 + + """ + An object where the defined keys will be set on the `DataCapabilitiesField` being updated. + """ + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch! + id: UUID! +} + +"""The output of our update `DataCapabilitiesField` mutation.""" +type UpdateDataCapabilitiesFieldPayload { + """ + 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 `DataCapabilitiesField` that was updated by this mutation.""" + dataCapabilitiesField: DataCapabilitiesField + + """An edge for our `DataCapabilitiesField`. May be used by Relay 1.""" + dataCapabilitiesFieldEdge( + """The method to use when ordering `DataCapabilitiesField`.""" + orderBy: [DataCapabilitiesFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): DataCapabilitiesFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateDatabaseProvisionModule` mutation.""" input UpdateDatabaseProvisionModuleInput { """ @@ -29861,6 +31884,44 @@ type UpdateDomainModulePayload { query: Query } +"""All input for the `updateEmailSenderModule` mutation.""" +input UpdateEmailSenderModuleInput { + """ + 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 + + """ + An object where the defined keys will be set on the `EmailSenderModule` being updated. + """ + emailSenderModulePatch: EmailSenderModulePatch! + id: UUID! +} + +"""The output of our update `EmailSenderModule` mutation.""" +type UpdateEmailSenderModulePayload { + """ + 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 `EmailSenderModule` that was updated by this mutation.""" + emailSenderModule: EmailSenderModule + + """An edge for our `EmailSenderModule`. May be used by Relay 1.""" + emailSenderModuleEdge( + """The method to use when ordering `EmailSenderModule`.""" + orderBy: [EmailSenderModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): EmailSenderModuleEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateEmailsModule` mutation.""" input UpdateEmailsModuleInput { """ @@ -29977,6 +32038,44 @@ type UpdateEventsModulePayload { query: Query } +"""All input for the `updateFileRefField` mutation.""" +input UpdateFileRefFieldInput { + """ + 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 + + """ + An object where the defined keys will be set on the `FileRefField` being updated. + """ + fileRefFieldPatch: FileRefFieldPatch! + id: UUID! +} + +"""The output of our update `FileRefField` mutation.""" +type UpdateFileRefFieldPayload { + """ + 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 `FileRefField` that was updated by this mutation.""" + fileRefField: FileRefField + + """An edge for our `FileRefField`. May be used by Relay 1.""" + fileRefFieldEdge( + """The method to use when ordering `FileRefField`.""" + orderBy: [FileRefFieldOrderBy!]! = [PRIMARY_KEY_ASC] + ): FileRefFieldEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateFunctionDeploymentModule` mutation.""" input UpdateFunctionDeploymentModuleInput { """ @@ -30775,8 +32874,8 @@ type UpdateNotificationsModulePayload { query: Query } -"""All input for the `updatePagesModule` mutation.""" -input UpdatePagesModuleInput { +"""All input for the `updateOauthRequestsModule` mutation.""" +input UpdateOauthRequestsModuleInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -30785,27 +32884,27 @@ input UpdatePagesModuleInput { id: UUID! """ - An object where the defined keys will be set on the `PagesModule` being updated. + An object where the defined keys will be set on the `OauthRequestsModule` being updated. """ - pagesModulePatch: PagesModulePatch! + oauthRequestsModulePatch: OauthRequestsModulePatch! } -"""The output of our update `PagesModule` mutation.""" -type UpdatePagesModulePayload { +"""The output of our update `OauthRequestsModule` mutation.""" +type UpdateOauthRequestsModulePayload { """ 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 `PagesModule` that was updated by this mutation.""" - pagesModule: PagesModule + """The `OauthRequestsModule` that was updated by this mutation.""" + oauthRequestsModule: OauthRequestsModule - """An edge for our `PagesModule`. May be used by Relay 1.""" - pagesModuleEdge( - """The method to use when ordering `PagesModule`.""" - orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PagesModuleEdge + """An edge for our `OauthRequestsModule`. May be used by Relay 1.""" + oauthRequestsModuleEdge( + """The method to use when ordering `OauthRequestsModule`.""" + orderBy: [OauthRequestsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): OauthRequestsModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -30813,8 +32912,8 @@ type UpdatePagesModulePayload { query: Query } -"""All input for the `updatePermissionsModule` mutation.""" -input UpdatePermissionsModuleInput { +"""All input for the `updatePagesModule` mutation.""" +input UpdatePagesModuleInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -30823,27 +32922,27 @@ input UpdatePermissionsModuleInput { id: UUID! """ - An object where the defined keys will be set on the `PermissionsModule` being updated. + An object where the defined keys will be set on the `PagesModule` being updated. """ - permissionsModulePatch: PermissionsModulePatch! + pagesModulePatch: PagesModulePatch! } -"""The output of our update `PermissionsModule` mutation.""" -type UpdatePermissionsModulePayload { +"""The output of our update `PagesModule` mutation.""" +type UpdatePagesModulePayload { """ 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 `PermissionsModule` that was updated by this mutation.""" - permissionsModule: PermissionsModule + """The `PagesModule` that was updated by this mutation.""" + pagesModule: PagesModule - """An edge for our `PermissionsModule`. May be used by Relay 1.""" - permissionsModuleEdge( - """The method to use when ordering `PermissionsModule`.""" - orderBy: [PermissionsModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): PermissionsModuleEdge + """An edge for our `PagesModule`. May be used by Relay 1.""" + pagesModuleEdge( + """The method to use when ordering `PagesModule`.""" + orderBy: [PagesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): PagesModuleEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -31271,6 +33370,44 @@ type UpdateRouteModulePayload { ): RouteModuleEdge } +"""All input for the `updateScopeTypesModule` mutation.""" +input UpdateScopeTypesModuleInput { + """ + 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 `ScopeTypesModule` being updated. + """ + scopeTypesModulePatch: ScopeTypesModulePatch! +} + +"""The output of our update `ScopeTypesModule` mutation.""" +type UpdateScopeTypesModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was updated by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the `updateSecureTableProvision` mutation.""" input UpdateSecureTableProvisionInput { """ @@ -31653,6 +33790,44 @@ type UpdateUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the `updateUserSettingsSecurityModule` mutation.""" +input UpdateUserSettingsSecurityModuleInput { + """ + 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 `UserSettingsSecurityModule` being updated. + """ + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch! +} + +"""The output of our update `UserSettingsSecurityModule` mutation.""" +type UpdateUserSettingsSecurityModulePayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was updated by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the `updateUserStateModule` mutation.""" input UpdateUserStateModuleInput { """ @@ -32368,6 +34543,124 @@ input UserSettingsModulePatch { tableName: String } +type UserSettingsSecurityModule { + apiName: String + databaseId: UUID! + id: UUID! + ownerTableId: UUID! + schemaId: UUID! + tableId: UUID! + tableName: String! +} + +"""A connection to a list of `UserSettingsSecurityModule` values.""" +type UserSettingsSecurityModuleConnection { + """ + A list of edges which contains the `UserSettingsSecurityModule` and cursor to aid in pagination. + """ + edges: [UserSettingsSecurityModuleEdge]! + + """A list of `UserSettingsSecurityModule` objects.""" + nodes: [UserSettingsSecurityModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `UserSettingsSecurityModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `UserSettingsSecurityModule` edge in the connection.""" +type UserSettingsSecurityModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `UserSettingsSecurityModule` at the end of the edge.""" + node: UserSettingsSecurityModule +} + +""" +A filter to be used against `UserSettingsSecurityModule` object types. All fields are combined with a logical ‘and.’ +""" +input UserSettingsSecurityModuleFilter { + """Checks for all expressions in this list.""" + and: [UserSettingsSecurityModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: UserSettingsSecurityModuleFilter + + """Checks for any expressions in this list.""" + or: [UserSettingsSecurityModuleFilter!] + + """Filter by the object’s `ownerTableId` field.""" + ownerTableId: 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 +} + +"""An input for mutations affecting `UserSettingsSecurityModule`""" +input UserSettingsSecurityModuleInput { + apiName: String + databaseId: UUID! + id: UUID + ownerTableId: UUID + schemaId: UUID + tableId: UUID + tableName: String +} + +"""Methods to use when ordering `UserSettingsSecurityModule`.""" +enum UserSettingsSecurityModuleOrderBy { + API_NAME_ASC + API_NAME_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + NATURAL + OWNER_TABLE_ID_ASC + OWNER_TABLE_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC +} + +""" +Represents an update to a `UserSettingsSecurityModule`. Fields that are set will be updated. +""" +input UserSettingsSecurityModulePatch { + apiName: String + databaseId: UUID + id: UUID + ownerTableId: UUID + schemaId: UUID + tableId: UUID + tableName: String +} + type UserStateModule { databaseId: UUID! entityField: String @@ -32952,7 +35245,7 @@ input WebauthnCredentialsModulePatch { type WebhookModule { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID @@ -33034,8 +35327,8 @@ input WebhookModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter - """Filter by the object’s `defaultPermissions` field.""" - defaultPermissions: StringListFilter + """Filter by the object’s `defaultCapabilities` field.""" + defaultCapabilities: StringListFilter """Filter by the object’s `entityField` field.""" entityField: StringFilter @@ -33132,7 +35425,7 @@ input WebhookModuleFilter { input WebhookModuleInput { apiName: String databaseId: UUID! - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID functionInvocationModuleId: UUID @@ -33161,8 +35454,8 @@ enum WebhookModuleOrderBy { API_NAME_DESC DATABASE_ID_ASC DATABASE_ID_DESC - DEFAULT_PERMISSIONS_ASC - DEFAULT_PERMISSIONS_DESC + DEFAULT_CAPABILITIES_ASC + DEFAULT_CAPABILITIES_DESC ENTITY_FIELD_ASC ENTITY_FIELD_DESC ENTITY_TABLE_ID_ASC @@ -33214,7 +35507,7 @@ Represents an update to a `WebhookModule`. Fields that are set will be updated. input WebhookModulePatch { apiName: String databaseId: UUID - defaultPermissions: [String] + defaultCapabilities: [String] entityField: String entityTableId: UUID functionInvocationModuleId: UUID diff --git a/sdk/constructive-sdk/schemas/objects.graphql b/sdk/constructive-sdk/schemas/objects.graphql index 6984ef2d31..2858c435c8 100644 --- a/sdk/constructive-sdk/schemas/objects.graphql +++ b/sdk/constructive-sdk/schemas/objects.graphql @@ -613,6 +613,36 @@ type InsertNodeAtPathPayload { result: UUID } +"""All input for the `insertNodesAtPaths` mutation.""" +input InsertNodesAtPathsInput { + """ + 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 + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `insertNodesAtPaths` mutation.""" +type InsertNodesAtPathsPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). """ @@ -1061,6 +1091,12 @@ type Mutation { """ input: InsertNodeAtPathInput! ): InsertNodeAtPathPayload + insertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InsertNodesAtPathsInput! + ): InsertNodesAtPathsPayload """ Provision an S3 bucket for a logical bucket in the database. @@ -1074,12 +1110,24 @@ type Mutation { """ input: ProvisionBucketInput! ): ProvisionBucketPayload + setAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetAndCommitInput! + ): SetAndCommitPayload setDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SetDataAtPathInput! ): SetDataAtPathPayload + setManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetManyAndCommitInput! + ): SetManyAndCommitPayload """Updates a single `Commit` using a unique key and a patch.""" updateCommit( @@ -1572,6 +1620,44 @@ input RefPatch { storeId: UUID } +"""All input for the `setAndCommit` mutation.""" +input SetAndCommitInput { + """ + 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 + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setAndCommit` mutation.""" +type SetAndCommitPayload { + """ + 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 + + """An edge for our `Commit`. May be used by Relay 1.""" + commitEdge( + """The method to use when ordering `Commit`.""" + orderBy: [CommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): CommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Commit +} + """All input for the `setDataAtPath` mutation.""" input SetDataAtPathInput { """ @@ -1600,6 +1686,41 @@ type SetDataAtPathPayload { result: UUID } +"""All input for the `setManyAndCommit` mutation.""" +input SetManyAndCommitInput { + """ + 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 + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setManyAndCommit` mutation.""" +type SetManyAndCommitPayload { + """ + 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 + + """An edge for our `Commit`. May be used by Relay 1.""" + commitEdge( + """The method to use when ordering `Commit`.""" + orderBy: [CommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): CommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Commit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ diff --git a/sdk/constructive-sdk/schemas/usage.graphql b/sdk/constructive-sdk/schemas/usage.graphql index c5cdf5c88c..176c2c7f65 100644 --- a/sdk/constructive-sdk/schemas/usage.graphql +++ b/sdk/constructive-sdk/schemas/usage.graphql @@ -1,1090 +1,1330 @@ -"""Tracks per-actor usage counts against configurable maximum limits""" -type AppLimit { - """User whose usage is being tracked against this limit""" - actorId: UUID! - - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID! - - """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. - """ - max: BigInt - - """Name identifier of the limit being tracked""" - name: String - - """Current usage count for this actor and limit""" - num: BigInt - - """Resolved billable organization via get_organization_id""" - organizationId: UUID - - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt - - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt - - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt +""" +Defines rewards granted when a level is achieved; supports limit_credits and meter_credits +""" +type AppAchievementReward { + """Number of credits to grant; unused by capability rewards""" + amount: Int! + createdAt: Datetime - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt + """Credit type: permanent, expiring, etc.""" + creditType: String! """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + Optional duration after which the granted credit expires; NULL means never expires """ - windowDuration: Interval - - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} - -""" -Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. -""" -type AppLimitCap { - """Entity this cap override applies to""" - entityId: UUID! + expiresInterval: Interval id: UUID! - """Override cap value for this entity""" - max: BigInt! + """Name of the level this reward is granted for""" + levelName: String! - """Name identifier of the cap being overridden""" - name: String! + """Type of reward: limit_credit, meter_credit, or capability""" + rewardType: String! + + """Target limit name, meter slug, or capability catalog name""" + targetName: String! + updatedAt: Datetime } -"""A connection to a list of `AppLimitCap` values.""" -type AppLimitCapConnection { +"""A connection to a list of `AppAchievementReward` values.""" +type AppAchievementRewardConnection { """ - A list of edges which contains the `AppLimitCap` and cursor to aid in pagination. + A list of edges which contains the `AppAchievementReward` and cursor to aid in pagination. """ - edges: [AppLimitCapEdge]! + edges: [AppAchievementRewardEdge]! - """A list of `AppLimitCap` objects.""" - nodes: [AppLimitCap]! + """A list of `AppAchievementReward` objects.""" + nodes: [AppAchievementReward]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppLimitCap` you could get from the connection.""" + """ + The count of *all* `AppAchievementReward` you could get from the connection. + """ totalCount: Int! } -"""A `AppLimitCap` edge in the connection.""" -type AppLimitCapEdge { +"""A `AppAchievementReward` edge in the connection.""" +type AppAchievementRewardEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCap` at the end of the edge.""" - node: AppLimitCap + """The `AppAchievementReward` at the end of the edge.""" + node: AppAchievementReward } """ -A filter to be used against `AppLimitCap` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppAchievementReward` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCapFilter { +input AppAchievementRewardFilter { + """Filter by the object’s `amount` field.""" + amount: IntFilter + """Checks for all expressions in this list.""" - and: [AppLimitCapFilter!] + and: [AppAchievementRewardFilter!] - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `creditType` field.""" + creditType: StringFilter + + """Filter by the object’s `expiresInterval` field.""" + expiresInterval: IntervalFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `max` field.""" - max: BigIntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `levelName` field.""" + levelName: StringFilter """Negates the expression.""" - not: AppLimitCapFilter + not: AppAchievementRewardFilter """Checks for any expressions in this list.""" - or: [AppLimitCapFilter!] + or: [AppAchievementRewardFilter!] + + """Filter by the object’s `rewardType` field.""" + rewardType: StringFilter + + """Filter by the object’s `targetName` field.""" + targetName: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppLimitCap`""" -input AppLimitCapInput { - """Entity this cap override applies to""" - entityId: UUID! +"""An input for mutations affecting `AppAchievementReward`""" +input AppAchievementRewardInput { + """Number of credits to grant; unused by capability rewards""" + amount: Int + createdAt: Datetime + + """Credit type: permanent, expiring, etc.""" + creditType: String + + """ + Optional duration after which the granted credit expires; NULL means never expires + """ + expiresInterval: IntervalInput id: UUID - """Override cap value for this entity""" - max: BigInt + """Name of the level this reward is granted for""" + levelName: String! - """Name identifier of the cap being overridden""" - name: String! + """Type of reward: limit_credit, meter_credit, or capability""" + rewardType: String! + + """Target limit name, meter slug, or capability catalog name""" + targetName: String! + updatedAt: Datetime } -"""Methods to use when ordering `AppLimitCap`.""" -enum AppLimitCapOrderBy { - ENTITY_ID_ASC - ENTITY_ID_DESC +"""Methods to use when ordering `AppAchievementReward`.""" +enum AppAchievementRewardOrderBy { + AMOUNT_ASC + AMOUNT_DESC + CREATED_AT_ASC + CREATED_AT_DESC + CREDIT_TYPE_ASC + CREDIT_TYPE_DESC + EXPIRES_INTERVAL_ASC + EXPIRES_INTERVAL_DESC ID_ASC ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC + LEVEL_NAME_ASC + LEVEL_NAME_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + REWARD_TYPE_ASC + REWARD_TYPE_DESC + TARGET_NAME_ASC + TARGET_NAME_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppLimitCap`. Fields that are set will be updated. +Represents an update to a `AppAchievementReward`. Fields that are set will be updated. """ -input AppLimitCapPatch { - """Entity this cap override applies to""" - entityId: UUID +input AppAchievementRewardPatch { + """Number of credits to grant; unused by capability rewards""" + amount: Int + createdAt: Datetime + + """Credit type: permanent, expiring, etc.""" + creditType: String + + """ + Optional duration after which the granted credit expires; NULL means never expires + """ + expiresInterval: IntervalInput id: UUID - """Override cap value for this entity""" - max: BigInt + """Name of the level this reward is granted for""" + levelName: String - """Name identifier of the cap being overridden""" - name: String + """Type of reward: limit_credit, meter_credit, or capability""" + rewardType: String + + """Target limit name, meter slug, or capability catalog name""" + targetName: String + updatedAt: Datetime } """ -Default cap values for static configuration limits (max file size, feature flags, etc.). Not metered — just read by consumers. +Partitioned append-only log of individual user actions; every single event ever recorded """ -type AppLimitCapsDefault { +type AppEvent { + actorId: UUID! + + """Number of units completed in this step action""" + count: Int! + createdAt: Datetime! + + """Unique identifier for each event (uuidv7 provides temporal ordering)""" id: UUID! - """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. - """ - max: BigInt! + """Name identifier of the level requirement this step fulfills""" + name: String! +} - """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) - """ +""" +Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually +""" +type AppEventAggregate { + actorId: UUID! + + """Cumulative count of completed steps toward this requirement""" + count: Int! + createdAt: Datetime + id: UUID! + + """Name identifier of the level requirement being tracked""" name: String! + + """Start of current counting period; NULL means lifetime counting""" + periodStart: Datetime + updatedAt: Datetime } -"""A connection to a list of `AppLimitCapsDefault` values.""" -type AppLimitCapsDefaultConnection { +"""A connection to a list of `AppEventAggregate` values.""" +type AppEventAggregateConnection { """ - A list of edges which contains the `AppLimitCapsDefault` and cursor to aid in pagination. + A list of edges which contains the `AppEventAggregate` and cursor to aid in pagination. """ - edges: [AppLimitCapsDefaultEdge]! + edges: [AppEventAggregateEdge]! - """A list of `AppLimitCapsDefault` objects.""" - nodes: [AppLimitCapsDefault]! + """A list of `AppEventAggregate` objects.""" + nodes: [AppEventAggregate]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `AppLimitCapsDefault` you could get from the connection. + The count of *all* `AppEventAggregate` you could get from the connection. """ totalCount: Int! } -"""A `AppLimitCapsDefault` edge in the connection.""" -type AppLimitCapsDefaultEdge { +"""A `AppEventAggregate` edge in the connection.""" +type AppEventAggregateEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCapsDefault` at the end of the edge.""" - node: AppLimitCapsDefault + """The `AppEventAggregate` at the end of the edge.""" + node: AppEventAggregate } """ -A filter to be used against `AppLimitCapsDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppEventAggregate` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCapsDefaultFilter { +input AppEventAggregateFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + """Checks for all expressions in this list.""" - and: [AppLimitCapsDefaultFilter!] + and: [AppEventAggregateFilter!] + + """Filter by the object’s `count` field.""" + count: IntFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `max` field.""" - max: BigIntFilter - """Filter by the object’s `name` field.""" name: StringFilter """Negates the expression.""" - not: AppLimitCapsDefaultFilter + not: AppEventAggregateFilter """Checks for any expressions in this list.""" - or: [AppLimitCapsDefaultFilter!] + or: [AppEventAggregateFilter!] + + """Filter by the object’s `periodStart` field.""" + periodStart: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppLimitCapsDefault`""" -input AppLimitCapsDefaultInput { - id: UUID +"""An input for mutations affecting `AppEventAggregate`""" +input AppEventAggregateInput { + actorId: UUID - """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. - """ - max: BigInt + """Cumulative count of completed steps toward this requirement""" + count: Int + createdAt: Datetime + id: UUID - """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) - """ + """Name identifier of the level requirement being tracked""" name: String! + + """Start of current counting period; NULL means lifetime counting""" + periodStart: Datetime + updatedAt: Datetime } -"""Methods to use when ordering `AppLimitCapsDefault`.""" -enum AppLimitCapsDefaultOrderBy { +"""Methods to use when ordering `AppEventAggregate`.""" +enum AppEventAggregateOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + COUNT_ASC + COUNT_DESC + CREATED_AT_ASC + CREATED_AT_DESC ID_ASC ID_DESC - MAX_ASC - MAX_DESC NAME_ASC NAME_DESC NATURAL + PERIOD_START_ASC + PERIOD_START_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppLimitCapsDefault`. Fields that are set will be updated. +Represents an update to a `AppEventAggregate`. Fields that are set will be updated. """ -input AppLimitCapsDefaultPatch { - id: UUID +input AppEventAggregatePatch { + actorId: UUID - """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. - """ - max: BigInt + """Cumulative count of completed steps toward this requirement""" + count: Int + createdAt: Datetime + id: UUID - """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) - """ + """Name identifier of the level requirement being tracked""" name: String + + """Start of current counting period; NULL means lifetime counting""" + periodStart: Datetime + updatedAt: Datetime } -"""A connection to a list of `AppLimit` values.""" -type AppLimitConnection { +"""A connection to a list of `AppEvent` values.""" +type AppEventConnection { """ - A list of edges which contains the `AppLimit` and cursor to aid in pagination. + A list of edges which contains the `AppEvent` and cursor to aid in pagination. """ - edges: [AppLimitEdge]! + edges: [AppEventEdge]! - """A list of `AppLimit` objects.""" - nodes: [AppLimit]! + """A list of `AppEvent` objects.""" + nodes: [AppEvent]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppLimit` you could get from the connection.""" + """The count of *all* `AppEvent` you could get from the connection.""" totalCount: Int! } +"""A `AppEvent` edge in the connection.""" +type AppEventEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppEvent` at the end of the edge.""" + node: AppEvent +} + """ -Append-only ledger of credit grants that automatically update limit ceilings +A filter to be used against `AppEvent` object types. All fields are combined with a logical ‘and.’ """ -type AppLimitCredit { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID +input AppEventFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt! + """Checks for all expressions in this list.""" + and: [AppEventFilter!] - """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) - """ - creditType: String! + """Filter by the object’s `count` field.""" + count: IntFilter - """ - Reads a single `AppLimitDefault` that is related to this `AppLimitCredit`. - """ - defaultLimit: AppLimitDefault - - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID! - id: UUID! + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Optional reason for the credit grant (promo code, admin grant, etc.)""" - reason: String -} + """Filter by the object’s `id` field.""" + id: UUIDFilter -""" -Redeemable credit codes managed by admins with the add_credits permission -""" -type AppLimitCreditCode { - """ - Reads and enables pagination through a set of `AppLimitCreditCodeItem`. - """ - appLimitCreditCodeItemsByCreditCodeId( - """Read all values in the set after (below) this cursor.""" - after: Cursor + """Filter by the object’s `name` field.""" + name: StringFilter - """Read all values in the set before (above) this cursor.""" - before: Cursor + """Negates the expression.""" + not: AppEventFilter - """Only read the first `n` values of the set.""" - first: Int + """Checks for any expressions in this list.""" + or: [AppEventFilter!] +} - """Only read the last `n` values of the set.""" - last: Int +"""An input for mutations affecting `AppEvent`""" +input AppEventInput { + actorId: UUID - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """Number of units completed in this step action""" + count: Int + createdAt: Datetime - """The method to use when ordering `AppLimitCreditCodeItem`.""" - orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] + """Unique identifier for each event (uuidv7 provides temporal ordering)""" + id: UUID - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: AppLimitCreditCodeItemFilter - ): AppLimitCreditCodeItemConnection! + """Name identifier of the level requirement this step fulfills""" + name: String! +} - """ - Reads and enables pagination through a set of `AppLimitCreditRedemption`. - """ - appLimitCreditRedemptionsByCreditCodeId( - """Read all values in the set after (below) this cursor.""" - after: Cursor +"""Methods to use when ordering `AppEvent`.""" +enum AppEventOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + COUNT_ASC + COUNT_DESC + CREATED_AT_ASC + CREATED_AT_DESC + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """Read all values in the set before (above) this cursor.""" - before: Cursor +""" +Represents an update to a `AppEvent`. Fields that are set will be updated. +""" +input AppEventPatch { + actorId: UUID - """Only read the first `n` values of the set.""" - first: Int + """Number of units completed in this step action""" + count: Int + createdAt: Datetime - """Only read the last `n` values of the set.""" - last: Int + """Unique identifier for each event (uuidv7 provides temporal ordering)""" + id: UUID - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """Name identifier of the level requirement this step fulfills""" + name: String +} - """The method to use when ordering `AppLimitCreditRedemption`.""" - orderBy: [AppLimitCreditRedemptionOrderBy!] = [PRIMARY_KEY_ASC] +""" +Catalog of known event types with per-type configuration for aggregation, retention, and level participation +""" +type AppEventType { + """Aggregation mode: count, sum, last_value, or none""" + aggregation: String! - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: AppLimitCreditRedemptionFilter - ): AppLimitCreditRedemptionConnection! + """Grouping category: onboarding, engagement, analytics, commerce, etc.""" + category: String + createdAt: Datetime - """Human-readable credit code (case-insensitive, unique)""" - code: String! + """Human-readable description of this event type""" + description: String """ - Current number of redemptions (incremented by trigger on credit_redemptions) + Whether this event type participates in the levels/badge system by updating aggregates """ - currentRedemptions: Int! - - """Expiration timestamp; NULL for no expiry""" - expiresAt: Datetime + feedsLevels: Boolean! id: UUID! - """Maximum total redemptions allowed; NULL for unlimited""" - maxRedemptions: Int + """Whether recording of this event type is enabled""" + isActive: Boolean! + + """Unique name identifier for this event type""" + name: String! + + """ + Optional period for aggregate count reset; NULL means lifetime counting + """ + periodInterval: Interval + updatedAt: Datetime } -"""A connection to a list of `AppLimitCreditCode` values.""" -type AppLimitCreditCodeConnection { +"""A connection to a list of `AppEventType` values.""" +type AppEventTypeConnection { """ - A list of edges which contains the `AppLimitCreditCode` and cursor to aid in pagination. + A list of edges which contains the `AppEventType` and cursor to aid in pagination. """ - edges: [AppLimitCreditCodeEdge]! + edges: [AppEventTypeEdge]! - """A list of `AppLimitCreditCode` objects.""" - nodes: [AppLimitCreditCode]! + """A list of `AppEventType` objects.""" + nodes: [AppEventType]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `AppLimitCreditCode` you could get from the connection. - """ + """The count of *all* `AppEventType` you could get from the connection.""" totalCount: Int! } -"""A `AppLimitCreditCode` edge in the connection.""" -type AppLimitCreditCodeEdge { +"""A `AppEventType` edge in the connection.""" +type AppEventTypeEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCreditCode` at the end of the edge.""" - node: AppLimitCreditCode + """The `AppEventType` at the end of the edge.""" + node: AppEventType } """ -A filter to be used against `AppLimitCreditCode` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppEventType` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCreditCodeFilter { - """Checks for all expressions in this list.""" - and: [AppLimitCreditCodeFilter!] +input AppEventTypeFilter { + """Filter by the object’s `aggregation` field.""" + aggregation: StringFilter - """ - Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. - """ - appLimitCreditCodeItemsByCreditCodeId: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter - - """`appLimitCreditCodeItemsByCreditCodeId` exist.""" - appLimitCreditCodeItemsByCreditCodeIdExist: Boolean - - """ - Filter by the object’s `appLimitCreditRedemptionsByCreditCodeId` relation. - """ - appLimitCreditRedemptionsByCreditCodeId: AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter + """Checks for all expressions in this list.""" + and: [AppEventTypeFilter!] - """`appLimitCreditRedemptionsByCreditCodeId` exist.""" - appLimitCreditRedemptionsByCreditCodeIdExist: Boolean + """Filter by the object’s `category` field.""" + category: StringFilter - """Filter by the object’s `code` field.""" - code: StringFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Filter by the object’s `currentRedemptions` field.""" - currentRedemptions: IntFilter + """Filter by the object’s `description` field.""" + description: StringFilter - """Filter by the object’s `expiresAt` field.""" - expiresAt: DatetimeFilter + """Filter by the object’s `feedsLevels` field.""" + feedsLevels: BooleanFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `maxRedemptions` field.""" - maxRedemptions: IntFilter + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter """Negates the expression.""" - not: AppLimitCreditCodeFilter + not: AppEventTypeFilter """Checks for any expressions in this list.""" - or: [AppLimitCreditCodeFilter!] + or: [AppEventTypeFilter!] + + """Filter by the object’s `periodInterval` field.""" + periodInterval: IntervalFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppLimitCreditCode`""" -input AppLimitCreditCodeInput { - """Human-readable credit code (case-insensitive, unique)""" - code: String! +"""An input for mutations affecting `AppEventType`""" +input AppEventTypeInput { + """Aggregation mode: count, sum, last_value, or none""" + aggregation: String + + """Grouping category: onboarding, engagement, analytics, commerce, etc.""" + category: String + createdAt: Datetime + + """Human-readable description of this event type""" + description: String """ - Current number of redemptions (incremented by trigger on credit_redemptions) + Whether this event type participates in the levels/badge system by updating aggregates """ - currentRedemptions: Int - - """Expiration timestamp; NULL for no expiry""" - expiresAt: Datetime + feedsLevels: Boolean id: UUID - """Maximum total redemptions allowed; NULL for unlimited""" - maxRedemptions: Int + """Whether recording of this event type is enabled""" + isActive: Boolean + + """Unique name identifier for this event type""" + name: String! + + """ + Optional period for aggregate count reset; NULL means lifetime counting + """ + periodInterval: IntervalInput + updatedAt: Datetime +} + +"""Methods to use when ordering `AppEventType`.""" +enum AppEventTypeOrderBy { + AGGREGATION_ASC + AGGREGATION_DESC + CATEGORY_ASC + CATEGORY_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + FEEDS_LEVELS_ASC + FEEDS_LEVELS_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + NAME_ASC + NAME_DESC + NATURAL + PERIOD_INTERVAL_ASC + PERIOD_INTERVAL_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Items within a credit code — each row grants credits for a specific limit definition +Represents an update to a `AppEventType`. Fields that are set will be updated. """ -type AppLimitCreditCodeItem { - """Number of credits this item grants per redemption""" - amount: BigInt! +input AppEventTypePatch { + """Aggregation mode: count, sum, last_value, or none""" + aggregation: String - """ - Reads a single `AppLimitCreditCode` that is related to this `AppLimitCreditCodeItem`. - """ - creditCode: AppLimitCreditCode + """Grouping category: onboarding, engagement, analytics, commerce, etc.""" + category: String + createdAt: Datetime - """FK to credit_codes — which code this item belongs to""" - creditCodeId: UUID! + """Human-readable description of this event type""" + description: String """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Whether this event type participates in the levels/badge system by updating aggregates """ - creditType: String! + feedsLevels: Boolean + id: UUID + + """Whether recording of this event type is enabled""" + isActive: Boolean + + """Unique name identifier for this event type""" + name: String """ - Reads a single `AppLimitDefault` that is related to this `AppLimitCreditCodeItem`. + Optional period for aggregate count reset; NULL means lifetime counting """ - defaultLimit: AppLimitDefault + periodInterval: IntervalInput + updatedAt: Datetime +} - """FK to default_limits — which limit this item grants credits for""" - defaultLimitId: UUID! +""" +Defines available levels that users can achieve by completing requirements +""" +type AppLevel { + createdAt: Datetime + + """Human-readable description of what this level represents""" + description: String id: UUID! + + """Badge or icon image associated with this level""" + image: ConstructiveInternalTypeImage + + """Unique name of the level""" + name: String! + + """Optional owner (actor) who created or manages this level""" + ownerId: UUID + updatedAt: Datetime } -"""A connection to a list of `AppLimitCreditCodeItem` values.""" -type AppLimitCreditCodeItemConnection { +"""A connection to a list of `AppLevel` values.""" +type AppLevelConnection { """ - A list of edges which contains the `AppLimitCreditCodeItem` and cursor to aid in pagination. + A list of edges which contains the `AppLevel` and cursor to aid in pagination. """ - edges: [AppLimitCreditCodeItemEdge]! + edges: [AppLevelEdge]! - """A list of `AppLimitCreditCodeItem` objects.""" - nodes: [AppLimitCreditCodeItem]! + """A list of `AppLevel` objects.""" + nodes: [AppLevel]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `AppLimitCreditCodeItem` you could get from the connection. - """ + """The count of *all* `AppLevel` you could get from the connection.""" totalCount: Int! } -"""A `AppLimitCreditCodeItem` edge in the connection.""" -type AppLimitCreditCodeItemEdge { +"""A `AppLevel` edge in the connection.""" +type AppLevelEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCreditCodeItem` at the end of the edge.""" - node: AppLimitCreditCodeItem + """The `AppLevel` at the end of the edge.""" + node: AppLevel } """ -A filter to be used against `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCreditCodeItemFilter { - """Filter by the object’s `amount` field.""" - amount: BigIntFilter - +input AppLevelFilter { """Checks for all expressions in this list.""" - and: [AppLimitCreditCodeItemFilter!] + and: [AppLevelFilter!] - """Filter by the object’s `creditCode` relation.""" - creditCode: AppLimitCreditCodeFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Filter by the object’s `creditCodeId` field.""" - creditCodeId: UUIDFilter + """Filter by the object’s `description` field.""" + description: StringFilter - """Filter by the object’s `creditType` field.""" - creditType: StringFilter + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Filter by the object’s `defaultLimit` relation.""" - defaultLimit: AppLimitDefaultFilter + """Filter by the object’s `image` field.""" + image: ConstructiveInternalTypeImageFilter - """Filter by the object’s `defaultLimitId` field.""" - defaultLimitId: UUIDFilter + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: AppLevelFilter + + """Checks for any expressions in this list.""" + or: [AppLevelFilter!] + + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""Records when a user achieves a level; prevents duplicate reward grants""" +type AppLevelGrant { + actorId: UUID! + createdAt: Datetime + + """When this grant lapses; NULL means it holds until revoked""" + expiresAt: Datetime + id: UUID! + + """Name of the level that was achieved""" + levelName: String! + + """ + Period start for periodic achievements; -infinity for non-periodic (earn-once) + """ + periodStart: Datetime! + updatedAt: Datetime +} + +"""A connection to a list of `AppLevelGrant` values.""" +type AppLevelGrantConnection { + """ + A list of edges which contains the `AppLevelGrant` and cursor to aid in pagination. + """ + edges: [AppLevelGrantEdge]! + + """A list of `AppLevelGrant` objects.""" + nodes: [AppLevelGrant]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppLevelGrant` you could get from the connection.""" + totalCount: Int! +} + +"""A `AppLevelGrant` edge in the connection.""" +type AppLevelGrantEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppLevelGrant` at the end of the edge.""" + node: AppLevelGrant +} + +""" +A filter to be used against `AppLevelGrant` object types. All fields are combined with a logical ‘and.’ +""" +input AppLevelGrantFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [AppLevelGrantFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `levelName` field.""" + levelName: StringFilter + """Negates the expression.""" - not: AppLimitCreditCodeItemFilter + not: AppLevelGrantFilter """Checks for any expressions in this list.""" - or: [AppLimitCreditCodeItemFilter!] + or: [AppLevelGrantFilter!] + + """Filter by the object’s `periodStart` field.""" + periodStart: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppLimitCreditCodeItem`""" -input AppLimitCreditCodeItemInput { - """Number of credits this item grants per redemption""" - amount: BigInt! +"""An input for mutations affecting `AppLevelGrant`""" +input AppLevelGrantInput { + actorId: UUID + createdAt: Datetime - """FK to credit_codes — which code this item belongs to""" - creditCodeId: UUID! + """When this grant lapses; NULL means it holds until revoked""" + expiresAt: Datetime + id: UUID + + """Name of the level that was achieved""" + levelName: String! """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Period start for periodic achievements; -infinity for non-periodic (earn-once) """ - creditType: String - - """FK to default_limits — which limit this item grants credits for""" - defaultLimitId: UUID! - id: UUID + periodStart: Datetime + updatedAt: Datetime } -"""Methods to use when ordering `AppLimitCreditCodeItem`.""" -enum AppLimitCreditCodeItemOrderBy { - AMOUNT_ASC - AMOUNT_DESC - CREDIT_CODE_ID_ASC - CREDIT_CODE_ID_DESC - CREDIT_TYPE_ASC - CREDIT_TYPE_DESC - DEFAULT_LIMIT_ID_ASC - DEFAULT_LIMIT_ID_DESC +"""Methods to use when ordering `AppLevelGrant`.""" +enum AppLevelGrantOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC ID_ASC ID_DESC + LEVEL_NAME_ASC + LEVEL_NAME_DESC NATURAL + PERIOD_START_ASC + PERIOD_START_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppLimitCreditCodeItem`. Fields that are set will be updated. +Represents an update to a `AppLevelGrant`. Fields that are set will be updated. """ -input AppLimitCreditCodeItemPatch { - """Number of credits this item grants per redemption""" - amount: BigInt +input AppLevelGrantPatch { + actorId: UUID + createdAt: Datetime - """FK to credit_codes — which code this item belongs to""" - creditCodeId: UUID + """When this grant lapses; NULL means it holds until revoked""" + expiresAt: Datetime + id: UUID + + """Name of the level that was achieved""" + levelName: String """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Period start for periodic achievements; -infinity for non-periodic (earn-once) """ - creditType: String + periodStart: Datetime + updatedAt: Datetime +} - """FK to default_limits — which limit this item grants credits for""" - defaultLimitId: UUID +"""An input for mutations affecting `AppLevel`""" +input AppLevelInput { + createdAt: Datetime + + """Human-readable description of what this level represents""" + description: String id: UUID + + """Badge or icon image associated with this level""" + image: ConstructiveInternalTypeImage + + """Unique name of the level""" + name: String! + + """Optional owner (actor) who created or manages this level""" + ownerId: UUID + updatedAt: Datetime } -"""Methods to use when ordering `AppLimitCreditCode`.""" -enum AppLimitCreditCodeOrderBy { - CODE_ASC - CODE_DESC - CURRENT_REDEMPTIONS_ASC - CURRENT_REDEMPTIONS_DESC - EXPIRES_AT_ASC - EXPIRES_AT_DESC +"""Methods to use when ordering `AppLevel`.""" +enum AppLevelOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC ID_ASC ID_DESC - MAX_REDEMPTIONS_ASC - MAX_REDEMPTIONS_DESC + IMAGE_ASC + IMAGE_DESC + NAME_ASC + NAME_DESC NATURAL + OWNER_ID_ASC + OWNER_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppLimitCreditCode`. Fields that are set will be updated. +Represents an update to a `AppLevel`. Fields that are set will be updated. """ -input AppLimitCreditCodePatch { - """Human-readable credit code (case-insensitive, unique)""" - code: String - - """ - Current number of redemptions (incremented by trigger on credit_redemptions) - """ - currentRedemptions: Int +input AppLevelPatch { + createdAt: Datetime - """Expiration timestamp; NULL for no expiry""" - expiresAt: Datetime + """Human-readable description of what this level represents""" + description: String id: UUID - """Maximum total redemptions allowed; NULL for unlimited""" - maxRedemptions: Int -} + """Badge or icon image associated with this level""" + image: ConstructiveInternalTypeImage -""" -A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ -""" -input AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter { - """Filters to entities where every related entity matches.""" - every: AppLimitCreditCodeItemFilter + """Upload for Badge or icon image associated with this level""" + imageUpload: Upload - """Filters to entities where no related entity matches.""" - none: AppLimitCreditCodeItemFilter + """Unique name of the level""" + name: String - """Filters to entities where at least one related entity matches.""" - some: AppLimitCreditCodeItemFilter + """Optional owner (actor) who created or manages this level""" + ownerId: UUID + updatedAt: Datetime } -""" -A filter to be used against many `AppLimitCreditRedemption` object types. All fields are combined with a logical ‘and.’ -""" -input AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter { - """Filters to entities where every related entity matches.""" - every: AppLimitCreditRedemptionFilter +"""Defines the specific requirements that must be met to achieve a level""" +type AppLevelRequirement { + createdAt: Datetime - """Filters to entities where no related entity matches.""" - none: AppLimitCreditRedemptionFilter + """Human-readable description of what this requirement entails""" + description: String - """Filters to entities where at least one related entity matches.""" - some: AppLimitCreditRedemptionFilter + """ + Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own + """ + groupKey: String + id: UUID! + + """Name of the level this requirement belongs to""" + level: String! + + """ + Computed signal to compare against required_count instead of an event count; currently only account_age_days + """ + metric: String + + """Name identifier of the requirement (matches step names)""" + name: String! + + """Display ordering priority; lower values appear first""" + priority: Int! + + """Number of steps needed to satisfy this requirement""" + requiredCount: Int! + updatedAt: Datetime } -"""A connection to a list of `AppLimitCredit` values.""" -type AppLimitCreditConnection { +"""A connection to a list of `AppLevelRequirement` values.""" +type AppLevelRequirementConnection { """ - A list of edges which contains the `AppLimitCredit` and cursor to aid in pagination. + A list of edges which contains the `AppLevelRequirement` and cursor to aid in pagination. """ - edges: [AppLimitCreditEdge]! + edges: [AppLevelRequirementEdge]! - """A list of `AppLimitCredit` objects.""" - nodes: [AppLimitCredit]! + """A list of `AppLevelRequirement` objects.""" + nodes: [AppLevelRequirement]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppLimitCredit` you could get from the connection.""" + """ + The count of *all* `AppLevelRequirement` you could get from the connection. + """ totalCount: Int! } -"""A `AppLimitCredit` edge in the connection.""" -type AppLimitCreditEdge { +"""A `AppLevelRequirement` edge in the connection.""" +type AppLevelRequirementEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCredit` at the end of the edge.""" - node: AppLimitCredit + """The `AppLevelRequirement` at the end of the edge.""" + node: AppLevelRequirement } """ -A filter to be used against `AppLimitCredit` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppLevelRequirement` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCreditFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - - """Filter by the object’s `amount` field.""" - amount: BigIntFilter - +input AppLevelRequirementFilter { """Checks for all expressions in this list.""" - and: [AppLimitCreditFilter!] + and: [AppLevelRequirementFilter!] - """Filter by the object’s `creditType` field.""" - creditType: StringFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Filter by the object’s `defaultLimit` relation.""" - defaultLimit: AppLimitDefaultFilter + """Filter by the object’s `description` field.""" + description: StringFilter - """Filter by the object’s `defaultLimitId` field.""" - defaultLimitId: UUIDFilter + """Filter by the object’s `groupKey` field.""" + groupKey: StringFilter """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `level` field.""" + level: StringFilter + + """Filter by the object’s `metric` field.""" + metric: StringFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + """Negates the expression.""" - not: AppLimitCreditFilter + not: AppLevelRequirementFilter """Checks for any expressions in this list.""" - or: [AppLimitCreditFilter!] + or: [AppLevelRequirementFilter!] - """Filter by the object’s `reason` field.""" - reason: StringFilter + """Filter by the object’s `priority` field.""" + priority: IntFilter + + """Filter by the object’s `requiredCount` field.""" + requiredCount: IntFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter } -"""An input for mutations affecting `AppLimitCredit`""" -input AppLimitCreditInput { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID +"""An input for mutations affecting `AppLevelRequirement`""" +input AppLevelRequirementInput { + createdAt: Datetime - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt! + """Human-readable description of what this requirement entails""" + description: String """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own """ - creditType: String - - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID! + groupKey: String id: UUID - """Optional reason for the credit grant (promo code, admin grant, etc.)""" - reason: String + """Name of the level this requirement belongs to""" + level: String! + + """ + Computed signal to compare against required_count instead of an event count; currently only account_age_days + """ + metric: String + + """Name identifier of the requirement (matches step names)""" + name: String! + + """Display ordering priority; lower values appear first""" + priority: Int + + """Number of steps needed to satisfy this requirement""" + requiredCount: Int + updatedAt: Datetime } -"""Methods to use when ordering `AppLimitCredit`.""" -enum AppLimitCreditOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - AMOUNT_ASC - AMOUNT_DESC - CREDIT_TYPE_ASC - CREDIT_TYPE_DESC - DEFAULT_LIMIT_ID_ASC - DEFAULT_LIMIT_ID_DESC +"""Methods to use when ordering `AppLevelRequirement`.""" +enum AppLevelRequirementOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + GROUP_KEY_ASC + GROUP_KEY_DESC ID_ASC ID_DESC + LEVEL_ASC + LEVEL_DESC + METRIC_ASC + METRIC_DESC + NAME_ASC + NAME_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - REASON_ASC - REASON_DESC + PRIORITY_ASC + PRIORITY_DESC + REQUIRED_COUNT_ASC + REQUIRED_COUNT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ -Represents an update to a `AppLimitCredit`. Fields that are set will be updated. +Represents an update to a `AppLevelRequirement`. Fields that are set will be updated. """ -input AppLimitCreditPatch { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID +input AppLevelRequirementPatch { + createdAt: Datetime - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt + """Human-readable description of what this requirement entails""" + description: String """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own """ - creditType: String - - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID + groupKey: String id: UUID - """Optional reason for the credit grant (promo code, admin grant, etc.)""" - reason: String -} + """Name of the level this requirement belongs to""" + level: String -""" -Append-only ledger of code redemptions; AFTER INSERT trigger validates and cascades to limit_credits -""" -type AppLimitCreditRedemption { """ - Reads a single `AppLimitCreditCode` that is related to this `AppLimitCreditRedemption`. + Computed signal to compare against required_count instead of an event count; currently only account_age_days """ - creditCode: AppLimitCreditCode + metric: String - """FK to credit_codes — which code is being redeemed""" - creditCodeId: UUID! + """Name identifier of the requirement (matches step names)""" + name: String - """Entity receiving the credits (personal org user_id or org entity_id)""" - entityId: UUID! + """Display ordering priority; lower values appear first""" + priority: Int - """Membership prefix identifying the entity kind (org, team, app)""" + """Number of steps needed to satisfy this requirement""" + requiredCount: Int + updatedAt: Datetime +} + +"""Tracks per-actor usage counts against configurable maximum limits""" +type AppLimit { + """User whose usage is being tracked against this limit""" + actorId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" entityType: String id: UUID! + """ + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + """ + max: BigInt + + """Name identifier of the limit being tracked""" + name: String + + """Current usage count for this actor and limit""" + num: BigInt + """Resolved billable organization via get_organization_id""" organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. + """ + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: Interval + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime } -"""A connection to a list of `AppLimitCreditRedemption` values.""" -type AppLimitCreditRedemptionConnection { +""" +Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. +""" +type AppLimitCap { + """Entity this cap override applies to""" + entityId: UUID! + id: UUID! + + """Override cap value for this entity""" + max: BigInt! + + """Name identifier of the cap being overridden""" + name: String! +} + +"""A connection to a list of `AppLimitCap` values.""" +type AppLimitCapConnection { """ - A list of edges which contains the `AppLimitCreditRedemption` and cursor to aid in pagination. + A list of edges which contains the `AppLimitCap` and cursor to aid in pagination. """ - edges: [AppLimitCreditRedemptionEdge]! + edges: [AppLimitCapEdge]! - """A list of `AppLimitCreditRedemption` objects.""" - nodes: [AppLimitCreditRedemption]! + """A list of `AppLimitCap` objects.""" + nodes: [AppLimitCap]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `AppLimitCreditRedemption` you could get from the connection. - """ + """The count of *all* `AppLimitCap` you could get from the connection.""" totalCount: Int! } -"""A `AppLimitCreditRedemption` edge in the connection.""" -type AppLimitCreditRedemptionEdge { +"""A `AppLimitCap` edge in the connection.""" +type AppLimitCapEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitCreditRedemption` at the end of the edge.""" - node: AppLimitCreditRedemption + """The `AppLimitCap` at the end of the edge.""" + node: AppLimitCap } """ -A filter to be used against `AppLimitCreditRedemption` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppLimitCap` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitCreditRedemptionFilter { +input AppLimitCapFilter { """Checks for all expressions in this list.""" - and: [AppLimitCreditRedemptionFilter!] - - """Filter by the object’s `creditCode` relation.""" - creditCode: AppLimitCreditCodeFilter - - """Filter by the object’s `creditCodeId` field.""" - creditCodeId: UUIDFilter + and: [AppLimitCapFilter!] """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `entityType` field.""" - entityType: StringFilter - """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + """Negates the expression.""" - not: AppLimitCreditRedemptionFilter + not: AppLimitCapFilter """Checks for any expressions in this list.""" - or: [AppLimitCreditRedemptionFilter!] - - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + or: [AppLimitCapFilter!] } -"""An input for mutations affecting `AppLimitCreditRedemption`""" -input AppLimitCreditRedemptionInput { - """FK to credit_codes — which code is being redeemed""" - creditCodeId: UUID! - - """Entity receiving the credits (personal org user_id or org entity_id)""" +"""An input for mutations affecting `AppLimitCap`""" +input AppLimitCapInput { + """Entity this cap override applies to""" entityId: UUID! - - """Membership prefix identifying the entity kind (org, team, app)""" - entityType: String id: UUID - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Override cap value for this entity""" + max: BigInt + + """Name identifier of the cap being overridden""" + name: String! } -"""Methods to use when ordering `AppLimitCreditRedemption`.""" -enum AppLimitCreditRedemptionOrderBy { - CREDIT_CODE_ID_ASC - CREDIT_CODE_ID_DESC +"""Methods to use when ordering `AppLimitCap`.""" +enum AppLimitCapOrderBy { ENTITY_ID_ASC ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC ID_ASC ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC NATURAL - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC } """ -Represents an update to a `AppLimitCreditRedemption`. Fields that are set will be updated. +Represents an update to a `AppLimitCap`. Fields that are set will be updated. """ -input AppLimitCreditRedemptionPatch { - """FK to credit_codes — which code is being redeemed""" - creditCodeId: UUID - - """Entity receiving the credits (personal org user_id or org entity_id)""" +input AppLimitCapPatch { + """Entity this cap override applies to""" entityId: UUID - - """Membership prefix identifying the entity kind (org, team, app)""" - entityType: String id: UUID - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Override cap value for this entity""" + max: BigInt + + """Name identifier of the cap being overridden""" + name: String } """ -Default maximum values for each named limit, applied when no per-actor override exists +Default cap values for static configuration limits (max file size, feature flags, etc.). Not metered — just read by consumers. """ -type AppLimitDefault { +type AppLimitCapsDefault { + id: UUID! + """ - Reads and enables pagination through a set of `AppLimitCreditCodeItem`. + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. """ - appLimitCreditCodeItemsByDefaultLimitId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor + max: BigInt! - """Only read the first `n` values of the set.""" - first: Int + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ + name: String! +} - """Only read the last `n` values of the set.""" - last: Int +"""A connection to a list of `AppLimitCapsDefault` values.""" +type AppLimitCapsDefaultConnection { + """ + A list of edges which contains the `AppLimitCapsDefault` and cursor to aid in pagination. + """ + edges: [AppLimitCapsDefaultEdge]! - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """A list of `AppLimitCapsDefault` objects.""" + nodes: [AppLimitCapsDefault]! - """The method to use when ordering `AppLimitCreditCodeItem`.""" - orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] + """Information to aid in pagination.""" + pageInfo: PageInfo! - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: AppLimitCreditCodeItemFilter - ): AppLimitCreditCodeItemConnection! + """ + The count of *all* `AppLimitCapsDefault` you could get from the connection. + """ + totalCount: Int! +} - """Reads and enables pagination through a set of `AppLimitCredit`.""" - appLimitCreditsByDefaultLimitId( - """Read all values in the set after (below) this cursor.""" - after: Cursor +"""A `AppLimitCapsDefault` edge in the connection.""" +type AppLimitCapsDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """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 - - """The method to use when ordering `AppLimitCredit`.""" - orderBy: [AppLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: AppLimitCreditFilter - ): AppLimitCreditConnection! - id: UUID! - - """Default maximum usage allowed for this limit""" - max: BigInt - - """Name identifier of the limit this default applies to""" - name: String! - - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt -} - -"""A connection to a list of `AppLimitDefault` values.""" -type AppLimitDefaultConnection { - """ - A list of edges which contains the `AppLimitDefault` and cursor to aid in pagination. - """ - edges: [AppLimitDefaultEdge]! - - """A list of `AppLimitDefault` objects.""" - nodes: [AppLimitDefault]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `AppLimitDefault` you could get from the connection. - """ - totalCount: Int! -} - -"""A `AppLimitDefault` edge in the connection.""" -type AppLimitDefaultEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `AppLimitDefault` at the end of the edge.""" - node: AppLimitDefault -} + """The `AppLimitCapsDefault` at the end of the edge.""" + node: AppLimitCapsDefault +} """ -A filter to be used against `AppLimitDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppLimitCapsDefault` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitDefaultFilter { +input AppLimitCapsDefaultFilter { """Checks for all expressions in this list.""" - and: [AppLimitDefaultFilter!] - - """ - Filter by the object’s `appLimitCreditCodeItemsByDefaultLimitId` relation. - """ - appLimitCreditCodeItemsByDefaultLimitId: AppLimitDefaultToManyAppLimitCreditCodeItemFilter - - """`appLimitCreditCodeItemsByDefaultLimitId` exist.""" - appLimitCreditCodeItemsByDefaultLimitIdExist: Boolean - - """Filter by the object’s `appLimitCreditsByDefaultLimitId` relation.""" - appLimitCreditsByDefaultLimitId: AppLimitDefaultToManyAppLimitCreditFilter - - """`appLimitCreditsByDefaultLimitId` exist.""" - appLimitCreditsByDefaultLimitIdExist: Boolean + and: [AppLimitCapsDefaultFilter!] """Filter by the object’s `id` field.""" id: UUIDFilter @@ -1096,31 +1336,29 @@ input AppLimitDefaultFilter { name: StringFilter """Negates the expression.""" - not: AppLimitDefaultFilter + not: AppLimitCapsDefaultFilter """Checks for any expressions in this list.""" - or: [AppLimitDefaultFilter!] - - """Filter by the object’s `softMax` field.""" - softMax: BigIntFilter + or: [AppLimitCapsDefaultFilter!] } -"""An input for mutations affecting `AppLimitDefault`""" -input AppLimitDefaultInput { +"""An input for mutations affecting `AppLimitCapsDefault`""" +input AppLimitCapsDefaultInput { id: UUID - """Default maximum usage allowed for this limit""" + """ + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + """ max: BigInt - """Name identifier of the limit this default applies to""" + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ name: String! - - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt } -"""Methods to use when ordering `AppLimitDefault`.""" -enum AppLimitDefaultOrderBy { +"""Methods to use when ordering `AppLimitCapsDefault`.""" +enum AppLimitCapsDefaultOrderBy { ID_ASC ID_DESC MAX_ASC @@ -1130,1995 +1368,1850 @@ enum AppLimitDefaultOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - SOFT_MAX_ASC - SOFT_MAX_DESC } """ -Represents an update to a `AppLimitDefault`. Fields that are set will be updated. +Represents an update to a `AppLimitCapsDefault`. Fields that are set will be updated. """ -input AppLimitDefaultPatch { +input AppLimitCapsDefaultPatch { id: UUID - """Default maximum usage allowed for this limit""" + """ + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + """ max: BigInt - """Name identifier of the limit this default applies to""" + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ name: String - - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt } -""" -A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ -""" -input AppLimitDefaultToManyAppLimitCreditCodeItemFilter { - """Filters to entities where every related entity matches.""" - every: AppLimitCreditCodeItemFilter +"""A connection to a list of `AppLimit` values.""" +type AppLimitConnection { + """ + A list of edges which contains the `AppLimit` and cursor to aid in pagination. + """ + edges: [AppLimitEdge]! - """Filters to entities where no related entity matches.""" - none: AppLimitCreditCodeItemFilter + """A list of `AppLimit` objects.""" + nodes: [AppLimit]! - """Filters to entities where at least one related entity matches.""" - some: AppLimitCreditCodeItemFilter + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppLimit` you could get from the connection.""" + totalCount: Int! } """ -A filter to be used against many `AppLimitCredit` object types. All fields are combined with a logical ‘and.’ +Append-only ledger of credit grants that automatically update limit ceilings """ -input AppLimitDefaultToManyAppLimitCreditFilter { - """Filters to entities where every related entity matches.""" - every: AppLimitCreditFilter - - """Filters to entities where no related entity matches.""" - none: AppLimitCreditFilter - - """Filters to entities where at least one related entity matches.""" - some: AppLimitCreditFilter -} - -"""A `AppLimit` edge in the connection.""" -type AppLimitEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `AppLimit` at the end of the edge.""" - node: AppLimit -} - -"""Append-only log of limit events for historical reporting and audit""" -type AppLimitEvent { - """User who triggered this event; NULL for system/aggregate events""" +type AppLimitCredit { + """User this credit is for; NULL for aggregate entity-level credits""" actorId: UUID - createdAt: Datetime! - - """Change amount: positive for increment, negative for decrement""" - delta: BigInt - - """Entity this event applies to; NULL for app-level events""" - entityId: UUID - - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String - - """Unique identifier for each limit event""" - id: UUID! - - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt - """Limit name this event applies to""" - name: String - - """Usage count after this event""" - numAfter: BigInt - - """Usage count before this event""" - numBefore: BigInt + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! """ - Resolved billable organization via get_organization_id; NULL for app-level events + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - organizationId: UUID + creditType: String! """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. + Reads a single `AppLimitDefault` that is related to this `AppLimitCredit`. """ + defaultLimit: AppLimitDefault + + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID! + id: UUID! + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" reason: String } -"""A connection to a list of `AppLimitEvent` values.""" -type AppLimitEventConnection { +""" +Redeemable credit codes managed by admins with the add_credits capability +""" +type AppLimitCreditCode { """ - A list of edges which contains the `AppLimitEvent` and cursor to aid in pagination. + Reads and enables pagination through a set of `AppLimitCreditCodeItem`. """ - edges: [AppLimitEventEdge]! + appLimitCreditCodeItemsByCreditCodeId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """A list of `AppLimitEvent` objects.""" - nodes: [AppLimitEvent]! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Only read the first `n` values of the set.""" + first: Int - """The count of *all* `AppLimitEvent` you could get from the connection.""" - totalCount: Int! -} + """Only read the last `n` values of the set.""" + last: Int -"""A `AppLimitEvent` edge in the connection.""" -type AppLimitEventEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """The `AppLimitEvent` at the end of the edge.""" - node: AppLimitEvent -} + """The method to use when ordering `AppLimitCreditCodeItem`.""" + orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] -""" -A filter to be used against `AppLimitEvent` object types. All fields are combined with a logical ‘and.’ -""" -input AppLimitEventFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditCodeItemFilter + ): AppLimitCreditCodeItemConnection! - """Checks for all expressions in this list.""" - and: [AppLimitEventFilter!] + """ + Reads and enables pagination through a set of `AppLimitCreditRedemption`. + """ + appLimitCreditRedemptionsByCreditCodeId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `delta` field.""" - delta: BigIntFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `eventType` field.""" - eventType: StringFilter + """The method to use when ordering `AppLimitCreditRedemption`.""" + orderBy: [AppLimitCreditRedemptionOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `id` field.""" - id: UUIDFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditRedemptionFilter + ): AppLimitCreditRedemptionConnection! - """Filter by the object’s `maxAtEvent` field.""" - maxAtEvent: BigIntFilter + """Human-readable credit code (case-insensitive, unique)""" + code: String! - """Filter by the object’s `name` field.""" - name: StringFilter + """ + Current number of redemptions (incremented by trigger on credit_redemptions) + """ + currentRedemptions: Int! - """Negates the expression.""" - not: AppLimitEventFilter + """Expiration timestamp; NULL for no expiry""" + expiresAt: Datetime + id: UUID! - """Filter by the object’s `numAfter` field.""" - numAfter: BigIntFilter + """Maximum total redemptions allowed; NULL for unlimited""" + maxRedemptions: Int +} - """Filter by the object’s `numBefore` field.""" - numBefore: BigIntFilter +"""A connection to a list of `AppLimitCreditCode` values.""" +type AppLimitCreditCodeConnection { + """ + A list of edges which contains the `AppLimitCreditCode` and cursor to aid in pagination. + """ + edges: [AppLimitCreditCodeEdge]! - """Checks for any expressions in this list.""" - or: [AppLimitEventFilter!] + """A list of `AppLimitCreditCode` objects.""" + nodes: [AppLimitCreditCode]! - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Filter by the object’s `reason` field.""" - reason: StringFilter + """ + The count of *all* `AppLimitCreditCode` you could get from the connection. + """ + totalCount: Int! } -"""An input for mutations affecting `AppLimitEvent`""" -input AppLimitEventInput { - """User who triggered this event; NULL for system/aggregate events""" - actorId: UUID - createdAt: Datetime - - """Change amount: positive for increment, negative for decrement""" - delta: BigInt - - """Entity this event applies to; NULL for app-level events""" - entityId: UUID +"""A `AppLimitCreditCode` edge in the connection.""" +type AppLimitCreditCodeEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String + """The `AppLimitCreditCode` at the end of the edge.""" + node: AppLimitCreditCode +} - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String +""" +A filter to be used against `AppLimitCreditCode` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitCreditCodeFilter { + """Checks for all expressions in this list.""" + and: [AppLimitCreditCodeFilter!] - """Unique identifier for each limit event""" - id: UUID + """ + Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. + """ + appLimitCreditCodeItemsByCreditCodeId: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt + """`appLimitCreditCodeItemsByCreditCodeId` exist.""" + appLimitCreditCodeItemsByCreditCodeIdExist: Boolean - """Limit name this event applies to""" - name: String + """ + Filter by the object’s `appLimitCreditRedemptionsByCreditCodeId` relation. + """ + appLimitCreditRedemptionsByCreditCodeId: AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter - """Usage count after this event""" - numAfter: BigInt + """`appLimitCreditRedemptionsByCreditCodeId` exist.""" + appLimitCreditRedemptionsByCreditCodeIdExist: Boolean - """Usage count before this event""" - numBefore: BigInt + """Filter by the object’s `code` field.""" + code: StringFilter - """ - Resolved billable organization via get_organization_id; NULL for app-level events - """ - organizationId: UUID + """Filter by the object’s `currentRedemptions` field.""" + currentRedemptions: IntFilter - """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. - """ - reason: String -} + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter -"""Methods to use when ordering `AppLimitEvent`.""" -enum AppLimitEventOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DELTA_ASC - DELTA_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC - EVENT_TYPE_ASC - EVENT_TYPE_DESC - ID_ASC - ID_DESC - MAX_AT_EVENT_ASC - MAX_AT_EVENT_DESC - NAME_ASC - NAME_DESC - NATURAL - NUM_AFTER_ASC - NUM_AFTER_DESC - NUM_BEFORE_ASC - NUM_BEFORE_DESC - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - REASON_ASC - REASON_DESC -} + """Filter by the object’s `id` field.""" + id: UUIDFilter -""" -Represents an update to a `AppLimitEvent`. Fields that are set will be updated. -""" -input AppLimitEventPatch { - """User who triggered this event; NULL for system/aggregate events""" - actorId: UUID - createdAt: Datetime + """Filter by the object’s `maxRedemptions` field.""" + maxRedemptions: IntFilter - """Change amount: positive for increment, negative for decrement""" - delta: BigInt + """Negates the expression.""" + not: AppLimitCreditCodeFilter - """Entity this event applies to; NULL for app-level events""" - entityId: UUID + """Checks for any expressions in this list.""" + or: [AppLimitCreditCodeFilter!] +} - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String +"""An input for mutations affecting `AppLimitCreditCode`""" +input AppLimitCreditCodeInput { + """Human-readable credit code (case-insensitive, unique)""" + code: String! - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String + """ + Current number of redemptions (incremented by trigger on credit_redemptions) + """ + currentRedemptions: Int - """Unique identifier for each limit event""" + """Expiration timestamp; NULL for no expiry""" + expiresAt: Datetime id: UUID - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt + """Maximum total redemptions allowed; NULL for unlimited""" + maxRedemptions: Int +} - """Limit name this event applies to""" - name: String +""" +Items within a credit code — each row grants credits for a specific limit definition +""" +type AppLimitCreditCodeItem { + """Number of credits this item grants per redemption""" + amount: BigInt! - """Usage count after this event""" - numAfter: BigInt + """ + Reads a single `AppLimitCreditCode` that is related to this `AppLimitCreditCodeItem`. + """ + creditCode: AppLimitCreditCode - """Usage count before this event""" - numBefore: BigInt + """FK to credit_codes — which code this item belongs to""" + creditCodeId: UUID! """ - Resolved billable organization via get_organization_id; NULL for app-level events + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - organizationId: UUID + creditType: String! """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. + Reads a single `AppLimitDefault` that is related to this `AppLimitCreditCodeItem`. """ - reason: String + defaultLimit: AppLimitDefault + + """FK to default_limits — which limit this item grants credits for""" + defaultLimitId: UUID! + id: UUID! } -""" -A filter to be used against `AppLimit` object types. All fields are combined with a logical ‘and.’ -""" -input AppLimitFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter +"""A connection to a list of `AppLimitCreditCodeItem` values.""" +type AppLimitCreditCodeItemConnection { + """ + A list of edges which contains the `AppLimitCreditCodeItem` and cursor to aid in pagination. + """ + edges: [AppLimitCreditCodeItemEdge]! - """Checks for all expressions in this list.""" - and: [AppLimitFilter!] + """A list of `AppLimitCreditCodeItem` objects.""" + nodes: [AppLimitCreditCodeItem]! - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Filter by the object’s `id` field.""" - id: UUIDFilter + """ + The count of *all* `AppLimitCreditCodeItem` you could get from the connection. + """ + totalCount: Int! +} - """Filter by the object’s `max` field.""" - max: BigIntFilter +"""A `AppLimitCreditCodeItem` edge in the connection.""" +type AppLimitCreditCodeItemEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Filter by the object’s `name` field.""" - name: StringFilter + """The `AppLimitCreditCodeItem` at the end of the edge.""" + node: AppLimitCreditCodeItem +} - """Negates the expression.""" - not: AppLimitFilter +""" +A filter to be used against `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitCreditCodeItemFilter { + """Filter by the object’s `amount` field.""" + amount: BigIntFilter - """Filter by the object’s `num` field.""" - num: BigIntFilter + """Checks for all expressions in this list.""" + and: [AppLimitCreditCodeItemFilter!] - """Checks for any expressions in this list.""" - or: [AppLimitFilter!] + """Filter by the object’s `creditCode` relation.""" + creditCode: AppLimitCreditCodeFilter - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + """Filter by the object’s `creditCodeId` field.""" + creditCodeId: UUIDFilter - """Filter by the object’s `periodCredits` field.""" - periodCredits: BigIntFilter + """Filter by the object’s `creditType` field.""" + creditType: StringFilter - """Filter by the object’s `planMax` field.""" - planMax: BigIntFilter + """Filter by the object’s `defaultLimit` relation.""" + defaultLimit: AppLimitDefaultFilter - """Filter by the object’s `purchasedCredits` field.""" - purchasedCredits: BigIntFilter + """Filter by the object’s `defaultLimitId` field.""" + defaultLimitId: UUIDFilter - """Filter by the object’s `softMax` field.""" - softMax: BigIntFilter + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Filter by the object’s `windowDuration` field.""" - windowDuration: IntervalFilter + """Negates the expression.""" + not: AppLimitCreditCodeItemFilter - """Filter by the object’s `windowStart` field.""" - windowStart: DatetimeFilter + """Checks for any expressions in this list.""" + or: [AppLimitCreditCodeItemFilter!] } -"""An input for mutations affecting `AppLimit`""" -input AppLimitInput { - """User whose usage is being tracked against this limit""" - actorId: UUID! +"""An input for mutations affecting `AppLimitCreditCodeItem`""" +input AppLimitCreditCodeItemInput { + """Number of credits this item grants per redemption""" + amount: BigInt! - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID + """FK to credit_codes — which code this item belongs to""" + creditCodeId: UUID! """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - max: BigInt - - """Name identifier of the limit being tracked""" - name: String - - """Current usage count for this actor and limit""" - num: BigInt - - """Resolved billable organization via get_organization_id""" - organizationId: UUID + creditType: String - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """FK to default_limits — which limit this item grants credits for""" + defaultLimitId: UUID! + id: UUID +} - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt +"""Methods to use when ordering `AppLimitCreditCodeItem`.""" +enum AppLimitCreditCodeItemOrderBy { + AMOUNT_ASC + AMOUNT_DESC + CREDIT_CODE_ID_ASC + CREDIT_CODE_ID_DESC + CREDIT_TYPE_ASC + CREDIT_TYPE_DESC + DEFAULT_LIMIT_ID_ASC + DEFAULT_LIMIT_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt +""" +Represents an update to a `AppLimitCreditCodeItem`. Fields that are set will be updated. +""" +input AppLimitCreditCodeItemPatch { + """Number of credits this item grants per redemption""" + amount: BigInt - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt + """FK to credit_codes — which code this item belongs to""" + creditCodeId: UUID """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - windowDuration: IntervalInput + creditType: String - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime + """FK to default_limits — which limit this item grants credits for""" + defaultLimitId: UUID + id: UUID } -"""Methods to use when ordering `AppLimit`.""" -enum AppLimitOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC +"""Methods to use when ordering `AppLimitCreditCode`.""" +enum AppLimitCreditCodeOrderBy { + CODE_ASC + CODE_DESC + CURRENT_REDEMPTIONS_ASC + CURRENT_REDEMPTIONS_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC ID_ASC ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC + MAX_REDEMPTIONS_ASC + MAX_REDEMPTIONS_DESC NATURAL - NUM_ASC - NUM_DESC - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC - PERIOD_CREDITS_ASC - PERIOD_CREDITS_DESC - PLAN_MAX_ASC - PLAN_MAX_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - PURCHASED_CREDITS_ASC - PURCHASED_CREDITS_DESC - SOFT_MAX_ASC - SOFT_MAX_DESC - WINDOW_DURATION_ASC - WINDOW_DURATION_DESC - WINDOW_START_ASC - WINDOW_START_DESC } """ -Represents an update to a `AppLimit`. Fields that are set will be updated. +Represents an update to a `AppLimitCreditCode`. Fields that are set will be updated. """ -input AppLimitPatch { - """User whose usage is being tracked against this limit""" - actorId: UUID - - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID +input AppLimitCreditCodePatch { + """Human-readable credit code (case-insensitive, unique)""" + code: String """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + Current number of redemptions (incremented by trigger on credit_redemptions) """ - max: BigInt - - """Name identifier of the limit being tracked""" - name: String + currentRedemptions: Int - """Current usage count for this actor and limit""" - num: BigInt + """Expiration timestamp; NULL for no expiry""" + expiresAt: Datetime + id: UUID - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Maximum total redemptions allowed; NULL for unlimited""" + maxRedemptions: Int +} - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt +""" +A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter { + """Filters to entities where every related entity matches.""" + every: AppLimitCreditCodeItemFilter - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """Filters to entities where no related entity matches.""" + none: AppLimitCreditCodeItemFilter - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """Filters to entities where at least one related entity matches.""" + some: AppLimitCreditCodeItemFilter +} - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt +""" +A filter to be used against many `AppLimitCreditRedemption` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter { + """Filters to entities where every related entity matches.""" + every: AppLimitCreditRedemptionFilter - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: IntervalInput - - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} - -""" -Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. -""" -type AppLimitWarning { - id: UUID! - - """Limit name this warning applies to (must match a default_limits entry)""" - name: String! - - """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) - """ - taskIdentifier: String! - - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt! + """Filters to entities where no related entity matches.""" + none: AppLimitCreditRedemptionFilter - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String! + """Filters to entities where at least one related entity matches.""" + some: AppLimitCreditRedemptionFilter } -"""A connection to a list of `AppLimitWarning` values.""" -type AppLimitWarningConnection { +"""A connection to a list of `AppLimitCredit` values.""" +type AppLimitCreditConnection { """ - A list of edges which contains the `AppLimitWarning` and cursor to aid in pagination. + A list of edges which contains the `AppLimitCredit` and cursor to aid in pagination. """ - edges: [AppLimitWarningEdge]! + edges: [AppLimitCreditEdge]! - """A list of `AppLimitWarning` objects.""" - nodes: [AppLimitWarning]! + """A list of `AppLimitCredit` objects.""" + nodes: [AppLimitCredit]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `AppLimitWarning` you could get from the connection. - """ + """The count of *all* `AppLimitCredit` you could get from the connection.""" totalCount: Int! } -"""A `AppLimitWarning` edge in the connection.""" -type AppLimitWarningEdge { +"""A `AppLimitCredit` edge in the connection.""" +type AppLimitCreditEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppLimitWarning` at the end of the edge.""" - node: AppLimitWarning + """The `AppLimitCredit` at the end of the edge.""" + node: AppLimitCredit } """ -A filter to be used against `AppLimitWarning` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppLimitCredit` object types. All fields are combined with a logical ‘and.’ """ -input AppLimitWarningFilter { +input AppLimitCreditFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `amount` field.""" + amount: BigIntFilter + """Checks for all expressions in this list.""" - and: [AppLimitWarningFilter!] + and: [AppLimitCreditFilter!] + + """Filter by the object’s `creditType` field.""" + creditType: StringFilter + + """Filter by the object’s `defaultLimit` relation.""" + defaultLimit: AppLimitDefaultFilter + + """Filter by the object’s `defaultLimitId` field.""" + defaultLimitId: UUIDFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `name` field.""" - name: StringFilter - """Negates the expression.""" - not: AppLimitWarningFilter + not: AppLimitCreditFilter """Checks for any expressions in this list.""" - or: [AppLimitWarningFilter!] - - """Filter by the object’s `taskIdentifier` field.""" - taskIdentifier: StringFilter - - """Filter by the object’s `thresholdValue` field.""" - thresholdValue: BigIntFilter + or: [AppLimitCreditFilter!] - """Filter by the object’s `warningType` field.""" - warningType: StringFilter + """Filter by the object’s `reason` field.""" + reason: StringFilter } -"""An input for mutations affecting `AppLimitWarning`""" -input AppLimitWarningInput { - id: UUID +"""An input for mutations affecting `AppLimitCredit`""" +input AppLimitCreditInput { + """User this credit is for; NULL for aggregate entity-level credits""" + actorId: UUID - """Limit name this warning applies to (must match a default_limits entry)""" - name: String! + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - taskIdentifier: String! + creditType: String - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt! + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID! + id: UUID - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String! + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String } -"""Methods to use when ordering `AppLimitWarning`.""" -enum AppLimitWarningOrderBy { +"""Methods to use when ordering `AppLimitCredit`.""" +enum AppLimitCreditOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + AMOUNT_ASC + AMOUNT_DESC + CREDIT_TYPE_ASC + CREDIT_TYPE_DESC + DEFAULT_LIMIT_ID_ASC + DEFAULT_LIMIT_ID_DESC ID_ASC ID_DESC - NAME_ASC - NAME_DESC NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC - TASK_IDENTIFIER_ASC - TASK_IDENTIFIER_DESC - THRESHOLD_VALUE_ASC - THRESHOLD_VALUE_DESC - WARNING_TYPE_ASC - WARNING_TYPE_DESC + REASON_ASC + REASON_DESC } """ -Represents an update to a `AppLimitWarning`. Fields that are set will be updated. +Represents an update to a `AppLimitCredit`. Fields that are set will be updated. """ -input AppLimitWarningPatch { - id: UUID +input AppLimitCreditPatch { + """User this credit is for; NULL for aggregate entity-level credits""" + actorId: UUID - """Limit name this warning applies to (must match a default_limits entry)""" - name: String + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) + Credit durability: permanent (survives window reset) or period (resets on window expiry) """ - taskIdentifier: String + creditType: String - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID + id: UUID - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String } """ -A signed eight-byte integer. The upper big integer values are greater than the -max value for a JavaScript number. Therefore all big integers will be output as -strings and not numbers. -""" -scalar BigInt - -""" -A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ +Append-only ledger of code redemptions; AFTER INSERT trigger validates and cascades to limit_credits """ -input BigIntFilter { +type AppLimitCreditRedemption { """ - Not equal to the specified value, treating null like an ordinary value. + Reads a single `AppLimitCreditCode` that is related to this `AppLimitCreditRedemption`. """ - distinctFrom: BigInt + creditCode: AppLimitCreditCode - """Equal to the specified value.""" - equalTo: BigInt + """FK to credit_codes — which code is being redeemed""" + creditCodeId: UUID! - """Greater than the specified value.""" - greaterThan: BigInt + """Entity receiving the credits (personal org user_id or org entity_id)""" + entityId: UUID! - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: BigInt + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID! - """Included in the specified list.""" - in: [BigInt!] + """Resolved billable organization via get_organization_id""" + organizationId: UUID +} +"""A connection to a list of `AppLimitCreditRedemption` values.""" +type AppLimitCreditRedemptionConnection { """ - Is null (if `true` is specified) or is not null (if `false` is specified). + A list of edges which contains the `AppLimitCreditRedemption` and cursor to aid in pagination. """ - isNull: Boolean - - """Less than the specified value.""" - lessThan: BigInt - - """Less than or equal to the specified value.""" - lessThanOrEqualTo: BigInt - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: BigInt - - """Not equal to the specified value.""" - notEqualTo: BigInt + edges: [AppLimitCreditRedemptionEdge]! - """Not included in the specified list.""" - notIn: [BigInt!] -} + """A list of `AppLimitCreditRedemption` objects.""" + nodes: [AppLimitCreditRedemption]! -"""All input for the create `AppLimitCap` mutation.""" -input CreateAppLimitCapInput { - """The `AppLimitCap` to be created by this mutation.""" - appLimitCap: AppLimitCapInput! + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + The count of *all* `AppLimitCreditRedemption` you could get from the connection. """ - clientMutationId: String + totalCount: Int! } -"""The output of our create `AppLimitCap` mutation.""" -type CreateAppLimitCapPayload { - """The `AppLimitCap` that was created by this mutation.""" - appLimitCap: AppLimitCap +"""A `AppLimitCreditRedemption` edge in the connection.""" +type AppLimitCreditRedemptionEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """An edge for our `AppLimitCap`. May be used by Relay 1.""" - appLimitCapEdge( - """The method to use when ordering `AppLimitCap`.""" - orderBy: [AppLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCapEdge + """The `AppLimitCreditRedemption` at the end of the edge.""" + node: AppLimitCreditRedemption +} - """ - 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 +""" +A filter to be used against `AppLimitCreditRedemption` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitCreditRedemptionFilter { + """Checks for all expressions in this list.""" + and: [AppLimitCreditRedemptionFilter!] - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `creditCode` relation.""" + creditCode: AppLimitCreditCodeFilter -"""All input for the create `AppLimitCapsDefault` mutation.""" -input CreateAppLimitCapsDefaultInput { - """The `AppLimitCapsDefault` to be created by this mutation.""" - appLimitCapsDefault: AppLimitCapsDefaultInput! + """Filter by the object’s `creditCodeId` field.""" + creditCodeId: UUIDFilter - """ - 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 -} + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter -"""The output of our create `AppLimitCapsDefault` mutation.""" -type CreateAppLimitCapsDefaultPayload { - """The `AppLimitCapsDefault` that was created by this mutation.""" - appLimitCapsDefault: AppLimitCapsDefault + """Filter by the object’s `entityType` field.""" + entityType: StringFilter - """An edge for our `AppLimitCapsDefault`. May be used by Relay 1.""" - appLimitCapsDefaultEdge( - """The method to use when ordering `AppLimitCapsDefault`.""" - orderBy: [AppLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCapsDefaultEdge + """Filter by the object’s `id` field.""" + id: UUIDFilter - """ - 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 + """Negates the expression.""" + not: AppLimitCreditRedemptionFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Checks for any expressions in this list.""" + or: [AppLimitCreditRedemptionFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter } -"""All input for the create `AppLimitCreditCode` mutation.""" -input CreateAppLimitCreditCodeInput { - """The `AppLimitCreditCode` to be created by this mutation.""" - appLimitCreditCode: AppLimitCreditCodeInput! +"""An input for mutations affecting `AppLimitCreditRedemption`""" +input AppLimitCreditRedemptionInput { + """FK to credit_codes — which code is being redeemed""" + creditCodeId: UUID! - """ - 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 -} + """Entity receiving the credits (personal org user_id or org entity_id)""" + entityId: UUID! -"""All input for the create `AppLimitCreditCodeItem` mutation.""" -input CreateAppLimitCreditCodeItemInput { - """The `AppLimitCreditCodeItem` to be created by this mutation.""" - appLimitCreditCodeItem: AppLimitCreditCodeItemInput! + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID - """ - 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 + """Resolved billable organization via get_organization_id""" + organizationId: UUID } -"""The output of our create `AppLimitCreditCodeItem` mutation.""" -type CreateAppLimitCreditCodeItemPayload { - """The `AppLimitCreditCodeItem` that was created by this mutation.""" - appLimitCreditCodeItem: AppLimitCreditCodeItem +"""Methods to use when ordering `AppLimitCreditRedemption`.""" +enum AppLimitCreditRedemptionOrderBy { + CREDIT_CODE_ID_ASC + CREDIT_CODE_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """An edge for our `AppLimitCreditCodeItem`. May be used by Relay 1.""" - appLimitCreditCodeItemEdge( - """The method to use when ordering `AppLimitCreditCodeItem`.""" - orderBy: [AppLimitCreditCodeItemOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditCodeItemEdge +""" +Represents an update to a `AppLimitCreditRedemption`. Fields that are set will be updated. +""" +input AppLimitCreditRedemptionPatch { + """FK to credit_codes — which code is being redeemed""" + creditCodeId: UUID - """ - 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 + """Entity receiving the credits (personal org user_id or org entity_id)""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID + + """Resolved billable organization via get_organization_id""" + organizationId: UUID +} +""" +Default maximum values for each named limit, applied when no per-actor override exists +""" +type AppLimitDefault { """ - Our root query field type. Allows us to run any query from our mutation payload. + Reads and enables pagination through a set of `AppLimitCreditCodeItem`. """ - query: Query -} + appLimitCreditCodeItemsByDefaultLimitId( + """Read all values in the set after (below) this cursor.""" + after: Cursor -"""The output of our create `AppLimitCreditCode` mutation.""" -type CreateAppLimitCreditCodePayload { - """The `AppLimitCreditCode` that was created by this mutation.""" - appLimitCreditCode: AppLimitCreditCode + """Read all values in the set before (above) this cursor.""" + before: Cursor - """An edge for our `AppLimitCreditCode`. May be used by Relay 1.""" - appLimitCreditCodeEdge( - """The method to use when ordering `AppLimitCreditCode`.""" - orderBy: [AppLimitCreditCodeOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditCodeEdge + """Only read the first `n` values of the set.""" + first: Int - """ - 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 + """Only read the last `n` values of the set.""" + last: Int - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -"""All input for the create `AppLimitCredit` mutation.""" -input CreateAppLimitCreditInput { - """The `AppLimitCredit` to be created by this mutation.""" - appLimitCredit: AppLimitCreditInput! + """The method to use when ordering `AppLimitCreditCodeItem`.""" + orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] - """ - 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 -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditCodeItemFilter + ): AppLimitCreditCodeItemConnection! -"""The output of our create `AppLimitCredit` mutation.""" -type CreateAppLimitCreditPayload { - """The `AppLimitCredit` that was created by this mutation.""" - appLimitCredit: AppLimitCredit + """Reads and enables pagination through a set of `AppLimitCredit`.""" + appLimitCreditsByDefaultLimitId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 - """An edge for our `AppLimitCredit`. May be used by Relay 1.""" - appLimitCreditEdge( """The method to use when ordering `AppLimitCredit`.""" - orderBy: [AppLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditEdge + orderBy: [AppLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditFilter + ): AppLimitCreditConnection! + id: UUID! + + """Default maximum usage allowed for this limit""" + max: BigInt + + """Name identifier of the limit this default applies to""" + name: String! + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt +} + +"""A connection to a list of `AppLimitDefault` values.""" +type AppLimitDefaultConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `AppLimitDefault` and cursor to aid in pagination. """ - clientMutationId: String + edges: [AppLimitDefaultEdge]! + + """A list of `AppLimitDefault` objects.""" + nodes: [AppLimitDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Our root query field type. Allows us to run any query from our mutation payload. + The count of *all* `AppLimitDefault` you could get from the connection. """ - query: Query + totalCount: Int! } -"""All input for the create `AppLimitCreditRedemption` mutation.""" -input CreateAppLimitCreditRedemptionInput { - """The `AppLimitCreditRedemption` to be created by this mutation.""" - appLimitCreditRedemption: AppLimitCreditRedemptionInput! +"""A `AppLimitDefault` edge in the connection.""" +type AppLimitDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """ - 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 `AppLimitDefault` at the end of the edge.""" + node: AppLimitDefault } -"""The output of our create `AppLimitCreditRedemption` mutation.""" -type CreateAppLimitCreditRedemptionPayload { - """The `AppLimitCreditRedemption` that was created by this mutation.""" - appLimitCreditRedemption: AppLimitCreditRedemption - - """An edge for our `AppLimitCreditRedemption`. May be used by Relay 1.""" - appLimitCreditRedemptionEdge( - """The method to use when ordering `AppLimitCreditRedemption`.""" - orderBy: [AppLimitCreditRedemptionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditRedemptionEdge +""" +A filter to be used against `AppLimitDefault` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitDefaultFilter { + """Checks for all expressions in this list.""" + and: [AppLimitDefaultFilter!] """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Filter by the object’s `appLimitCreditCodeItemsByDefaultLimitId` relation. """ - clientMutationId: String + appLimitCreditCodeItemsByDefaultLimitId: AppLimitDefaultToManyAppLimitCreditCodeItemFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """`appLimitCreditCodeItemsByDefaultLimitId` exist.""" + appLimitCreditCodeItemsByDefaultLimitIdExist: Boolean -"""All input for the create `AppLimitDefault` mutation.""" -input CreateAppLimitDefaultInput { - """The `AppLimitDefault` to be created by this mutation.""" - appLimitDefault: AppLimitDefaultInput! + """Filter by the object’s `appLimitCreditsByDefaultLimitId` relation.""" + appLimitCreditsByDefaultLimitId: AppLimitDefaultToManyAppLimitCreditFilter - """ - 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 -} + """`appLimitCreditsByDefaultLimitId` exist.""" + appLimitCreditsByDefaultLimitIdExist: Boolean -"""The output of our create `AppLimitDefault` mutation.""" -type CreateAppLimitDefaultPayload { - """The `AppLimitDefault` that was created by this mutation.""" - appLimitDefault: AppLimitDefault + """Filter by the object’s `id` field.""" + id: UUIDFilter - """An edge for our `AppLimitDefault`. May be used by Relay 1.""" - appLimitDefaultEdge( - """The method to use when ordering `AppLimitDefault`.""" - orderBy: [AppLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitDefaultEdge + """Filter by the object’s `max` field.""" + max: BigIntFilter - """ - 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 + """Filter by the object’s `name` field.""" + name: StringFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Negates the expression.""" + not: AppLimitDefaultFilter -"""All input for the create `AppLimitEvent` mutation.""" -input CreateAppLimitEventInput { - """The `AppLimitEvent` to be created by this mutation.""" - appLimitEvent: AppLimitEventInput! + """Checks for any expressions in this list.""" + or: [AppLimitDefaultFilter!] - """ - 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 + """Filter by the object’s `softMax` field.""" + softMax: BigIntFilter } -"""The output of our create `AppLimitEvent` mutation.""" -type CreateAppLimitEventPayload { - """The `AppLimitEvent` that was created by this mutation.""" - appLimitEvent: AppLimitEvent +"""An input for mutations affecting `AppLimitDefault`""" +input AppLimitDefaultInput { + id: UUID - """An edge for our `AppLimitEvent`. May be used by Relay 1.""" - appLimitEventEdge( - """The method to use when ordering `AppLimitEvent`.""" - orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEventEdge + """Default maximum usage allowed for this limit""" + max: BigInt - """ - 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 + """Name identifier of the limit this default applies to""" + name: String! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt } -"""All input for the create `AppLimit` mutation.""" -input CreateAppLimitInput { - """The `AppLimit` to be created by this mutation.""" - appLimit: AppLimitInput! - - """ - 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 +"""Methods to use when ordering `AppLimitDefault`.""" +enum AppLimitDefaultOrderBy { + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SOFT_MAX_ASC + SOFT_MAX_DESC } -"""The output of our create `AppLimit` mutation.""" -type CreateAppLimitPayload { - """The `AppLimit` that was created by this mutation.""" - appLimit: AppLimit +""" +Represents an update to a `AppLimitDefault`. Fields that are set will be updated. +""" +input AppLimitDefaultPatch { + id: UUID - """An edge for our `AppLimit`. May be used by Relay 1.""" - appLimitEdge( - """The method to use when ordering `AppLimit`.""" - orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEdge + """Default maximum usage allowed for this limit""" + max: BigInt - """ - 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 + """Name identifier of the limit this default applies to""" + name: String - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt } -"""All input for the create `AppLimitWarning` mutation.""" -input CreateAppLimitWarningInput { - """The `AppLimitWarning` to be created by this mutation.""" - appLimitWarning: AppLimitWarningInput! +""" +A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitDefaultToManyAppLimitCreditCodeItemFilter { + """Filters to entities where every related entity matches.""" + every: AppLimitCreditCodeItemFilter - """ - 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 -} + """Filters to entities where no related entity matches.""" + none: AppLimitCreditCodeItemFilter -"""The output of our create `AppLimitWarning` mutation.""" -type CreateAppLimitWarningPayload { - """The `AppLimitWarning` that was created by this mutation.""" - appLimitWarning: AppLimitWarning + """Filters to entities where at least one related entity matches.""" + some: AppLimitCreditCodeItemFilter +} - """An edge for our `AppLimitWarning`. May be used by Relay 1.""" - appLimitWarningEdge( - """The method to use when ordering `AppLimitWarning`.""" - orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitWarningEdge +""" +A filter to be used against many `AppLimitCredit` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitDefaultToManyAppLimitCreditFilter { + """Filters to entities where every related entity matches.""" + every: AppLimitCreditFilter - """ - 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 + """Filters to entities where no related entity matches.""" + none: AppLimitCreditFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Filters to entities where at least one related entity matches.""" + some: AppLimitCreditFilter } -"""All input for the create `OrgLimitAggregate` mutation.""" -input CreateOrgLimitAggregateInput { - """ - 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 +"""A `AppLimit` edge in the connection.""" +type AppLimitEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """The `OrgLimitAggregate` to be created by this mutation.""" - orgLimitAggregate: OrgLimitAggregateInput! + """The `AppLimit` at the end of the edge.""" + node: AppLimit } -"""The output of our create `OrgLimitAggregate` mutation.""" -type CreateOrgLimitAggregatePayload { - """ - 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 +"""Append-only log of limit events for historical reporting and audit""" +type AppLimitEvent { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime! - """The `OrgLimitAggregate` that was created by this mutation.""" - orgLimitAggregate: OrgLimitAggregate + """Change amount: positive for increment, negative for decrement""" + delta: BigInt - """An edge for our `OrgLimitAggregate`. May be used by Relay 1.""" - orgLimitAggregateEdge( - """The method to use when ordering `OrgLimitAggregate`.""" - orderBy: [OrgLimitAggregateOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitAggregateEdge + """Entity this event applies to; NULL for app-level events""" + entityId: UUID - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String -"""All input for the create `OrgLimitCap` mutation.""" -input CreateOrgLimitCapInput { - """ - 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 + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String - """The `OrgLimitCap` to be created by this mutation.""" - orgLimitCap: OrgLimitCapInput! -} + """Unique identifier for each limit event""" + id: UUID! -"""The output of our create `OrgLimitCap` mutation.""" -type CreateOrgLimitCapPayload { - """ - 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 + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt - """The `OrgLimitCap` that was created by this mutation.""" - orgLimitCap: OrgLimitCap + """Limit name this event applies to""" + name: String - """An edge for our `OrgLimitCap`. May be used by Relay 1.""" - orgLimitCapEdge( - """The method to use when ordering `OrgLimitCap`.""" - orderBy: [OrgLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCapEdge + """Usage count after this event""" + numAfter: BigInt + + """Usage count before this event""" + numBefore: BigInt """ - Our root query field type. Allows us to run any query from our mutation payload. + Resolved billable organization via get_organization_id; NULL for app-level events """ - query: Query -} + organizationId: UUID -"""All input for the create `OrgLimitCapsDefault` mutation.""" -input CreateOrgLimitCapsDefaultInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Optional reason or source: achievement, invite, plan_change, purchase, etc. """ - clientMutationId: String - - """The `OrgLimitCapsDefault` to be created by this mutation.""" - orgLimitCapsDefault: OrgLimitCapsDefaultInput! + reason: String } -"""The output of our create `OrgLimitCapsDefault` mutation.""" -type CreateOrgLimitCapsDefaultPayload { +"""A connection to a list of `AppLimitEvent` values.""" +type AppLimitEventConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `AppLimitEvent` and cursor to aid in pagination. """ - clientMutationId: String + edges: [AppLimitEventEdge]! - """The `OrgLimitCapsDefault` that was created by this mutation.""" - orgLimitCapsDefault: OrgLimitCapsDefault + """A list of `AppLimitEvent` objects.""" + nodes: [AppLimitEvent]! - """An edge for our `OrgLimitCapsDefault`. May be used by Relay 1.""" - orgLimitCapsDefaultEdge( - """The method to use when ordering `OrgLimitCapsDefault`.""" - orderBy: [OrgLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCapsDefaultEdge + """Information to aid in pagination.""" + pageInfo: PageInfo! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """The count of *all* `AppLimitEvent` you could get from the connection.""" + totalCount: Int! } -"""All input for the create `OrgLimitCredit` mutation.""" -input CreateOrgLimitCreditInput { - """ - 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 +"""A `AppLimitEvent` edge in the connection.""" +type AppLimitEventEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """The `OrgLimitCredit` to be created by this mutation.""" - orgLimitCredit: OrgLimitCreditInput! + """The `AppLimitEvent` at the end of the edge.""" + node: AppLimitEvent } -"""The output of our create `OrgLimitCredit` mutation.""" -type CreateOrgLimitCreditPayload { - """ - 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 +""" +A filter to be used against `AppLimitEvent` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitEventFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter - """The `OrgLimitCredit` that was created by this mutation.""" - orgLimitCredit: OrgLimitCredit + """Checks for all expressions in this list.""" + and: [AppLimitEventFilter!] - """An edge for our `OrgLimitCredit`. May be used by Relay 1.""" - orgLimitCreditEdge( - """The method to use when ordering `OrgLimitCredit`.""" - orderBy: [OrgLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCreditEdge + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `delta` field.""" + delta: BigIntFilter -"""All input for the create `OrgLimitDefault` mutation.""" -input CreateOrgLimitDefaultInput { - """ - 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 + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter - """The `OrgLimitDefault` to be created by this mutation.""" - orgLimitDefault: OrgLimitDefaultInput! -} + """Filter by the object’s `entityType` field.""" + entityType: StringFilter -"""The output of our create `OrgLimitDefault` mutation.""" -type CreateOrgLimitDefaultPayload { - """ - 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 + """Filter by the object’s `eventType` field.""" + eventType: StringFilter - """The `OrgLimitDefault` that was created by this mutation.""" - orgLimitDefault: OrgLimitDefault + """Filter by the object’s `id` field.""" + id: UUIDFilter - """An edge for our `OrgLimitDefault`. May be used by Relay 1.""" - orgLimitDefaultEdge( - """The method to use when ordering `OrgLimitDefault`.""" - orderBy: [OrgLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitDefaultEdge + """Filter by the object’s `maxAtEvent` field.""" + maxAtEvent: BigIntFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `name` field.""" + name: StringFilter -"""All input for the create `OrgLimitEvent` mutation.""" -input CreateOrgLimitEventInput { - """ - 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 + """Negates the expression.""" + not: AppLimitEventFilter - """The `OrgLimitEvent` to be created by this mutation.""" - orgLimitEvent: OrgLimitEventInput! -} + """Filter by the object’s `numAfter` field.""" + numAfter: BigIntFilter -"""The output of our create `OrgLimitEvent` mutation.""" -type CreateOrgLimitEventPayload { - """ - 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 + """Filter by the object’s `numBefore` field.""" + numBefore: BigIntFilter - """The `OrgLimitEvent` that was created by this mutation.""" - orgLimitEvent: OrgLimitEvent + """Checks for any expressions in this list.""" + or: [AppLimitEventFilter!] - """An edge for our `OrgLimitEvent`. May be used by Relay 1.""" - orgLimitEventEdge( - """The method to use when ordering `OrgLimitEvent`.""" - orderBy: [OrgLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitEventEdge + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Filter by the object’s `reason` field.""" + reason: StringFilter } -"""All input for the create `OrgLimit` mutation.""" -input CreateOrgLimitInput { - """ - 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 +"""An input for mutations affecting `AppLimitEvent`""" +input AppLimitEventInput { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime - """The `OrgLimit` to be created by this mutation.""" - orgLimit: OrgLimitInput! -} + """Change amount: positive for increment, negative for decrement""" + delta: BigInt -"""The output of our create `OrgLimit` mutation.""" -type CreateOrgLimitPayload { - """ - 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 + """Entity this event applies to; NULL for app-level events""" + entityId: UUID - """The `OrgLimit` that was created by this mutation.""" - orgLimit: OrgLimit + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String - """An edge for our `OrgLimit`. May be used by Relay 1.""" - orgLimitEdge( - """The method to use when ordering `OrgLimit`.""" - orderBy: [OrgLimitOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitEdge + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Unique identifier for each limit event""" + id: UUID -"""All input for the create `OrgLimitWarning` mutation.""" -input CreateOrgLimitWarningInput { - """ - 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 + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt - """The `OrgLimitWarning` to be created by this mutation.""" - orgLimitWarning: OrgLimitWarningInput! -} + """Limit name this event applies to""" + name: String -"""The output of our create `OrgLimitWarning` mutation.""" -type CreateOrgLimitWarningPayload { - """ - 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 + """Usage count after this event""" + numAfter: BigInt - """The `OrgLimitWarning` that was created by this mutation.""" - orgLimitWarning: OrgLimitWarning + """Usage count before this event""" + numBefore: BigInt - """An edge for our `OrgLimitWarning`. May be used by Relay 1.""" - orgLimitWarningEdge( - """The method to use when ordering `OrgLimitWarning`.""" - orderBy: [OrgLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitWarningEdge + """ + Resolved billable organization via get_organization_id; NULL for app-level events + """ + organizationId: UUID """ - Our root query field type. Allows us to run any query from our mutation payload. + Optional reason or source: achievement, invite, plan_change, purchase, etc. """ - query: Query + reason: String } -"""A location in a connection that can be used for resuming pagination.""" -scalar Cursor +"""Methods to use when ordering `AppLimitEvent`.""" +enum AppLimitEventOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DELTA_ASC + DELTA_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + EVENT_TYPE_ASC + EVENT_TYPE_DESC + ID_ASC + ID_DESC + MAX_AT_EVENT_ASC + MAX_AT_EVENT_DESC + NAME_ASC + NAME_DESC + NATURAL + NUM_AFTER_ASC + NUM_AFTER_DESC + NUM_BEFORE_ASC + NUM_BEFORE_DESC + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REASON_ASC + REASON_DESC +} """ -A point in time as described by the [ISO -8601](https://en.wikipedia.org/wiki/ISO_8601) and, if it has a timezone, [RFC -3339](https://datatracker.ietf.org/doc/html/rfc3339) standards. Input values -that do not conform to both ISO 8601 and RFC 3339 may be coerced, which may lead -to unexpected results. +Represents an update to a `AppLimitEvent`. Fields that are set will be updated. """ -scalar Datetime +input AppLimitEventPatch { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime -""" -A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ -""" -input DatetimeFilter { - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: Datetime + """Change amount: positive for increment, negative for decrement""" + delta: BigInt - """Equal to the specified value.""" - equalTo: Datetime + """Entity this event applies to; NULL for app-level events""" + entityId: UUID - """Greater than the specified value.""" - greaterThan: Datetime + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Datetime + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String - """Included in the specified list.""" - in: [Datetime!] + """Unique identifier for each limit event""" + id: UUID + + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt + + """Limit name this event applies to""" + name: String + + """Usage count after this event""" + numAfter: BigInt + + """Usage count before this event""" + numBefore: BigInt """ - Is null (if `true` is specified) or is not null (if `false` is specified). + Resolved billable organization via get_organization_id; NULL for app-level events """ - isNull: Boolean + organizationId: UUID - """Less than the specified value.""" - lessThan: Datetime + """ + Optional reason or source: achievement, invite, plan_change, purchase, etc. + """ + reason: String +} - """Less than or equal to the specified value.""" - lessThanOrEqualTo: Datetime +""" +A filter to be used against `AppLimit` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Datetime + """Checks for all expressions in this list.""" + and: [AppLimitFilter!] - """Not equal to the specified value.""" - notEqualTo: Datetime + """Filter by the object’s `entityType` field.""" + entityType: StringFilter - """Not included in the specified list.""" - notIn: [Datetime!] + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: AppLimitFilter + + """Filter by the object’s `num` field.""" + num: BigIntFilter + + """Checks for any expressions in this list.""" + or: [AppLimitFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `periodCredits` field.""" + periodCredits: BigIntFilter + + """Filter by the object’s `planMax` field.""" + planMax: BigIntFilter + + """Filter by the object’s `purchasedCredits` field.""" + purchasedCredits: BigIntFilter + + """Filter by the object’s `softMax` field.""" + softMax: BigIntFilter + + """Filter by the object’s `windowDuration` field.""" + windowDuration: IntervalFilter + + """Filter by the object’s `windowStart` field.""" + windowStart: DatetimeFilter } -"""All input for the `deleteAppLimitCap` mutation.""" -input DeleteAppLimitCapInput { +"""An input for mutations affecting `AppLimit`""" +input AppLimitInput { + """User whose usage is being tracked against this limit""" + actorId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. """ - clientMutationId: String - id: UUID! -} + max: BigInt -"""The output of our delete `AppLimitCap` mutation.""" -type DeleteAppLimitCapPayload { - """The `AppLimitCap` that was deleted by this mutation.""" - appLimitCap: AppLimitCap + """Name identifier of the limit being tracked""" + name: String - """An edge for our `AppLimitCap`. May be used by Relay 1.""" - appLimitCapEdge( - """The method to use when ordering `AppLimitCap`.""" - orderBy: [AppLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCapEdge + """Current usage count for this actor and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Temporary credits for the current billing window. Resets to 0 on window expiry. """ - clientMutationId: String + periodCredits: BigInt """ - Our root query field type. Allows us to run any query from our mutation payload. + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. """ - query: Query -} + planMax: BigInt -"""All input for the `deleteAppLimitCapsDefault` mutation.""" -input DeleteAppLimitCapsDefaultInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. """ - clientMutationId: String - id: UUID! -} + purchasedCredits: BigInt -"""The output of our delete `AppLimitCapsDefault` mutation.""" -type DeleteAppLimitCapsDefaultPayload { - """The `AppLimitCapsDefault` that was deleted by this mutation.""" - appLimitCapsDefault: AppLimitCapsDefault - - """An edge for our `AppLimitCapsDefault`. May be used by Relay 1.""" - appLimitCapsDefaultEdge( - """The method to use when ordering `AppLimitCapsDefault`.""" - orderBy: [AppLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCapsDefaultEdge + """ + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. + """ + softMax: BigInt """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window """ - clientMutationId: String + windowDuration: IntervalInput - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime } -"""All input for the `deleteAppLimitCreditCode` mutation.""" -input DeleteAppLimitCreditCodeInput { - """ - 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! +"""Methods to use when ordering `AppLimit`.""" +enum AppLimitOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + NUM_ASC + NUM_DESC + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PERIOD_CREDITS_ASC + PERIOD_CREDITS_DESC + PLAN_MAX_ASC + PLAN_MAX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PURCHASED_CREDITS_ASC + PURCHASED_CREDITS_DESC + SOFT_MAX_ASC + SOFT_MAX_DESC + WINDOW_DURATION_ASC + WINDOW_DURATION_DESC + WINDOW_START_ASC + WINDOW_START_DESC } -"""All input for the `deleteAppLimitCreditCodeItem` mutation.""" -input DeleteAppLimitCreditCodeItemInput { +""" +Represents an update to a `AppLimit`. Fields that are set will be updated. +""" +input AppLimitPatch { + """User whose usage is being tracked against this limit""" + actorId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. """ - clientMutationId: String - id: UUID! -} + max: BigInt -"""The output of our delete `AppLimitCreditCodeItem` mutation.""" -type DeleteAppLimitCreditCodeItemPayload { - """The `AppLimitCreditCodeItem` that was deleted by this mutation.""" - appLimitCreditCodeItem: AppLimitCreditCodeItem + """Name identifier of the limit being tracked""" + name: String - """An edge for our `AppLimitCreditCodeItem`. May be used by Relay 1.""" - appLimitCreditCodeItemEdge( - """The method to use when ordering `AppLimitCreditCodeItem`.""" - orderBy: [AppLimitCreditCodeItemOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditCodeItemEdge + """Current usage count for this actor and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Temporary credits for the current billing window. Resets to 0 on window expiry. """ - clientMutationId: String + periodCredits: BigInt """ - Our root query field type. Allows us to run any query from our mutation payload. + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. """ - query: Query -} - -"""The output of our delete `AppLimitCreditCode` mutation.""" -type DeleteAppLimitCreditCodePayload { - """The `AppLimitCreditCode` that was deleted by this mutation.""" - appLimitCreditCode: AppLimitCreditCode - - """An edge for our `AppLimitCreditCode`. May be used by Relay 1.""" - appLimitCreditCodeEdge( - """The method to use when ordering `AppLimitCreditCode`.""" - orderBy: [AppLimitCreditCodeOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditCodeEdge + planMax: BigInt """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. """ - clientMutationId: String + purchasedCredits: BigInt """ - Our root query field type. Allows us to run any query from our mutation payload. + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. """ - query: Query -} + softMax: BigInt -"""All input for the `deleteAppLimitCredit` mutation.""" -input DeleteAppLimitCreditInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window """ - clientMutationId: String - id: UUID! + windowDuration: IntervalInput + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime } -"""The output of our delete `AppLimitCredit` mutation.""" -type DeleteAppLimitCreditPayload { - """The `AppLimitCredit` that was deleted by this mutation.""" - appLimitCredit: AppLimitCredit +""" +Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. +""" +type AppLimitWarning { + id: UUID! - """An edge for our `AppLimitCredit`. May be used by Relay 1.""" - appLimitCreditEdge( - """The method to use when ordering `AppLimitCredit`.""" - orderBy: [AppLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditEdge + """Limit name this warning applies to (must match a default_limits entry)""" + name: String! """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) """ - clientMutationId: String + taskIdentifier: String! """ - Our root query field type. Allows us to run any query from our mutation payload. + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type """ - query: Query + thresholdValue: BigInt! + + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String! } -"""All input for the `deleteAppLimitCreditRedemption` mutation.""" -input DeleteAppLimitCreditRedemptionInput { +"""A connection to a list of `AppLimitWarning` values.""" +type AppLimitWarningConnection { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + A list of edges which contains the `AppLimitWarning` and cursor to aid in pagination. """ - clientMutationId: String - id: UUID! -} + edges: [AppLimitWarningEdge]! -"""The output of our delete `AppLimitCreditRedemption` mutation.""" -type DeleteAppLimitCreditRedemptionPayload { - """The `AppLimitCreditRedemption` that was deleted by this mutation.""" - appLimitCreditRedemption: AppLimitCreditRedemption + """A list of `AppLimitWarning` objects.""" + nodes: [AppLimitWarning]! - """An edge for our `AppLimitCreditRedemption`. May be used by Relay 1.""" - appLimitCreditRedemptionEdge( - """The method to use when ordering `AppLimitCreditRedemption`.""" - orderBy: [AppLimitCreditRedemptionOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitCreditRedemptionEdge + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + The count of *all* `AppLimitWarning` you could get from the connection. """ - clientMutationId: String + totalCount: Int! +} - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query +"""A `AppLimitWarning` edge in the connection.""" +type AppLimitWarningEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppLimitWarning` at the end of the edge.""" + node: AppLimitWarning } -"""All input for the `deleteAppLimitDefault` mutation.""" -input DeleteAppLimitDefaultInput { - """ - 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! +""" +A filter to be used against `AppLimitWarning` object types. All fields are combined with a logical ‘and.’ +""" +input AppLimitWarningFilter { + """Checks for all expressions in this list.""" + and: [AppLimitWarningFilter!] + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: AppLimitWarningFilter + + """Checks for any expressions in this list.""" + or: [AppLimitWarningFilter!] + + """Filter by the object’s `taskIdentifier` field.""" + taskIdentifier: StringFilter + + """Filter by the object’s `thresholdValue` field.""" + thresholdValue: BigIntFilter + + """Filter by the object’s `warningType` field.""" + warningType: StringFilter } -"""The output of our delete `AppLimitDefault` mutation.""" -type DeleteAppLimitDefaultPayload { - """The `AppLimitDefault` that was deleted by this mutation.""" - appLimitDefault: AppLimitDefault +"""An input for mutations affecting `AppLimitWarning`""" +input AppLimitWarningInput { + id: UUID - """An edge for our `AppLimitDefault`. May be used by Relay 1.""" - appLimitDefaultEdge( - """The method to use when ordering `AppLimitDefault`.""" - orderBy: [AppLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitDefaultEdge + """Limit name this warning applies to (must match a default_limits entry)""" + name: String! """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) """ - clientMutationId: String + taskIdentifier: String! """ - Our root query field type. Allows us to run any query from our mutation payload. + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type """ - query: Query -} + thresholdValue: BigInt! -"""All input for the `deleteAppLimitEvent` mutation.""" -input DeleteAppLimitEventInput { - """ - 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 - createdAt: Datetime! + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String! +} - """Unique identifier for each limit event""" - id: UUID! +"""Methods to use when ordering `AppLimitWarning`.""" +enum AppLimitWarningOrderBy { + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + TASK_IDENTIFIER_ASC + TASK_IDENTIFIER_DESC + THRESHOLD_VALUE_ASC + THRESHOLD_VALUE_DESC + WARNING_TYPE_ASC + WARNING_TYPE_DESC } -"""The output of our delete `AppLimitEvent` mutation.""" -type DeleteAppLimitEventPayload { - """The `AppLimitEvent` that was deleted by this mutation.""" - appLimitEvent: AppLimitEvent +""" +Represents an update to a `AppLimitWarning`. Fields that are set will be updated. +""" +input AppLimitWarningPatch { + id: UUID - """An edge for our `AppLimitEvent`. May be used by Relay 1.""" - appLimitEventEdge( - """The method to use when ordering `AppLimitEvent`.""" - orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEventEdge + """Limit name this warning applies to (must match a default_limits entry)""" + name: String """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) """ - clientMutationId: String + taskIdentifier: String """ - Our root query field type. Allows us to run any query from our mutation payload. + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type """ - query: Query + thresholdValue: BigInt + + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String } -"""All input for the `deleteAppLimit` mutation.""" -input DeleteAppLimitInput { +""" +A floating point number that requires more precision than IEEE 754 binary 64 +""" +scalar BigFloat + +""" +A filter to be used against BigFloat fields. All fields are combined with a logical ‘and.’ +""" +input BigFloatFilter { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Not equal to the specified value, treating null like an ordinary value. """ - clientMutationId: String - id: UUID! -} + distinctFrom: BigFloat -"""The output of our delete `AppLimit` mutation.""" -type DeleteAppLimitPayload { - """The `AppLimit` that was deleted by this mutation.""" - appLimit: AppLimit + """Equal to the specified value.""" + equalTo: BigFloat - """An edge for our `AppLimit`. May be used by Relay 1.""" - appLimitEdge( - """The method to use when ordering `AppLimit`.""" - orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEdge + """Greater than the specified value.""" + greaterThan: BigFloat - """ - 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 + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: BigFloat - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Included in the specified list.""" + in: [BigFloat!] -"""All input for the `deleteAppLimitWarning` mutation.""" -input DeleteAppLimitWarningInput { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Is null (if `true` is specified) or is not null (if `false` is specified). """ - clientMutationId: String - id: UUID! -} + isNull: Boolean -"""The output of our delete `AppLimitWarning` mutation.""" -type DeleteAppLimitWarningPayload { - """The `AppLimitWarning` that was deleted by this mutation.""" - appLimitWarning: AppLimitWarning + """Less than the specified value.""" + lessThan: BigFloat - """An edge for our `AppLimitWarning`. May be used by Relay 1.""" - appLimitWarningEdge( - """The method to use when ordering `AppLimitWarning`.""" - orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitWarningEdge + """Less than or equal to the specified value.""" + lessThanOrEqualTo: BigFloat - """ - 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 + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: BigFloat - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Not equal to the specified value.""" + notEqualTo: BigFloat -"""All input for the `deleteOrgLimitAggregate` mutation.""" -input DeleteOrgLimitAggregateInput { - """ - 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! + """Not included in the specified list.""" + notIn: [BigFloat!] } -"""The output of our delete `OrgLimitAggregate` mutation.""" -type DeleteOrgLimitAggregatePayload { +""" +A signed eight-byte integer. The upper big integer values are greater than the +max value for a JavaScript number. Therefore all big integers will be output as +strings and not numbers. +""" +scalar BigInt + +""" +A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ +""" +input BigIntFilter { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Not equal to the specified value, treating null like an ordinary value. """ - clientMutationId: String + distinctFrom: BigInt - """The `OrgLimitAggregate` that was deleted by this mutation.""" - orgLimitAggregate: OrgLimitAggregate + """Equal to the specified value.""" + equalTo: BigInt - """An edge for our `OrgLimitAggregate`. May be used by Relay 1.""" - orgLimitAggregateEdge( - """The method to use when ordering `OrgLimitAggregate`.""" - orderBy: [OrgLimitAggregateOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitAggregateEdge + """Greater than the specified value.""" + greaterThan: BigInt + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: BigInt + + """Included in the specified list.""" + in: [BigInt!] """ - Our root query field type. Allows us to run any query from our mutation payload. + Is null (if `true` is specified) or is not null (if `false` is specified). """ - query: Query + isNull: Boolean + + """Less than the specified value.""" + lessThan: BigInt + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: BigInt + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: BigInt + + """Not equal to the specified value.""" + notEqualTo: BigInt + + """Not included in the specified list.""" + notIn: [BigInt!] } -"""All input for the `deleteOrgLimitCap` mutation.""" -input DeleteOrgLimitCapInput { - """ - 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 +""" +Permanent monthly usage summary per entity per meter (user-facing billing dashboard) +""" +type BillingUsageSummary { + """Universal credits consumed during this period""" + creditsConsumed: BigInt! + + """The entity (org, team, user) this summary belongs to""" + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String id: UUID! -} -"""The output of our delete `OrgLimitCap` mutation.""" -type DeleteOrgLimitCapPayload { + """Which meter this summary tracks""" + meterSlug: String! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Units consumed beyond the plan limit (quantity_used - plan_limit when positive) """ - clientMutationId: String + overageUnits: BigInt! - """The `OrgLimitCap` that was deleted by this mutation.""" - orgLimitCap: OrgLimitCap + """End of the billing period this summary covers""" + periodEnd: Datetime! - """An edge for our `OrgLimitCap`. May be used by Relay 1.""" - orgLimitCapEdge( - """The method to use when ordering `OrgLimitCap`.""" - orderBy: [OrgLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCapEdge + """Start of the billing period this summary covers""" + periodStart: Datetime! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Plan limit that was in effect during this period""" + planLimit: BigInt! -"""All input for the `deleteOrgLimitCapsDefault` mutation.""" -input DeleteOrgLimitCapsDefaultInput { - """ - 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! + """Total units consumed during this period""" + quantityUsed: BigInt! } -"""The output of our delete `OrgLimitCapsDefault` mutation.""" -type DeleteOrgLimitCapsDefaultPayload { +"""A connection to a list of `BillingUsageSummary` values.""" +type BillingUsageSummaryConnection { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + A list of edges which contains the `BillingUsageSummary` and cursor to aid in pagination. """ - clientMutationId: String + edges: [BillingUsageSummaryEdge]! - """The `OrgLimitCapsDefault` that was deleted by this mutation.""" - orgLimitCapsDefault: OrgLimitCapsDefault + """A list of `BillingUsageSummary` objects.""" + nodes: [BillingUsageSummary]! - """An edge for our `OrgLimitCapsDefault`. May be used by Relay 1.""" - orgLimitCapsDefaultEdge( - """The method to use when ordering `OrgLimitCapsDefault`.""" - orderBy: [OrgLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCapsDefaultEdge + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Our root query field type. Allows us to run any query from our mutation payload. + The count of *all* `BillingUsageSummary` you could get from the connection. """ - query: Query + totalCount: Int! } -"""All input for the `deleteOrgLimitCredit` mutation.""" -input DeleteOrgLimitCreditInput { - """ - 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! +"""A `BillingUsageSummary` edge in the connection.""" +type BillingUsageSummaryEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `BillingUsageSummary` at the end of the edge.""" + node: BillingUsageSummary } -"""The output of our delete `OrgLimitCredit` mutation.""" -type DeleteOrgLimitCreditPayload { - """ - 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 +""" +A filter to be used against `BillingUsageSummary` object types. All fields are combined with a logical ‘and.’ +""" +input BillingUsageSummaryFilter { + """Checks for all expressions in this list.""" + and: [BillingUsageSummaryFilter!] - """The `OrgLimitCredit` that was deleted by this mutation.""" - orgLimitCredit: OrgLimitCredit + """Filter by the object’s `creditsConsumed` field.""" + creditsConsumed: BigIntFilter - """An edge for our `OrgLimitCredit`. May be used by Relay 1.""" - orgLimitCreditEdge( - """The method to use when ordering `OrgLimitCredit`.""" - orderBy: [OrgLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitCreditEdge + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `entityType` field.""" + entityType: StringFilter -"""All input for the `deleteOrgLimitDefault` mutation.""" -input DeleteOrgLimitDefaultInput { - """ - 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! -} + """Filter by the object’s `id` field.""" + id: UUIDFilter -"""The output of our delete `OrgLimitDefault` mutation.""" -type DeleteOrgLimitDefaultPayload { - """ - 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 + """Filter by the object’s `meterSlug` field.""" + meterSlug: StringFilter - """The `OrgLimitDefault` that was deleted by this mutation.""" - orgLimitDefault: OrgLimitDefault + """Negates the expression.""" + not: BillingUsageSummaryFilter - """An edge for our `OrgLimitDefault`. May be used by Relay 1.""" - orgLimitDefaultEdge( - """The method to use when ordering `OrgLimitDefault`.""" - orderBy: [OrgLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitDefaultEdge + """Checks for any expressions in this list.""" + or: [BillingUsageSummaryFilter!] - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter -"""All input for the `deleteOrgLimitEvent` mutation.""" -input DeleteOrgLimitEventInput { - """ - 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 - createdAt: Datetime! + """Filter by the object’s `overageUnits` field.""" + overageUnits: BigIntFilter - """Unique identifier for each limit event""" - id: UUID! + """Filter by the object’s `periodEnd` field.""" + periodEnd: DatetimeFilter + + """Filter by the object’s `periodStart` field.""" + periodStart: DatetimeFilter + + """Filter by the object’s `planLimit` field.""" + planLimit: BigIntFilter + + """Filter by the object’s `quantityUsed` field.""" + quantityUsed: BigIntFilter } -"""The output of our delete `OrgLimitEvent` mutation.""" -type DeleteOrgLimitEventPayload { - """ - 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 +"""An input for mutations affecting `BillingUsageSummary`""" +input BillingUsageSummaryInput { + """Universal credits consumed during this period""" + creditsConsumed: BigInt - """The `OrgLimitEvent` that was deleted by this mutation.""" - orgLimitEvent: OrgLimitEvent + """The entity (org, team, user) this summary belongs to""" + entityId: UUID! - """An edge for our `OrgLimitEvent`. May be used by Relay 1.""" - orgLimitEventEdge( - """The method to use when ordering `OrgLimitEvent`.""" - orderBy: [OrgLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitEventEdge + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Which meter this summary tracks""" + meterSlug: String! -"""All input for the `deleteOrgLimit` mutation.""" -input DeleteOrgLimitInput { - """ - 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! -} + """Resolved billable organization via get_organization_id""" + organizationId: UUID -"""The output of our delete `OrgLimit` mutation.""" -type DeleteOrgLimitPayload { """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. + Units consumed beyond the plan limit (quantity_used - plan_limit when positive) """ - clientMutationId: String + overageUnits: BigInt - """The `OrgLimit` that was deleted by this mutation.""" - orgLimit: OrgLimit + """End of the billing period this summary covers""" + periodEnd: Datetime! - """An edge for our `OrgLimit`. May be used by Relay 1.""" - orgLimitEdge( - """The method to use when ordering `OrgLimit`.""" - orderBy: [OrgLimitOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitEdge + """Start of the billing period this summary covers""" + periodStart: Datetime! - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query + """Plan limit that was in effect during this period""" + planLimit: BigInt + + """Total units consumed during this period""" + quantityUsed: BigInt } -"""All input for the `deleteOrgLimitWarning` mutation.""" -input DeleteOrgLimitWarningInput { - """ - 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! +"""Methods to use when ordering `BillingUsageSummary`.""" +enum BillingUsageSummaryOrderBy { + CREDITS_CONSUMED_ASC + CREDITS_CONSUMED_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + METER_SLUG_ASC + METER_SLUG_DESC + NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + OVERAGE_UNITS_ASC + OVERAGE_UNITS_DESC + PERIOD_END_ASC + PERIOD_END_DESC + PERIOD_START_ASC + PERIOD_START_DESC + PLAN_LIMIT_ASC + PLAN_LIMIT_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + QUANTITY_USED_ASC + QUANTITY_USED_DESC } -"""The output of our delete `OrgLimitWarning` mutation.""" -type DeleteOrgLimitWarningPayload { - """ - 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 +""" +Represents an update to a `BillingUsageSummary`. Fields that are set will be updated. +""" +input BillingUsageSummaryPatch { + """Universal credits consumed during this period""" + creditsConsumed: BigInt - """The `OrgLimitWarning` that was deleted by this mutation.""" - orgLimitWarning: OrgLimitWarning + """The entity (org, team, user) this summary belongs to""" + entityId: UUID - """An edge for our `OrgLimitWarning`. May be used by Relay 1.""" - orgLimitWarningEdge( - """The method to use when ordering `OrgLimitWarning`.""" - orderBy: [OrgLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgLimitWarningEdge + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + + """Which meter this summary tracks""" + meterSlug: String + + """Resolved billable organization via get_organization_id""" + organizationId: UUID """ - Our root query field type. Allows us to run any query from our mutation payload. + Units consumed beyond the plan limit (quantity_used - plan_limit when positive) """ - query: Query + overageUnits: BigInt + + """End of the billing period this summary covers""" + periodEnd: Datetime + + """Start of the billing period this summary covers""" + periodStart: Datetime + + """Plan limit that was in effect during this period""" + planLimit: BigInt + + """Total units consumed during this period""" + quantityUsed: BigInt } """ -A filter to be used against Int fields. All fields are combined with a logical ‘and.’ +A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ """ -input IntFilter { +input BooleanFilter { """ Not equal to the specified value, treating null like an ordinary value. """ - distinctFrom: Int + distinctFrom: Boolean """Equal to the specified value.""" - equalTo: Int + equalTo: Boolean """Greater than the specified value.""" - greaterThan: Int + greaterThan: Boolean """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: Int + greaterThanOrEqualTo: Boolean """Included in the specified list.""" - in: [Int!] + in: [Boolean!] """ Is null (if `true` is specified) or is not null (if `false` is specified). @@ -3126,68 +3219,58 @@ input IntFilter { isNull: Boolean """Less than the specified value.""" - lessThan: Int + lessThan: Boolean """Less than or equal to the specified value.""" - lessThanOrEqualTo: Int + lessThanOrEqualTo: Boolean """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: Int + notDistinctFrom: Boolean """Not equal to the specified value.""" - notEqualTo: Int + notEqualTo: Boolean """Not included in the specified list.""" - notIn: [Int!] + notIn: [Boolean!] } +scalar ConstructiveInternalTypeImage + """ -An interval of time that has passed where the smallest distinct unit is a second. +A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ """ -type Interval { - """A quantity of days.""" - days: Int +input ConstructiveInternalTypeImageFilter { + """Contained by the specified JSON.""" + containedBy: ConstructiveInternalTypeImage - """A quantity of hours.""" - hours: Int - - """A quantity of minutes.""" - minutes: Int + """Contains the specified JSON.""" + contains: ConstructiveInternalTypeImage - """A quantity of months.""" - months: Int + """Contains all of the specified keys.""" + containsAllKeys: [String!] - """ - A quantity of seconds. This is the only non-integer field, as all the other - fields will dump their overflow into a smaller unit of time. Intervals don’t - have a smaller unit than seconds. - """ - seconds: Float + """Contains any of the specified keys.""" + containsAnyKeys: [String!] - """A quantity of years.""" - years: Int -} + """Contains the specified key.""" + containsKey: String -""" -A filter to be used against Interval fields. All fields are combined with a logical ‘and.’ -""" -input IntervalFilter { """ Not equal to the specified value, treating null like an ordinary value. """ - distinctFrom: IntervalInput + distinctFrom: ConstructiveInternalTypeImage """Equal to the specified value.""" - equalTo: IntervalInput + equalTo: ConstructiveInternalTypeImage """Greater than the specified value.""" - greaterThan: IntervalInput + greaterThan: ConstructiveInternalTypeImage """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: IntervalInput + greaterThanOrEqualTo: ConstructiveInternalTypeImage """Included in the specified list.""" - in: [IntervalInput!] + in: [ConstructiveInternalTypeImage!] """ Is null (if `true` is specified) or is not null (if `false` is specified). @@ -3195,1569 +3278,7609 @@ input IntervalFilter { isNull: Boolean """Less than the specified value.""" - lessThan: IntervalInput + lessThan: ConstructiveInternalTypeImage """Less than or equal to the specified value.""" - lessThanOrEqualTo: IntervalInput + lessThanOrEqualTo: ConstructiveInternalTypeImage """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: IntervalInput + notDistinctFrom: ConstructiveInternalTypeImage """Not equal to the specified value.""" - notEqualTo: IntervalInput + notEqualTo: ConstructiveInternalTypeImage """Not included in the specified list.""" - notIn: [IntervalInput!] + notIn: [ConstructiveInternalTypeImage!] } -""" -An interval of time that has passed where the smallest distinct unit is a second. -""" -input IntervalInput { - """A quantity of days.""" - days: Int +"""All input for the create `AppAchievementReward` mutation.""" +input CreateAppAchievementRewardInput { + """The `AppAchievementReward` to be created by this mutation.""" + appAchievementReward: AppAchievementRewardInput! - """A quantity of hours.""" - hours: Int + """ + 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 +} - """A quantity of minutes.""" - minutes: Int +"""The output of our create `AppAchievementReward` mutation.""" +type CreateAppAchievementRewardPayload { + """The `AppAchievementReward` that was created by this mutation.""" + appAchievementReward: AppAchievementReward - """A quantity of months.""" - months: Int + """An edge for our `AppAchievementReward`. May be used by Relay 1.""" + appAchievementRewardEdge( + """The method to use when ordering `AppAchievementReward`.""" + orderBy: [AppAchievementRewardOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppAchievementRewardEdge """ - A quantity of seconds. This is the only non-integer field, as all the other - fields will dump their overflow into a smaller unit of time. Intervals don’t - have a smaller unit than seconds. + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - seconds: Float - - """A quantity of years.""" - years: Int -} + clientMutationId: String -""" -Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). -""" -scalar JSON - -"""A belongs-to (forward FK) relation""" -type MetaBelongsToRelation { - fieldName: String - isUnique: Boolean! - keys: [MetaField!]! - references: MetaRefTable! - type: String -} - -"""Table constraints""" -type MetaConstraints { - foreignKey: [MetaForeignKeyConstraint!]! - primaryKey: MetaPrimaryKeyConstraint - unique: [MetaUniqueConstraint!]! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Information about a PostgreSQL enum type""" -type MetaEnum { - """The PostgreSQL enum type name""" - name: String! +"""All input for the create `AppEventAggregate` mutation.""" +input CreateAppEventAggregateInput { + """The `AppEventAggregate` to be created by this mutation.""" + appEventAggregate: AppEventAggregateInput! - """Allowed values for this enum""" - values: [String!]! + """ + 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 } -"""Information about a table field/column""" -type MetaField { - """PostgreSQL column name""" - columnName: String! - description: String - - """Enum metadata if this field has an enum type""" - enumValues: MetaEnum - hasDefault: Boolean! - isForeignKey: Boolean! - isNotNull: Boolean! - isPrimaryKey: Boolean! +"""The output of our create `AppEventAggregate` mutation.""" +type CreateAppEventAggregatePayload { + """The `AppEventAggregate` that was created by this mutation.""" + appEventAggregate: AppEventAggregate - """Final GraphQL field name""" - name: String! - type: MetaType! -} + """An edge for our `AppEventAggregate`. May be used by Relay 1.""" + appEventAggregateEdge( + """The method to use when ordering `AppEventAggregate`.""" + orderBy: [AppEventAggregateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventAggregateEdge -"""Information about a foreign key constraint""" -type MetaForeignKeyConstraint { - fields: [MetaField!]! - name: String! - refFields: [MetaField!] - refTable: MetaRefTable - referencedFields: [String!]! - referencedTable: String! -} + """ + 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 -"""A has-one or has-many (reverse FK) relation""" -type MetaHasRelation { - fieldName: String - isUnique: Boolean! - keys: [MetaField!]! - referencedBy: MetaRefTable! - type: String + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""i18n metadata for a table with @i18n tag""" -type MetaI18n { - """Fields that are translatable""" - translatableFields: [MetaI18nField!]! +"""All input for the create `AppEvent` mutation.""" +input CreateAppEventInput { + """The `AppEvent` to be created by this mutation.""" + appEvent: AppEventInput! - """Name of the translation table""" - translationTable: String! + """ + 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 } -"""A translatable field""" -type MetaI18nField { - """GraphQL field name""" - name: String! +"""The output of our create `AppEvent` mutation.""" +type CreateAppEventPayload { + """The `AppEvent` that was created by this mutation.""" + appEvent: AppEvent - """PostgreSQL column type (text, citext)""" - type: String! -} + """An edge for our `AppEvent`. May be used by Relay 1.""" + appEventEdge( + """The method to use when ordering `AppEvent`.""" + orderBy: [AppEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventEdge -"""Information about a database index""" -type MetaIndex { - columns: [String!]! - fields: [MetaField!] - isPrimary: Boolean! - isUnique: Boolean! - name: String! -} + """ + 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 -"""Table inflection names""" -type MetaInflection { - allRows: String! - conditionType: String! - connection: String! - createInputType: String! - createPayloadType: String! - deletePayloadType: String! - edge: String! - filterType: String - orderByType: String! - patchType: String - tableType: String! - updatePayloadType: String + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""A many-to-many relation via junction table""" -type MetaManyToManyRelation { - fieldName: String - junctionLeftConstraint: MetaForeignKeyConstraint! - junctionLeftKeyAttributes: [MetaField!]! - junctionRightConstraint: MetaForeignKeyConstraint! - junctionRightKeyAttributes: [MetaField!]! - junctionTable: MetaRefTable! - leftKeyAttributes: [MetaField!]! - rightKeyAttributes: [MetaField!]! - rightTable: MetaRefTable! - type: String -} +"""All input for the create `AppEventType` mutation.""" +input CreateAppEventTypeInput { + """The `AppEventType` to be created by this mutation.""" + appEventType: AppEventTypeInput! -"""Information about a primary key constraint""" -type MetaPrimaryKeyConstraint { - fields: [MetaField!]! - name: String! + """ + 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 } -"""Table query/mutation names""" -type MetaQuery { - all: String - create: String - delete: String - one: String - update: String -} +"""The output of our create `AppEventType` mutation.""" +type CreateAppEventTypePayload { + """The `AppEventType` that was created by this mutation.""" + appEventType: AppEventType -"""Realtime metadata for a table with @realtime tag""" -type MetaRealtime { - """The generated subscription field name (e.g. onPostChanged)""" - subscriptionFieldName: String! -} + """An edge for our `AppEventType`. May be used by Relay 1.""" + appEventTypeEdge( + """The method to use when ordering `AppEventType`.""" + orderBy: [AppEventTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventTypeEdge -"""Reference to a related table""" -type MetaRefTable { - name: String! -} + """ + 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 -"""Table relations""" -type MetaRelations { - belongsTo: [MetaBelongsToRelation!]! - has: [MetaHasRelation!]! - hasMany: [MetaHasRelation!]! - hasOne: [MetaHasRelation!]! - manyToMany: [MetaManyToManyRelation!]! + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -""" -How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. -""" -type MetaScalarEncoding { - """For 'vector': declared length, else null.""" - dimensions: Int +"""All input for the create `AppLevelGrant` mutation.""" +input CreateAppLevelGrantInput { + """The `AppLevelGrant` to be created by this mutation.""" + appLevelGrant: AppLevelGrantInput! - """For 'ltree': values are dot-separated path strings.""" - dotPath: Boolean + """ + 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 +} - """For 'vector': element scalar (e.g. 'float').""" - elementType: String +"""The output of our create `AppLevelGrant` mutation.""" +type CreateAppLevelGrantPayload { + """The `AppLevelGrant` that was created by this mutation.""" + appLevelGrant: AppLevelGrant - """For 'geojson': Point/LineString/Polygon/…, else null.""" - geometrySubtype: String + """An edge for our `AppLevelGrant`. May be used by Relay 1.""" + appLevelGrantEdge( + """The method to use when ordering `AppLevelGrant`.""" + orderBy: [AppLevelGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelGrantEdge """ - Machine kind: bigint, datetime, date, time, interval, uuid, geojson, point, inet, ltree, vector, bytea, or composite. + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - kind: String! + clientMutationId: String - """For 'geojson': spatial reference id, else null.""" - srid: Int + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Root meta schema type""" -type MetaSchema { - tables: [MetaTable!]! +"""All input for the create `AppLevel` mutation.""" +input CreateAppLevelInput { + """The `AppLevel` to be created by this mutation.""" + appLevel: AppLevelInput! + + """ + 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 } -"""Provisioning scope metadata for a table""" -type MetaScope { - """SQL name of the entity table for entity scopes, else null""" - entityTable: String +"""The output of our create `AppLevel` mutation.""" +type CreateAppLevelPayload { + """The `AppLevel` that was created by this mutation.""" + appLevel: AppLevel + + """An edge for our `AppLevel`. May be used by Relay 1.""" + appLevelEdge( + """The method to use when ordering `AppLevel`.""" + orderBy: [AppLevelOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelEdge """ - Inflected scope key column (e.g. databaseId, orgId), null for global tiers + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. """ - keyColumn: String + clientMutationId: String """ - Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') + Our root query field type. Allows us to run any query from our mutation payload. """ - scope: String! + query: Query +} - """Provenance of the scope metadata (always 'smartTag')""" - source: String! +"""All input for the create `AppLevelRequirement` mutation.""" +input CreateAppLevelRequirementInput { + """The `AppLevelRequirement` to be created by this mutation.""" + appLevelRequirement: AppLevelRequirementInput! - """Coarse bucket: 'global', 'database', or 'entity'""" - tier: String! + """ + 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 } -"""Search metadata for a table""" -type MetaSearch { - """Active search algorithms on this table""" - algorithms: [String!]! +"""The output of our create `AppLevelRequirement` mutation.""" +type CreateAppLevelRequirementPayload { + """The `AppLevelRequirement` that was created by this mutation.""" + appLevelRequirement: AppLevelRequirement - """Searchable columns with their algorithm""" - columns: [MetaSearchColumn!]! + """An edge for our `AppLevelRequirement`. May be used by Relay 1.""" + appLevelRequirementEdge( + """The method to use when ordering `AppLevelRequirement`.""" + orderBy: [AppLevelRequirementOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelRequirementEdge - """Per-table search configuration""" - config: MetaSearchConfig + """ + 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 - """Whether unifiedSearch composite filter is available""" - hasUnifiedSearch: Boolean! -} + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} -"""A searchable column with its algorithm""" -type MetaSearchColumn { - """Search algorithm: tsvector, bm25, trgm, or vector""" - algorithm: String! +"""All input for the create `AppLimitCap` mutation.""" +input CreateAppLimitCapInput { + """The `AppLimitCap` to be created by this mutation.""" + appLimitCap: AppLimitCapInput! - """Column name (camelCase)""" - name: String! + """ + 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 } -"""Per-table search configuration from @searchConfig smart tag""" -type MetaSearchConfig { - """Exponential decay factor per day""" - boostRecencyDecay: Float +"""The output of our create `AppLimitCap` mutation.""" +type CreateAppLimitCapPayload { + """The `AppLimitCap` that was created by this mutation.""" + appLimitCap: AppLimitCap - """Field used for recency decay""" - boostRecencyField: String + """An edge for our `AppLimitCap`. May be used by Relay 1.""" + appLimitCapEdge( + """The method to use when ordering `AppLimitCap`.""" + orderBy: [AppLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCapEdge - """Whether recency boosting is enabled""" - boostRecent: Boolean! + """ + 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 - """JSON-encoded per-adapter score weights""" - weights: String + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -"""Storage metadata for a table""" -type MetaStorage { - """Whether this table is a storage buckets table""" - isBucketsTable: Boolean! +"""All input for the create `AppLimitCapsDefault` mutation.""" +input CreateAppLimitCapsDefaultInput { + """The `AppLimitCapsDefault` to be created by this mutation.""" + appLimitCapsDefault: AppLimitCapsDefaultInput! - """Whether this table is a storage files table""" - isFilesTable: Boolean! + """ + 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 } -"""Information about a database table""" -type MetaTable { - constraints: MetaConstraints! - fields: [MetaField!]! - foreignKeyConstraints: [MetaForeignKeyConstraint!]! - - """i18n metadata (null if no @i18n tag)""" - i18n: MetaI18n - indexes: [MetaIndex!]! - inflection: MetaInflection! - - """Final GraphQL output type name""" - name: String! - primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! - query: MetaQuery! +"""The output of our create `AppLimitCapsDefault` mutation.""" +type CreateAppLimitCapsDefaultPayload { + """The `AppLimitCapsDefault` that was created by this mutation.""" + appLimitCapsDefault: AppLimitCapsDefault - """Realtime metadata (null if no @realtime tag)""" - realtime: MetaRealtime - relations: MetaRelations! - schemaName: String! + """An edge for our `AppLimitCapsDefault`. May be used by Relay 1.""" + appLimitCapsDefaultEdge( + """The method to use when ordering `AppLimitCapsDefault`.""" + orderBy: [AppLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCapsDefaultEdge - """Provisioning scope metadata (null if no @scope tag)""" - scope: MetaScope + """ + 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 - """Search metadata (null if no search configured)""" - search: MetaSearch + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Storage metadata (null if not a storage table)""" - storage: MetaStorage +"""All input for the create `AppLimitCreditCode` mutation.""" +input CreateAppLimitCreditCodeInput { + """The `AppLimitCreditCode` to be created by this mutation.""" + appLimitCreditCode: AppLimitCreditCodeInput! - """PostgreSQL table name""" - tableName: String! - uniqueConstraints: [MetaUniqueConstraint!]! + """ + 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 } -"""Information about a PostgreSQL type""" -type MetaType { - """Scalar serialization contract (null for plain scalars)""" - encoding: MetaScalarEncoding - gqlType: String! - hasDefault: Boolean - isArray: Boolean! - isNotNull: Boolean - pgType: String! - subtype: String -} +"""All input for the create `AppLimitCreditCodeItem` mutation.""" +input CreateAppLimitCreditCodeItemInput { + """The `AppLimitCreditCodeItem` to be created by this mutation.""" + appLimitCreditCodeItem: AppLimitCreditCodeItemInput! -"""Information about a unique constraint""" -type MetaUniqueConstraint { - fields: [MetaField!]! - name: String! + """ + 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 root mutation type which contains root level fields which mutate data. -""" -type Mutation { - """Creates a single `AppLimit`.""" - createAppLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitInput! - ): CreateAppLimitPayload +"""The output of our create `AppLimitCreditCodeItem` mutation.""" +type CreateAppLimitCreditCodeItemPayload { + """The `AppLimitCreditCodeItem` that was created by this mutation.""" + appLimitCreditCodeItem: AppLimitCreditCodeItem - """Creates a single `AppLimitCap`.""" - createAppLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCapInput! - ): CreateAppLimitCapPayload + """An edge for our `AppLimitCreditCodeItem`. May be used by Relay 1.""" + appLimitCreditCodeItemEdge( + """The method to use when ordering `AppLimitCreditCodeItem`.""" + orderBy: [AppLimitCreditCodeItemOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditCodeItemEdge - """Creates a single `AppLimitCapsDefault`.""" - createAppLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCapsDefaultInput! - ): CreateAppLimitCapsDefaultPayload + """ + 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 - """Creates a single `AppLimitCredit`.""" - createAppLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCreditInput! - ): CreateAppLimitCreditPayload + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Creates a single `AppLimitCreditCode`.""" - createAppLimitCreditCode( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCreditCodeInput! - ): CreateAppLimitCreditCodePayload +"""The output of our create `AppLimitCreditCode` mutation.""" +type CreateAppLimitCreditCodePayload { + """The `AppLimitCreditCode` that was created by this mutation.""" + appLimitCreditCode: AppLimitCreditCode - """Creates a single `AppLimitCreditCodeItem`.""" - createAppLimitCreditCodeItem( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCreditCodeItemInput! - ): CreateAppLimitCreditCodeItemPayload + """An edge for our `AppLimitCreditCode`. May be used by Relay 1.""" + appLimitCreditCodeEdge( + """The method to use when ordering `AppLimitCreditCode`.""" + orderBy: [AppLimitCreditCodeOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditCodeEdge - """Creates a single `AppLimitCreditRedemption`.""" - createAppLimitCreditRedemption( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitCreditRedemptionInput! - ): CreateAppLimitCreditRedemptionPayload + """ + 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 - """Creates a single `AppLimitDefault`.""" - createAppLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitDefaultInput! - ): CreateAppLimitDefaultPayload + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} - """Creates a single `AppLimitEvent`.""" - createAppLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppLimitEventInput! - ): CreateAppLimitEventPayload +"""All input for the create `AppLimitCredit` mutation.""" +input CreateAppLimitCreditInput { + """The `AppLimitCredit` to be created by this mutation.""" + appLimitCredit: AppLimitCreditInput! + + """ + 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 output of our create `AppLimitCredit` mutation.""" +type CreateAppLimitCreditPayload { + """The `AppLimitCredit` that was created by this mutation.""" + appLimitCredit: AppLimitCredit + + """An edge for our `AppLimitCredit`. May be used by Relay 1.""" + appLimitCreditEdge( + """The method to use when ordering `AppLimitCredit`.""" + orderBy: [AppLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `AppLimitCreditRedemption` mutation.""" +input CreateAppLimitCreditRedemptionInput { + """The `AppLimitCreditRedemption` to be created by this mutation.""" + appLimitCreditRedemption: AppLimitCreditRedemptionInput! + + """ + 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 output of our create `AppLimitCreditRedemption` mutation.""" +type CreateAppLimitCreditRedemptionPayload { + """The `AppLimitCreditRedemption` that was created by this mutation.""" + appLimitCreditRedemption: AppLimitCreditRedemption + + """An edge for our `AppLimitCreditRedemption`. May be used by Relay 1.""" + appLimitCreditRedemptionEdge( + """The method to use when ordering `AppLimitCreditRedemption`.""" + orderBy: [AppLimitCreditRedemptionOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditRedemptionEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `AppLimitDefault` mutation.""" +input CreateAppLimitDefaultInput { + """The `AppLimitDefault` to be created by this mutation.""" + appLimitDefault: AppLimitDefaultInput! + + """ + 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 output of our create `AppLimitDefault` mutation.""" +type CreateAppLimitDefaultPayload { + """The `AppLimitDefault` that was created by this mutation.""" + appLimitDefault: AppLimitDefault + + """An edge for our `AppLimitDefault`. May be used by Relay 1.""" + appLimitDefaultEdge( + """The method to use when ordering `AppLimitDefault`.""" + orderBy: [AppLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitDefaultEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `AppLimitEvent` mutation.""" +input CreateAppLimitEventInput { + """The `AppLimitEvent` to be created by this mutation.""" + appLimitEvent: AppLimitEventInput! + + """ + 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 output of our create `AppLimitEvent` mutation.""" +type CreateAppLimitEventPayload { + """The `AppLimitEvent` that was created by this mutation.""" + appLimitEvent: AppLimitEvent + + """An edge for our `AppLimitEvent`. May be used by Relay 1.""" + appLimitEventEdge( + """The method to use when ordering `AppLimitEvent`.""" + orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEventEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `AppLimit` mutation.""" +input CreateAppLimitInput { + """The `AppLimit` to be created by this mutation.""" + appLimit: AppLimitInput! + + """ + 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 output of our create `AppLimit` mutation.""" +type CreateAppLimitPayload { + """The `AppLimit` that was created by this mutation.""" + appLimit: AppLimit + + """An edge for our `AppLimit`. May be used by Relay 1.""" + appLimitEdge( + """The method to use when ordering `AppLimit`.""" + orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `AppLimitWarning` mutation.""" +input CreateAppLimitWarningInput { + """The `AppLimitWarning` to be created by this mutation.""" + appLimitWarning: AppLimitWarningInput! + + """ + 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 output of our create `AppLimitWarning` mutation.""" +type CreateAppLimitWarningPayload { + """The `AppLimitWarning` that was created by this mutation.""" + appLimitWarning: AppLimitWarning + + """An edge for our `AppLimitWarning`. May be used by Relay 1.""" + appLimitWarningEdge( + """The method to use when ordering `AppLimitWarning`.""" + orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitWarningEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `BillingUsageSummary` mutation.""" +input CreateBillingUsageSummaryInput { + """The `BillingUsageSummary` to be created by this mutation.""" + billingUsageSummary: BillingUsageSummaryInput! + + """ + 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 output of our create `BillingUsageSummary` mutation.""" +type CreateBillingUsageSummaryPayload { + """The `BillingUsageSummary` that was created by this mutation.""" + billingUsageSummary: BillingUsageSummary + + """An edge for our `BillingUsageSummary`. May be used by Relay 1.""" + billingUsageSummaryEdge( + """The method to use when ordering `BillingUsageSummary`.""" + orderBy: [BillingUsageSummaryOrderBy!]! = [PRIMARY_KEY_ASC] + ): BillingUsageSummaryEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `Ledger` mutation.""" +input CreateLedgerInput { + """ + 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 `Ledger` to be created by this mutation.""" + ledger: LedgerInput! +} + +"""The output of our create `Ledger` mutation.""" +type CreateLedgerPayload { + """ + 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 `Ledger` that was created by this mutation.""" + ledger: Ledger + + """An edge for our `Ledger`. May be used by Relay 1.""" + ledgerEdge( + """The method to use when ordering `Ledger`.""" + orderBy: [LedgerOrderBy!]! = [PRIMARY_KEY_ASC] + ): LedgerEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `MeterCredit` mutation.""" +input CreateMeterCreditInput { + """ + 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 `MeterCredit` to be created by this mutation.""" + meterCredit: MeterCreditInput! +} + +"""The output of our create `MeterCredit` mutation.""" +type CreateMeterCreditPayload { + """ + 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 `MeterCredit` that was created by this mutation.""" + meterCredit: MeterCredit + + """An edge for our `MeterCredit`. May be used by Relay 1.""" + meterCreditEdge( + """The method to use when ordering `MeterCredit`.""" + orderBy: [MeterCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterCreditEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `MeterDefault` mutation.""" +input CreateMeterDefaultInput { + """ + 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 `MeterDefault` to be created by this mutation.""" + meterDefault: MeterDefaultInput! +} + +"""The output of our create `MeterDefault` mutation.""" +type CreateMeterDefaultPayload { + """ + 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 `MeterDefault` that was created by this mutation.""" + meterDefault: MeterDefault + + """An edge for our `MeterDefault`. May be used by Relay 1.""" + meterDefaultEdge( + """The method to use when ordering `MeterDefault`.""" + orderBy: [MeterDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `Meter` mutation.""" +input CreateMeterInput { + """ + 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 `Meter` to be created by this mutation.""" + meter: MeterInput! +} + +"""The output of our create `Meter` mutation.""" +type CreateMeterPayload { + """ + 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 `Meter` that was created by this mutation.""" + meter: Meter + + """An edge for our `Meter`. May be used by Relay 1.""" + meterEdge( + """The method to use when ordering `Meter`.""" + orderBy: [MeterOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `MeterSource` mutation.""" +input CreateMeterSourceInput { + """ + 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 `MeterSource` to be created by this mutation.""" + meterSource: MeterSourceInput! +} + +"""The output of our create `MeterSource` mutation.""" +type CreateMeterSourcePayload { + """ + 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 `MeterSource` that was created by this mutation.""" + meterSource: MeterSource + + """An edge for our `MeterSource`. May be used by Relay 1.""" + meterSourceEdge( + """The method to use when ordering `MeterSource`.""" + orderBy: [MeterSourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterSourceEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitAggregate` mutation.""" +input CreateOrgLimitAggregateInput { + """ + 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 `OrgLimitAggregate` to be created by this mutation.""" + orgLimitAggregate: OrgLimitAggregateInput! +} + +"""The output of our create `OrgLimitAggregate` mutation.""" +type CreateOrgLimitAggregatePayload { + """ + 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 `OrgLimitAggregate` that was created by this mutation.""" + orgLimitAggregate: OrgLimitAggregate + + """An edge for our `OrgLimitAggregate`. May be used by Relay 1.""" + orgLimitAggregateEdge( + """The method to use when ordering `OrgLimitAggregate`.""" + orderBy: [OrgLimitAggregateOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitAggregateEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitCap` mutation.""" +input CreateOrgLimitCapInput { + """ + 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 `OrgLimitCap` to be created by this mutation.""" + orgLimitCap: OrgLimitCapInput! +} + +"""The output of our create `OrgLimitCap` mutation.""" +type CreateOrgLimitCapPayload { + """ + 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 `OrgLimitCap` that was created by this mutation.""" + orgLimitCap: OrgLimitCap + + """An edge for our `OrgLimitCap`. May be used by Relay 1.""" + orgLimitCapEdge( + """The method to use when ordering `OrgLimitCap`.""" + orderBy: [OrgLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCapEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitCapsDefault` mutation.""" +input CreateOrgLimitCapsDefaultInput { + """ + 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 `OrgLimitCapsDefault` to be created by this mutation.""" + orgLimitCapsDefault: OrgLimitCapsDefaultInput! +} + +"""The output of our create `OrgLimitCapsDefault` mutation.""" +type CreateOrgLimitCapsDefaultPayload { + """ + 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 `OrgLimitCapsDefault` that was created by this mutation.""" + orgLimitCapsDefault: OrgLimitCapsDefault + + """An edge for our `OrgLimitCapsDefault`. May be used by Relay 1.""" + orgLimitCapsDefaultEdge( + """The method to use when ordering `OrgLimitCapsDefault`.""" + orderBy: [OrgLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCapsDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitCredit` mutation.""" +input CreateOrgLimitCreditInput { + """ + 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 `OrgLimitCredit` to be created by this mutation.""" + orgLimitCredit: OrgLimitCreditInput! +} + +"""The output of our create `OrgLimitCredit` mutation.""" +type CreateOrgLimitCreditPayload { + """ + 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 `OrgLimitCredit` that was created by this mutation.""" + orgLimitCredit: OrgLimitCredit + + """An edge for our `OrgLimitCredit`. May be used by Relay 1.""" + orgLimitCreditEdge( + """The method to use when ordering `OrgLimitCredit`.""" + orderBy: [OrgLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCreditEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitDefault` mutation.""" +input CreateOrgLimitDefaultInput { + """ + 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 `OrgLimitDefault` to be created by this mutation.""" + orgLimitDefault: OrgLimitDefaultInput! +} + +"""The output of our create `OrgLimitDefault` mutation.""" +type CreateOrgLimitDefaultPayload { + """ + 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 `OrgLimitDefault` that was created by this mutation.""" + orgLimitDefault: OrgLimitDefault + + """An edge for our `OrgLimitDefault`. May be used by Relay 1.""" + orgLimitDefaultEdge( + """The method to use when ordering `OrgLimitDefault`.""" + orderBy: [OrgLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitEvent` mutation.""" +input CreateOrgLimitEventInput { + """ + 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 `OrgLimitEvent` to be created by this mutation.""" + orgLimitEvent: OrgLimitEventInput! +} + +"""The output of our create `OrgLimitEvent` mutation.""" +type CreateOrgLimitEventPayload { + """ + 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 `OrgLimitEvent` that was created by this mutation.""" + orgLimitEvent: OrgLimitEvent + + """An edge for our `OrgLimitEvent`. May be used by Relay 1.""" + orgLimitEventEdge( + """The method to use when ordering `OrgLimitEvent`.""" + orderBy: [OrgLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitEventEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimit` mutation.""" +input CreateOrgLimitInput { + """ + 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 `OrgLimit` to be created by this mutation.""" + orgLimit: OrgLimitInput! +} + +"""The output of our create `OrgLimit` mutation.""" +type CreateOrgLimitPayload { + """ + 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 `OrgLimit` that was created by this mutation.""" + orgLimit: OrgLimit + + """An edge for our `OrgLimit`. May be used by Relay 1.""" + orgLimitEdge( + """The method to use when ordering `OrgLimit`.""" + orderBy: [OrgLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `OrgLimitWarning` mutation.""" +input CreateOrgLimitWarningInput { + """ + 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 `OrgLimitWarning` to be created by this mutation.""" + orgLimitWarning: OrgLimitWarningInput! +} + +"""The output of our create `OrgLimitWarning` mutation.""" +type CreateOrgLimitWarningPayload { + """ + 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 `OrgLimitWarning` that was created by this mutation.""" + orgLimitWarning: OrgLimitWarning + + """An edge for our `OrgLimitWarning`. May be used by Relay 1.""" + orgLimitWarningEdge( + """The method to use when ordering `OrgLimitWarning`.""" + orderBy: [OrgLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitWarningEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlanCap` mutation.""" +input CreatePlanCapInput { + """ + 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 `PlanCap` to be created by this mutation.""" + planCap: PlanCapInput! +} + +"""The output of our create `PlanCap` mutation.""" +type CreatePlanCapPayload { + """ + 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 `PlanCap` that was created by this mutation.""" + planCap: PlanCap + + """An edge for our `PlanCap`. May be used by Relay 1.""" + planCapEdge( + """The method to use when ordering `PlanCap`.""" + orderBy: [PlanCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanCapEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `Plan` mutation.""" +input CreatePlanInput { + """ + 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 `Plan` to be created by this mutation.""" + plan: PlanInput! +} + +"""All input for the create `PlanLimit` mutation.""" +input CreatePlanLimitInput { + """ + 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 `PlanLimit` to be created by this mutation.""" + planLimit: PlanLimitInput! +} + +"""The output of our create `PlanLimit` mutation.""" +type CreatePlanLimitPayload { + """ + 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 `PlanLimit` that was created by this mutation.""" + planLimit: PlanLimit + + """An edge for our `PlanLimit`. May be used by Relay 1.""" + planLimitEdge( + """The method to use when ordering `PlanLimit`.""" + orderBy: [PlanLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlanMeterLimit` mutation.""" +input CreatePlanMeterLimitInput { + """ + 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 `PlanMeterLimit` to be created by this mutation.""" + planMeterLimit: PlanMeterLimitInput! +} + +"""The output of our create `PlanMeterLimit` mutation.""" +type CreatePlanMeterLimitPayload { + """ + 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 `PlanMeterLimit` that was created by this mutation.""" + planMeterLimit: PlanMeterLimit + + """An edge for our `PlanMeterLimit`. May be used by Relay 1.""" + planMeterLimitEdge( + """The method to use when ordering `PlanMeterLimit`.""" + orderBy: [PlanMeterLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanMeterLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlanOverride` mutation.""" +input CreatePlanOverrideInput { + """ + 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 `PlanOverride` to be created by this mutation.""" + planOverride: PlanOverrideInput! +} + +"""The output of our create `PlanOverride` mutation.""" +type CreatePlanOverridePayload { + """ + 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 `PlanOverride` that was created by this mutation.""" + planOverride: PlanOverride + + """An edge for our `PlanOverride`. May be used by Relay 1.""" + planOverrideEdge( + """The method to use when ordering `PlanOverride`.""" + orderBy: [PlanOverrideOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanOverrideEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""The output of our create `Plan` mutation.""" +type CreatePlanPayload { + """ + 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 `Plan` that was created by this mutation.""" + plan: Plan + + """An edge for our `Plan`. May be used by Relay 1.""" + planEdge( + """The method to use when ordering `Plan`.""" + orderBy: [PlanOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlanPricing` mutation.""" +input CreatePlanPricingInput { + """ + 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 `PlanPricing` to be created by this mutation.""" + planPricing: PlanPricingInput! +} + +"""The output of our create `PlanPricing` mutation.""" +type CreatePlanPricingPayload { + """ + 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 `PlanPricing` that was created by this mutation.""" + planPricing: PlanPricing + + """An edge for our `PlanPricing`. May be used by Relay 1.""" + planPricingEdge( + """The method to use when ordering `PlanPricing`.""" + orderBy: [PlanPricingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanPricingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the create `PlanSubscription` mutation.""" +input CreatePlanSubscriptionInput { + """ + 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 `PlanSubscription` to be created by this mutation.""" + planSubscription: PlanSubscriptionInput! +} + +"""The output of our create `PlanSubscription` mutation.""" +type CreatePlanSubscriptionPayload { + """ + 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 `PlanSubscription` that was created by this mutation.""" + planSubscription: PlanSubscription + + """An edge for our `PlanSubscription`. May be used by Relay 1.""" + planSubscriptionEdge( + """The method to use when ordering `PlanSubscription`.""" + orderBy: [PlanSubscriptionOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanSubscriptionEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""A location in a connection that can be used for resuming pagination.""" +scalar Cursor + +""" +A point in time as described by the [ISO +8601](https://en.wikipedia.org/wiki/ISO_8601) and, if it has a timezone, [RFC +3339](https://datatracker.ietf.org/doc/html/rfc3339) standards. Input values +that do not conform to both ISO 8601 and RFC 3339 may be coerced, which may lead +to unexpected results. +""" +scalar Datetime + +""" +A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ +""" +input DatetimeFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Datetime + + """Equal to the specified value.""" + equalTo: Datetime + + """Greater than the specified value.""" + greaterThan: Datetime + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Datetime + + """Included in the specified list.""" + in: [Datetime!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: Datetime + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Datetime + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Datetime + + """Not equal to the specified value.""" + notEqualTo: Datetime + + """Not included in the specified list.""" + notIn: [Datetime!] +} + +"""All input for the `deleteAppAchievementReward` mutation.""" +input DeleteAppAchievementRewardInput { + """ + 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 `AppAchievementReward` mutation.""" +type DeleteAppAchievementRewardPayload { + """The `AppAchievementReward` that was deleted by this mutation.""" + appAchievementReward: AppAchievementReward + + """An edge for our `AppAchievementReward`. May be used by Relay 1.""" + appAchievementRewardEdge( + """The method to use when ordering `AppAchievementReward`.""" + orderBy: [AppAchievementRewardOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppAchievementRewardEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppEventAggregate` mutation.""" +input DeleteAppEventAggregateInput { + """ + 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 `AppEventAggregate` mutation.""" +type DeleteAppEventAggregatePayload { + """The `AppEventAggregate` that was deleted by this mutation.""" + appEventAggregate: AppEventAggregate + + """An edge for our `AppEventAggregate`. May be used by Relay 1.""" + appEventAggregateEdge( + """The method to use when ordering `AppEventAggregate`.""" + orderBy: [AppEventAggregateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventAggregateEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppEvent` mutation.""" +input DeleteAppEventInput { + """ + 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 + createdAt: Datetime! + + """Unique identifier for each event (uuidv7 provides temporal ordering)""" + id: UUID! +} + +"""The output of our delete `AppEvent` mutation.""" +type DeleteAppEventPayload { + """The `AppEvent` that was deleted by this mutation.""" + appEvent: AppEvent + + """An edge for our `AppEvent`. May be used by Relay 1.""" + appEventEdge( + """The method to use when ordering `AppEvent`.""" + orderBy: [AppEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppEventType` mutation.""" +input DeleteAppEventTypeInput { + """ + 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 `AppEventType` mutation.""" +type DeleteAppEventTypePayload { + """The `AppEventType` that was deleted by this mutation.""" + appEventType: AppEventType + + """An edge for our `AppEventType`. May be used by Relay 1.""" + appEventTypeEdge( + """The method to use when ordering `AppEventType`.""" + orderBy: [AppEventTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventTypeEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLevelGrant` mutation.""" +input DeleteAppLevelGrantInput { + """ + 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 `AppLevelGrant` mutation.""" +type DeleteAppLevelGrantPayload { + """The `AppLevelGrant` that was deleted by this mutation.""" + appLevelGrant: AppLevelGrant + + """An edge for our `AppLevelGrant`. May be used by Relay 1.""" + appLevelGrantEdge( + """The method to use when ordering `AppLevelGrant`.""" + orderBy: [AppLevelGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLevel` mutation.""" +input DeleteAppLevelInput { + """ + 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 { + """The `AppLevel` that was deleted by this mutation.""" + appLevel: AppLevel + + """An edge for our `AppLevel`. May be used by Relay 1.""" + appLevelEdge( + """The method to use when ordering `AppLevel`.""" + orderBy: [AppLevelOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLevelRequirement` mutation.""" +input DeleteAppLevelRequirementInput { + """ + 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 `AppLevelRequirement` mutation.""" +type DeleteAppLevelRequirementPayload { + """The `AppLevelRequirement` that was deleted by this mutation.""" + appLevelRequirement: AppLevelRequirement + + """An edge for our `AppLevelRequirement`. May be used by Relay 1.""" + appLevelRequirementEdge( + """The method to use when ordering `AppLevelRequirement`.""" + orderBy: [AppLevelRequirementOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelRequirementEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitCap` mutation.""" +input DeleteAppLimitCapInput { + """ + 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 `AppLimitCap` mutation.""" +type DeleteAppLimitCapPayload { + """The `AppLimitCap` that was deleted by this mutation.""" + appLimitCap: AppLimitCap + + """An edge for our `AppLimitCap`. May be used by Relay 1.""" + appLimitCapEdge( + """The method to use when ordering `AppLimitCap`.""" + orderBy: [AppLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCapEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitCapsDefault` mutation.""" +input DeleteAppLimitCapsDefaultInput { + """ + 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 `AppLimitCapsDefault` mutation.""" +type DeleteAppLimitCapsDefaultPayload { + """The `AppLimitCapsDefault` that was deleted by this mutation.""" + appLimitCapsDefault: AppLimitCapsDefault + + """An edge for our `AppLimitCapsDefault`. May be used by Relay 1.""" + appLimitCapsDefaultEdge( + """The method to use when ordering `AppLimitCapsDefault`.""" + orderBy: [AppLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCapsDefaultEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitCreditCode` mutation.""" +input DeleteAppLimitCreditCodeInput { + """ + 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! +} + +"""All input for the `deleteAppLimitCreditCodeItem` mutation.""" +input DeleteAppLimitCreditCodeItemInput { + """ + 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 `AppLimitCreditCodeItem` mutation.""" +type DeleteAppLimitCreditCodeItemPayload { + """The `AppLimitCreditCodeItem` that was deleted by this mutation.""" + appLimitCreditCodeItem: AppLimitCreditCodeItem + + """An edge for our `AppLimitCreditCodeItem`. May be used by Relay 1.""" + appLimitCreditCodeItemEdge( + """The method to use when ordering `AppLimitCreditCodeItem`.""" + orderBy: [AppLimitCreditCodeItemOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditCodeItemEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""The output of our delete `AppLimitCreditCode` mutation.""" +type DeleteAppLimitCreditCodePayload { + """The `AppLimitCreditCode` that was deleted by this mutation.""" + appLimitCreditCode: AppLimitCreditCode + + """An edge for our `AppLimitCreditCode`. May be used by Relay 1.""" + appLimitCreditCodeEdge( + """The method to use when ordering `AppLimitCreditCode`.""" + orderBy: [AppLimitCreditCodeOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditCodeEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitCredit` mutation.""" +input DeleteAppLimitCreditInput { + """ + 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 `AppLimitCredit` mutation.""" +type DeleteAppLimitCreditPayload { + """The `AppLimitCredit` that was deleted by this mutation.""" + appLimitCredit: AppLimitCredit + + """An edge for our `AppLimitCredit`. May be used by Relay 1.""" + appLimitCreditEdge( + """The method to use when ordering `AppLimitCredit`.""" + orderBy: [AppLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitCreditRedemption` mutation.""" +input DeleteAppLimitCreditRedemptionInput { + """ + 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 `AppLimitCreditRedemption` mutation.""" +type DeleteAppLimitCreditRedemptionPayload { + """The `AppLimitCreditRedemption` that was deleted by this mutation.""" + appLimitCreditRedemption: AppLimitCreditRedemption + + """An edge for our `AppLimitCreditRedemption`. May be used by Relay 1.""" + appLimitCreditRedemptionEdge( + """The method to use when ordering `AppLimitCreditRedemption`.""" + orderBy: [AppLimitCreditRedemptionOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitCreditRedemptionEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitDefault` mutation.""" +input DeleteAppLimitDefaultInput { + """ + 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 `AppLimitDefault` mutation.""" +type DeleteAppLimitDefaultPayload { + """The `AppLimitDefault` that was deleted by this mutation.""" + appLimitDefault: AppLimitDefault + + """An edge for our `AppLimitDefault`. May be used by Relay 1.""" + appLimitDefaultEdge( + """The method to use when ordering `AppLimitDefault`.""" + orderBy: [AppLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitDefaultEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitEvent` mutation.""" +input DeleteAppLimitEventInput { + """ + 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 + createdAt: Datetime! + + """Unique identifier for each limit event""" + id: UUID! +} + +"""The output of our delete `AppLimitEvent` mutation.""" +type DeleteAppLimitEventPayload { + """The `AppLimitEvent` that was deleted by this mutation.""" + appLimitEvent: AppLimitEvent + + """An edge for our `AppLimitEvent`. May be used by Relay 1.""" + appLimitEventEdge( + """The method to use when ordering `AppLimitEvent`.""" + orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEventEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimit` mutation.""" +input DeleteAppLimitInput { + """ + 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 `AppLimit` mutation.""" +type DeleteAppLimitPayload { + """The `AppLimit` that was deleted by this mutation.""" + appLimit: AppLimit + + """An edge for our `AppLimit`. May be used by Relay 1.""" + appLimitEdge( + """The method to use when ordering `AppLimit`.""" + orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteAppLimitWarning` mutation.""" +input DeleteAppLimitWarningInput { + """ + 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 `AppLimitWarning` mutation.""" +type DeleteAppLimitWarningPayload { + """The `AppLimitWarning` that was deleted by this mutation.""" + appLimitWarning: AppLimitWarning + + """An edge for our `AppLimitWarning`. May be used by Relay 1.""" + appLimitWarningEdge( + """The method to use when ordering `AppLimitWarning`.""" + orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitWarningEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteBillingUsageSummary` mutation.""" +input DeleteBillingUsageSummaryInput { + """ + 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 `BillingUsageSummary` mutation.""" +type DeleteBillingUsageSummaryPayload { + """The `BillingUsageSummary` that was deleted by this mutation.""" + billingUsageSummary: BillingUsageSummary + + """An edge for our `BillingUsageSummary`. May be used by Relay 1.""" + billingUsageSummaryEdge( + """The method to use when ordering `BillingUsageSummary`.""" + orderBy: [BillingUsageSummaryOrderBy!]! = [PRIMARY_KEY_ASC] + ): BillingUsageSummaryEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteLedger` mutation.""" +input DeleteLedgerInput { + """ + 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 + createdAt: Datetime! + + """Unique identifier for each ledger entry""" + id: UUID! +} + +"""The output of our delete `Ledger` mutation.""" +type DeleteLedgerPayload { + """ + 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 `Ledger` that was deleted by this mutation.""" + ledger: Ledger + + """An edge for our `Ledger`. May be used by Relay 1.""" + ledgerEdge( + """The method to use when ordering `Ledger`.""" + orderBy: [LedgerOrderBy!]! = [PRIMARY_KEY_ASC] + ): LedgerEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteMeterCredit` mutation.""" +input DeleteMeterCreditInput { + """ + 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 `MeterCredit` mutation.""" +type DeleteMeterCreditPayload { + """ + 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 `MeterCredit` that was deleted by this mutation.""" + meterCredit: MeterCredit + + """An edge for our `MeterCredit`. May be used by Relay 1.""" + meterCreditEdge( + """The method to use when ordering `MeterCredit`.""" + orderBy: [MeterCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterCreditEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteMeterDefault` mutation.""" +input DeleteMeterDefaultInput { + """ + 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 `MeterDefault` mutation.""" +type DeleteMeterDefaultPayload { + """ + 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 `MeterDefault` that was deleted by this mutation.""" + meterDefault: MeterDefault + + """An edge for our `MeterDefault`. May be used by Relay 1.""" + meterDefaultEdge( + """The method to use when ordering `MeterDefault`.""" + orderBy: [MeterDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteMeter` mutation.""" +input DeleteMeterInput { + """ + 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 `Meter` mutation.""" +type DeleteMeterPayload { + """ + 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 `Meter` that was deleted by this mutation.""" + meter: Meter + + """An edge for our `Meter`. May be used by Relay 1.""" + meterEdge( + """The method to use when ordering `Meter`.""" + orderBy: [MeterOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteMeterSource` mutation.""" +input DeleteMeterSourceInput { + """ + 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 `MeterSource` mutation.""" +type DeleteMeterSourcePayload { + """ + 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 `MeterSource` that was deleted by this mutation.""" + meterSource: MeterSource + + """An edge for our `MeterSource`. May be used by Relay 1.""" + meterSourceEdge( + """The method to use when ordering `MeterSource`.""" + orderBy: [MeterSourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterSourceEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitAggregate` mutation.""" +input DeleteOrgLimitAggregateInput { + """ + 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 `OrgLimitAggregate` mutation.""" +type DeleteOrgLimitAggregatePayload { + """ + 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 `OrgLimitAggregate` that was deleted by this mutation.""" + orgLimitAggregate: OrgLimitAggregate + + """An edge for our `OrgLimitAggregate`. May be used by Relay 1.""" + orgLimitAggregateEdge( + """The method to use when ordering `OrgLimitAggregate`.""" + orderBy: [OrgLimitAggregateOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitAggregateEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitCap` mutation.""" +input DeleteOrgLimitCapInput { + """ + 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 `OrgLimitCap` mutation.""" +type DeleteOrgLimitCapPayload { + """ + 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 `OrgLimitCap` that was deleted by this mutation.""" + orgLimitCap: OrgLimitCap + + """An edge for our `OrgLimitCap`. May be used by Relay 1.""" + orgLimitCapEdge( + """The method to use when ordering `OrgLimitCap`.""" + orderBy: [OrgLimitCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCapEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitCapsDefault` mutation.""" +input DeleteOrgLimitCapsDefaultInput { + """ + 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 `OrgLimitCapsDefault` mutation.""" +type DeleteOrgLimitCapsDefaultPayload { + """ + 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 `OrgLimitCapsDefault` that was deleted by this mutation.""" + orgLimitCapsDefault: OrgLimitCapsDefault + + """An edge for our `OrgLimitCapsDefault`. May be used by Relay 1.""" + orgLimitCapsDefaultEdge( + """The method to use when ordering `OrgLimitCapsDefault`.""" + orderBy: [OrgLimitCapsDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCapsDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitCredit` mutation.""" +input DeleteOrgLimitCreditInput { + """ + 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 `OrgLimitCredit` mutation.""" +type DeleteOrgLimitCreditPayload { + """ + 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 `OrgLimitCredit` that was deleted by this mutation.""" + orgLimitCredit: OrgLimitCredit + + """An edge for our `OrgLimitCredit`. May be used by Relay 1.""" + orgLimitCreditEdge( + """The method to use when ordering `OrgLimitCredit`.""" + orderBy: [OrgLimitCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitCreditEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitDefault` mutation.""" +input DeleteOrgLimitDefaultInput { + """ + 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 `OrgLimitDefault` mutation.""" +type DeleteOrgLimitDefaultPayload { + """ + 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 `OrgLimitDefault` that was deleted by this mutation.""" + orgLimitDefault: OrgLimitDefault + + """An edge for our `OrgLimitDefault`. May be used by Relay 1.""" + orgLimitDefaultEdge( + """The method to use when ordering `OrgLimitDefault`.""" + orderBy: [OrgLimitDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitDefaultEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitEvent` mutation.""" +input DeleteOrgLimitEventInput { + """ + 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 + createdAt: Datetime! + + """Unique identifier for each limit event""" + id: UUID! +} + +"""The output of our delete `OrgLimitEvent` mutation.""" +type DeleteOrgLimitEventPayload { + """ + 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 `OrgLimitEvent` that was deleted by this mutation.""" + orgLimitEvent: OrgLimitEvent + + """An edge for our `OrgLimitEvent`. May be used by Relay 1.""" + orgLimitEventEdge( + """The method to use when ordering `OrgLimitEvent`.""" + orderBy: [OrgLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitEventEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimit` mutation.""" +input DeleteOrgLimitInput { + """ + 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 `OrgLimit` mutation.""" +type DeleteOrgLimitPayload { + """ + 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 `OrgLimit` that was deleted by this mutation.""" + orgLimit: OrgLimit + + """An edge for our `OrgLimit`. May be used by Relay 1.""" + orgLimitEdge( + """The method to use when ordering `OrgLimit`.""" + orderBy: [OrgLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deleteOrgLimitWarning` mutation.""" +input DeleteOrgLimitWarningInput { + """ + 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 `OrgLimitWarning` mutation.""" +type DeleteOrgLimitWarningPayload { + """ + 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 `OrgLimitWarning` that was deleted by this mutation.""" + orgLimitWarning: OrgLimitWarning + + """An edge for our `OrgLimitWarning`. May be used by Relay 1.""" + orgLimitWarningEdge( + """The method to use when ordering `OrgLimitWarning`.""" + orderBy: [OrgLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgLimitWarningEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlanCap` mutation.""" +input DeletePlanCapInput { + """ + 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 `PlanCap` mutation.""" +type DeletePlanCapPayload { + """ + 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 `PlanCap` that was deleted by this mutation.""" + planCap: PlanCap + + """An edge for our `PlanCap`. May be used by Relay 1.""" + planCapEdge( + """The method to use when ordering `PlanCap`.""" + orderBy: [PlanCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanCapEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlan` mutation.""" +input DeletePlanInput { + """ + 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! +} + +"""All input for the `deletePlanLimit` mutation.""" +input DeletePlanLimitInput { + """ + 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 `PlanLimit` mutation.""" +type DeletePlanLimitPayload { + """ + 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 `PlanLimit` that was deleted by this mutation.""" + planLimit: PlanLimit + + """An edge for our `PlanLimit`. May be used by Relay 1.""" + planLimitEdge( + """The method to use when ordering `PlanLimit`.""" + orderBy: [PlanLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlanMeterLimit` mutation.""" +input DeletePlanMeterLimitInput { + """ + 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 `PlanMeterLimit` mutation.""" +type DeletePlanMeterLimitPayload { + """ + 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 `PlanMeterLimit` that was deleted by this mutation.""" + planMeterLimit: PlanMeterLimit + + """An edge for our `PlanMeterLimit`. May be used by Relay 1.""" + planMeterLimitEdge( + """The method to use when ordering `PlanMeterLimit`.""" + orderBy: [PlanMeterLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanMeterLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlanOverride` mutation.""" +input DeletePlanOverrideInput { + """ + 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 `PlanOverride` mutation.""" +type DeletePlanOverridePayload { + """ + 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 `PlanOverride` that was deleted by this mutation.""" + planOverride: PlanOverride + + """An edge for our `PlanOverride`. May be used by Relay 1.""" + planOverrideEdge( + """The method to use when ordering `PlanOverride`.""" + orderBy: [PlanOverrideOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanOverrideEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""The output of our delete `Plan` mutation.""" +type DeletePlanPayload { + """ + 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 `Plan` that was deleted by this mutation.""" + plan: Plan + + """An edge for our `Plan`. May be used by Relay 1.""" + planEdge( + """The method to use when ordering `Plan`.""" + orderBy: [PlanOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlanPricing` mutation.""" +input DeletePlanPricingInput { + """ + 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 `PlanPricing` mutation.""" +type DeletePlanPricingPayload { + """ + 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 `PlanPricing` that was deleted by this mutation.""" + planPricing: PlanPricing + + """An edge for our `PlanPricing`. May be used by Relay 1.""" + planPricingEdge( + """The method to use when ordering `PlanPricing`.""" + orderBy: [PlanPricingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanPricingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `deletePlanSubscription` mutation.""" +input DeletePlanSubscriptionInput { + """ + 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 `PlanSubscription` mutation.""" +type DeletePlanSubscriptionPayload { + """ + 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 `PlanSubscription` that was deleted by this mutation.""" + planSubscription: PlanSubscription + + """An edge for our `PlanSubscription`. May be used by Relay 1.""" + planSubscriptionEdge( + """The method to use when ordering `PlanSubscription`.""" + orderBy: [PlanSubscriptionOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanSubscriptionEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `grantAchievement` mutation.""" +input GrantAchievementInput { + actorId: UUID + + """ + 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 + levelName: String +} + +"""The output of our `grantAchievement` mutation.""" +type GrantAchievementPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +""" +A filter to be used against Int fields. All fields are combined with a logical ‘and.’ +""" +input IntFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: Int + + """Equal to the specified value.""" + equalTo: Int + + """Greater than the specified value.""" + greaterThan: Int + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: Int + + """Included in the specified list.""" + in: [Int!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: Int + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: Int + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: Int + + """Not equal to the specified value.""" + notEqualTo: Int + + """Not included in the specified list.""" + notIn: [Int!] +} + +""" +An interval of time that has passed where the smallest distinct unit is a second. +""" +type Interval { + """A quantity of days.""" + days: Int + + """A quantity of hours.""" + hours: Int + + """A quantity of minutes.""" + minutes: Int + + """A quantity of months.""" + months: Int + + """ + A quantity of seconds. This is the only non-integer field, as all the other + fields will dump their overflow into a smaller unit of time. Intervals don’t + have a smaller unit than seconds. + """ + seconds: Float + + """A quantity of years.""" + years: Int +} + +""" +A filter to be used against Interval fields. All fields are combined with a logical ‘and.’ +""" +input IntervalFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: IntervalInput + + """Equal to the specified value.""" + equalTo: IntervalInput + + """Greater than the specified value.""" + greaterThan: IntervalInput + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: IntervalInput + + """Included in the specified list.""" + in: [IntervalInput!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: IntervalInput + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: IntervalInput + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: IntervalInput + + """Not equal to the specified value.""" + notEqualTo: IntervalInput + + """Not included in the specified list.""" + notIn: [IntervalInput!] +} + +""" +An interval of time that has passed where the smallest distinct unit is a second. +""" +input IntervalInput { + """A quantity of days.""" + days: Int + + """A quantity of hours.""" + hours: Int + + """A quantity of minutes.""" + minutes: Int + + """A quantity of months.""" + months: Int + + """ + A quantity of seconds. This is the only non-integer field, as all the other + fields will dump their overflow into a smaller unit of time. Intervals don’t + have a smaller unit than seconds. + """ + seconds: Float + + """A quantity of years.""" + years: Int +} + +""" +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 JSON fields. All fields are combined with a logical ‘and.’ +""" +input JSONFilter { + """Contained by the specified JSON.""" + containedBy: JSON + + """Contains the specified JSON.""" + contains: JSON + + """Contains all of the specified keys.""" + containsAllKeys: [String!] + + """Contains any of the specified keys.""" + containsAnyKeys: [String!] + + """Contains the specified key.""" + containsKey: String + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: JSON + + """Equal to the specified value.""" + equalTo: JSON + + """Greater than the specified value.""" + greaterThan: JSON + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: JSON + + """Included in the specified list.""" + in: [JSON!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: JSON + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: JSON + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: JSON + + """Not equal to the specified value.""" + notEqualTo: JSON + + """Not included in the specified list.""" + notIn: [JSON!] +} + +""" +Append-only event log for all billing events (usage, grants, adjustments) +""" +type Ledger { + createdAt: Datetime! + + """Change amount (positive = grant/credit, negative = consumption/debit)""" + delta: BigInt! + + """The entity this ledger entry belongs to""" + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """ + Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment + """ + entryType: String! + + """Unique identifier for each ledger entry""" + id: UUID! + + """Classification: usage, grant, adjustment, refund""" + ledgerClass: String! + + """Additional context (reason, source, Stripe receipt, etc.)""" + metadata: JSON + + """Which meter this entry is for""" + meterSlug: String! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Running total of usage after this entry""" + usageAfter: BigInt! +} + +"""A connection to a list of `Ledger` values.""" +type LedgerConnection { + """ + A list of edges which contains the `Ledger` and cursor to aid in pagination. + """ + edges: [LedgerEdge]! + + """A list of `Ledger` objects.""" + nodes: [Ledger]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Ledger` you could get from the connection.""" + totalCount: Int! +} + +"""A `Ledger` edge in the connection.""" +type LedgerEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Ledger` at the end of the edge.""" + node: Ledger +} + +""" +A filter to be used against `Ledger` object types. All fields are combined with a logical ‘and.’ +""" +input LedgerFilter { + """Checks for all expressions in this list.""" + and: [LedgerFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `delta` field.""" + delta: BigIntFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `entryType` field.""" + entryType: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `ledgerClass` field.""" + ledgerClass: StringFilter + + """Filter by the object’s `metadata` field.""" + metadata: JSONFilter + + """Filter by the object’s `meterSlug` field.""" + meterSlug: StringFilter + + """Negates the expression.""" + not: LedgerFilter + + """Checks for any expressions in this list.""" + or: [LedgerFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `usageAfter` field.""" + usageAfter: BigIntFilter +} + +"""An input for mutations affecting `Ledger`""" +input LedgerInput { + createdAt: Datetime + + """Change amount (positive = grant/credit, negative = consumption/debit)""" + delta: BigInt! + + """The entity this ledger entry belongs to""" + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """ + Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment + """ + entryType: String + + """Unique identifier for each ledger entry""" + id: UUID + + """Classification: usage, grant, adjustment, refund""" + ledgerClass: String + + """Additional context (reason, source, Stripe receipt, etc.)""" + metadata: JSON + + """Which meter this entry is for""" + meterSlug: String! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Running total of usage after this entry""" + usageAfter: BigInt! +} + +"""Methods to use when ordering `Ledger`.""" +enum LedgerOrderBy { + CREATED_AT_ASC + CREATED_AT_DESC + DELTA_ASC + DELTA_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ENTRY_TYPE_ASC + ENTRY_TYPE_DESC + ID_ASC + ID_DESC + LEDGER_CLASS_ASC + LEDGER_CLASS_DESC + METADATA_ASC + METADATA_DESC + METER_SLUG_ASC + METER_SLUG_DESC + NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + USAGE_AFTER_ASC + USAGE_AFTER_DESC +} + +""" +Represents an update to a `Ledger`. Fields that are set will be updated. +""" +input LedgerPatch { + createdAt: Datetime + + """Change amount (positive = grant/credit, negative = consumption/debit)""" + delta: BigInt + + """The entity this ledger entry belongs to""" + entityId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """ + Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment + """ + entryType: String + + """Unique identifier for each ledger entry""" + id: UUID + + """Classification: usage, grant, adjustment, refund""" + ledgerClass: String + + """Additional context (reason, source, Stripe receipt, etc.)""" + metadata: JSON + + """Which meter this entry is for""" + meterSlug: String + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Running total of usage after this entry""" + usageAfter: BigInt +} + +"""A belongs-to (forward FK) relation""" +type MetaBelongsToRelation { + fieldName: String + isUnique: Boolean! + keys: [MetaField!]! + references: MetaRefTable! + type: String +} + +"""Table constraints""" +type MetaConstraints { + foreignKey: [MetaForeignKeyConstraint!]! + primaryKey: MetaPrimaryKeyConstraint + unique: [MetaUniqueConstraint!]! +} + +"""Information about a PostgreSQL enum type""" +type MetaEnum { + """The PostgreSQL enum type name""" + name: String! + + """Allowed values for this enum""" + values: [String!]! +} + +"""Information about a table field/column""" +type MetaField { + """PostgreSQL column name""" + columnName: String! + description: String + + """Enum metadata if this field has an enum type""" + enumValues: MetaEnum + hasDefault: Boolean! + isForeignKey: Boolean! + isNotNull: Boolean! + isPrimaryKey: Boolean! + + """Final GraphQL field name""" + name: String! + type: MetaType! +} + +"""Information about a foreign key constraint""" +type MetaForeignKeyConstraint { + fields: [MetaField!]! + name: String! + refFields: [MetaField!] + refTable: MetaRefTable + referencedFields: [String!]! + referencedTable: String! +} + +"""A has-one or has-many (reverse FK) relation""" +type MetaHasRelation { + fieldName: String + isUnique: Boolean! + keys: [MetaField!]! + referencedBy: MetaRefTable! + type: String +} + +"""i18n metadata for a table with @i18n tag""" +type MetaI18n { + """Fields that are translatable""" + translatableFields: [MetaI18nField!]! + + """Name of the translation table""" + translationTable: String! +} + +"""A translatable field""" +type MetaI18nField { + """GraphQL field name""" + name: String! + + """PostgreSQL column type (text, citext)""" + type: String! +} + +"""Information about a database index""" +type MetaIndex { + columns: [String!]! + fields: [MetaField!] + isPrimary: Boolean! + isUnique: Boolean! + name: String! +} + +"""Table inflection names""" +type MetaInflection { + allRows: String! + conditionType: String! + connection: String! + createInputType: String! + createPayloadType: String! + deletePayloadType: String! + edge: String! + filterType: String + orderByType: String! + patchType: String + tableType: String! + updatePayloadType: String +} + +"""A many-to-many relation via junction table""" +type MetaManyToManyRelation { + fieldName: String + junctionLeftConstraint: MetaForeignKeyConstraint! + junctionLeftKeyAttributes: [MetaField!]! + junctionRightConstraint: MetaForeignKeyConstraint! + junctionRightKeyAttributes: [MetaField!]! + junctionTable: MetaRefTable! + leftKeyAttributes: [MetaField!]! + rightKeyAttributes: [MetaField!]! + rightTable: MetaRefTable! + type: String +} + +"""Information about a primary key constraint""" +type MetaPrimaryKeyConstraint { + fields: [MetaField!]! + name: String! +} + +"""Table query/mutation names""" +type MetaQuery { + all: String + create: String + delete: String + one: String + update: String +} + +"""Realtime metadata for a table with @realtime tag""" +type MetaRealtime { + """The generated subscription field name (e.g. onPostChanged)""" + subscriptionFieldName: String! +} + +"""Reference to a related table""" +type MetaRefTable { + name: String! +} + +"""Table relations""" +type MetaRelations { + belongsTo: [MetaBelongsToRelation!]! + has: [MetaHasRelation!]! + hasMany: [MetaHasRelation!]! + hasOne: [MetaHasRelation!]! + manyToMany: [MetaManyToManyRelation!]! +} + +""" +How a client must serialize/parse a scalar — the one field-type detail standard GraphQL introspection cannot describe. Null for plain scalars whose wire format is obvious from gqlType. +""" +type MetaScalarEncoding { + """For 'vector': declared length, else null.""" + dimensions: Int + + """For 'ltree': values are dot-separated path strings.""" + dotPath: Boolean + + """For 'vector': element scalar (e.g. 'float').""" + elementType: String + + """For 'geojson': Point/LineString/Polygon/…, else null.""" + geometrySubtype: String + + """ + Machine kind: bigint, datetime, date, time, interval, uuid, geojson, point, inet, ltree, vector, bytea, or composite. + """ + kind: String! + + """For 'geojson': spatial reference id, else null.""" + srid: Int +} + +"""Root meta schema type""" +type MetaSchema { + tables: [MetaTable!]! +} + +"""Provisioning scope metadata for a table""" +type MetaScope { + """SQL name of the entity table for entity scopes, else null""" + entityTable: String + + """ + Inflected scope key column (e.g. databaseId, orgId), null for global tiers + """ + keyColumn: String + + """ + Provisioning scope: 'platform', 'app', 'database', or an entity scope (e.g. 'org') + """ + scope: String! + + """Provenance of the scope metadata (always 'smartTag')""" + source: String! + + """Coarse bucket: 'global', 'database', or 'entity'""" + tier: String! +} + +"""Search metadata for a table""" +type MetaSearch { + """Active search algorithms on this table""" + algorithms: [String!]! + + """Searchable columns with their algorithm""" + columns: [MetaSearchColumn!]! + + """Per-table search configuration""" + config: MetaSearchConfig + + """Whether unifiedSearch composite filter is available""" + hasUnifiedSearch: Boolean! +} + +"""A searchable column with its algorithm""" +type MetaSearchColumn { + """Search algorithm: tsvector, bm25, trgm, or vector""" + algorithm: String! + + """Column name (camelCase)""" + name: String! +} + +"""Per-table search configuration from @searchConfig smart tag""" +type MetaSearchConfig { + """Exponential decay factor per day""" + boostRecencyDecay: Float + + """Field used for recency decay""" + boostRecencyField: String + + """Whether recency boosting is enabled""" + boostRecent: Boolean! + + """JSON-encoded per-adapter score weights""" + weights: String +} + +"""Storage metadata for a table""" +type MetaStorage { + """Whether this table is a storage buckets table""" + isBucketsTable: Boolean! + + """Whether this table is a storage files table""" + isFilesTable: Boolean! +} + +"""Information about a database table""" +type MetaTable { + constraints: MetaConstraints! + fields: [MetaField!]! + foreignKeyConstraints: [MetaForeignKeyConstraint!]! + + """i18n metadata (null if no @i18n tag)""" + i18n: MetaI18n + indexes: [MetaIndex!]! + inflection: MetaInflection! + + """Final GraphQL output type name""" + name: String! + primaryKeyConstraints: [MetaPrimaryKeyConstraint!]! + query: MetaQuery! + + """Realtime metadata (null if no @realtime tag)""" + realtime: MetaRealtime + relations: MetaRelations! + schemaName: String! + + """Provisioning scope metadata (null if no @scope tag)""" + scope: MetaScope + + """Search metadata (null if no search configured)""" + search: MetaSearch + + """Storage metadata (null if not a storage table)""" + storage: MetaStorage + + """PostgreSQL table name""" + tableName: String! + uniqueConstraints: [MetaUniqueConstraint!]! +} + +"""Information about a PostgreSQL type""" +type MetaType { + """Scalar serialization contract (null for plain scalars)""" + encoding: MetaScalarEncoding + gqlType: String! + hasDefault: Boolean + isArray: Boolean! + isNotNull: Boolean + pgType: String! + subtype: String +} + +"""Information about a unique constraint""" +type MetaUniqueConstraint { + fields: [MetaField!]! + name: String! +} + +""" +Defines billable meters (what to track: quotas, feature flags, credit pools) +""" +type Meter { + """ + How usage is aggregated: cumulative (sum over period) or peak (max watermark) + """ + aggregation: String! + + """ + Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: Int + + """Human-readable name for the meter""" + displayName: String + id: UUID! + + """Whether this meter is currently active""" + isActive: Boolean + + """Reads and enables pagination through a set of `MeterCredit`.""" + meterCredits( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `MeterCredit`.""" + orderBy: [MeterCreditOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: MeterCreditFilter + ): MeterCreditConnection! + + """ + Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) + """ + meterType: String! + + """ + Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. + """ + periodInterval: Interval + + """ + Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. + """ + rolloverCap: BigInt + + """Unique identifier for the meter (e.g. api_requests, storage_gb, seats)""" + slug: String! + + """ + Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) + """ + unit: String +} + +"""A connection to a list of `Meter` values.""" +type MeterConnection { + """ + A list of edges which contains the `Meter` and cursor to aid in pagination. + """ + edges: [MeterEdge]! + + """A list of `Meter` objects.""" + nodes: [Meter]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Meter` you could get from the connection.""" + totalCount: Int! +} + +""" +Append-only ledger of credit grants for billing meters that automatically update balances +""" +type MeterCredit { + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! + + """When this credit was granted""" + createdAt: Datetime! + + """ + Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) + """ + creditType: String! + + """Entity this credit applies to""" + entityId: UUID! + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + + """When this credit expires. NULL means the credit never expires.""" + expiresAt: Datetime + id: UUID! + + """Reads a single `Meter` that is related to this `MeterCredit`.""" + meter: Meter + + """FK to meters — which meter definition this credit applies to""" + meterId: UUID! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +"""A connection to a list of `MeterCredit` values.""" +type MeterCreditConnection { + """ + A list of edges which contains the `MeterCredit` and cursor to aid in pagination. + """ + edges: [MeterCreditEdge]! + + """A list of `MeterCredit` objects.""" + nodes: [MeterCredit]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MeterCredit` you could get from the connection.""" + totalCount: Int! +} + +"""A `MeterCredit` edge in the connection.""" +type MeterCreditEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `MeterCredit` at the end of the edge.""" + node: MeterCredit +} + +""" +A filter to be used against `MeterCredit` object types. All fields are combined with a logical ‘and.’ +""" +input MeterCreditFilter { + """Filter by the object’s `amount` field.""" + amount: BigIntFilter + + """Checks for all expressions in this list.""" + and: [MeterCreditFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `creditType` field.""" + creditType: StringFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `meter` relation.""" + meter: MeterFilter + + """Filter by the object’s `meterId` field.""" + meterId: UUIDFilter + + """Negates the expression.""" + not: MeterCreditFilter + + """Checks for any expressions in this list.""" + or: [MeterCreditFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `reason` field.""" + reason: StringFilter +} + +"""An input for mutations affecting `MeterCredit`""" +input MeterCreditInput { + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! + + """When this credit was granted""" + createdAt: Datetime + + """ + Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) + """ + creditType: String + + """Entity this credit applies to""" + entityId: UUID! + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + + """When this credit expires. NULL means the credit never expires.""" + expiresAt: Datetime + id: UUID + + """FK to meters — which meter definition this credit applies to""" + meterId: UUID! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +"""Methods to use when ordering `MeterCredit`.""" +enum MeterCreditOrderBy { + AMOUNT_ASC + AMOUNT_DESC + CREATED_AT_ASC + CREATED_AT_DESC + CREDIT_TYPE_ASC + CREDIT_TYPE_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC + ID_ASC + ID_DESC + METER_ID_ASC + METER_ID_DESC + NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REASON_ASC + REASON_DESC +} + +""" +Represents an update to a `MeterCredit`. Fields that are set will be updated. +""" +input MeterCreditPatch { + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt + + """When this credit was granted""" + createdAt: Datetime + + """ + Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) + """ + creditType: String + + """Entity this credit applies to""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + + """When this credit expires. NULL means the credit never expires.""" + expiresAt: Datetime + id: UUID + + """FK to meters — which meter definition this credit applies to""" + meterId: UUID + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +""" +Default meter catalog: defines which meters are available and their default plan_limit values for new entities +""" +type MeterDefault { + """ + Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: BigFloat + + """ + Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. + """ + defaultPlanLimit: BigInt! + + """Human-readable name for the default meter""" + displayName: String + id: UUID! + + """Whether this default meter is actively provisioned for new entities""" + isActive: Boolean + + """Type of meter: quota, boolean, or usage_pool""" + meterType: String! + + """Meter slug that matches the slug in the meters table""" + slug: String! + + """ + Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) + """ + unit: String +} + +"""A connection to a list of `MeterDefault` values.""" +type MeterDefaultConnection { + """ + A list of edges which contains the `MeterDefault` and cursor to aid in pagination. + """ + edges: [MeterDefaultEdge]! + + """A list of `MeterDefault` objects.""" + nodes: [MeterDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MeterDefault` you could get from the connection.""" + totalCount: Int! +} + +"""A `MeterDefault` edge in the connection.""" +type MeterDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `MeterDefault` at the end of the edge.""" + node: MeterDefault +} + +""" +A filter to be used against `MeterDefault` object types. All fields are combined with a logical ‘and.’ +""" +input MeterDefaultFilter { + """Checks for all expressions in this list.""" + and: [MeterDefaultFilter!] + + """Filter by the object’s `categoryMeter` field.""" + categoryMeter: StringFilter + + """Filter by the object’s `creditCost` field.""" + creditCost: BigFloatFilter + + """Filter by the object’s `defaultPlanLimit` field.""" + defaultPlanLimit: BigIntFilter + + """Filter by the object’s `displayName` field.""" + displayName: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `meterType` field.""" + meterType: StringFilter + + """Negates the expression.""" + not: MeterDefaultFilter + + """Checks for any expressions in this list.""" + or: [MeterDefaultFilter!] + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `unit` field.""" + unit: StringFilter +} + +"""An input for mutations affecting `MeterDefault`""" +input MeterDefaultInput { + """ + Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: BigFloat + + """ + Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. + """ + defaultPlanLimit: BigInt + + """Human-readable name for the default meter""" + displayName: String + id: UUID + + """Whether this default meter is actively provisioned for new entities""" + isActive: Boolean + + """Type of meter: quota, boolean, or usage_pool""" + meterType: String + + """Meter slug that matches the slug in the meters table""" + slug: String! + + """ + Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) + """ + unit: String +} + +"""Methods to use when ordering `MeterDefault`.""" +enum MeterDefaultOrderBy { + CATEGORY_METER_ASC + CATEGORY_METER_DESC + CREDIT_COST_ASC + CREDIT_COST_DESC + DEFAULT_PLAN_LIMIT_ASC + DEFAULT_PLAN_LIMIT_DESC + DISPLAY_NAME_ASC + DISPLAY_NAME_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + METER_TYPE_ASC + METER_TYPE_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SLUG_ASC + SLUG_DESC + UNIT_ASC + UNIT_DESC +} + +""" +Represents an update to a `MeterDefault`. Fields that are set will be updated. +""" +input MeterDefaultPatch { + """ + Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: BigFloat + + """ + Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. + """ + defaultPlanLimit: BigInt + + """Human-readable name for the default meter""" + displayName: String + id: UUID + + """Whether this default meter is actively provisioned for new entities""" + isActive: Boolean + + """Type of meter: quota, boolean, or usage_pool""" + meterType: String + + """Meter slug that matches the slug in the meters table""" + slug: String + + """ + Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) + """ + unit: String +} + +"""A `Meter` edge in the connection.""" +type MeterEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Meter` at the end of the edge.""" + node: Meter +} + +""" +A filter to be used against `Meter` object types. All fields are combined with a logical ‘and.’ +""" +input MeterFilter { + """Filter by the object’s `aggregation` field.""" + aggregation: StringFilter + + """Checks for all expressions in this list.""" + and: [MeterFilter!] + + """Filter by the object’s `categoryMeter` field.""" + categoryMeter: StringFilter + + """Filter by the object’s `creditCost` field.""" + creditCost: IntFilter + + """Filter by the object’s `displayName` field.""" + displayName: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `meterCredits` relation.""" + meterCredits: MeterToManyMeterCreditFilter + + """`meterCredits` exist.""" + meterCreditsExist: Boolean + + """Filter by the object’s `meterType` field.""" + meterType: StringFilter + + """Negates the expression.""" + not: MeterFilter + + """Checks for any expressions in this list.""" + or: [MeterFilter!] + + """Filter by the object’s `periodInterval` field.""" + periodInterval: IntervalFilter + + """Filter by the object’s `rolloverCap` field.""" + rolloverCap: BigIntFilter + + """Filter by the object’s `slug` field.""" + slug: StringFilter + + """Filter by the object’s `unit` field.""" + unit: StringFilter +} + +"""An input for mutations affecting `Meter`""" +input MeterInput { + """ + How usage is aggregated: cumulative (sum over period) or peak (max watermark) + """ + aggregation: String + + """ + Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: Int + + """Human-readable name for the meter""" + displayName: String + id: UUID + + """Whether this meter is currently active""" + isActive: Boolean + + """ + Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) + """ + meterType: String + + """ + Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. + """ + periodInterval: IntervalInput + + """ + Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. + """ + rolloverCap: BigInt + + """Unique identifier for the meter (e.g. api_requests, storage_gb, seats)""" + slug: String! + + """ + Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) + """ + unit: String +} + +"""Methods to use when ordering `Meter`.""" +enum MeterOrderBy { + AGGREGATION_ASC + AGGREGATION_DESC + CATEGORY_METER_ASC + CATEGORY_METER_DESC + CREDIT_COST_ASC + CREDIT_COST_DESC + DISPLAY_NAME_ASC + DISPLAY_NAME_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + METER_TYPE_ASC + METER_TYPE_DESC + NATURAL + PERIOD_INTERVAL_ASC + PERIOD_INTERVAL_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ROLLOVER_CAP_ASC + ROLLOVER_CAP_DESC + SLUG_ASC + SLUG_DESC + UNIT_ASC + UNIT_DESC +} + +""" +Represents an update to a `Meter`. Fields that are set will be updated. +""" +input MeterPatch { + """ + How usage is aggregated: cumulative (sum over period) or peak (max watermark) + """ + aggregation: String + + """ + Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. + """ + categoryMeter: String + + """ + Universal credits consumed per unit of this meter. NULL disables universal credit fallback. + """ + creditCost: Int + + """Human-readable name for the meter""" + displayName: String + id: UUID + + """Whether this meter is currently active""" + isActive: Boolean + + """ + Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) + """ + meterType: String + + """ + Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. + """ + periodInterval: IntervalInput + + """ + Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. + """ + rolloverCap: BigInt + + """Unique identifier for the meter (e.g. api_requests, storage_gb, seats)""" + slug: String + + """ + Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) + """ + unit: String +} + +""" +Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. +""" +type MeterSource { + """ + How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. + """ + aggregationType: String! + + """ + Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) + """ + dimensionPath: String! + id: UUID! + + """Soft-delete flag. Inactive sources are skipped during reconciliation.""" + isActive: Boolean! + + """ + Slug of the billing meter this source feeds (matches meters.slug in the billing module) + """ + meterSlug: String! + + """ + Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) + """ + sourceMetric: String! +} + +"""A connection to a list of `MeterSource` values.""" +type MeterSourceConnection { + """ + A list of edges which contains the `MeterSource` and cursor to aid in pagination. + """ + edges: [MeterSourceEdge]! + + """A list of `MeterSource` objects.""" + nodes: [MeterSource]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MeterSource` you could get from the connection.""" + totalCount: Int! +} + +"""A `MeterSource` edge in the connection.""" +type MeterSourceEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `MeterSource` at the end of the edge.""" + node: MeterSource +} + +""" +A filter to be used against `MeterSource` object types. All fields are combined with a logical ‘and.’ +""" +input MeterSourceFilter { + """Filter by the object’s `aggregationType` field.""" + aggregationType: StringFilter + + """Checks for all expressions in this list.""" + and: [MeterSourceFilter!] + + """Filter by the object’s `dimensionPath` field.""" + dimensionPath: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `meterSlug` field.""" + meterSlug: StringFilter + + """Negates the expression.""" + not: MeterSourceFilter + + """Checks for any expressions in this list.""" + or: [MeterSourceFilter!] + + """Filter by the object’s `sourceMetric` field.""" + sourceMetric: StringFilter +} + +"""An input for mutations affecting `MeterSource`""" +input MeterSourceInput { + """ + How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. + """ + aggregationType: String + + """ + Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) + """ + dimensionPath: String! + id: UUID + + """Soft-delete flag. Inactive sources are skipped during reconciliation.""" + isActive: Boolean + + """ + Slug of the billing meter this source feeds (matches meters.slug in the billing module) + """ + meterSlug: String! + + """ + Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) + """ + sourceMetric: String! +} + +"""Methods to use when ordering `MeterSource`.""" +enum MeterSourceOrderBy { + AGGREGATION_TYPE_ASC + AGGREGATION_TYPE_DESC + DIMENSION_PATH_ASC + DIMENSION_PATH_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + METER_SLUG_ASC + METER_SLUG_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SOURCE_METRIC_ASC + SOURCE_METRIC_DESC +} + +""" +Represents an update to a `MeterSource`. Fields that are set will be updated. +""" +input MeterSourcePatch { + """ + How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. + """ + aggregationType: String + + """ + Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) + """ + dimensionPath: String + id: UUID + + """Soft-delete flag. Inactive sources are skipped during reconciliation.""" + isActive: Boolean + + """ + Slug of the billing meter this source feeds (matches meters.slug in the billing module) + """ + meterSlug: String + + """ + Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) + """ + sourceMetric: String +} + +""" +A filter to be used against many `MeterCredit` object types. All fields are combined with a logical ‘and.’ +""" +input MeterToManyMeterCreditFilter { + """Filters to entities where every related entity matches.""" + every: MeterCreditFilter + + """Filters to entities where no related entity matches.""" + none: MeterCreditFilter + + """Filters to entities where at least one related entity matches.""" + some: MeterCreditFilter +} + +""" +The root mutation type which contains root level fields which mutate data. +""" +type Mutation { + """Creates a single `AppAchievementReward`.""" + createAppAchievementReward( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppAchievementRewardInput! + ): CreateAppAchievementRewardPayload + + """Creates a single `AppEvent`.""" + createAppEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppEventInput! + ): CreateAppEventPayload + + """Creates a single `AppEventAggregate`.""" + createAppEventAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppEventAggregateInput! + ): CreateAppEventAggregatePayload + + """Creates a single `AppEventType`.""" + createAppEventType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppEventTypeInput! + ): CreateAppEventTypePayload + + """Creates a single `AppLevel`.""" + createAppLevel( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLevelInput! + ): CreateAppLevelPayload + + """Creates a single `AppLevelGrant`.""" + createAppLevelGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLevelGrantInput! + ): CreateAppLevelGrantPayload + + """Creates a single `AppLevelRequirement`.""" + createAppLevelRequirement( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLevelRequirementInput! + ): CreateAppLevelRequirementPayload + + """Creates a single `AppLimit`.""" + createAppLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitInput! + ): CreateAppLimitPayload + + """Creates a single `AppLimitCap`.""" + createAppLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCapInput! + ): CreateAppLimitCapPayload + + """Creates a single `AppLimitCapsDefault`.""" + createAppLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCapsDefaultInput! + ): CreateAppLimitCapsDefaultPayload + + """Creates a single `AppLimitCredit`.""" + createAppLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCreditInput! + ): CreateAppLimitCreditPayload + + """Creates a single `AppLimitCreditCode`.""" + createAppLimitCreditCode( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCreditCodeInput! + ): CreateAppLimitCreditCodePayload + + """Creates a single `AppLimitCreditCodeItem`.""" + createAppLimitCreditCodeItem( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCreditCodeItemInput! + ): CreateAppLimitCreditCodeItemPayload + + """Creates a single `AppLimitCreditRedemption`.""" + createAppLimitCreditRedemption( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitCreditRedemptionInput! + ): CreateAppLimitCreditRedemptionPayload + + """Creates a single `AppLimitDefault`.""" + createAppLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitDefaultInput! + ): CreateAppLimitDefaultPayload + + """Creates a single `AppLimitEvent`.""" + createAppLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitEventInput! + ): CreateAppLimitEventPayload + + """Creates a single `AppLimitWarning`.""" + createAppLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppLimitWarningInput! + ): CreateAppLimitWarningPayload + + """Creates a single `BillingUsageSummary`.""" + createBillingUsageSummary( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateBillingUsageSummaryInput! + ): CreateBillingUsageSummaryPayload + + """Creates a single `Ledger`.""" + createLedger( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateLedgerInput! + ): CreateLedgerPayload + + """Creates a single `Meter`.""" + createMeter( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMeterInput! + ): CreateMeterPayload + + """Creates a single `MeterCredit`.""" + createMeterCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMeterCreditInput! + ): CreateMeterCreditPayload + + """Creates a single `MeterDefault`.""" + createMeterDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMeterDefaultInput! + ): CreateMeterDefaultPayload + + """Creates a single `MeterSource`.""" + createMeterSource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMeterSourceInput! + ): CreateMeterSourcePayload + + """Creates a single `OrgLimit`.""" + createOrgLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitInput! + ): CreateOrgLimitPayload + + """Creates a single `OrgLimitAggregate`.""" + createOrgLimitAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitAggregateInput! + ): CreateOrgLimitAggregatePayload + + """Creates a single `OrgLimitCap`.""" + createOrgLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitCapInput! + ): CreateOrgLimitCapPayload + + """Creates a single `OrgLimitCapsDefault`.""" + createOrgLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitCapsDefaultInput! + ): CreateOrgLimitCapsDefaultPayload + + """Creates a single `OrgLimitCredit`.""" + createOrgLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitCreditInput! + ): CreateOrgLimitCreditPayload + + """Creates a single `OrgLimitDefault`.""" + createOrgLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitDefaultInput! + ): CreateOrgLimitDefaultPayload + + """Creates a single `OrgLimitEvent`.""" + createOrgLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitEventInput! + ): CreateOrgLimitEventPayload + + """Creates a single `OrgLimitWarning`.""" + createOrgLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgLimitWarningInput! + ): CreateOrgLimitWarningPayload + + """Creates a single `Plan`.""" + createPlan( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanInput! + ): CreatePlanPayload + + """Creates a single `PlanCap`.""" + createPlanCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanCapInput! + ): CreatePlanCapPayload + + """Creates a single `PlanLimit`.""" + createPlanLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanLimitInput! + ): CreatePlanLimitPayload + + """Creates a single `PlanMeterLimit`.""" + createPlanMeterLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanMeterLimitInput! + ): CreatePlanMeterLimitPayload + + """Creates a single `PlanOverride`.""" + createPlanOverride( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanOverrideInput! + ): CreatePlanOverridePayload + + """Creates a single `PlanPricing`.""" + createPlanPricing( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanPricingInput! + ): CreatePlanPricingPayload + + """Creates a single `PlanSubscription`.""" + createPlanSubscription( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlanSubscriptionInput! + ): CreatePlanSubscriptionPayload + + """Deletes a single `AppAchievementReward` using a unique key.""" + deleteAppAchievementReward( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppAchievementRewardInput! + ): DeleteAppAchievementRewardPayload + + """Deletes a single `AppEvent` using a unique key.""" + deleteAppEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppEventInput! + ): DeleteAppEventPayload + + """Deletes a single `AppEventAggregate` using a unique key.""" + deleteAppEventAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppEventAggregateInput! + ): DeleteAppEventAggregatePayload + + """Deletes a single `AppEventType` using a unique key.""" + deleteAppEventType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppEventTypeInput! + ): DeleteAppEventTypePayload + + """Deletes a single `AppLevel` using a unique key.""" + deleteAppLevel( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLevelInput! + ): DeleteAppLevelPayload + + """Deletes a single `AppLevelGrant` using a unique key.""" + deleteAppLevelGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLevelGrantInput! + ): DeleteAppLevelGrantPayload + + """Deletes a single `AppLevelRequirement` using a unique key.""" + deleteAppLevelRequirement( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLevelRequirementInput! + ): DeleteAppLevelRequirementPayload + + """Deletes a single `AppLimit` using a unique key.""" + deleteAppLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitInput! + ): DeleteAppLimitPayload + + """Deletes a single `AppLimitCap` using a unique key.""" + deleteAppLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCapInput! + ): DeleteAppLimitCapPayload + + """Deletes a single `AppLimitCapsDefault` using a unique key.""" + deleteAppLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCapsDefaultInput! + ): DeleteAppLimitCapsDefaultPayload + + """Deletes a single `AppLimitCredit` using a unique key.""" + deleteAppLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCreditInput! + ): DeleteAppLimitCreditPayload + + """Deletes a single `AppLimitCreditCode` using a unique key.""" + deleteAppLimitCreditCode( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCreditCodeInput! + ): DeleteAppLimitCreditCodePayload + + """Deletes a single `AppLimitCreditCodeItem` using a unique key.""" + deleteAppLimitCreditCodeItem( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCreditCodeItemInput! + ): DeleteAppLimitCreditCodeItemPayload + + """Deletes a single `AppLimitCreditRedemption` using a unique key.""" + deleteAppLimitCreditRedemption( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitCreditRedemptionInput! + ): DeleteAppLimitCreditRedemptionPayload + + """Deletes a single `AppLimitDefault` using a unique key.""" + deleteAppLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitDefaultInput! + ): DeleteAppLimitDefaultPayload + + """Deletes a single `AppLimitEvent` using a unique key.""" + deleteAppLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitEventInput! + ): DeleteAppLimitEventPayload + + """Deletes a single `AppLimitWarning` using a unique key.""" + deleteAppLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppLimitWarningInput! + ): DeleteAppLimitWarningPayload + + """Deletes a single `BillingUsageSummary` using a unique key.""" + deleteBillingUsageSummary( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteBillingUsageSummaryInput! + ): DeleteBillingUsageSummaryPayload + + """Deletes a single `Ledger` using a unique key.""" + deleteLedger( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteLedgerInput! + ): DeleteLedgerPayload + + """Deletes a single `Meter` using a unique key.""" + deleteMeter( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMeterInput! + ): DeleteMeterPayload + + """Deletes a single `MeterCredit` using a unique key.""" + deleteMeterCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMeterCreditInput! + ): DeleteMeterCreditPayload + + """Deletes a single `MeterDefault` using a unique key.""" + deleteMeterDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMeterDefaultInput! + ): DeleteMeterDefaultPayload + + """Deletes a single `MeterSource` using a unique key.""" + deleteMeterSource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMeterSourceInput! + ): DeleteMeterSourcePayload + + """Deletes a single `OrgLimit` using a unique key.""" + deleteOrgLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitInput! + ): DeleteOrgLimitPayload + + """Deletes a single `OrgLimitAggregate` using a unique key.""" + deleteOrgLimitAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitAggregateInput! + ): DeleteOrgLimitAggregatePayload + + """Deletes a single `OrgLimitCap` using a unique key.""" + deleteOrgLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitCapInput! + ): DeleteOrgLimitCapPayload + + """Deletes a single `OrgLimitCapsDefault` using a unique key.""" + deleteOrgLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitCapsDefaultInput! + ): DeleteOrgLimitCapsDefaultPayload + + """Deletes a single `OrgLimitCredit` using a unique key.""" + deleteOrgLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitCreditInput! + ): DeleteOrgLimitCreditPayload + + """Deletes a single `OrgLimitDefault` using a unique key.""" + deleteOrgLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitDefaultInput! + ): DeleteOrgLimitDefaultPayload + + """Deletes a single `OrgLimitEvent` using a unique key.""" + deleteOrgLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitEventInput! + ): DeleteOrgLimitEventPayload + + """Deletes a single `OrgLimitWarning` using a unique key.""" + deleteOrgLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgLimitWarningInput! + ): DeleteOrgLimitWarningPayload + + """Deletes a single `Plan` using a unique key.""" + deletePlan( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanInput! + ): DeletePlanPayload + + """Deletes a single `PlanCap` using a unique key.""" + deletePlanCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanCapInput! + ): DeletePlanCapPayload + + """Deletes a single `PlanLimit` using a unique key.""" + deletePlanLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanLimitInput! + ): DeletePlanLimitPayload + + """Deletes a single `PlanMeterLimit` using a unique key.""" + deletePlanMeterLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanMeterLimitInput! + ): DeletePlanMeterLimitPayload + + """Deletes a single `PlanOverride` using a unique key.""" + deletePlanOverride( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanOverrideInput! + ): DeletePlanOverridePayload + + """Deletes a single `PlanPricing` using a unique key.""" + deletePlanPricing( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanPricingInput! + ): DeletePlanPricingPayload + + """Deletes a single `PlanSubscription` using a unique key.""" + deletePlanSubscription( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlanSubscriptionInput! + ): DeletePlanSubscriptionPayload + grantAchievement( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: GrantAchievementInput! + ): GrantAchievementPayload + + """ + Provision an S3 bucket for a logical bucket in the database. + Reads the bucket config via RLS, then creates and configures + the S3 bucket with the appropriate privacy policies, CORS rules, + and lifecycle settings. + """ + provisionBucket( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ProvisionBucketInput! + ): ProvisionBucketPayload + recomputeCapabilities( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RecomputeCapabilitiesInput! + ): RecomputeCapabilitiesPayload + revokeAchievement( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeAchievementInput! + ): RevokeAchievementPayload + seedAppLimitCapsDefaults( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedAppLimitCapsDefaultsInput! + ): SeedAppLimitCapsDefaultsPayload + seedAppLimitDefaults( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedAppLimitDefaultsInput! + ): SeedAppLimitDefaultsPayload + seedMeterDefaults( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedMeterDefaultsInput! + ): SeedMeterDefaultsPayload + seedOrgLimitCapsDefaults( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedOrgLimitCapsDefaultsInput! + ): SeedOrgLimitCapsDefaultsPayload + seedOrgLimitDefaults( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedOrgLimitDefaultsInput! + ): SeedOrgLimitDefaultsPayload + seedPlan( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedPlanInput! + ): SeedPlanPayload + seedTrustLadder( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SeedTrustLadderInput! + ): SeedTrustLadderPayload + + """ + Updates a single `AppAchievementReward` using a unique key and a patch. + """ + updateAppAchievementReward( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppAchievementRewardInput! + ): UpdateAppAchievementRewardPayload + + """Updates a single `AppEvent` using a unique key and a patch.""" + updateAppEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppEventInput! + ): UpdateAppEventPayload + + """Updates a single `AppEventAggregate` using a unique key and a patch.""" + updateAppEventAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppEventAggregateInput! + ): UpdateAppEventAggregatePayload + + """Updates a single `AppEventType` using a unique key and a patch.""" + updateAppEventType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppEventTypeInput! + ): UpdateAppEventTypePayload + + """Updates a single `AppLevel` using a unique key and a patch.""" + updateAppLevel( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLevelInput! + ): UpdateAppLevelPayload + + """Updates a single `AppLevelGrant` using a unique key and a patch.""" + updateAppLevelGrant( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLevelGrantInput! + ): UpdateAppLevelGrantPayload + + """Updates a single `AppLevelRequirement` using a unique key and a patch.""" + updateAppLevelRequirement( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLevelRequirementInput! + ): UpdateAppLevelRequirementPayload + + """Updates a single `AppLimit` using a unique key and a patch.""" + updateAppLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitInput! + ): UpdateAppLimitPayload + + """Updates a single `AppLimitCap` using a unique key and a patch.""" + updateAppLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCapInput! + ): UpdateAppLimitCapPayload + + """Updates a single `AppLimitCapsDefault` using a unique key and a patch.""" + updateAppLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCapsDefaultInput! + ): UpdateAppLimitCapsDefaultPayload + + """Updates a single `AppLimitCredit` using a unique key and a patch.""" + updateAppLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCreditInput! + ): UpdateAppLimitCreditPayload + + """Updates a single `AppLimitCreditCode` using a unique key and a patch.""" + updateAppLimitCreditCode( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCreditCodeInput! + ): UpdateAppLimitCreditCodePayload + + """ + Updates a single `AppLimitCreditCodeItem` using a unique key and a patch. + """ + updateAppLimitCreditCodeItem( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCreditCodeItemInput! + ): UpdateAppLimitCreditCodeItemPayload + + """ + Updates a single `AppLimitCreditRedemption` using a unique key and a patch. + """ + updateAppLimitCreditRedemption( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitCreditRedemptionInput! + ): UpdateAppLimitCreditRedemptionPayload + + """Updates a single `AppLimitDefault` using a unique key and a patch.""" + updateAppLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitDefaultInput! + ): UpdateAppLimitDefaultPayload + + """Updates a single `AppLimitEvent` using a unique key and a patch.""" + updateAppLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitEventInput! + ): UpdateAppLimitEventPayload + + """Updates a single `AppLimitWarning` using a unique key and a patch.""" + updateAppLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppLimitWarningInput! + ): UpdateAppLimitWarningPayload + + """Updates a single `BillingUsageSummary` using a unique key and a patch.""" + updateBillingUsageSummary( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateBillingUsageSummaryInput! + ): UpdateBillingUsageSummaryPayload + + """Updates a single `Ledger` using a unique key and a patch.""" + updateLedger( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateLedgerInput! + ): UpdateLedgerPayload + + """Updates a single `Meter` using a unique key and a patch.""" + updateMeter( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMeterInput! + ): UpdateMeterPayload + + """Updates a single `MeterCredit` using a unique key and a patch.""" + updateMeterCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMeterCreditInput! + ): UpdateMeterCreditPayload + + """Updates a single `MeterDefault` using a unique key and a patch.""" + updateMeterDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMeterDefaultInput! + ): UpdateMeterDefaultPayload + + """Updates a single `MeterSource` using a unique key and a patch.""" + updateMeterSource( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMeterSourceInput! + ): UpdateMeterSourcePayload + + """Updates a single `OrgLimit` using a unique key and a patch.""" + updateOrgLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitInput! + ): UpdateOrgLimitPayload + + """Updates a single `OrgLimitAggregate` using a unique key and a patch.""" + updateOrgLimitAggregate( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitAggregateInput! + ): UpdateOrgLimitAggregatePayload + + """Updates a single `OrgLimitCap` using a unique key and a patch.""" + updateOrgLimitCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitCapInput! + ): UpdateOrgLimitCapPayload + + """Updates a single `OrgLimitCapsDefault` using a unique key and a patch.""" + updateOrgLimitCapsDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitCapsDefaultInput! + ): UpdateOrgLimitCapsDefaultPayload + + """Updates a single `OrgLimitCredit` using a unique key and a patch.""" + updateOrgLimitCredit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitCreditInput! + ): UpdateOrgLimitCreditPayload + + """Updates a single `OrgLimitDefault` using a unique key and a patch.""" + updateOrgLimitDefault( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitDefaultInput! + ): UpdateOrgLimitDefaultPayload + + """Updates a single `OrgLimitEvent` using a unique key and a patch.""" + updateOrgLimitEvent( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitEventInput! + ): UpdateOrgLimitEventPayload + + """Updates a single `OrgLimitWarning` using a unique key and a patch.""" + updateOrgLimitWarning( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgLimitWarningInput! + ): UpdateOrgLimitWarningPayload + + """Updates a single `Plan` using a unique key and a patch.""" + updatePlan( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanInput! + ): UpdatePlanPayload + + """Updates a single `PlanCap` using a unique key and a patch.""" + updatePlanCap( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanCapInput! + ): UpdatePlanCapPayload + + """Updates a single `PlanLimit` using a unique key and a patch.""" + updatePlanLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanLimitInput! + ): UpdatePlanLimitPayload + + """Updates a single `PlanMeterLimit` using a unique key and a patch.""" + updatePlanMeterLimit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanMeterLimitInput! + ): UpdatePlanMeterLimitPayload + + """Updates a single `PlanOverride` using a unique key and a patch.""" + updatePlanOverride( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanOverrideInput! + ): UpdatePlanOverridePayload + + """Updates a single `PlanPricing` using a unique key and a patch.""" + updatePlanPricing( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanPricingInput! + ): UpdatePlanPricingPayload + + """Updates a single `PlanSubscription` using a unique key and a patch.""" + updatePlanSubscription( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlanSubscriptionInput! + ): UpdatePlanSubscriptionPayload +} + +"""Tracks per-actor usage counts against configurable maximum limits""" +type OrgLimit { + """User whose usage is being tracked against this limit""" + actorId: UUID! + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID! + + """ + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + """ + max: BigInt + + """Name identifier of the limit being tracked""" + name: String + + """Current usage count for this actor and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. + """ + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: Interval + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} + +""" +Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) +""" +type OrgLimitAggregate { + """Entity (org) whose aggregate usage is being tracked""" + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID! + + """Maximum allowed aggregate usage; negative means unlimited""" + max: BigInt + + """Name identifier of the aggregate limit being tracked""" + name: String + + """Current aggregate usage count for this entity and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. + """ + reserved: BigInt + + """Soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: Interval + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} + +"""A connection to a list of `OrgLimitAggregate` values.""" +type OrgLimitAggregateConnection { + """ + A list of edges which contains the `OrgLimitAggregate` and cursor to aid in pagination. + """ + edges: [OrgLimitAggregateEdge]! + + """A list of `OrgLimitAggregate` objects.""" + nodes: [OrgLimitAggregate]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgLimitAggregate` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgLimitAggregate` edge in the connection.""" +type OrgLimitAggregateEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitAggregate` at the end of the edge.""" + node: OrgLimitAggregate +} + +""" +A filter to be used against `OrgLimitAggregate` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitAggregateFilter { + """Checks for all expressions in this list.""" + and: [OrgLimitAggregateFilter!] + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitAggregateFilter + + """Filter by the object’s `num` field.""" + num: BigIntFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitAggregateFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `periodCredits` field.""" + periodCredits: BigIntFilter + + """Filter by the object’s `planMax` field.""" + planMax: BigIntFilter + + """Filter by the object’s `purchasedCredits` field.""" + purchasedCredits: BigIntFilter + + """Filter by the object’s `reserved` field.""" + reserved: BigIntFilter + + """Filter by the object’s `softMax` field.""" + softMax: BigIntFilter + + """Filter by the object’s `windowDuration` field.""" + windowDuration: IntervalFilter + + """Filter by the object’s `windowStart` field.""" + windowStart: DatetimeFilter +} + +"""An input for mutations affecting `OrgLimitAggregate`""" +input OrgLimitAggregateInput { + """Entity (org) whose aggregate usage is being tracked""" + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + + """Maximum allowed aggregate usage; negative means unlimited""" + max: BigInt + + """Name identifier of the aggregate limit being tracked""" + name: String + + """Current aggregate usage count for this entity and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. + """ + reserved: BigInt + + """Soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: IntervalInput + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} + +"""Methods to use when ordering `OrgLimitAggregate`.""" +enum OrgLimitAggregateOrderBy { + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + NUM_ASC + NUM_DESC + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PERIOD_CREDITS_ASC + PERIOD_CREDITS_DESC + PLAN_MAX_ASC + PLAN_MAX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PURCHASED_CREDITS_ASC + PURCHASED_CREDITS_DESC + RESERVED_ASC + RESERVED_DESC + SOFT_MAX_ASC + SOFT_MAX_DESC + WINDOW_DURATION_ASC + WINDOW_DURATION_DESC + WINDOW_START_ASC + WINDOW_START_DESC +} + +""" +Represents an update to a `OrgLimitAggregate`. Fields that are set will be updated. +""" +input OrgLimitAggregatePatch { + """Entity (org) whose aggregate usage is being tracked""" + entityId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + + """Maximum allowed aggregate usage; negative means unlimited""" + max: BigInt + + """Name identifier of the aggregate limit being tracked""" + name: String + + """Current aggregate usage count for this entity and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. + """ + reserved: BigInt + + """Soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: IntervalInput + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} + +""" +Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. +""" +type OrgLimitCap { + """Entity this cap override applies to""" + entityId: UUID! + id: UUID! + + """Override cap value for this entity""" + max: BigInt! + + """Name identifier of the cap being overridden""" + name: String! +} + +"""A connection to a list of `OrgLimitCap` values.""" +type OrgLimitCapConnection { + """ + A list of edges which contains the `OrgLimitCap` and cursor to aid in pagination. + """ + edges: [OrgLimitCapEdge]! + + """A list of `OrgLimitCap` objects.""" + nodes: [OrgLimitCap]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgLimitCap` you could get from the connection.""" + totalCount: Int! +} + +"""A `OrgLimitCap` edge in the connection.""" +type OrgLimitCapEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitCap` at the end of the edge.""" + node: OrgLimitCap +} + +""" +A filter to be used against `OrgLimitCap` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitCapFilter { + """Checks for all expressions in this list.""" + and: [OrgLimitCapFilter!] + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitCapFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitCapFilter!] +} + +"""An input for mutations affecting `OrgLimitCap`""" +input OrgLimitCapInput { + """Entity this cap override applies to""" + entityId: UUID! + id: UUID + + """Override cap value for this entity""" + max: BigInt + + """Name identifier of the cap being overridden""" + name: String! +} + +"""Methods to use when ordering `OrgLimitCap`.""" +enum OrgLimitCapOrderBy { + ENTITY_ID_ASC + ENTITY_ID_DESC + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} + +""" +Represents an update to a `OrgLimitCap`. Fields that are set will be updated. +""" +input OrgLimitCapPatch { + """Entity this cap override applies to""" + entityId: UUID + id: UUID + + """Override cap value for this entity""" + max: BigInt + + """Name identifier of the cap being overridden""" + name: String +} + +""" +Default cap values for static configuration limits (max file size, feature flags, etc.). Not metered — just read by consumers. +""" +type OrgLimitCapsDefault { + id: UUID! + + """ + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + """ + max: BigInt! + + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ + name: String! +} + +"""A connection to a list of `OrgLimitCapsDefault` values.""" +type OrgLimitCapsDefaultConnection { + """ + A list of edges which contains the `OrgLimitCapsDefault` and cursor to aid in pagination. + """ + edges: [OrgLimitCapsDefaultEdge]! + + """A list of `OrgLimitCapsDefault` objects.""" + nodes: [OrgLimitCapsDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgLimitCapsDefault` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgLimitCapsDefault` edge in the connection.""" +type OrgLimitCapsDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitCapsDefault` at the end of the edge.""" + node: OrgLimitCapsDefault +} + +""" +A filter to be used against `OrgLimitCapsDefault` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitCapsDefaultFilter { + """Checks for all expressions in this list.""" + and: [OrgLimitCapsDefaultFilter!] + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitCapsDefaultFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitCapsDefaultFilter!] +} + +"""An input for mutations affecting `OrgLimitCapsDefault`""" +input OrgLimitCapsDefaultInput { + id: UUID + + """ + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + """ + max: BigInt + + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ + name: String! +} + +"""Methods to use when ordering `OrgLimitCapsDefault`.""" +enum OrgLimitCapsDefaultOrderBy { + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} + +""" +Represents an update to a `OrgLimitCapsDefault`. Fields that are set will be updated. +""" +input OrgLimitCapsDefaultPatch { + id: UUID + + """ + Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + """ + max: BigInt + + """ + Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + """ + name: String +} + +"""A connection to a list of `OrgLimit` values.""" +type OrgLimitConnection { + """ + A list of edges which contains the `OrgLimit` and cursor to aid in pagination. + """ + edges: [OrgLimitEdge]! + + """A list of `OrgLimit` objects.""" + nodes: [OrgLimit]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgLimit` you could get from the connection.""" + totalCount: Int! +} + +""" +Append-only ledger of credit grants that automatically update limit ceilings +""" +type OrgLimitCredit { + """User this credit is for; NULL for aggregate entity-level credits""" + actorId: UUID + + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! + + """ + Credit durability: permanent (survives window reset) or period (resets on window expiry) + """ + creditType: String! + + """ + Reads a single `OrgLimitDefault` that is related to this `OrgLimitCredit`. + """ + defaultLimit: OrgLimitDefault + + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID! + + """Entity this credit applies to; NULL for actor-only credits""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID! + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +"""A connection to a list of `OrgLimitCredit` values.""" +type OrgLimitCreditConnection { + """ + A list of edges which contains the `OrgLimitCredit` and cursor to aid in pagination. + """ + edges: [OrgLimitCreditEdge]! + + """A list of `OrgLimitCredit` objects.""" + nodes: [OrgLimitCredit]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgLimitCredit` you could get from the connection.""" + totalCount: Int! +} + +"""A `OrgLimitCredit` edge in the connection.""" +type OrgLimitCreditEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitCredit` at the end of the edge.""" + node: OrgLimitCredit +} + +""" +A filter to be used against `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitCreditFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `amount` field.""" + amount: BigIntFilter + + """Checks for all expressions in this list.""" + and: [OrgLimitCreditFilter!] + + """Filter by the object’s `creditType` field.""" + creditType: StringFilter + + """Filter by the object’s `defaultLimit` relation.""" + defaultLimit: OrgLimitDefaultFilter + + """Filter by the object’s `defaultLimitId` field.""" + defaultLimitId: UUIDFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: OrgLimitCreditFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitCreditFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `reason` field.""" + reason: StringFilter +} + +"""An input for mutations affecting `OrgLimitCredit`""" +input OrgLimitCreditInput { + """User this credit is for; NULL for aggregate entity-level credits""" + actorId: UUID + + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt! + + """ + Credit durability: permanent (survives window reset) or period (resets on window expiry) + """ + creditType: String + + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID! + + """Entity this credit applies to; NULL for actor-only credits""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +"""Methods to use when ordering `OrgLimitCredit`.""" +enum OrgLimitCreditOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + AMOUNT_ASC + AMOUNT_DESC + CREDIT_TYPE_ASC + CREDIT_TYPE_DESC + DEFAULT_LIMIT_ID_ASC + DEFAULT_LIMIT_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REASON_ASC + REASON_DESC +} + +""" +Represents an update to a `OrgLimitCredit`. Fields that are set will be updated. +""" +input OrgLimitCreditPatch { + """User this credit is for; NULL for aggregate entity-level credits""" + actorId: UUID + + """Number of credits to grant (positive to add, negative to revoke)""" + amount: BigInt + + """ + Credit durability: permanent (survives window reset) or period (resets on window expiry) + """ + creditType: String + + """FK to default_limits — which limit definition this credit applies to""" + defaultLimitId: UUID + + """Entity this credit applies to; NULL for actor-only credits""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Optional reason for the credit grant (promo code, admin grant, etc.)""" + reason: String +} + +""" +Default maximum values for each named limit, applied when no per-actor override exists +""" +type OrgLimitDefault { + id: UUID! + + """Default maximum usage allowed for this limit""" + max: BigInt + + """Name identifier of the limit this default applies to""" + name: String! + + """Reads and enables pagination through a set of `OrgLimitCredit`.""" + orgLimitCreditsByDefaultLimitId( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int - """Creates a single `AppLimitWarning`.""" - createAppLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateAppLimitWarningInput! - ): CreateAppLimitWarningPayload + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `OrgLimitCredit`.""" + orderBy: [OrgLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgLimitCreditFilter + ): OrgLimitCreditConnection! + + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt +} + +"""A connection to a list of `OrgLimitDefault` values.""" +type OrgLimitDefaultConnection { + """ + A list of edges which contains the `OrgLimitDefault` and cursor to aid in pagination. + """ + edges: [OrgLimitDefaultEdge]! + + """A list of `OrgLimitDefault` objects.""" + nodes: [OrgLimitDefault]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgLimitDefault` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgLimitDefault` edge in the connection.""" +type OrgLimitDefaultEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitDefault` at the end of the edge.""" + node: OrgLimitDefault +} + +""" +A filter to be used against `OrgLimitDefault` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitDefaultFilter { + """Checks for all expressions in this list.""" + and: [OrgLimitDefaultFilter!] + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitDefaultFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitDefaultFilter!] + + """Filter by the object’s `orgLimitCreditsByDefaultLimitId` relation.""" + orgLimitCreditsByDefaultLimitId: OrgLimitDefaultToManyOrgLimitCreditFilter + + """`orgLimitCreditsByDefaultLimitId` exist.""" + orgLimitCreditsByDefaultLimitIdExist: Boolean + + """Filter by the object’s `softMax` field.""" + softMax: BigIntFilter +} + +"""An input for mutations affecting `OrgLimitDefault`""" +input OrgLimitDefaultInput { + id: UUID + + """Default maximum usage allowed for this limit""" + max: BigInt + + """Name identifier of the limit this default applies to""" + name: String! + + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt +} + +"""Methods to use when ordering `OrgLimitDefault`.""" +enum OrgLimitDefaultOrderBy { + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SOFT_MAX_ASC + SOFT_MAX_DESC +} + +""" +Represents an update to a `OrgLimitDefault`. Fields that are set will be updated. +""" +input OrgLimitDefaultPatch { + id: UUID + + """Default maximum usage allowed for this limit""" + max: BigInt + + """Name identifier of the limit this default applies to""" + name: String + + """Default soft limit threshold for warnings; NULL means no soft limit""" + softMax: BigInt +} + +""" +A filter to be used against many `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitDefaultToManyOrgLimitCreditFilter { + """Filters to entities where every related entity matches.""" + every: OrgLimitCreditFilter + + """Filters to entities where no related entity matches.""" + none: OrgLimitCreditFilter + + """Filters to entities where at least one related entity matches.""" + some: OrgLimitCreditFilter +} + +"""A `OrgLimit` edge in the connection.""" +type OrgLimitEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimit` at the end of the edge.""" + node: OrgLimit +} + +"""Append-only log of limit events for historical reporting and audit""" +type OrgLimitEvent { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime! + + """Change amount: positive for increment, negative for decrement""" + delta: BigInt + + """Entity this event applies to; NULL for app-level events""" + entityId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String + + """Unique identifier for each limit event""" + id: UUID! + + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt + + """Limit name this event applies to""" + name: String + + """Usage count after this event""" + numAfter: BigInt + + """Usage count before this event""" + numBefore: BigInt + + """ + Resolved billable organization via get_organization_id; NULL for app-level events + """ + organizationId: UUID + + """ + Optional reason or source: achievement, invite, plan_change, purchase, etc. + """ + reason: String +} + +"""A connection to a list of `OrgLimitEvent` values.""" +type OrgLimitEventConnection { + """ + A list of edges which contains the `OrgLimitEvent` and cursor to aid in pagination. + """ + edges: [OrgLimitEventEdge]! + + """A list of `OrgLimitEvent` objects.""" + nodes: [OrgLimitEvent]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgLimitEvent` you could get from the connection.""" + totalCount: Int! +} + +"""A `OrgLimitEvent` edge in the connection.""" +type OrgLimitEventEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgLimitEvent` at the end of the edge.""" + node: OrgLimitEvent +} + +""" +A filter to be used against `OrgLimitEvent` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitEventFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [OrgLimitEventFilter!] + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `delta` field.""" + delta: BigIntFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `eventType` field.""" + eventType: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `maxAtEvent` field.""" + maxAtEvent: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitEventFilter + + """Filter by the object’s `numAfter` field.""" + numAfter: BigIntFilter + + """Filter by the object’s `numBefore` field.""" + numBefore: BigIntFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitEventFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `reason` field.""" + reason: StringFilter +} + +"""An input for mutations affecting `OrgLimitEvent`""" +input OrgLimitEventInput { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime + + """Change amount: positive for increment, negative for decrement""" + delta: BigInt + + """Entity this event applies to; NULL for app-level events""" + entityId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String + + """Unique identifier for each limit event""" + id: UUID + + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt + + """Limit name this event applies to""" + name: String + + """Usage count after this event""" + numAfter: BigInt + + """Usage count before this event""" + numBefore: BigInt + + """ + Resolved billable organization via get_organization_id; NULL for app-level events + """ + organizationId: UUID + + """ + Optional reason or source: achievement, invite, plan_change, purchase, etc. + """ + reason: String +} + +"""Methods to use when ordering `OrgLimitEvent`.""" +enum OrgLimitEventOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DELTA_ASC + DELTA_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + EVENT_TYPE_ASC + EVENT_TYPE_DESC + ID_ASC + ID_DESC + MAX_AT_EVENT_ASC + MAX_AT_EVENT_DESC + NAME_ASC + NAME_DESC + NATURAL + NUM_AFTER_ASC + NUM_AFTER_DESC + NUM_BEFORE_ASC + NUM_BEFORE_DESC + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + REASON_ASC + REASON_DESC +} + +""" +Represents an update to a `OrgLimitEvent`. Fields that are set will be updated. +""" +input OrgLimitEventPatch { + """User who triggered this event; NULL for system/aggregate events""" + actorId: UUID + createdAt: Datetime + + """Change amount: positive for increment, negative for decrement""" + delta: BigInt + + """Entity this event applies to; NULL for app-level events""" + entityId: UUID + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + + """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" + eventType: String + + """Unique identifier for each limit event""" + id: UUID + + """Max limit ceiling at the time of this event""" + maxAtEvent: BigInt + + """Limit name this event applies to""" + name: String + + """Usage count after this event""" + numAfter: BigInt + + """Usage count before this event""" + numBefore: BigInt + + """ + Resolved billable organization via get_organization_id; NULL for app-level events + """ + organizationId: UUID + + """ + Optional reason or source: achievement, invite, plan_change, purchase, etc. + """ + reason: String +} + +""" +A filter to be used against `OrgLimit` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitFilter { + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [OrgLimitFilter!] + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `max` field.""" + max: BigIntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: OrgLimitFilter + + """Filter by the object’s `num` field.""" + num: BigIntFilter + + """Checks for any expressions in this list.""" + or: [OrgLimitFilter!] + + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter + + """Filter by the object’s `periodCredits` field.""" + periodCredits: BigIntFilter + + """Filter by the object’s `planMax` field.""" + planMax: BigIntFilter + + """Filter by the object’s `purchasedCredits` field.""" + purchasedCredits: BigIntFilter + + """Filter by the object’s `softMax` field.""" + softMax: BigIntFilter + + """Filter by the object’s `windowDuration` field.""" + windowDuration: IntervalFilter + + """Filter by the object’s `windowStart` field.""" + windowStart: DatetimeFilter +} + +"""An input for mutations affecting `OrgLimit`""" +input OrgLimitInput { + """User whose usage is being tracked against this limit""" + actorId: UUID! + entityId: UUID! + + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID + + """ + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + """ + max: BigInt + + """Name identifier of the limit being tracked""" + name: String + + """Current usage count for this actor and limit""" + num: BigInt + + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt + + """ + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt + + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt + + """ + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. + """ + softMax: BigInt + + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: IntervalInput + + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} + +"""Methods to use when ordering `OrgLimit`.""" +enum OrgLimitOrderBy { + ACTOR_ID_ASC + ACTOR_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC + ID_ASC + ID_DESC + MAX_ASC + MAX_DESC + NAME_ASC + NAME_DESC + NATURAL + NUM_ASC + NUM_DESC + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PERIOD_CREDITS_ASC + PERIOD_CREDITS_DESC + PLAN_MAX_ASC + PLAN_MAX_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PURCHASED_CREDITS_ASC + PURCHASED_CREDITS_DESC + SOFT_MAX_ASC + SOFT_MAX_DESC + WINDOW_DURATION_ASC + WINDOW_DURATION_DESC + WINDOW_START_ASC + WINDOW_START_DESC +} - """Creates a single `OrgLimit`.""" - createOrgLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitInput! - ): CreateOrgLimitPayload +""" +Represents an update to a `OrgLimit`. Fields that are set will be updated. +""" +input OrgLimitPatch { + """User whose usage is being tracked against this limit""" + actorId: UUID + entityId: UUID - """Creates a single `OrgLimitAggregate`.""" - createOrgLimitAggregate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitAggregateInput! - ): CreateOrgLimitAggregatePayload + """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" + entityType: String + id: UUID - """Creates a single `OrgLimitCap`.""" - createOrgLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitCapInput! - ): CreateOrgLimitCapPayload + """ + Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + """ + max: BigInt - """Creates a single `OrgLimitCapsDefault`.""" - createOrgLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitCapsDefaultInput! - ): CreateOrgLimitCapsDefaultPayload + """Name identifier of the limit being tracked""" + name: String - """Creates a single `OrgLimitCredit`.""" - createOrgLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitCreditInput! - ): CreateOrgLimitCreditPayload + """Current usage count for this actor and limit""" + num: BigInt - """Creates a single `OrgLimitDefault`.""" - createOrgLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitDefaultInput! - ): CreateOrgLimitDefaultPayload + """Resolved billable organization via get_organization_id""" + organizationId: UUID - """Creates a single `OrgLimitEvent`.""" - createOrgLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitEventInput! - ): CreateOrgLimitEventPayload + """ + Temporary credits for the current billing window. Resets to 0 on window expiry. + """ + periodCredits: BigInt - """Creates a single `OrgLimitWarning`.""" - createOrgLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgLimitWarningInput! - ): CreateOrgLimitWarningPayload + """ + Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. + """ + planMax: BigInt - """Deletes a single `AppLimit` using a unique key.""" - deleteAppLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitInput! - ): DeleteAppLimitPayload + """ + Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + """ + purchasedCredits: BigInt - """Deletes a single `AppLimitCap` using a unique key.""" - deleteAppLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCapInput! - ): DeleteAppLimitCapPayload + """ + Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. + """ + softMax: BigInt - """Deletes a single `AppLimitCapsDefault` using a unique key.""" - deleteAppLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCapsDefaultInput! - ): DeleteAppLimitCapsDefaultPayload + """ + Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + """ + windowDuration: IntervalInput - """Deletes a single `AppLimitCredit` using a unique key.""" - deleteAppLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCreditInput! - ): DeleteAppLimitCreditPayload + """Start of the current metering window; NULL means no time window""" + windowStart: Datetime +} - """Deletes a single `AppLimitCreditCode` using a unique key.""" - deleteAppLimitCreditCode( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCreditCodeInput! - ): DeleteAppLimitCreditCodePayload +""" +Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. +""" +type OrgLimitWarning { + """Per-entity override (NULL = scope default for all entities)""" + entityId: UUID + id: UUID! - """Deletes a single `AppLimitCreditCodeItem` using a unique key.""" - deleteAppLimitCreditCodeItem( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCreditCodeItemInput! - ): DeleteAppLimitCreditCodeItemPayload + """Limit name this warning applies to (must match a default_limits entry)""" + name: String! - """Deletes a single `AppLimitCreditRedemption` using a unique key.""" - deleteAppLimitCreditRedemption( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitCreditRedemptionInput! - ): DeleteAppLimitCreditRedemptionPayload + """ + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) + """ + taskIdentifier: String! - """Deletes a single `AppLimitDefault` using a unique key.""" - deleteAppLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitDefaultInput! - ): DeleteAppLimitDefaultPayload + """ + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type + """ + thresholdValue: BigInt! - """Deletes a single `AppLimitEvent` using a unique key.""" - deleteAppLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitEventInput! - ): DeleteAppLimitEventPayload + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String! +} - """Deletes a single `AppLimitWarning` using a unique key.""" - deleteAppLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppLimitWarningInput! - ): DeleteAppLimitWarningPayload +"""A connection to a list of `OrgLimitWarning` values.""" +type OrgLimitWarningConnection { + """ + A list of edges which contains the `OrgLimitWarning` and cursor to aid in pagination. + """ + edges: [OrgLimitWarningEdge]! - """Deletes a single `OrgLimit` using a unique key.""" - deleteOrgLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitInput! - ): DeleteOrgLimitPayload + """A list of `OrgLimitWarning` objects.""" + nodes: [OrgLimitWarning]! - """Deletes a single `OrgLimitAggregate` using a unique key.""" - deleteOrgLimitAggregate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitAggregateInput! - ): DeleteOrgLimitAggregatePayload + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Deletes a single `OrgLimitCap` using a unique key.""" - deleteOrgLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitCapInput! - ): DeleteOrgLimitCapPayload + """ + The count of *all* `OrgLimitWarning` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgLimitWarning` edge in the connection.""" +type OrgLimitWarningEdge { + """A cursor for use in pagination.""" + cursor: Cursor - """Deletes a single `OrgLimitCapsDefault` using a unique key.""" - deleteOrgLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitCapsDefaultInput! - ): DeleteOrgLimitCapsDefaultPayload + """The `OrgLimitWarning` at the end of the edge.""" + node: OrgLimitWarning +} - """Deletes a single `OrgLimitCredit` using a unique key.""" - deleteOrgLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitCreditInput! - ): DeleteOrgLimitCreditPayload +""" +A filter to be used against `OrgLimitWarning` object types. All fields are combined with a logical ‘and.’ +""" +input OrgLimitWarningFilter { + """Checks for all expressions in this list.""" + and: [OrgLimitWarningFilter!] - """Deletes a single `OrgLimitDefault` using a unique key.""" - deleteOrgLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitDefaultInput! - ): DeleteOrgLimitDefaultPayload + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter - """Deletes a single `OrgLimitEvent` using a unique key.""" - deleteOrgLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitEventInput! - ): DeleteOrgLimitEventPayload + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Deletes a single `OrgLimitWarning` using a unique key.""" - deleteOrgLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgLimitWarningInput! - ): DeleteOrgLimitWarningPayload + """Filter by the object’s `name` field.""" + name: StringFilter - """ - Provision an S3 bucket for a logical bucket in the database. - Reads the bucket config via RLS, then creates and configures - the S3 bucket with the appropriate privacy policies, CORS rules, - and lifecycle settings. - """ - provisionBucket( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionBucketInput! - ): ProvisionBucketPayload - seedAppLimitCapsDefaults( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SeedAppLimitCapsDefaultsInput! - ): SeedAppLimitCapsDefaultsPayload - seedAppLimitDefaults( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SeedAppLimitDefaultsInput! - ): SeedAppLimitDefaultsPayload - seedOrgLimitCapsDefaults( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SeedOrgLimitCapsDefaultsInput! - ): SeedOrgLimitCapsDefaultsPayload - seedOrgLimitDefaults( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SeedOrgLimitDefaultsInput! - ): SeedOrgLimitDefaultsPayload + """Negates the expression.""" + not: OrgLimitWarningFilter - """Updates a single `AppLimit` using a unique key and a patch.""" - updateAppLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitInput! - ): UpdateAppLimitPayload + """Checks for any expressions in this list.""" + or: [OrgLimitWarningFilter!] - """Updates a single `AppLimitCap` using a unique key and a patch.""" - updateAppLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCapInput! - ): UpdateAppLimitCapPayload + """Filter by the object’s `taskIdentifier` field.""" + taskIdentifier: StringFilter - """Updates a single `AppLimitCapsDefault` using a unique key and a patch.""" - updateAppLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCapsDefaultInput! - ): UpdateAppLimitCapsDefaultPayload + """Filter by the object’s `thresholdValue` field.""" + thresholdValue: BigIntFilter - """Updates a single `AppLimitCredit` using a unique key and a patch.""" - updateAppLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCreditInput! - ): UpdateAppLimitCreditPayload + """Filter by the object’s `warningType` field.""" + warningType: StringFilter +} - """Updates a single `AppLimitCreditCode` using a unique key and a patch.""" - updateAppLimitCreditCode( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCreditCodeInput! - ): UpdateAppLimitCreditCodePayload +"""An input for mutations affecting `OrgLimitWarning`""" +input OrgLimitWarningInput { + """Per-entity override (NULL = scope default for all entities)""" + entityId: UUID + id: UUID + + """Limit name this warning applies to (must match a default_limits entry)""" + name: String! """ - Updates a single `AppLimitCreditCodeItem` using a unique key and a patch. + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) """ - updateAppLimitCreditCodeItem( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCreditCodeItemInput! - ): UpdateAppLimitCreditCodeItemPayload + taskIdentifier: String! """ - Updates a single `AppLimitCreditRedemption` using a unique key and a patch. + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type """ - updateAppLimitCreditRedemption( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitCreditRedemptionInput! - ): UpdateAppLimitCreditRedemptionPayload + thresholdValue: BigInt! - """Updates a single `AppLimitDefault` using a unique key and a patch.""" - updateAppLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitDefaultInput! - ): UpdateAppLimitDefaultPayload + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String! +} - """Updates a single `AppLimitEvent` using a unique key and a patch.""" - updateAppLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitEventInput! - ): UpdateAppLimitEventPayload +"""Methods to use when ordering `OrgLimitWarning`.""" +enum OrgLimitWarningOrderBy { + ENTITY_ID_ASC + ENTITY_ID_DESC + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + TASK_IDENTIFIER_ASC + TASK_IDENTIFIER_DESC + THRESHOLD_VALUE_ASC + THRESHOLD_VALUE_DESC + WARNING_TYPE_ASC + WARNING_TYPE_DESC +} - """Updates a single `AppLimitWarning` using a unique key and a patch.""" - updateAppLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppLimitWarningInput! - ): UpdateAppLimitWarningPayload +""" +Represents an update to a `OrgLimitWarning`. Fields that are set will be updated. +""" +input OrgLimitWarningPatch { + """Per-entity override (NULL = scope default for all entities)""" + entityId: UUID + id: UUID - """Updates a single `OrgLimit` using a unique key and a patch.""" - updateOrgLimit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitInput! - ): UpdateOrgLimitPayload + """Limit name this warning applies to (must match a default_limits entry)""" + name: String - """Updates a single `OrgLimitAggregate` using a unique key and a patch.""" - updateOrgLimitAggregate( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitAggregateInput! - ): UpdateOrgLimitAggregatePayload + """ + Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) + """ + taskIdentifier: String - """Updates a single `OrgLimitCap` using a unique key and a patch.""" - updateOrgLimitCap( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitCapInput! - ): UpdateOrgLimitCapPayload + """ + Threshold value — either an absolute count or a percentage (1-100) depending on warning_type + """ + thresholdValue: BigInt - """Updates a single `OrgLimitCapsDefault` using a unique key and a patch.""" - updateOrgLimitCapsDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitCapsDefaultInput! - ): UpdateOrgLimitCapsDefaultPayload + """Threshold type: absolute (fixed count) or percentage (of max)""" + warningType: String +} - """Updates a single `OrgLimitCredit` using a unique key and a patch.""" - updateOrgLimitCredit( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitCreditInput! - ): UpdateOrgLimitCreditPayload +"""Information about pagination in a connection.""" +type PageInfo { + """When paginating forwards, the cursor to continue.""" + endCursor: Cursor - """Updates a single `OrgLimitDefault` using a unique key and a patch.""" - updateOrgLimitDefault( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitDefaultInput! - ): UpdateOrgLimitDefaultPayload + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! - """Updates a single `OrgLimitEvent` using a unique key and a patch.""" - updateOrgLimitEvent( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitEventInput! - ): UpdateOrgLimitEventPayload + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! - """Updates a single `OrgLimitWarning` using a unique key and a patch.""" - updateOrgLimitWarning( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgLimitWarningInput! - ): UpdateOrgLimitWarningPayload + """When paginating backwards, the cursor to continue.""" + startCursor: Cursor } -"""Tracks per-actor usage counts against configurable maximum limits""" -type OrgLimit { - """User whose usage is being tracked against this limit""" - actorId: UUID! - entityId: UUID! - - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String +"""Defines plan tiers with named limit configurations""" +type Plan { + """Human-readable description of the plan tier""" + description: String id: UUID! - """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. - """ - max: BigInt + """Whether this plan can currently be applied to entities""" + isActive: Boolean - """Name identifier of the limit being tracked""" - name: String + """Unique name identifier of the plan (e.g. free, pro, enterprise)""" + name: String! - """Current usage count for this actor and limit""" - num: BigInt + """Reads and enables pagination through a set of `PlanCap`.""" + planCaps( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """Only read the first `n` values of the set.""" + first: Int - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """Only read the last `n` values of the set.""" + last: Int - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt + """The method to use when ordering `PlanCap`.""" + orderBy: [PlanCapOrderBy!] = [PRIMARY_KEY_ASC] - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: Interval + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanCapFilter + ): PlanCapConnection! - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} + """Reads and enables pagination through a set of `PlanLimit`.""" + planLimits( + """Read all values in the set after (below) this cursor.""" + after: Cursor -""" -Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) -""" -type OrgLimitAggregate { - """Entity (org) whose aggregate usage is being tracked""" - entityId: UUID! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID! + """Only read the first `n` values of the set.""" + first: Int - """Maximum allowed aggregate usage; negative means unlimited""" - max: BigInt + """Only read the last `n` values of the set.""" + last: Int - """Name identifier of the aggregate limit being tracked""" - name: String + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Current aggregate usage count for this entity and limit""" - num: BigInt + """The method to use when ordering `PlanLimit`.""" + orderBy: [PlanLimitOrderBy!] = [PRIMARY_KEY_ASC] - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanLimitFilter + ): PlanLimitConnection! - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """Reads and enables pagination through a set of `PlanMeterLimit`.""" + planMeterLimits( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """Only read the first `n` values of the set.""" + first: Int - """ - Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. - """ - reserved: BigInt + """Only read the last `n` values of the set.""" + last: Int - """Soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: Interval + """The method to use when ordering `PlanMeterLimit`.""" + orderBy: [PlanMeterLimitOrderBy!] = [PRIMARY_KEY_ASC] - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanMeterLimitFilter + ): PlanMeterLimitConnection! -"""A connection to a list of `OrgLimitAggregate` values.""" -type OrgLimitAggregateConnection { - """ - A list of edges which contains the `OrgLimitAggregate` and cursor to aid in pagination. - """ - edges: [OrgLimitAggregateEdge]! + """Reads and enables pagination through a set of `PlanPricing`.""" + planPricings( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """A list of `OrgLimitAggregate` objects.""" - nodes: [OrgLimitAggregate]! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Only read the first `n` values of the set.""" + first: Int - """ - The count of *all* `OrgLimitAggregate` you could get from the connection. - """ - totalCount: Int! -} + """Only read the last `n` values of the set.""" + last: Int -"""A `OrgLimitAggregate` edge in the connection.""" -type OrgLimitAggregateEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """The `OrgLimitAggregate` at the end of the edge.""" - node: OrgLimitAggregate -} + """The method to use when ordering `PlanPricing`.""" + orderBy: [PlanPricingOrderBy!] = [PRIMARY_KEY_ASC] -""" -A filter to be used against `OrgLimitAggregate` object types. All fields are combined with a logical ‘and.’ -""" -input OrgLimitAggregateFilter { - """Checks for all expressions in this list.""" - and: [OrgLimitAggregateFilter!] + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanPricingFilter + ): PlanPricingConnection! - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Reads and enables pagination through a set of `PlanSubscription`.""" + planSubscriptions( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `id` field.""" - id: UUIDFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `max` field.""" - max: BigIntFilter + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `name` field.""" - name: StringFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Negates the expression.""" - not: OrgLimitAggregateFilter + """The method to use when ordering `PlanSubscription`.""" + orderBy: [PlanSubscriptionOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `num` field.""" - num: BigIntFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanSubscriptionFilter + ): PlanSubscriptionConnection! +} - """Checks for any expressions in this list.""" - or: [OrgLimitAggregateFilter!] +""" +Maps each plan to feature flag cap values (written to limit_caps when plan is applied) +""" +type PlanCap { + """ + Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) + """ + capName: String! - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + """ + Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited + """ + capValue: BigInt! + id: UUID! - """Filter by the object’s `periodCredits` field.""" - periodCredits: BigIntFilter + """Reads a single `Plan` that is related to this `PlanCap`.""" + plan: Plan - """Filter by the object’s `planMax` field.""" - planMax: BigIntFilter + """Reference to the plan this cap setting belongs to""" + planId: UUID! +} - """Filter by the object’s `purchasedCredits` field.""" - purchasedCredits: BigIntFilter +"""A connection to a list of `PlanCap` values.""" +type PlanCapConnection { + """ + A list of edges which contains the `PlanCap` and cursor to aid in pagination. + """ + edges: [PlanCapEdge]! - """Filter by the object’s `reserved` field.""" - reserved: BigIntFilter + """A list of `PlanCap` objects.""" + nodes: [PlanCap]! - """Filter by the object’s `softMax` field.""" - softMax: BigIntFilter + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Filter by the object’s `windowDuration` field.""" - windowDuration: IntervalFilter + """The count of *all* `PlanCap` you could get from the connection.""" + totalCount: Int! +} - """Filter by the object’s `windowStart` field.""" - windowStart: DatetimeFilter +"""A `PlanCap` edge in the connection.""" +type PlanCapEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlanCap` at the end of the edge.""" + node: PlanCap } -"""An input for mutations affecting `OrgLimitAggregate`""" -input OrgLimitAggregateInput { - """Entity (org) whose aggregate usage is being tracked""" - entityId: UUID! +""" +A filter to be used against `PlanCap` object types. All fields are combined with a logical ‘and.’ +""" +input PlanCapFilter { + """Checks for all expressions in this list.""" + and: [PlanCapFilter!] - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID + """Filter by the object’s `capName` field.""" + capName: StringFilter - """Maximum allowed aggregate usage; negative means unlimited""" - max: BigInt + """Filter by the object’s `capValue` field.""" + capValue: BigIntFilter - """Name identifier of the aggregate limit being tracked""" - name: String + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Current aggregate usage count for this entity and limit""" - num: BigInt + """Negates the expression.""" + not: PlanCapFilter - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Checks for any expressions in this list.""" + or: [PlanCapFilter!] + + """Filter by the object’s `plan` relation.""" + plan: PlanFilter + + """Filter by the object’s `planId` field.""" + planId: UUIDFilter +} +"""An input for mutations affecting `PlanCap`""" +input PlanCapInput { """ - Temporary credits for the current billing window. Resets to 0 on window expiry. + Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) """ - periodCredits: BigInt + capName: String! """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. + Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited """ - planMax: BigInt + capValue: BigInt + id: UUID + + """Reference to the plan this cap setting belongs to""" + planId: UUID! +} + +"""Methods to use when ordering `PlanCap`.""" +enum PlanCapOrderBy { + CAP_NAME_ASC + CAP_NAME_DESC + CAP_VALUE_ASC + CAP_VALUE_DESC + ID_ASC + ID_DESC + NATURAL + PLAN_ID_ASC + PLAN_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} +""" +Represents an update to a `PlanCap`. Fields that are set will be updated. +""" +input PlanCapPatch { """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. + Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) """ - purchasedCredits: BigInt + capName: String """ - Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. + Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited """ - reserved: BigInt + capValue: BigInt + id: UUID - """Soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """Reference to the plan this cap setting belongs to""" + planId: UUID +} +"""A connection to a list of `Plan` values.""" +type PlanConnection { """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window + A list of edges which contains the `Plan` and cursor to aid in pagination. """ - windowDuration: IntervalInput + edges: [PlanEdge]! - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime + """A list of `Plan` objects.""" + nodes: [Plan]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Plan` you could get from the connection.""" + totalCount: Int! } -"""Methods to use when ordering `OrgLimitAggregate`.""" -enum OrgLimitAggregateOrderBy { - ENTITY_ID_ASC - ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC - ID_ASC - ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC - NATURAL - NUM_ASC - NUM_DESC - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC - PERIOD_CREDITS_ASC - PERIOD_CREDITS_DESC - PLAN_MAX_ASC - PLAN_MAX_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - PURCHASED_CREDITS_ASC - PURCHASED_CREDITS_DESC - RESERVED_ASC - RESERVED_DESC - SOFT_MAX_ASC - SOFT_MAX_DESC - WINDOW_DURATION_ASC - WINDOW_DURATION_DESC - WINDOW_START_ASC - WINDOW_START_DESC +"""A `Plan` edge in the connection.""" +type PlanEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Plan` at the end of the edge.""" + node: Plan } """ -Represents an update to a `OrgLimitAggregate`. Fields that are set will be updated. +A filter to be used against `Plan` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitAggregatePatch { - """Entity (org) whose aggregate usage is being tracked""" - entityId: UUID +input PlanFilter { + """Checks for all expressions in this list.""" + and: [PlanFilter!] - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID + """Filter by the object’s `description` field.""" + description: StringFilter - """Maximum allowed aggregate usage; negative means unlimited""" - max: BigInt + """Filter by the object’s `id` field.""" + id: UUIDFilter - """Name identifier of the aggregate limit being tracked""" - name: String + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter - """Current aggregate usage count for this entity and limit""" - num: BigInt + """Filter by the object’s `name` field.""" + name: StringFilter - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Negates the expression.""" + not: PlanFilter - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """Checks for any expressions in this list.""" + or: [PlanFilter!] - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """Filter by the object’s `planCaps` relation.""" + planCaps: PlanToManyPlanCapFilter - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """`planCaps` exist.""" + planCapsExist: Boolean - """ - Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. - """ - reserved: BigInt + """Filter by the object’s `planLimits` relation.""" + planLimits: PlanToManyPlanLimitFilter - """Soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """`planLimits` exist.""" + planLimitsExist: Boolean - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: IntervalInput + """Filter by the object’s `planMeterLimits` relation.""" + planMeterLimits: PlanToManyPlanMeterLimitFilter - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime + """`planMeterLimits` exist.""" + planMeterLimitsExist: Boolean + + """Filter by the object’s `planPricings` relation.""" + planPricings: PlanToManyPlanPricingFilter + + """`planPricings` exist.""" + planPricingsExist: Boolean + + """Filter by the object’s `planSubscriptions` relation.""" + planSubscriptions: PlanToManyPlanSubscriptionFilter + + """`planSubscriptions` exist.""" + planSubscriptionsExist: Boolean +} + +"""An input for mutations affecting `Plan`""" +input PlanInput { + """Human-readable description of the plan tier""" + description: String + id: UUID + + """Whether this plan can currently be applied to entities""" + isActive: Boolean + + """Unique name identifier of the plan (e.g. free, pro, enterprise)""" + name: String! } """ -Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. +Maps each plan to specific limit names and their maximum allowed values """ -type OrgLimitCap { - """Entity this cap override applies to""" - entityId: UUID! +type PlanLimit { id: UUID! - """Override cap value for this entity""" - max: BigInt! + """ + Name of the limit this plan sets (must match the name field in a limits table) + """ + limitName: String! - """Name identifier of the cap being overridden""" - name: String! + """ + Maximum value to set on the limit when this plan is applied; negative means unlimited + """ + maxValue: BigInt! + + """Reads a single `Plan` that is related to this `PlanLimit`.""" + plan: Plan + + """Reference to the plan this limit configuration belongs to""" + planId: UUID! } -"""A connection to a list of `OrgLimitCap` values.""" -type OrgLimitCapConnection { +"""A connection to a list of `PlanLimit` values.""" +type PlanLimitConnection { """ - A list of edges which contains the `OrgLimitCap` and cursor to aid in pagination. + A list of edges which contains the `PlanLimit` and cursor to aid in pagination. """ - edges: [OrgLimitCapEdge]! + edges: [PlanLimitEdge]! - """A list of `OrgLimitCap` objects.""" - nodes: [OrgLimitCap]! + """A list of `PlanLimit` objects.""" + nodes: [PlanLimit]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgLimitCap` you could get from the connection.""" + """The count of *all* `PlanLimit` you could get from the connection.""" totalCount: Int! } -"""A `OrgLimitCap` edge in the connection.""" -type OrgLimitCapEdge { +"""A `PlanLimit` edge in the connection.""" +type PlanLimitEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgLimitCap` at the end of the edge.""" - node: OrgLimitCap + """The `PlanLimit` at the end of the edge.""" + node: PlanLimit } """ -A filter to be used against `OrgLimitCap` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `PlanLimit` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitCapFilter { +input PlanLimitFilter { """Checks for all expressions in this list.""" - and: [OrgLimitCapFilter!] - - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + and: [PlanLimitFilter!] """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `max` field.""" - max: BigIntFilter + """Filter by the object’s `limitName` field.""" + limitName: StringFilter - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `maxValue` field.""" + maxValue: BigIntFilter """Negates the expression.""" - not: OrgLimitCapFilter + not: PlanLimitFilter """Checks for any expressions in this list.""" - or: [OrgLimitCapFilter!] + or: [PlanLimitFilter!] + + """Filter by the object’s `plan` relation.""" + plan: PlanFilter + + """Filter by the object’s `planId` field.""" + planId: UUIDFilter } -"""An input for mutations affecting `OrgLimitCap`""" -input OrgLimitCapInput { - """Entity this cap override applies to""" - entityId: UUID! +"""An input for mutations affecting `PlanLimit`""" +input PlanLimitInput { id: UUID - """Override cap value for this entity""" - max: BigInt + """ + Name of the limit this plan sets (must match the name field in a limits table) + """ + limitName: String! - """Name identifier of the cap being overridden""" - name: String! + """ + Maximum value to set on the limit when this plan is applied; negative means unlimited + """ + maxValue: BigInt! + + """Reference to the plan this limit configuration belongs to""" + planId: UUID! } -"""Methods to use when ordering `OrgLimitCap`.""" -enum OrgLimitCapOrderBy { - ENTITY_ID_ASC - ENTITY_ID_DESC +"""Methods to use when ordering `PlanLimit`.""" +enum PlanLimitOrderBy { ID_ASC ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC + LIMIT_NAME_ASC + LIMIT_NAME_DESC + MAX_VALUE_ASC + MAX_VALUE_DESC NATURAL + PLAN_ID_ASC + PLAN_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC } """ -Represents an update to a `OrgLimitCap`. Fields that are set will be updated. +Represents an update to a `PlanLimit`. Fields that are set will be updated. """ -input OrgLimitCapPatch { - """Entity this cap override applies to""" - entityId: UUID +input PlanLimitPatch { id: UUID - """Override cap value for this entity""" - max: BigInt + """ + Name of the limit this plan sets (must match the name field in a limits table) + """ + limitName: String - """Name identifier of the cap being overridden""" - name: String + """ + Maximum value to set on the limit when this plan is applied; negative means unlimited + """ + maxValue: BigInt + + """Reference to the plan this limit configuration belongs to""" + planId: UUID } """ -Default cap values for static configuration limits (max file size, feature flags, etc.). Not metered — just read by consumers. +Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) """ -type OrgLimitCapsDefault { +type PlanMeterLimit { id: UUID! """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) """ - max: BigInt! + meterSlug: String! + + """Reads a single `Plan` that is related to this `PlanMeterLimit`.""" + plan: Plan + + """Reference to the plan this meter limit belongs to""" + planId: UUID! """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + Billing quota to set on the balance when this plan is applied; negative means unlimited """ - name: String! + planLimit: BigInt! } -"""A connection to a list of `OrgLimitCapsDefault` values.""" -type OrgLimitCapsDefaultConnection { +"""A connection to a list of `PlanMeterLimit` values.""" +type PlanMeterLimitConnection { """ - A list of edges which contains the `OrgLimitCapsDefault` and cursor to aid in pagination. + A list of edges which contains the `PlanMeterLimit` and cursor to aid in pagination. """ - edges: [OrgLimitCapsDefaultEdge]! + edges: [PlanMeterLimitEdge]! - """A list of `OrgLimitCapsDefault` objects.""" - nodes: [OrgLimitCapsDefault]! + """A list of `PlanMeterLimit` objects.""" + nodes: [PlanMeterLimit]! """Information to aid in pagination.""" pageInfo: PageInfo! - """ - The count of *all* `OrgLimitCapsDefault` you could get from the connection. - """ + """The count of *all* `PlanMeterLimit` you could get from the connection.""" totalCount: Int! } -"""A `OrgLimitCapsDefault` edge in the connection.""" -type OrgLimitCapsDefaultEdge { +"""A `PlanMeterLimit` edge in the connection.""" +type PlanMeterLimitEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgLimitCapsDefault` at the end of the edge.""" - node: OrgLimitCapsDefault + """The `PlanMeterLimit` at the end of the edge.""" + node: PlanMeterLimit } """ -A filter to be used against `OrgLimitCapsDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitCapsDefaultFilter { +input PlanMeterLimitFilter { """Checks for all expressions in this list.""" - and: [OrgLimitCapsDefaultFilter!] + and: [PlanMeterLimitFilter!] """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `max` field.""" - max: BigIntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `meterSlug` field.""" + meterSlug: StringFilter """Negates the expression.""" - not: OrgLimitCapsDefaultFilter + not: PlanMeterLimitFilter """Checks for any expressions in this list.""" - or: [OrgLimitCapsDefaultFilter!] + or: [PlanMeterLimitFilter!] + + """Filter by the object’s `plan` relation.""" + plan: PlanFilter + + """Filter by the object’s `planId` field.""" + planId: UUIDFilter + + """Filter by the object’s `planLimit` field.""" + planLimit: BigIntFilter } -"""An input for mutations affecting `OrgLimitCapsDefault`""" -input OrgLimitCapsDefaultInput { +"""An input for mutations affecting `PlanMeterLimit`""" +input PlanMeterLimitInput { id: UUID """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) """ - max: BigInt + meterSlug: String! + + """Reference to the plan this meter limit belongs to""" + planId: UUID! """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) + Billing quota to set on the balance when this plan is applied; negative means unlimited """ - name: String! + planLimit: BigInt! } -"""Methods to use when ordering `OrgLimitCapsDefault`.""" -enum OrgLimitCapsDefaultOrderBy { +"""Methods to use when ordering `PlanMeterLimit`.""" +enum PlanMeterLimitOrderBy { ID_ASC ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC + METER_SLUG_ASC + METER_SLUG_DESC NATURAL + PLAN_ID_ASC + PLAN_ID_DESC + PLAN_LIMIT_ASC + PLAN_LIMIT_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC } """ -Represents an update to a `OrgLimitCapsDefault`. Fields that are set will be updated. +Represents an update to a `PlanMeterLimit`. Fields that are set will be updated. """ -input OrgLimitCapsDefaultPatch { +input PlanMeterLimitPatch { id: UUID """ - Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. + Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) """ - max: BigInt + meterSlug: String - """ - Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) - """ - name: String -} + """Reference to the plan this meter limit belongs to""" + planId: UUID -"""A connection to a list of `OrgLimit` values.""" -type OrgLimitConnection { """ - A list of edges which contains the `OrgLimit` and cursor to aid in pagination. + Billing quota to set on the balance when this plan is applied; negative means unlimited """ - edges: [OrgLimitEdge]! - - """A list of `OrgLimit` objects.""" - nodes: [OrgLimit]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `OrgLimit` you could get from the connection.""" - totalCount: Int! + planLimit: BigInt } -""" -Append-only ledger of credit grants that automatically update limit ceilings -""" -type OrgLimitCredit { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID - - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt! - - """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) - """ - creditType: String! - - """ - Reads a single `OrgLimitDefault` that is related to this `OrgLimitCredit`. - """ - defaultLimit: OrgLimitDefault - - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID! +"""Methods to use when ordering `Plan`.""" +enum PlanOrderBy { + DESCRIPTION_ASC + DESCRIPTION_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC +} - """Entity this credit applies to; NULL for actor-only credits""" - entityId: UUID +"""Per-entity limit overrides that take precedence over plan defaults""" +type PlanOverride { + """Entity receiving the custom override (personal org or actual org)""" + entityId: UUID! - """Membership prefix identifying the entity kind (org, team, app)""" - entityType: String + """When this override expires; NULL means permanent""" + expiresAt: Datetime id: UUID! - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Name of the limit being overridden""" + limitName: String! - """Optional reason for the credit grant (promo code, admin grant, etc.)""" + """Override maximum value; negative means unlimited""" + maxValue: BigInt! + + """Admin note explaining why this override was granted""" reason: String } -"""A connection to a list of `OrgLimitCredit` values.""" -type OrgLimitCreditConnection { +"""A connection to a list of `PlanOverride` values.""" +type PlanOverrideConnection { """ - A list of edges which contains the `OrgLimitCredit` and cursor to aid in pagination. + A list of edges which contains the `PlanOverride` and cursor to aid in pagination. """ - edges: [OrgLimitCreditEdge]! + edges: [PlanOverrideEdge]! - """A list of `OrgLimitCredit` objects.""" - nodes: [OrgLimitCredit]! + """A list of `PlanOverride` objects.""" + nodes: [PlanOverride]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgLimitCredit` you could get from the connection.""" + """The count of *all* `PlanOverride` you could get from the connection.""" totalCount: Int! } -"""A `OrgLimitCredit` edge in the connection.""" -type OrgLimitCreditEdge { +"""A `PlanOverride` edge in the connection.""" +type PlanOverrideEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgLimitCredit` at the end of the edge.""" - node: OrgLimitCredit + """The `PlanOverride` at the end of the edge.""" + node: PlanOverride } """ -A filter to be used against `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `PlanOverride` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitCreditFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - - """Filter by the object’s `amount` field.""" - amount: BigIntFilter - +input PlanOverrideFilter { """Checks for all expressions in this list.""" - and: [OrgLimitCreditFilter!] - - """Filter by the object’s `creditType` field.""" - creditType: StringFilter - - """Filter by the object’s `defaultLimit` relation.""" - defaultLimit: OrgLimitDefaultFilter - - """Filter by the object’s `defaultLimitId` field.""" - defaultLimitId: UUIDFilter + and: [PlanOverrideFilter!] """Filter by the object’s `entityId` field.""" entityId: UUIDFilter - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `limitName` field.""" + limitName: StringFilter + + """Filter by the object’s `maxValue` field.""" + maxValue: BigIntFilter + """Negates the expression.""" - not: OrgLimitCreditFilter + not: PlanOverrideFilter """Checks for any expressions in this list.""" - or: [OrgLimitCreditFilter!] - - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + or: [PlanOverrideFilter!] """Filter by the object’s `reason` field.""" reason: StringFilter } -"""An input for mutations affecting `OrgLimitCredit`""" -input OrgLimitCreditInput { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID - - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt! - - """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) - """ - creditType: String - - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID! - - """Entity this credit applies to; NULL for actor-only credits""" - entityId: UUID +"""An input for mutations affecting `PlanOverride`""" +input PlanOverrideInput { + """Entity receiving the custom override (personal org or actual org)""" + entityId: UUID! - """Membership prefix identifying the entity kind (org, team, app)""" - entityType: String + """When this override expires; NULL means permanent""" + expiresAt: Datetime id: UUID - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Name of the limit being overridden""" + limitName: String! - """Optional reason for the credit grant (promo code, admin grant, etc.)""" + """Override maximum value; negative means unlimited""" + maxValue: BigInt! + + """Admin note explaining why this override was granted""" reason: String } -"""Methods to use when ordering `OrgLimitCredit`.""" -enum OrgLimitCreditOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - AMOUNT_ASC - AMOUNT_DESC - CREDIT_TYPE_ASC - CREDIT_TYPE_DESC - DEFAULT_LIMIT_ID_ASC - DEFAULT_LIMIT_ID_DESC +"""Methods to use when ordering `PlanOverride`.""" +enum PlanOverrideOrderBy { ENTITY_ID_ASC ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC ID_ASC ID_DESC + LIMIT_NAME_ASC + LIMIT_NAME_DESC + MAX_VALUE_ASC + MAX_VALUE_DESC NATURAL - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC REASON_ASC @@ -4765,862 +10888,1090 @@ enum OrgLimitCreditOrderBy { } """ -Represents an update to a `OrgLimitCredit`. Fields that are set will be updated. +Represents an update to a `PlanOverride`. Fields that are set will be updated. """ -input OrgLimitCreditPatch { - """User this credit is for; NULL for aggregate entity-level credits""" - actorId: UUID +input PlanOverridePatch { + """Entity receiving the custom override (personal org or actual org)""" + entityId: UUID - """Number of credits to grant (positive to add, negative to revoke)""" - amount: BigInt + """When this override expires; NULL means permanent""" + expiresAt: Datetime + id: UUID + + """Name of the limit being overridden""" + limitName: String + + """Override maximum value; negative means unlimited""" + maxValue: BigInt + + """Admin note explaining why this override was granted""" + reason: String +} + +"""Represents an update to a `Plan`. Fields that are set will be updated.""" +input PlanPatch { + """Human-readable description of the plan tier""" + description: String + id: UUID + + """Whether this plan can currently be applied to entities""" + isActive: Boolean + + """Unique name identifier of the plan (e.g. free, pro, enterprise)""" + name: String +} + +"""Billing intervals and pricing for each plan tier""" +type PlanPricing { + """Billing cycle identifier (e.g. monthly, yearly, lifetime)""" + billingInterval: String! + + """ISO 4217 currency code (lowercase)""" + currency: String! + + """Discount percentage off the base price (0-100); NULL means no discount""" + discountPercent: BigFloat + id: UUID! + + """Whether this pricing option is currently available""" + isActive: Boolean + + """Reads a single `Plan` that is related to this `PlanPricing`.""" + plan: Plan + + """Reference to the plan this pricing belongs to""" + planId: UUID! """ - Credit durability: permanent (survives window reset) or period (resets on window expiry) + Price in smallest currency unit (e.g. cents); negative means contact-sales """ - creditType: String + price: BigInt! +} - """FK to default_limits — which limit definition this credit applies to""" - defaultLimitId: UUID +"""A connection to a list of `PlanPricing` values.""" +type PlanPricingConnection { + """ + A list of edges which contains the `PlanPricing` and cursor to aid in pagination. + """ + edges: [PlanPricingEdge]! - """Entity this credit applies to; NULL for actor-only credits""" - entityId: UUID + """A list of `PlanPricing` objects.""" + nodes: [PlanPricing]! - """Membership prefix identifying the entity kind (org, team, app)""" - entityType: String + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `PlanPricing` you could get from the connection.""" + totalCount: Int! +} + +"""A `PlanPricing` edge in the connection.""" +type PlanPricingEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlanPricing` at the end of the edge.""" + node: PlanPricing +} + +""" +A filter to be used against `PlanPricing` object types. All fields are combined with a logical ‘and.’ +""" +input PlanPricingFilter { + """Checks for all expressions in this list.""" + and: [PlanPricingFilter!] + + """Filter by the object’s `billingInterval` field.""" + billingInterval: StringFilter + + """Filter by the object’s `currency` field.""" + currency: StringFilter + + """Filter by the object’s `discountPercent` field.""" + discountPercent: BigFloatFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Negates the expression.""" + not: PlanPricingFilter + + """Checks for any expressions in this list.""" + or: [PlanPricingFilter!] + + """Filter by the object’s `plan` relation.""" + plan: PlanFilter + + """Filter by the object’s `planId` field.""" + planId: UUIDFilter + + """Filter by the object’s `price` field.""" + price: BigIntFilter +} + +"""An input for mutations affecting `PlanPricing`""" +input PlanPricingInput { + """Billing cycle identifier (e.g. monthly, yearly, lifetime)""" + billingInterval: String! + + """ISO 4217 currency code (lowercase)""" + currency: String + + """Discount percentage off the base price (0-100); NULL means no discount""" + discountPercent: BigFloat id: UUID - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Whether this pricing option is currently available""" + isActive: Boolean - """Optional reason for the credit grant (promo code, admin grant, etc.)""" - reason: String + """Reference to the plan this pricing belongs to""" + planId: UUID! + + """ + Price in smallest currency unit (e.g. cents); negative means contact-sales + """ + price: BigInt! +} + +"""Methods to use when ordering `PlanPricing`.""" +enum PlanPricingOrderBy { + BILLING_INTERVAL_ASC + BILLING_INTERVAL_DESC + CURRENCY_ASC + CURRENCY_DESC + DISCOUNT_PERCENT_ASC + DISCOUNT_PERCENT_DESC + ID_ASC + ID_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + NATURAL + PLAN_ID_ASC + PLAN_ID_DESC + PRICE_ASC + PRICE_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC } """ -Default maximum values for each named limit, applied when no per-actor override exists +Represents an update to a `PlanPricing`. Fields that are set will be updated. """ -type OrgLimitDefault { - id: UUID! +input PlanPricingPatch { + """Billing cycle identifier (e.g. monthly, yearly, lifetime)""" + billingInterval: String - """Default maximum usage allowed for this limit""" - max: BigInt + """ISO 4217 currency code (lowercase)""" + currency: String - """Name identifier of the limit this default applies to""" - name: String! + """Discount percentage off the base price (0-100); NULL means no discount""" + discountPercent: BigFloat + id: UUID - """Reads and enables pagination through a set of `OrgLimitCredit`.""" - orgLimitCreditsByDefaultLimitId( - """Read all values in the set after (below) this cursor.""" - after: Cursor + """Whether this pricing option is currently available""" + isActive: Boolean - """Read all values in the set before (above) this cursor.""" - before: Cursor + """Reference to the plan this pricing belongs to""" + planId: UUID - """Only read the first `n` values of the set.""" - first: Int + """ + Price in smallest currency unit (e.g. cents); negative means contact-sales + """ + price: BigInt +} - """Only read the last `n` values of the set.""" - last: Int +""" +Assigns a plan to an entity with subscription lifecycle (start, end, active state) +""" +type PlanSubscription { + """When the subscription expires (NULL = no expiration)""" + endsAt: Datetime - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int + """The entity (org, team, user) this subscription belongs to""" + entityId: UUID! - """The method to use when ordering `OrgLimitCredit`.""" - orderBy: [OrgLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String + id: UUID! - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgLimitCreditFilter - ): OrgLimitCreditConnection! + """Whether the subscription is currently active""" + isActive: Boolean - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """Resolved billable organization via get_organization_id""" + organizationId: UUID + + """Reads a single `Plan` that is related to this `PlanSubscription`.""" + plan: Plan + + """Reference to the plan this subscription is for""" + planId: UUID! + + """When the subscription becomes active""" + startsAt: Datetime } -"""A connection to a list of `OrgLimitDefault` values.""" -type OrgLimitDefaultConnection { +"""A connection to a list of `PlanSubscription` values.""" +type PlanSubscriptionConnection { """ - A list of edges which contains the `OrgLimitDefault` and cursor to aid in pagination. + A list of edges which contains the `PlanSubscription` and cursor to aid in pagination. """ - edges: [OrgLimitDefaultEdge]! + edges: [PlanSubscriptionEdge]! - """A list of `OrgLimitDefault` objects.""" - nodes: [OrgLimitDefault]! + """A list of `PlanSubscription` objects.""" + nodes: [PlanSubscription]! """Information to aid in pagination.""" pageInfo: PageInfo! """ - The count of *all* `OrgLimitDefault` you could get from the connection. + The count of *all* `PlanSubscription` you could get from the connection. """ totalCount: Int! } -"""A `OrgLimitDefault` edge in the connection.""" -type OrgLimitDefaultEdge { +"""A `PlanSubscription` edge in the connection.""" +type PlanSubscriptionEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgLimitDefault` at the end of the edge.""" - node: OrgLimitDefault + """The `PlanSubscription` at the end of the edge.""" + node: PlanSubscription } """ -A filter to be used against `OrgLimitDefault` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `PlanSubscription` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitDefaultFilter { +input PlanSubscriptionFilter { """Checks for all expressions in this list.""" - and: [OrgLimitDefaultFilter!] + and: [PlanSubscriptionFilter!] + + """Filter by the object’s `endsAt` field.""" + endsAt: DatetimeFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `entityType` field.""" + entityType: StringFilter """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `max` field.""" - max: BigIntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter """Negates the expression.""" - not: OrgLimitDefaultFilter + not: PlanSubscriptionFilter """Checks for any expressions in this list.""" - or: [OrgLimitDefaultFilter!] + or: [PlanSubscriptionFilter!] - """Filter by the object’s `orgLimitCreditsByDefaultLimitId` relation.""" - orgLimitCreditsByDefaultLimitId: OrgLimitDefaultToManyOrgLimitCreditFilter + """Filter by the object’s `organizationId` field.""" + organizationId: UUIDFilter - """`orgLimitCreditsByDefaultLimitId` exist.""" - orgLimitCreditsByDefaultLimitIdExist: Boolean + """Filter by the object’s `plan` relation.""" + plan: PlanFilter - """Filter by the object’s `softMax` field.""" - softMax: BigIntFilter + """Filter by the object’s `planId` field.""" + planId: UUIDFilter + + """Filter by the object’s `startsAt` field.""" + startsAt: DatetimeFilter } -"""An input for mutations affecting `OrgLimitDefault`""" -input OrgLimitDefaultInput { +"""An input for mutations affecting `PlanSubscription`""" +input PlanSubscriptionInput { + """When the subscription expires (NULL = no expiration)""" + endsAt: Datetime + + """The entity (org, team, user) this subscription belongs to""" + entityId: UUID! + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String id: UUID - """Default maximum usage allowed for this limit""" - max: BigInt + """Whether the subscription is currently active""" + isActive: Boolean - """Name identifier of the limit this default applies to""" - name: String! + """Resolved billable organization via get_organization_id""" + organizationId: UUID - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """Reference to the plan this subscription is for""" + planId: UUID! + + """When the subscription becomes active""" + startsAt: Datetime } -"""Methods to use when ordering `OrgLimitDefault`.""" -enum OrgLimitDefaultOrderBy { +"""Methods to use when ordering `PlanSubscription`.""" +enum PlanSubscriptionOrderBy { + ENDS_AT_ASC + ENDS_AT_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ENTITY_TYPE_ASC + ENTITY_TYPE_DESC ID_ASC ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC NATURAL + ORGANIZATION_ID_ASC + ORGANIZATION_ID_DESC + PLAN_ID_ASC + PLAN_ID_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - SOFT_MAX_ASC - SOFT_MAX_DESC + STARTS_AT_ASC + STARTS_AT_DESC } """ -Represents an update to a `OrgLimitDefault`. Fields that are set will be updated. +Represents an update to a `PlanSubscription`. Fields that are set will be updated. """ -input OrgLimitDefaultPatch { +input PlanSubscriptionPatch { + """When the subscription expires (NULL = no expiration)""" + endsAt: Datetime + + """The entity (org, team, user) this subscription belongs to""" + entityId: UUID + + """Membership prefix identifying the entity kind (org, team, app)""" + entityType: String id: UUID - """Default maximum usage allowed for this limit""" - max: BigInt + """Whether the subscription is currently active""" + isActive: Boolean - """Name identifier of the limit this default applies to""" - name: String + """Resolved billable organization via get_organization_id""" + organizationId: UUID - """Default soft limit threshold for warnings; NULL means no soft limit""" - softMax: BigInt + """Reference to the plan this subscription is for""" + planId: UUID + + """When the subscription becomes active""" + startsAt: Datetime } """ -A filter to be used against many `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `PlanCap` object types. All fields are combined with a logical ‘and.’ """ -input OrgLimitDefaultToManyOrgLimitCreditFilter { +input PlanToManyPlanCapFilter { """Filters to entities where every related entity matches.""" - every: OrgLimitCreditFilter + every: PlanCapFilter """Filters to entities where no related entity matches.""" - none: OrgLimitCreditFilter + none: PlanCapFilter """Filters to entities where at least one related entity matches.""" - some: OrgLimitCreditFilter + some: PlanCapFilter } -"""A `OrgLimit` edge in the connection.""" -type OrgLimitEdge { - """A cursor for use in pagination.""" - cursor: Cursor +""" +A filter to be used against many `PlanLimit` object types. All fields are combined with a logical ‘and.’ +""" +input PlanToManyPlanLimitFilter { + """Filters to entities where every related entity matches.""" + every: PlanLimitFilter - """The `OrgLimit` at the end of the edge.""" - node: OrgLimit + """Filters to entities where no related entity matches.""" + none: PlanLimitFilter + + """Filters to entities where at least one related entity matches.""" + some: PlanLimitFilter } -"""Append-only log of limit events for historical reporting and audit""" -type OrgLimitEvent { - """User who triggered this event; NULL for system/aggregate events""" - actorId: UUID - createdAt: Datetime! +""" +A filter to be used against many `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ +""" +input PlanToManyPlanMeterLimitFilter { + """Filters to entities where every related entity matches.""" + every: PlanMeterLimitFilter - """Change amount: positive for increment, negative for decrement""" - delta: BigInt + """Filters to entities where no related entity matches.""" + none: PlanMeterLimitFilter - """Entity this event applies to; NULL for app-level events""" - entityId: UUID + """Filters to entities where at least one related entity matches.""" + some: PlanMeterLimitFilter +} - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String +""" +A filter to be used against many `PlanPricing` object types. All fields are combined with a logical ‘and.’ +""" +input PlanToManyPlanPricingFilter { + """Filters to entities where every related entity matches.""" + every: PlanPricingFilter - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String + """Filters to entities where no related entity matches.""" + none: PlanPricingFilter - """Unique identifier for each limit event""" - id: UUID! + """Filters to entities where at least one related entity matches.""" + some: PlanPricingFilter +} - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt +""" +A filter to be used against many `PlanSubscription` object types. All fields are combined with a logical ‘and.’ +""" +input PlanToManyPlanSubscriptionFilter { + """Filters to entities where every related entity matches.""" + every: PlanSubscriptionFilter - """Limit name this event applies to""" - name: String + """Filters to entities where no related entity matches.""" + none: PlanSubscriptionFilter - """Usage count after this event""" - numAfter: BigInt + """Filters to entities where at least one related entity matches.""" + some: PlanSubscriptionFilter +} - """Usage count before this event""" - numBefore: BigInt +input ProvisionBucketInput { + """The logical bucket key (e.g., "public", "private")""" + bucketKey: String! """ - Resolved billable organization via get_organization_id; NULL for app-level events + Owner entity ID for entity-scoped bucket provisioning. + Omit for app-level (database-wide) storage. """ - organizationId: UUID + ownerId: UUID +} + +type ProvisionBucketPayload { + """The access type applied""" + accessType: String! + + """The S3 bucket name that was provisioned""" + bucketName: String! + + """The S3 endpoint (null for AWS S3 default)""" + endpoint: String + + """Error message if provisioning failed""" + error: String + + """The storage provider used""" + provider: String! + + """Whether provisioning succeeded""" + success: Boolean! +} +"""The root query type which gives access points into the data universe.""" +type Query { """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. + Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. """ - reason: String -} + _meta: MetaSchema + + """Reads and enables pagination through a set of `AppAchievementReward`.""" + appAchievementRewards( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """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 + + """The method to use when ordering `AppAchievementReward`.""" + orderBy: [AppAchievementRewardOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppAchievementRewardFilter + ): AppAchievementRewardConnection + + """Reads and enables pagination through a set of `AppEventAggregate`.""" + appEventAggregates( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int -"""A connection to a list of `OrgLimitEvent` values.""" -type OrgLimitEventConnection { - """ - A list of edges which contains the `OrgLimitEvent` and cursor to aid in pagination. - """ - edges: [OrgLimitEventEdge]! + """Only read the last `n` values of the set.""" + last: Int - """A list of `OrgLimitEvent` objects.""" - nodes: [OrgLimitEvent]! + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Information to aid in pagination.""" - pageInfo: PageInfo! + """The method to use when ordering `AppEventAggregate`.""" + orderBy: [AppEventAggregateOrderBy!] = [PRIMARY_KEY_ASC] - """The count of *all* `OrgLimitEvent` you could get from the connection.""" - totalCount: Int! -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppEventAggregateFilter + ): AppEventAggregateConnection -"""A `OrgLimitEvent` edge in the connection.""" -type OrgLimitEventEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Reads and enables pagination through a set of `AppEventType`.""" + appEventTypes( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """The `OrgLimitEvent` at the end of the edge.""" - node: OrgLimitEvent -} + """Read all values in the set before (above) this cursor.""" + before: Cursor -""" -A filter to be used against `OrgLimitEvent` object types. All fields are combined with a logical ‘and.’ -""" -input OrgLimitEventFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter + """Only read the first `n` values of the set.""" + first: Int - """Checks for all expressions in this list.""" - and: [OrgLimitEventFilter!] + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `delta` field.""" - delta: BigIntFilter + """The method to use when ordering `AppEventType`.""" + orderBy: [AppEventTypeOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppEventTypeFilter + ): AppEventTypeConnection - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """Reads and enables pagination through a set of `AppEvent`.""" + appEvents( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `eventType` field.""" - eventType: StringFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `id` field.""" - id: UUIDFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `maxAtEvent` field.""" - maxAtEvent: BigIntFilter + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `name` field.""" - name: StringFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Negates the expression.""" - not: OrgLimitEventFilter + """The method to use when ordering `AppEvent`.""" + orderBy: [AppEventOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `numAfter` field.""" - numAfter: BigIntFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppEventFilter + ): AppEventConnection - """Filter by the object’s `numBefore` field.""" - numBefore: BigIntFilter + """Reads and enables pagination through a set of `AppLevelGrant`.""" + appLevelGrants( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Checks for any expressions in this list.""" - or: [OrgLimitEventFilter!] + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `reason` field.""" - reason: StringFilter -} + """Only read the last `n` values of the set.""" + last: Int -"""An input for mutations affecting `OrgLimitEvent`""" -input OrgLimitEventInput { - """User who triggered this event; NULL for system/aggregate events""" - actorId: UUID - createdAt: Datetime + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Change amount: positive for increment, negative for decrement""" - delta: BigInt + """The method to use when ordering `AppLevelGrant`.""" + orderBy: [AppLevelGrantOrderBy!] = [PRIMARY_KEY_ASC] - """Entity this event applies to; NULL for app-level events""" - entityId: UUID + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLevelGrantFilter + ): AppLevelGrantConnection - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String + """Reads and enables pagination through a set of `AppLevelRequirement`.""" + appLevelRequirements( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Unique identifier for each limit event""" - id: UUID + """Only read the first `n` values of the set.""" + first: Int - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt + """Only read the last `n` values of the set.""" + last: Int - """Limit name this event applies to""" - name: String + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Usage count after this event""" - numAfter: BigInt + """The method to use when ordering `AppLevelRequirement`.""" + orderBy: [AppLevelRequirementOrderBy!] = [PRIMARY_KEY_ASC] - """Usage count before this event""" - numBefore: BigInt + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLevelRequirementFilter + ): AppLevelRequirementConnection - """ - Resolved billable organization via get_organization_id; NULL for app-level events - """ - organizationId: UUID + """Reads and enables pagination through a set of `AppLevel`.""" + appLevels( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. - """ - reason: String -} + """Read all values in the set before (above) this cursor.""" + before: Cursor -"""Methods to use when ordering `OrgLimitEvent`.""" -enum OrgLimitEventOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DELTA_ASC - DELTA_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC - EVENT_TYPE_ASC - EVENT_TYPE_DESC - ID_ASC - ID_DESC - MAX_AT_EVENT_ASC - MAX_AT_EVENT_DESC - NAME_ASC - NAME_DESC - NATURAL - NUM_AFTER_ASC - NUM_AFTER_DESC - NUM_BEFORE_ASC - NUM_BEFORE_DESC - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - REASON_ASC - REASON_DESC -} + """Only read the first `n` values of the set.""" + first: Int -""" -Represents an update to a `OrgLimitEvent`. Fields that are set will be updated. -""" -input OrgLimitEventPatch { - """User who triggered this event; NULL for system/aggregate events""" - actorId: UUID - createdAt: Datetime + """Only read the last `n` values of the set.""" + last: Int - """Change amount: positive for increment, negative for decrement""" - delta: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Entity this event applies to; NULL for app-level events""" - entityId: UUID + """The method to use when ordering `AppLevel`.""" + orderBy: [AppLevelOrderBy!] = [PRIMARY_KEY_ASC] - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLevelFilter + ): AppLevelConnection - """Event type: inc, dec, check, modify, transfer, apply_plan, reset""" - eventType: String + """Reads and enables pagination through a set of `AppLimitCap`.""" + appLimitCaps( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Unique identifier for each limit event""" - id: UUID + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Max limit ceiling at the time of this event""" - maxAtEvent: BigInt + """Only read the first `n` values of the set.""" + first: Int - """Limit name this event applies to""" - name: String + """Only read the last `n` values of the set.""" + last: Int - """Usage count after this event""" - numAfter: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Usage count before this event""" - numBefore: BigInt + """The method to use when ordering `AppLimitCap`.""" + orderBy: [AppLimitCapOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCapFilter + ): AppLimitCapConnection - """ - Resolved billable organization via get_organization_id; NULL for app-level events - """ - organizationId: UUID + """Reads and enables pagination through a set of `AppLimitCapsDefault`.""" + appLimitCapsDefaults( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - Optional reason or source: achievement, invite, plan_change, purchase, etc. - """ - reason: String -} + """Read all values in the set before (above) this cursor.""" + before: Cursor -""" -A filter to be used against `OrgLimit` object types. All fields are combined with a logical ‘and.’ -""" -input OrgLimitFilter { - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter + """Only read the first `n` values of the set.""" + first: Int - """Checks for all expressions in this list.""" - and: [OrgLimitFilter!] + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `entityType` field.""" - entityType: StringFilter + """The method to use when ordering `AppLimitCapsDefault`.""" + orderBy: [AppLimitCapsDefaultOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `id` field.""" - id: UUIDFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCapsDefaultFilter + ): AppLimitCapsDefaultConnection - """Filter by the object’s `max` field.""" - max: BigIntFilter + """ + Reads and enables pagination through a set of `AppLimitCreditCodeItem`. + """ + appLimitCreditCodeItems( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `name` field.""" - name: StringFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Negates the expression.""" - not: OrgLimitFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `num` field.""" - num: BigIntFilter + """Only read the last `n` values of the set.""" + last: Int - """Checks for any expressions in this list.""" - or: [OrgLimitFilter!] + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `organizationId` field.""" - organizationId: UUIDFilter + """The method to use when ordering `AppLimitCreditCodeItem`.""" + orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `periodCredits` field.""" - periodCredits: BigIntFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditCodeItemFilter + ): AppLimitCreditCodeItemConnection - """Filter by the object’s `planMax` field.""" - planMax: BigIntFilter + """Reads and enables pagination through a set of `AppLimitCreditCode`.""" + appLimitCreditCodes( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `purchasedCredits` field.""" - purchasedCredits: BigIntFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Filter by the object’s `softMax` field.""" - softMax: BigIntFilter + """Only read the first `n` values of the set.""" + first: Int - """Filter by the object’s `windowDuration` field.""" - windowDuration: IntervalFilter + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `windowStart` field.""" - windowStart: DatetimeFilter -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -"""An input for mutations affecting `OrgLimit`""" -input OrgLimitInput { - """User whose usage is being tracked against this limit""" - actorId: UUID! - entityId: UUID! + """The method to use when ordering `AppLimitCreditCode`.""" + orderBy: [AppLimitCreditCodeOrderBy!] = [PRIMARY_KEY_ASC] - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditCodeFilter + ): AppLimitCreditCodeConnection """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. + Reads and enables pagination through a set of `AppLimitCreditRedemption`. """ - max: BigInt - - """Name identifier of the limit being tracked""" - name: String + appLimitCreditRedemptions( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Current usage count for this actor and limit""" - num: BigInt + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Only read the first `n` values of the set.""" + first: Int - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """Only read the last `n` values of the set.""" + last: Int - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """The method to use when ordering `AppLimitCreditRedemption`.""" + orderBy: [AppLimitCreditRedemptionOrderBy!] = [PRIMARY_KEY_ASC] - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditRedemptionFilter + ): AppLimitCreditRedemptionConnection - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: IntervalInput + """Reads and enables pagination through a set of `AppLimitCredit`.""" + appLimitCredits( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} + """Read all values in the set before (above) this cursor.""" + before: Cursor -"""Methods to use when ordering `OrgLimit`.""" -enum OrgLimitOrderBy { - ACTOR_ID_ASC - ACTOR_ID_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - ENTITY_TYPE_ASC - ENTITY_TYPE_DESC - ID_ASC - ID_DESC - MAX_ASC - MAX_DESC - NAME_ASC - NAME_DESC - NATURAL - NUM_ASC - NUM_DESC - ORGANIZATION_ID_ASC - ORGANIZATION_ID_DESC - PERIOD_CREDITS_ASC - PERIOD_CREDITS_DESC - PLAN_MAX_ASC - PLAN_MAX_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - PURCHASED_CREDITS_ASC - PURCHASED_CREDITS_DESC - SOFT_MAX_ASC - SOFT_MAX_DESC - WINDOW_DURATION_ASC - WINDOW_DURATION_DESC - WINDOW_START_ASC - WINDOW_START_DESC -} + """Only read the first `n` values of the set.""" + first: Int -""" -Represents an update to a `OrgLimit`. Fields that are set will be updated. -""" -input OrgLimitPatch { - """User whose usage is being tracked against this limit""" - actorId: UUID - entityId: UUID + """Only read the last `n` values of the set.""" + last: Int - """Entity type prefix (org, team, app, etc.) for interpreting entity_id""" - entityType: String - id: UUID + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. - """ - max: BigInt + """The method to use when ordering `AppLimitCredit`.""" + orderBy: [AppLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] - """Name identifier of the limit being tracked""" - name: String + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitCreditFilter + ): AppLimitCreditConnection - """Current usage count for this actor and limit""" - num: BigInt + """Reads and enables pagination through a set of `AppLimitDefault`.""" + appLimitDefaults( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Resolved billable organization via get_organization_id""" - organizationId: UUID + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - Temporary credits for the current billing window. Resets to 0 on window expiry. - """ - periodCredits: BigInt + """Only read the first `n` values of the set.""" + first: Int - """ - Ceiling set by the active plan via apply_plan(). Window reset does not change this value. - """ - planMax: BigInt + """Only read the last `n` values of the set.""" + last: Int - """ - Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. - """ - purchasedCredits: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """ - Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. - """ - softMax: BigInt + """The method to use when ordering `AppLimitDefault`.""" + orderBy: [AppLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] - """ - Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window - """ - windowDuration: IntervalInput + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitDefaultFilter + ): AppLimitDefaultConnection - """Start of the current metering window; NULL means no time window""" - windowStart: Datetime -} + """Reads and enables pagination through a set of `AppLimitEvent`.""" + appLimitEvents( + """Read all values in the set after (below) this cursor.""" + after: Cursor -""" -Warning configuration for soft limits. Each row defines a warning threshold and the job task to enqueue when usage approaches it. -""" -type OrgLimitWarning { - """Per-entity override (NULL = scope default for all entities)""" - entityId: UUID - id: UUID! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Limit name this warning applies to (must match a default_limits entry)""" - name: String! + """Only read the first `n` values of the set.""" + first: Int - """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) - """ - taskIdentifier: String! + """Only read the last `n` values of the set.""" + last: Int - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt! + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String! -} + """The method to use when ordering `AppLimitEvent`.""" + orderBy: [AppLimitEventOrderBy!] = [PRIMARY_KEY_ASC] -"""A connection to a list of `OrgLimitWarning` values.""" -type OrgLimitWarningConnection { - """ - A list of edges which contains the `OrgLimitWarning` and cursor to aid in pagination. - """ - edges: [OrgLimitWarningEdge]! + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitEventFilter + ): AppLimitEventConnection - """A list of `OrgLimitWarning` objects.""" - nodes: [OrgLimitWarning]! + """Reads and enables pagination through a set of `AppLimitWarning`.""" + appLimitWarnings( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - The count of *all* `OrgLimitWarning` you could get from the connection. - """ - totalCount: Int! -} + """Only read the first `n` values of the set.""" + first: Int -"""A `OrgLimitWarning` edge in the connection.""" -type OrgLimitWarningEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Only read the last `n` values of the set.""" + last: Int - """The `OrgLimitWarning` at the end of the edge.""" - node: OrgLimitWarning -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -""" -A filter to be used against `OrgLimitWarning` object types. All fields are combined with a logical ‘and.’ -""" -input OrgLimitWarningFilter { - """Checks for all expressions in this list.""" - and: [OrgLimitWarningFilter!] + """The method to use when ordering `AppLimitWarning`.""" + orderBy: [AppLimitWarningOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitWarningFilter + ): AppLimitWarningConnection - """Filter by the object’s `id` field.""" - id: UUIDFilter + """Reads and enables pagination through a set of `AppLimit`.""" + appLimits( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Filter by the object’s `name` field.""" - name: StringFilter + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Negates the expression.""" - not: OrgLimitWarningFilter + """Only read the first `n` values of the set.""" + first: Int - """Checks for any expressions in this list.""" - or: [OrgLimitWarningFilter!] + """Only read the last `n` values of the set.""" + last: Int - """Filter by the object’s `taskIdentifier` field.""" - taskIdentifier: StringFilter + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Filter by the object’s `thresholdValue` field.""" - thresholdValue: BigIntFilter + """The method to use when ordering `AppLimit`.""" + orderBy: [AppLimitOrderBy!] = [PRIMARY_KEY_ASC] - """Filter by the object’s `warningType` field.""" - warningType: StringFilter -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppLimitFilter + ): AppLimitConnection -"""An input for mutations affecting `OrgLimitWarning`""" -input OrgLimitWarningInput { - """Per-entity override (NULL = scope default for all entities)""" - entityId: UUID - id: UUID + """Reads and enables pagination through a set of `BillingUsageSummary`.""" + billingUsageSummaries( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """Limit name this warning applies to (must match a default_limits entry)""" - name: String! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) - """ - taskIdentifier: String! + """Only read the first `n` values of the set.""" + first: Int - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt! + """Only read the last `n` values of the set.""" + last: Int - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String! -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -"""Methods to use when ordering `OrgLimitWarning`.""" -enum OrgLimitWarningOrderBy { - ENTITY_ID_ASC - ENTITY_ID_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - TASK_IDENTIFIER_ASC - TASK_IDENTIFIER_DESC - THRESHOLD_VALUE_ASC - THRESHOLD_VALUE_DESC - WARNING_TYPE_ASC - WARNING_TYPE_DESC -} + """The method to use when ordering `BillingUsageSummary`.""" + orderBy: [BillingUsageSummaryOrderBy!] = [PRIMARY_KEY_ASC] -""" -Represents an update to a `OrgLimitWarning`. Fields that are set will be updated. -""" -input OrgLimitWarningPatch { - """Per-entity override (NULL = scope default for all entities)""" - entityId: UUID - id: UUID + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: BillingUsageSummaryFilter + ): BillingUsageSummaryConnection + captureAppLimitDefaults: JSON + captureOrgLimitDefaults: JSON + captureTrustLadder: JSON + eventsAchieved(level: String, roleId: UUID): Boolean - """Limit name this warning applies to (must match a default_limits entry)""" - name: String + """Reads and enables pagination through a set of `AppLevelRequirement`.""" + eventsRequired( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) - """ - taskIdentifier: String + """Only read the first `n` values of the set.""" + first: Int + level: String - """ - Threshold value — either an absolute count or a percentage (1-100) depending on warning_type - """ - thresholdValue: BigInt + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + roleId: UUID + ): AppLevelRequirementConnection - """Threshold type: absolute (fixed count) or percentage (of max)""" - warningType: String -} + """Reads and enables pagination through a set of `Ledger`.""" + ledgers( + """Read all values in the set after (below) this cursor.""" + after: Cursor -"""Information about pagination in a connection.""" -type PageInfo { - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor + """Read all values in the set before (above) this cursor.""" + before: Cursor - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! + """Only read the first `n` values of the set.""" + first: Int - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! + """Only read the last `n` values of the set.""" + last: Int - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -input ProvisionBucketInput { - """The logical bucket key (e.g., "public", "private")""" - bucketKey: String! + """The method to use when ordering `Ledger`.""" + orderBy: [LedgerOrderBy!] = [PRIMARY_KEY_ASC] - """ - Owner entity ID for entity-scoped bucket provisioning. - Omit for app-level (database-wide) storage. - """ - ownerId: UUID -} + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: LedgerFilter + ): LedgerConnection -type ProvisionBucketPayload { - """The access type applied""" - accessType: String! + """Reads and enables pagination through a set of `MeterCredit`.""" + meterCredits( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """The S3 bucket name that was provisioned""" - bucketName: String! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """The S3 endpoint (null for AWS S3 default)""" - endpoint: String + """Only read the first `n` values of the set.""" + first: Int - """Error message if provisioning failed""" - error: String + """Only read the last `n` values of the set.""" + last: Int - """The storage provider used""" - provider: String! + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int - """Whether provisioning succeeded""" - success: Boolean! -} + """The method to use when ordering `MeterCredit`.""" + orderBy: [MeterCreditOrderBy!] = [PRIMARY_KEY_ASC] -"""The root query type which gives access points into the data universe.""" -type Query { - """ - Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. - """ - _meta: MetaSchema + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: MeterCreditFilter + ): MeterCreditConnection - """Reads and enables pagination through a set of `AppLimitCap`.""" - appLimitCaps( + """Reads and enables pagination through a set of `MeterDefault`.""" + meterDefaults( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5639,17 +11990,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCap`.""" - orderBy: [AppLimitCapOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `MeterDefault`.""" + orderBy: [MeterDefaultOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCapFilter - ): AppLimitCapConnection + where: MeterDefaultFilter + ): MeterDefaultConnection - """Reads and enables pagination through a set of `AppLimitCapsDefault`.""" - appLimitCapsDefaults( + """Reads and enables pagination through a set of `MeterSource`.""" + meterSources( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5668,19 +12019,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCapsDefault`.""" - orderBy: [AppLimitCapsDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `MeterSource`.""" + orderBy: [MeterSourceOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCapsDefaultFilter - ): AppLimitCapsDefaultConnection + where: MeterSourceFilter + ): MeterSourceConnection - """ - Reads and enables pagination through a set of `AppLimitCreditCodeItem`. - """ - appLimitCreditCodeItems( + """Reads and enables pagination through a set of `Meter`.""" + meters( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5699,17 +12048,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCreditCodeItem`.""" - orderBy: [AppLimitCreditCodeItemOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `Meter`.""" + orderBy: [MeterOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCreditCodeItemFilter - ): AppLimitCreditCodeItemConnection + where: MeterFilter + ): MeterConnection - """Reads and enables pagination through a set of `AppLimitCreditCode`.""" - appLimitCreditCodes( + """Reads and enables pagination through a set of `OrgLimitAggregate`.""" + orgLimitAggregates( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5728,19 +12077,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCreditCode`.""" - orderBy: [AppLimitCreditCodeOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitAggregate`.""" + orderBy: [OrgLimitAggregateOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCreditCodeFilter - ): AppLimitCreditCodeConnection + where: OrgLimitAggregateFilter + ): OrgLimitAggregateConnection - """ - Reads and enables pagination through a set of `AppLimitCreditRedemption`. - """ - appLimitCreditRedemptions( + """Reads and enables pagination through a set of `OrgLimitCap`.""" + orgLimitCaps( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5759,17 +12106,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCreditRedemption`.""" - orderBy: [AppLimitCreditRedemptionOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitCap`.""" + orderBy: [OrgLimitCapOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCreditRedemptionFilter - ): AppLimitCreditRedemptionConnection + where: OrgLimitCapFilter + ): OrgLimitCapConnection - """Reads and enables pagination through a set of `AppLimitCredit`.""" - appLimitCredits( + """Reads and enables pagination through a set of `OrgLimitCapsDefault`.""" + orgLimitCapsDefaults( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5788,17 +12135,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitCredit`.""" - orderBy: [AppLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitCapsDefault`.""" + orderBy: [OrgLimitCapsDefaultOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitCreditFilter - ): AppLimitCreditConnection + where: OrgLimitCapsDefaultFilter + ): OrgLimitCapsDefaultConnection - """Reads and enables pagination through a set of `AppLimitDefault`.""" - appLimitDefaults( + """Reads and enables pagination through a set of `OrgLimitCredit`.""" + orgLimitCredits( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5817,17 +12164,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitDefault`.""" - orderBy: [AppLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitCredit`.""" + orderBy: [OrgLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitDefaultFilter - ): AppLimitDefaultConnection + where: OrgLimitCreditFilter + ): OrgLimitCreditConnection - """Reads and enables pagination through a set of `AppLimitEvent`.""" - appLimitEvents( + """Reads and enables pagination through a set of `OrgLimitDefault`.""" + orgLimitDefaults( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5846,17 +12193,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitEvent`.""" - orderBy: [AppLimitEventOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitDefault`.""" + orderBy: [OrgLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitEventFilter - ): AppLimitEventConnection + where: OrgLimitDefaultFilter + ): OrgLimitDefaultConnection - """Reads and enables pagination through a set of `AppLimitWarning`.""" - appLimitWarnings( + """Reads and enables pagination through a set of `OrgLimitEvent`.""" + orgLimitEvents( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5875,17 +12222,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimitWarning`.""" - orderBy: [AppLimitWarningOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitEvent`.""" + orderBy: [OrgLimitEventOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitWarningFilter - ): AppLimitWarningConnection + where: OrgLimitEventFilter + ): OrgLimitEventConnection - """Reads and enables pagination through a set of `AppLimit`.""" - appLimits( + """Reads and enables pagination through a set of `OrgLimitWarning`.""" + orgLimitWarnings( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5904,17 +12251,17 @@ type Query { """ offset: Int - """The method to use when ordering `AppLimit`.""" - orderBy: [AppLimitOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimitWarning`.""" + orderBy: [OrgLimitWarningOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitFilter - ): AppLimitConnection + where: OrgLimitWarningFilter + ): OrgLimitWarningConnection - """Reads and enables pagination through a set of `OrgLimitAggregate`.""" - orgLimitAggregates( + """Reads and enables pagination through a set of `OrgLimit`.""" + orgLimits( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5933,17 +12280,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitAggregate`.""" - orderBy: [OrgLimitAggregateOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `OrgLimit`.""" + orderBy: [OrgLimitOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitAggregateFilter - ): OrgLimitAggregateConnection + where: OrgLimitFilter + ): OrgLimitConnection - """Reads and enables pagination through a set of `OrgLimitCap`.""" - orgLimitCaps( + """Reads and enables pagination through a set of `PlanCap`.""" + planCaps( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5962,17 +12309,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitCap`.""" - orderBy: [OrgLimitCapOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanCap`.""" + orderBy: [PlanCapOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitCapFilter - ): OrgLimitCapConnection + where: PlanCapFilter + ): PlanCapConnection - """Reads and enables pagination through a set of `OrgLimitCapsDefault`.""" - orgLimitCapsDefaults( + """Reads and enables pagination through a set of `PlanLimit`.""" + planLimits( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -5991,17 +12338,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitCapsDefault`.""" - orderBy: [OrgLimitCapsDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanLimit`.""" + orderBy: [PlanLimitOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitCapsDefaultFilter - ): OrgLimitCapsDefaultConnection + where: PlanLimitFilter + ): PlanLimitConnection - """Reads and enables pagination through a set of `OrgLimitCredit`.""" - orgLimitCredits( + """Reads and enables pagination through a set of `PlanMeterLimit`.""" + planMeterLimits( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -6020,17 +12367,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitCredit`.""" - orderBy: [OrgLimitCreditOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanMeterLimit`.""" + orderBy: [PlanMeterLimitOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitCreditFilter - ): OrgLimitCreditConnection + where: PlanMeterLimitFilter + ): PlanMeterLimitConnection - """Reads and enables pagination through a set of `OrgLimitDefault`.""" - orgLimitDefaults( + """Reads and enables pagination through a set of `PlanOverride`.""" + planOverrides( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -6049,17 +12396,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitDefault`.""" - orderBy: [OrgLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanOverride`.""" + orderBy: [PlanOverrideOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitDefaultFilter - ): OrgLimitDefaultConnection + where: PlanOverrideFilter + ): PlanOverrideConnection - """Reads and enables pagination through a set of `OrgLimitEvent`.""" - orgLimitEvents( + """Reads and enables pagination through a set of `PlanPricing`.""" + planPricings( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -6078,17 +12425,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitEvent`.""" - orderBy: [OrgLimitEventOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanPricing`.""" + orderBy: [PlanPricingOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitEventFilter - ): OrgLimitEventConnection + where: PlanPricingFilter + ): PlanPricingConnection - """Reads and enables pagination through a set of `OrgLimitWarning`.""" - orgLimitWarnings( + """Reads and enables pagination through a set of `PlanSubscription`.""" + planSubscriptions( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -6107,17 +12454,17 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimitWarning`.""" - orderBy: [OrgLimitWarningOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlanSubscription`.""" + orderBy: [PlanSubscriptionOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitWarningFilter - ): OrgLimitWarningConnection + where: PlanSubscriptionFilter + ): PlanSubscriptionConnection - """Reads and enables pagination through a set of `OrgLimit`.""" - orgLimits( + """Reads and enables pagination through a set of `Plan`.""" + plans( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -6136,14 +12483,65 @@ type Query { """ offset: Int - """The method to use when ordering `OrgLimit`.""" - orderBy: [OrgLimitOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `Plan`.""" + orderBy: [PlanOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlanFilter + ): PlanConnection +} + +"""All input for the `recomputeCapabilities` mutation.""" +input RecomputeCapabilitiesInput { + actorId: UUID + + """ + 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 output of our `recomputeCapabilities` mutation.""" +type RecomputeCapabilitiesPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeAchievement` mutation.""" +input RevokeAchievementInput { + actorId: UUID + + """ + 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 + levelName: String +} - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgLimitFilter - ): OrgLimitConnection +"""The output of our `revokeAchievement` mutation.""" +type RevokeAchievementPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } """All input for the `seedAppLimitCapsDefaults` mutation.""" @@ -6196,6 +12594,31 @@ type SeedAppLimitDefaultsPayload { result: Boolean } +"""All input for the `seedMeterDefaults` mutation.""" +input SeedMeterDefaultsInput { + """ + 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 + defaults: JSON +} + +"""The output of our `seedMeterDefaults` mutation.""" +type SeedMeterDefaultsPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Boolean +} + """All input for the `seedOrgLimitCapsDefaults` mutation.""" input SeedOrgLimitCapsDefaultsInput { """ @@ -6246,6 +12669,57 @@ type SeedOrgLimitDefaultsPayload { result: Boolean } +"""All input for the `seedPlan` mutation.""" +input SeedPlanInput { + """ + 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 + planConfig: JSON + planName: String +} + +"""The output of our `seedPlan` mutation.""" +type SeedPlanPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + +"""All input for the `seedTrustLadder` mutation.""" +input SeedTrustLadderInput { + """ + 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 + ladder: JSON +} + +"""The output of our `seedTrustLadder` mutation.""" +type SeedTrustLadderPayload { + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Boolean +} + """ A filter to be used against String fields. All fields are combined with a logical ‘and.’ """ @@ -6374,55 +12848,324 @@ input StringFilter { """Starts with the specified string (case-sensitive).""" startsWith: String - """Starts with the specified string (case-insensitive).""" - startsWithInsensitive: String + """Starts with the specified string (case-insensitive).""" + startsWithInsensitive: String +} + +""" +A universally unique identifier as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122). +""" +scalar UUID + +""" +A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ +""" +input UUIDFilter { + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: UUID + + """Equal to the specified value.""" + equalTo: UUID + + """Greater than the specified value.""" + greaterThan: UUID + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: UUID + + """Included in the specified list.""" + in: [UUID!] + + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Less than the specified value.""" + lessThan: UUID + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: UUID + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: UUID + + """Not equal to the specified value.""" + notEqualTo: UUID + + """Not included in the specified list.""" + notIn: [UUID!] +} + +"""All input for the `updateAppAchievementReward` mutation.""" +input UpdateAppAchievementRewardInput { + """ + An object where the defined keys will be set on the `AppAchievementReward` being updated. + """ + appAchievementRewardPatch: AppAchievementRewardPatch! + + """ + 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 update `AppAchievementReward` mutation.""" +type UpdateAppAchievementRewardPayload { + """The `AppAchievementReward` that was updated by this mutation.""" + appAchievementReward: AppAchievementReward + + """An edge for our `AppAchievementReward`. May be used by Relay 1.""" + appAchievementRewardEdge( + """The method to use when ordering `AppAchievementReward`.""" + orderBy: [AppAchievementRewardOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppAchievementRewardEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppEventAggregate` mutation.""" +input UpdateAppEventAggregateInput { + """ + An object where the defined keys will be set on the `AppEventAggregate` being updated. + """ + appEventAggregatePatch: AppEventAggregatePatch! + + """ + 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 update `AppEventAggregate` mutation.""" +type UpdateAppEventAggregatePayload { + """The `AppEventAggregate` that was updated by this mutation.""" + appEventAggregate: AppEventAggregate + + """An edge for our `AppEventAggregate`. May be used by Relay 1.""" + appEventAggregateEdge( + """The method to use when ordering `AppEventAggregate`.""" + orderBy: [AppEventAggregateOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventAggregateEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppEvent` mutation.""" +input UpdateAppEventInput { + """ + An object where the defined keys will be set on the `AppEvent` being updated. + """ + appEventPatch: AppEventPatch! + + """ + 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 + createdAt: Datetime! + + """Unique identifier for each event (uuidv7 provides temporal ordering)""" + id: UUID! +} + +"""The output of our update `AppEvent` mutation.""" +type UpdateAppEventPayload { + """The `AppEvent` that was updated by this mutation.""" + appEvent: AppEvent + + """An edge for our `AppEvent`. May be used by Relay 1.""" + appEventEdge( + """The method to use when ordering `AppEvent`.""" + orderBy: [AppEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppEventType` mutation.""" +input UpdateAppEventTypeInput { + """ + An object where the defined keys will be set on the `AppEventType` being updated. + """ + appEventTypePatch: AppEventTypePatch! + + """ + 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 update `AppEventType` mutation.""" +type UpdateAppEventTypePayload { + """The `AppEventType` that was updated by this mutation.""" + appEventType: AppEventType + + """An edge for our `AppEventType`. May be used by Relay 1.""" + appEventTypeEdge( + """The method to use when ordering `AppEventType`.""" + orderBy: [AppEventTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppEventTypeEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppLevelGrant` mutation.""" +input UpdateAppLevelGrantInput { + """ + An object where the defined keys will be set on the `AppLevelGrant` being updated. + """ + appLevelGrantPatch: AppLevelGrantPatch! + + """ + 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 update `AppLevelGrant` mutation.""" +type UpdateAppLevelGrantPayload { + """The `AppLevelGrant` that was updated by this mutation.""" + appLevelGrant: AppLevelGrant + + """An edge for our `AppLevelGrant`. May be used by Relay 1.""" + appLevelGrantEdge( + """The method to use when ordering `AppLevelGrant`.""" + orderBy: [AppLevelGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelGrantEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } -""" -A universally unique identifier as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122). -""" -scalar UUID +"""All input for the `updateAppLevel` mutation.""" +input UpdateAppLevelInput { + """ + An object where the defined keys will be set on the `AppLevel` being updated. + """ + appLevelPatch: AppLevelPatch! -""" -A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ -""" -input UUIDFilter { """ - Not equal to the specified value, treating null like an ordinary value. + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. """ - distinctFrom: UUID + clientMutationId: String + id: UUID! +} - """Equal to the specified value.""" - equalTo: UUID +"""The output of our update `AppLevel` mutation.""" +type UpdateAppLevelPayload { + """The `AppLevel` that was updated by this mutation.""" + appLevel: AppLevel - """Greater than the specified value.""" - greaterThan: UUID + """An edge for our `AppLevel`. May be used by Relay 1.""" + appLevelEdge( + """The method to use when ordering `AppLevel`.""" + orderBy: [AppLevelOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelEdge - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: UUID + """ + 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 - """Included in the specified list.""" - in: [UUID!] + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} +"""All input for the `updateAppLevelRequirement` mutation.""" +input UpdateAppLevelRequirementInput { """ - Is null (if `true` is specified) or is not null (if `false` is specified). + An object where the defined keys will be set on the `AppLevelRequirement` being updated. """ - isNull: Boolean + appLevelRequirementPatch: AppLevelRequirementPatch! - """Less than the specified value.""" - lessThan: UUID + """ + 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! +} - """Less than or equal to the specified value.""" - lessThanOrEqualTo: UUID +"""The output of our update `AppLevelRequirement` mutation.""" +type UpdateAppLevelRequirementPayload { + """The `AppLevelRequirement` that was updated by this mutation.""" + appLevelRequirement: AppLevelRequirement - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: UUID + """An edge for our `AppLevelRequirement`. May be used by Relay 1.""" + appLevelRequirementEdge( + """The method to use when ordering `AppLevelRequirement`.""" + orderBy: [AppLevelRequirementOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLevelRequirementEdge - """Not equal to the specified value.""" - notEqualTo: UUID + """ + 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 - """Not included in the specified list.""" - notIn: [UUID!] + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query } """All input for the `updateAppLimitCap` mutation.""" @@ -6691,117 +13434,348 @@ type UpdateAppLimitDefaultPayload { query: Query } -"""All input for the `updateAppLimitEvent` mutation.""" -input UpdateAppLimitEventInput { - """ - An object where the defined keys will be set on the `AppLimitEvent` being updated. - """ - appLimitEventPatch: AppLimitEventPatch! - +"""All input for the `updateAppLimitEvent` mutation.""" +input UpdateAppLimitEventInput { + """ + An object where the defined keys will be set on the `AppLimitEvent` being updated. + """ + appLimitEventPatch: AppLimitEventPatch! + + """ + 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 + createdAt: Datetime! + + """Unique identifier for each limit event""" + id: UUID! +} + +"""The output of our update `AppLimitEvent` mutation.""" +type UpdateAppLimitEventPayload { + """The `AppLimitEvent` that was updated by this mutation.""" + appLimitEvent: AppLimitEvent + + """An edge for our `AppLimitEvent`. May be used by Relay 1.""" + appLimitEventEdge( + """The method to use when ordering `AppLimitEvent`.""" + orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEventEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppLimit` mutation.""" +input UpdateAppLimitInput { + """ + An object where the defined keys will be set on the `AppLimit` being updated. + """ + appLimitPatch: AppLimitPatch! + + """ + 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 update `AppLimit` mutation.""" +type UpdateAppLimitPayload { + """The `AppLimit` that was updated by this mutation.""" + appLimit: AppLimit + + """An edge for our `AppLimit`. May be used by Relay 1.""" + appLimitEdge( + """The method to use when ordering `AppLimit`.""" + orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateAppLimitWarning` mutation.""" +input UpdateAppLimitWarningInput { + """ + An object where the defined keys will be set on the `AppLimitWarning` being updated. + """ + appLimitWarningPatch: AppLimitWarningPatch! + + """ + 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 update `AppLimitWarning` mutation.""" +type UpdateAppLimitWarningPayload { + """The `AppLimitWarning` that was updated by this mutation.""" + appLimitWarning: AppLimitWarning + + """An edge for our `AppLimitWarning`. May be used by Relay 1.""" + appLimitWarningEdge( + """The method to use when ordering `AppLimitWarning`.""" + orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppLimitWarningEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateBillingUsageSummary` mutation.""" +input UpdateBillingUsageSummaryInput { + """ + An object where the defined keys will be set on the `BillingUsageSummary` being updated. + """ + billingUsageSummaryPatch: BillingUsageSummaryPatch! + + """ + 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 update `BillingUsageSummary` mutation.""" +type UpdateBillingUsageSummaryPayload { + """The `BillingUsageSummary` that was updated by this mutation.""" + billingUsageSummary: BillingUsageSummary + + """An edge for our `BillingUsageSummary`. May be used by Relay 1.""" + billingUsageSummaryEdge( + """The method to use when ordering `BillingUsageSummary`.""" + orderBy: [BillingUsageSummaryOrderBy!]! = [PRIMARY_KEY_ASC] + ): BillingUsageSummaryEdge + + """ + 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 + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateLedger` mutation.""" +input UpdateLedgerInput { + """ + 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 + createdAt: Datetime! + + """Unique identifier for each ledger entry""" + id: UUID! + + """ + An object where the defined keys will be set on the `Ledger` being updated. + """ + ledgerPatch: LedgerPatch! +} + +"""The output of our update `Ledger` mutation.""" +type UpdateLedgerPayload { + """ + 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 `Ledger` that was updated by this mutation.""" + ledger: Ledger + + """An edge for our `Ledger`. May be used by Relay 1.""" + ledgerEdge( + """The method to use when ordering `Ledger`.""" + orderBy: [LedgerOrderBy!]! = [PRIMARY_KEY_ASC] + ): LedgerEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateMeterCredit` mutation.""" +input UpdateMeterCreditInput { + """ + 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 `MeterCredit` being updated. + """ + meterCreditPatch: MeterCreditPatch! +} + +"""The output of our update `MeterCredit` mutation.""" +type UpdateMeterCreditPayload { + """ + 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 `MeterCredit` that was updated by this mutation.""" + meterCredit: MeterCredit + + """An edge for our `MeterCredit`. May be used by Relay 1.""" + meterCreditEdge( + """The method to use when ordering `MeterCredit`.""" + orderBy: [MeterCreditOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterCreditEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updateMeterDefault` mutation.""" +input UpdateMeterDefaultInput { """ 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 - createdAt: Datetime! - - """Unique identifier for each limit event""" id: UUID! -} - -"""The output of our update `AppLimitEvent` mutation.""" -type UpdateAppLimitEventPayload { - """The `AppLimitEvent` that was updated by this mutation.""" - appLimitEvent: AppLimitEvent - """An edge for our `AppLimitEvent`. May be used by Relay 1.""" - appLimitEventEdge( - """The method to use when ordering `AppLimitEvent`.""" - orderBy: [AppLimitEventOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEventEdge + """ + An object where the defined keys will be set on the `MeterDefault` being updated. + """ + meterDefaultPatch: MeterDefaultPatch! +} +"""The output of our update `MeterDefault` mutation.""" +type UpdateMeterDefaultPayload { """ 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 `MeterDefault` that was updated by this mutation.""" + meterDefault: MeterDefault + + """An edge for our `MeterDefault`. May be used by Relay 1.""" + meterDefaultEdge( + """The method to use when ordering `MeterDefault`.""" + orderBy: [MeterDefaultOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterDefaultEdge + """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `updateAppLimit` mutation.""" -input UpdateAppLimitInput { - """ - An object where the defined keys will be set on the `AppLimit` being updated. - """ - appLimitPatch: AppLimitPatch! - +"""All input for the `updateMeter` mutation.""" +input UpdateMeterInput { """ 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 update `AppLimit` mutation.""" -type UpdateAppLimitPayload { - """The `AppLimit` that was updated by this mutation.""" - appLimit: AppLimit - """An edge for our `AppLimit`. May be used by Relay 1.""" - appLimitEdge( - """The method to use when ordering `AppLimit`.""" - orderBy: [AppLimitOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitEdge + """ + An object where the defined keys will be set on the `Meter` being updated. + """ + meterPatch: MeterPatch! +} +"""The output of our update `Meter` mutation.""" +type UpdateMeterPayload { """ 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 `Meter` that was updated by this mutation.""" + meter: Meter + + """An edge for our `Meter`. May be used by Relay 1.""" + meterEdge( + """The method to use when ordering `Meter`.""" + orderBy: [MeterOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterEdge + """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query } -"""All input for the `updateAppLimitWarning` mutation.""" -input UpdateAppLimitWarningInput { - """ - An object where the defined keys will be set on the `AppLimitWarning` being updated. - """ - appLimitWarningPatch: AppLimitWarningPatch! - +"""All input for the `updateMeterSource` mutation.""" +input UpdateMeterSourceInput { """ 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 update `AppLimitWarning` mutation.""" -type UpdateAppLimitWarningPayload { - """The `AppLimitWarning` that was updated by this mutation.""" - appLimitWarning: AppLimitWarning - - """An edge for our `AppLimitWarning`. May be used by Relay 1.""" - appLimitWarningEdge( - """The method to use when ordering `AppLimitWarning`.""" - orderBy: [AppLimitWarningOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppLimitWarningEdge + """ + An object where the defined keys will be set on the `MeterSource` being updated. + """ + meterSourcePatch: MeterSourcePatch! +} +"""The output of our update `MeterSource` mutation.""" +type UpdateMeterSourcePayload { """ 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 `MeterSource` that was updated by this mutation.""" + meterSource: MeterSource + + """An edge for our `MeterSource`. May be used by Relay 1.""" + meterSourceEdge( + """The method to use when ordering `MeterSource`.""" + orderBy: [MeterSourceOrderBy!]! = [PRIMARY_KEY_ASC] + ): MeterSourceEdge + """ Our root query field type. Allows us to run any query from our mutation payload. """ @@ -7113,4 +14087,273 @@ type UpdateOrgLimitWarningPayload { Our root query field type. Allows us to run any query from our mutation payload. """ query: Query -} \ No newline at end of file +} + +"""All input for the `updatePlanCap` mutation.""" +input UpdatePlanCapInput { + """ + 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 `PlanCap` being updated. + """ + planCapPatch: PlanCapPatch! +} + +"""The output of our update `PlanCap` mutation.""" +type UpdatePlanCapPayload { + """ + 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 `PlanCap` that was updated by this mutation.""" + planCap: PlanCap + + """An edge for our `PlanCap`. May be used by Relay 1.""" + planCapEdge( + """The method to use when ordering `PlanCap`.""" + orderBy: [PlanCapOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanCapEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlan` mutation.""" +input UpdatePlanInput { + """ + 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 `Plan` being updated. + """ + planPatch: PlanPatch! +} + +"""All input for the `updatePlanLimit` mutation.""" +input UpdatePlanLimitInput { + """ + 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 `PlanLimit` being updated. + """ + planLimitPatch: PlanLimitPatch! +} + +"""The output of our update `PlanLimit` mutation.""" +type UpdatePlanLimitPayload { + """ + 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 `PlanLimit` that was updated by this mutation.""" + planLimit: PlanLimit + + """An edge for our `PlanLimit`. May be used by Relay 1.""" + planLimitEdge( + """The method to use when ordering `PlanLimit`.""" + orderBy: [PlanLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlanMeterLimit` mutation.""" +input UpdatePlanMeterLimitInput { + """ + 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 `PlanMeterLimit` being updated. + """ + planMeterLimitPatch: PlanMeterLimitPatch! +} + +"""The output of our update `PlanMeterLimit` mutation.""" +type UpdatePlanMeterLimitPayload { + """ + 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 `PlanMeterLimit` that was updated by this mutation.""" + planMeterLimit: PlanMeterLimit + + """An edge for our `PlanMeterLimit`. May be used by Relay 1.""" + planMeterLimitEdge( + """The method to use when ordering `PlanMeterLimit`.""" + orderBy: [PlanMeterLimitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanMeterLimitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlanOverride` mutation.""" +input UpdatePlanOverrideInput { + """ + 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 `PlanOverride` being updated. + """ + planOverridePatch: PlanOverridePatch! +} + +"""The output of our update `PlanOverride` mutation.""" +type UpdatePlanOverridePayload { + """ + 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 `PlanOverride` that was updated by this mutation.""" + planOverride: PlanOverride + + """An edge for our `PlanOverride`. May be used by Relay 1.""" + planOverrideEdge( + """The method to use when ordering `PlanOverride`.""" + orderBy: [PlanOverrideOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanOverrideEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""The output of our update `Plan` mutation.""" +type UpdatePlanPayload { + """ + 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 `Plan` that was updated by this mutation.""" + plan: Plan + + """An edge for our `Plan`. May be used by Relay 1.""" + planEdge( + """The method to use when ordering `Plan`.""" + orderBy: [PlanOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlanPricing` mutation.""" +input UpdatePlanPricingInput { + """ + 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 `PlanPricing` being updated. + """ + planPricingPatch: PlanPricingPatch! +} + +"""The output of our update `PlanPricing` mutation.""" +type UpdatePlanPricingPayload { + """ + 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 `PlanPricing` that was updated by this mutation.""" + planPricing: PlanPricing + + """An edge for our `PlanPricing`. May be used by Relay 1.""" + planPricingEdge( + """The method to use when ordering `PlanPricing`.""" + orderBy: [PlanPricingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanPricingEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `updatePlanSubscription` mutation.""" +input UpdatePlanSubscriptionInput { + """ + 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 `PlanSubscription` being updated. + """ + planSubscriptionPatch: PlanSubscriptionPatch! +} + +"""The output of our update `PlanSubscription` mutation.""" +type UpdatePlanSubscriptionPayload { + """ + 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 `PlanSubscription` that was updated by this mutation.""" + planSubscription: PlanSubscription + + """An edge for our `PlanSubscription`. May be used by Relay 1.""" + planSubscriptionEdge( + """The method to use when ordering `PlanSubscription`.""" + orderBy: [PlanSubscriptionOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlanSubscriptionEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""The `Upload` scalar type represents a file upload.""" +scalar Upload \ No newline at end of file diff --git a/sdk/constructive-sdk/src/admin/README.md b/sdk/constructive-sdk/src/admin/README.md index c9e7aa3cfd..10d94a7ddd 100644 --- a/sdk/constructive-sdk/src/admin/README.md +++ b/sdk/constructive-sdk/src/admin/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 30 +- **Tables:** 42 - **Custom queries:** 9 - **Custom mutations:** 3 diff --git a/sdk/constructive-sdk/src/admin/orm/README.md b/sdk/constructive-sdk/src/admin/orm/README.md index c5a36159a7..a0d3b13a12 100644 --- a/sdk/constructive-sdk/src/admin/orm/README.md +++ b/sdk/constructive-sdk/src/admin/orm/README.md @@ -22,18 +22,28 @@ const db = createClient({ | Model | Operations | |-------|------------| | `appAdminGrant` | findMany, findOne, create, update, delete | +| `appCapability` | findMany, findOne, create, update, delete | +| `appCapabilityDefaultCapability` | findMany, findOne, create, update, delete | +| `appCapabilityDefault` | findMany, findOne, create, update, delete | +| `appCapabilityDefaultGrant` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `appGrant` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | | `appMembership` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | +| `appMembershipProfile` | findMany, findOne, create, update, delete | | `appOwnerGrant` | findMany, findOne, create, update, delete | -| `appPermission` | findMany, findOne, create, update, delete | -| `appPermissionDefault` | findMany, findOne, create, update, delete | -| `appPermissionDefaultGrant` | findMany, findOne, create, update, delete | -| `appPermissionDefaultPermission` | findMany, findOne, create, update, delete | +| `appProfileCapability` | findMany, findOne, create, update, delete | +| `appProfile` | findMany, findOne, create, update, delete | +| `appProfileDefinitionGrant` | findMany, findOne, create, update, delete | +| `appProfileGrant` | findMany, findOne, create, update, delete | +| `appProfileTemplate` | findMany, findOne, create, update, delete | | `membershipType` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | +| `orgCapability` | findMany, findOne, create, update, delete | +| `orgCapabilityDefaultCapability` | findMany, findOne, create, update, delete | +| `orgCapabilityDefault` | findMany, findOne, create, update, delete | +| `orgCapabilityDefaultGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | | `orgClaimedInvite` | findMany, findOne, create, update, delete | @@ -45,12 +55,14 @@ const db = createClient({ | `orgMemberProfile` | findMany, findOne, create, update, delete | | `orgMembership` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | +| `orgMembershipProfile` | findMany, findOne, create, update, delete | | `orgMembershipSetting` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | -| `orgPermission` | findMany, findOne, create, update, delete | -| `orgPermissionDefault` | findMany, findOne, create, update, delete | -| `orgPermissionDefaultGrant` | findMany, findOne, create, update, delete | -| `orgPermissionDefaultPermission` | findMany, findOne, create, update, delete | +| `orgProfileCapability` | findMany, findOne, create, update, delete | +| `orgProfile` | findMany, findOne, create, update, delete | +| `orgProfileDefinitionGrant` | findMany, findOne, create, update, delete | +| `orgProfileGrant` | findMany, findOne, create, update, delete | +| `orgProfileTemplate` | findMany, findOne, create, update, delete | ## Table Operations @@ -88,6 +100,136 @@ const updated = await db.appAdminGrant.update({ where: { id: '' }, data: { const deleted = await db.appAdminGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.appCapability` + +CRUD operations for AppCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bitnum` | Int | Yes | +| `bitstr` | BitString | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all appCapability records +const items = await db.appCapability.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Get one by id +const item = await db.appCapability.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Create +const created = await db.appCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefaultCapability` + +CRUD operations for AppCapabilityDefaultCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appCapabilityDefaultCapability records +const items = await db.appCapabilityDefaultCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefaultCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appCapabilityDefaultCapability.create({ data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefaultCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefault` + +CRUD operations for AppCapabilityDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `id` | UUID | No | + +**Operations:** + +```typescript +// List all appCapabilityDefault records +const items = await db.appCapabilityDefault.findMany({ select: { capabilities: true, id: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefault.findOne({ id: '', select: { capabilities: true, id: true } }).execute(); + +// Create +const created = await db.appCapabilityDefault.create({ data: { capabilities: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.appCapabilityDefaultGrant` + +CRUD operations for AppCapabilityDefaultGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | +| `id` | UUID | No | +| `isGrant` | Boolean | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appCapabilityDefaultGrant records +const items = await db.appCapabilityDefaultGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appCapabilityDefaultGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appCapabilityDefaultGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appCapabilityDefaultGrant.delete({ where: { id: '' } }).execute(); +``` + ### `db.appClaimedInvite` CRUD operations for AppClaimedInvite records. @@ -131,24 +273,24 @@ CRUD operations for AppGrant records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissions` | BitString | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript // List all appGrant records -const items = await db.appGrant.findMany({ select: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const items = await db.appGrant.findMany({ select: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appGrant.findOne({ id: '', select: { actorId: true, createdAt: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const item = await db.appGrant.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Create -const created = await db.appGrant.create({ data: { actorId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.appGrant.create({ data: { actorId: '', capabilities: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); // Update const updated = await db.appGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -209,6 +351,7 @@ CRUD operations for AppMembership records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `createdBy` | UUID | Yes | | `granted` | BitString | Yes | @@ -220,7 +363,6 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isVerified` | Boolean | Yes | -| `permissions` | BitString | Yes | | `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | | `updatedBy` | UUID | Yes | @@ -229,13 +371,13 @@ CRUD operations for AppMembership records. ```typescript // List all appMembership records -const items = await db.appMembership.findMany({ select: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const items = await db.appMembership.findMany({ select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { actorId: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isOwner: true, isVerified: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { actorId: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isOwner: '', isVerified: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); // Update const updated = await db.appMembership.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -279,6 +421,40 @@ const updated = await db.appMembershipDefault.update({ where: { id: '' }, const deleted = await db.appMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.appMembershipProfile` + +CRUD operations for AppMembershipProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appMembershipProfile records +const items = await db.appMembershipProfile.findMany({ select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appMembershipProfile.findOne({ id: '', select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appMembershipProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.appOwnerGrant` CRUD operations for AppOwnerGrant records. @@ -313,72 +489,114 @@ const updated = await db.appOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.appOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermission` +### `db.appProfileCapability` -CRUD operations for AppPermission records. +CRUD operations for AppProfileCapability records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `bitnum` | Int | Yes | -| `bitstr` | BitString | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appProfileCapability records +const items = await db.appProfileCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appProfileCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appProfileCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.appProfile` + +CRUD operations for AppProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `createdAt` | Datetime | No | | `description` | String | Yes | | `id` | UUID | No | +| `isDefault` | Boolean | Yes | +| `isSystem` | Boolean | Yes | | `name` | String | Yes | +| `slug` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermission records -const items = await db.appPermission.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +// List all appProfile records +const items = await db.appProfile.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermission.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +const item = await db.appProfile.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermission.create({ data: { bitnum: '', bitstr: '', description: '', name: '' }, select: { id: true } }).execute(); +const created = await db.appProfile.create({ data: { capabilities: '', description: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermission.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); +const updated = await db.appProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfile.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefault` +### `db.appProfileDefinitionGrant` -CRUD operations for AppPermissionDefault records. +CRUD operations for AppProfileDefinitionGrant records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | | `id` | UUID | No | -| `permissions` | BitString | Yes | +| `isGrant` | Boolean | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefault records -const items = await db.appPermissionDefault.findMany({ select: { id: true, permissions: true } }).execute(); +// List all appProfileDefinitionGrant records +const items = await db.appProfileDefinitionGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefault.findOne({ id: '', select: { id: true, permissions: true } }).execute(); +const item = await db.appProfileDefinitionGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefault.create({ data: { permissions: '' }, select: { id: true } }).execute(); +const created = await db.appProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefault.update({ where: { id: '' }, data: { permissions: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileDefinitionGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefaultGrant` +### `db.appProfileGrant` -CRUD operations for AppPermissionDefaultGrant records. +CRUD operations for AppProfileGrant records. **Fields:** @@ -388,58 +606,63 @@ CRUD operations for AppPermissionDefaultGrant records. | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissionId` | UUID | Yes | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefaultGrant records -const items = await db.appPermissionDefaultGrant.findMany({ select: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +// List all appProfileGrant records +const items = await db.appProfileGrant.findMany({ select: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefaultGrant.findOne({ id: '', select: { createdAt: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.appProfileGrant.findOne({ id: '', select: { createdAt: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefaultGrant.create({ data: { grantorId: '', isGrant: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.appProfileGrant.create({ data: { grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefaultGrant.update({ where: { id: '' }, data: { grantorId: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileGrant.update({ where: { id: '' }, data: { grantorId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefaultGrant.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.appPermissionDefaultPermission` +### `db.appProfileTemplate` -CRUD operations for AppPermissionDefaultPermission records. +CRUD operations for AppProfileTemplate records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | +| `description` | String | Yes | | `id` | UUID | No | -| `permissionId` | UUID | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all appPermissionDefaultPermission records -const items = await db.appPermissionDefaultPermission.findMany({ select: { createdAt: true, id: true, permissionId: true, updatedAt: true } }).execute(); +// List all appProfileTemplate records +const items = await db.appProfileTemplate.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.appPermissionDefaultPermission.findOne({ id: '', select: { createdAt: true, id: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.appProfileTemplate.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.appPermissionDefaultPermission.create({ data: { permissionId: '' }, select: { id: true } }).execute(); +const created = await db.appProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appPermissionDefaultPermission.update({ where: { id: '' }, data: { permissionId: '' }, select: { id: true } }).execute(); +const updated = await db.appProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appPermissionDefaultPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.appProfileTemplate.delete({ where: { id: '' } }).execute(); ``` ### `db.membershipType` @@ -511,6 +734,139 @@ const updated = await db.orgAdminGrant.update({ where: { id: '' }, data: { const deleted = await db.orgAdminGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.orgCapability` + +CRUD operations for OrgCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bitnum` | Int | Yes | +| `bitstr` | BitString | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgCapability records +const items = await db.orgCapability.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgCapability.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, kind: true, name: true } }).execute(); + +// Create +const created = await db.orgCapability.create({ data: { bitnum: '', bitstr: '', description: '', kind: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapability.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefaultCapability` + +CRUD operations for OrgCapabilityDefaultCapability records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `entityId` | UUID | Yes | +| `id` | UUID | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefaultCapability records +const items = await db.orgCapabilityDefaultCapability.findMany({ select: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefaultCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, entityId: true, id: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefaultCapability.create({ data: { capabilityId: '', entityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefaultCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefaultCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefault` + +CRUD operations for OrgCapabilityDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `entityId` | UUID | Yes | +| `id` | UUID | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefault records +const items = await db.orgCapabilityDefault.findMany({ select: { capabilities: true, entityId: true, id: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefault.findOne({ id: '', select: { capabilities: true, entityId: true, id: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefault.create({ data: { capabilities: '', entityId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefault.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgCapabilityDefaultGrant` + +CRUD operations for OrgCapabilityDefaultGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `entityId` | UUID | Yes | +| `grantorId` | UUID | Yes | +| `id` | UUID | No | +| `isGrant` | Boolean | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgCapabilityDefaultGrant records +const items = await db.orgCapabilityDefaultGrant.findMany({ select: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgCapabilityDefaultGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgCapabilityDefaultGrant.create({ data: { capabilityId: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgCapabilityDefaultGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgCapabilityDefaultGrant.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgChartEdge` CRUD operations for OrgChartEdge records. @@ -688,25 +1044,25 @@ CRUD operations for OrgGrant records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `entityId` | UUID | Yes | | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissions` | BitString | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript // List all orgGrant records -const items = await db.orgGrant.findMany({ select: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const items = await db.orgGrant.findMany({ select: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgGrant.findOne({ id: '', select: { actorId: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissions: true, updatedAt: true } }).execute(); +const item = await db.orgGrant.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, updatedAt: true } }).execute(); // Create -const created = await db.orgGrant.create({ data: { actorId: '', entityId: '', grantorId: '', isGrant: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.orgGrant.create({ data: { actorId: '', capabilities: '', entityId: '', grantorId: '', isGrant: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -841,6 +1197,7 @@ CRUD operations for OrgMembership records. | Field | Type | Editable | |-------|------|----------| | `actorId` | UUID | Yes | +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | | `createdBy` | UUID | Yes | | `entityId` | UUID | Yes | @@ -854,7 +1211,6 @@ CRUD operations for OrgMembership records. | `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isReadOnly` | Boolean | Yes | -| `permissions` | BitString | Yes | | `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | | `updatedBy` | UUID | Yes | @@ -863,13 +1219,13 @@ CRUD operations for OrgMembership records. ```typescript // List all orgMembership records -const items = await db.orgMembership.findMany({ select: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const items = await db.orgMembership.findMany({ select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { actorId: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, permissions: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { actorId: true, capabilities: true, createdAt: true, createdBy: true, entityId: true, granted: true, id: true, isActive: true, isAdmin: true, isApproved: true, isBanned: true, isDisabled: true, isExternal: true, isOwner: true, isReadOnly: true, profileId: true, updatedAt: true, updatedBy: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { actorId: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', permissions: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { actorId: '', capabilities: '', createdBy: '', entityId: '', granted: '', isActive: '', isAdmin: '', isApproved: '', isBanned: '', isDisabled: '', isExternal: '', isOwner: '', isReadOnly: '', profileId: '', updatedBy: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgMembership.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); @@ -913,6 +1269,40 @@ const updated = await db.orgMembershipDefault.update({ where: { id: '' }, const deleted = await db.orgMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMembershipProfile` + +CRUD operations for OrgMembershipProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgMembershipProfile records +const items = await db.orgMembershipProfile.findMany({ select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgMembershipProfile.findOne({ id: '', select: { actorId: true, createdAt: true, id: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgMembershipProfile.create({ data: { actorId: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMembershipProfile.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMembershipProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgMembershipSetting` CRUD operations for OrgMembershipSetting records. @@ -990,73 +1380,115 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermission` +### `db.orgProfileCapability` -CRUD operations for OrgPermission records. +CRUD operations for OrgProfileCapability records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `bitnum` | Int | Yes | -| `bitstr` | BitString | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all orgProfileCapability records +const items = await db.orgProfileCapability.findMany({ select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.orgProfileCapability.findOne({ id: '', select: { capabilityId: true, createdAt: true, id: true, profileId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.orgProfileCapability.create({ data: { capabilityId: '', profileId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgProfileCapability.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgProfileCapability.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgProfile` + +CRUD operations for OrgProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilities` | BitString | Yes | +| `createdAt` | Datetime | No | | `description` | String | Yes | +| `entityId` | UUID | Yes | | `id` | UUID | No | +| `isDefault` | Boolean | Yes | +| `isSystem` | Boolean | Yes | | `name` | String | Yes | +| `slug` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermission records -const items = await db.orgPermission.findMany({ select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +// List all orgProfile records +const items = await db.orgProfile.findMany({ select: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermission.findOne({ id: '', select: { bitnum: true, bitstr: true, description: true, id: true, name: true } }).execute(); +const item = await db.orgProfile.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, entityId: true, id: true, isDefault: true, isSystem: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermission.create({ data: { bitnum: '', bitstr: '', description: '', name: '' }, select: { id: true } }).execute(); +const created = await db.orgProfile.create({ data: { capabilities: '', description: '', entityId: '', isDefault: '', isSystem: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermission.update({ where: { id: '' }, data: { bitnum: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfile.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfile.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefault` +### `db.orgProfileDefinitionGrant` -CRUD operations for OrgPermissionDefault records. +CRUD operations for OrgProfileDefinitionGrant records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `entityId` | UUID | Yes | +| `capabilityId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `grantorId` | UUID | Yes | | `id` | UUID | No | -| `permissions` | BitString | Yes | +| `isGrant` | Boolean | Yes | +| `profileId` | UUID | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefault records -const items = await db.orgPermissionDefault.findMany({ select: { entityId: true, id: true, permissions: true } }).execute(); +// List all orgProfileDefinitionGrant records +const items = await db.orgProfileDefinitionGrant.findMany({ select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefault.findOne({ id: '', select: { entityId: true, id: true, permissions: true } }).execute(); +const item = await db.orgProfileDefinitionGrant.findOne({ id: '', select: { capabilityId: true, createdAt: true, grantorId: true, id: true, isGrant: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefault.create({ data: { entityId: '', permissions: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileDefinitionGrant.create({ data: { capabilityId: '', grantorId: '', isGrant: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefault.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileDefinitionGrant.update({ where: { id: '' }, data: { capabilityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileDefinitionGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefaultGrant` +### `db.orgProfileGrant` -CRUD operations for OrgPermissionDefaultGrant records. +CRUD operations for OrgProfileGrant records. **Fields:** @@ -1067,66 +1499,70 @@ CRUD operations for OrgPermissionDefaultGrant records. | `grantorId` | UUID | Yes | | `id` | UUID | No | | `isGrant` | Boolean | Yes | -| `permissionId` | UUID | Yes | +| `membershipId` | UUID | Yes | +| `profileId` | UUID | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefaultGrant records -const items = await db.orgPermissionDefaultGrant.findMany({ select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +// List all orgProfileGrant records +const items = await db.orgProfileGrant.findMany({ select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefaultGrant.findOne({ id: '', select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.orgProfileGrant.findOne({ id: '', select: { createdAt: true, entityId: true, grantorId: true, id: true, isGrant: true, membershipId: true, profileId: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefaultGrant.create({ data: { entityId: '', grantorId: '', isGrant: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileGrant.create({ data: { entityId: '', grantorId: '', isGrant: '', membershipId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefaultGrant.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileGrant.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefaultGrant.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.orgPermissionDefaultPermission` +### `db.orgProfileTemplate` -CRUD operations for OrgPermissionDefaultPermission records. +CRUD operations for OrgProfileTemplate records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `capabilities` | BitString | Yes | | `createdAt` | Datetime | No | -| `entityId` | UUID | Yes | +| `description` | String | Yes | | `id` | UUID | No | -| `permissionId` | UUID | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `slug` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all orgPermissionDefaultPermission records -const items = await db.orgPermissionDefaultPermission.findMany({ select: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }).execute(); +// List all orgProfileTemplate records +const items = await db.orgProfileTemplate.findMany({ select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.orgPermissionDefaultPermission.findOne({ id: '', select: { createdAt: true, entityId: true, id: true, permissionId: true, updatedAt: true } }).execute(); +const item = await db.orgProfileTemplate.findOne({ id: '', select: { capabilities: true, createdAt: true, description: true, id: true, isDefault: true, name: true, slug: true, updatedAt: true } }).execute(); // Create -const created = await db.orgPermissionDefaultPermission.create({ data: { entityId: '', permissionId: '' }, select: { id: true } }).execute(); +const created = await db.orgProfileTemplate.create({ data: { capabilities: '', description: '', isDefault: '', name: '', slug: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgPermissionDefaultPermission.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.orgProfileTemplate.update({ where: { id: '' }, data: { capabilities: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgPermissionDefaultPermission.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgProfileTemplate.delete({ where: { id: '' } }).execute(); ``` ## Custom Operations -### `db.query.appPermissionsGetByMask` +### `db.query.appCapabilitiesGetByMask` -Reads and enables pagination through a set of `AppPermission`. +Reads and enables pagination through a set of `AppCapability`. - **Type:** query - **Arguments:** @@ -1139,12 +1575,12 @@ Reads and enables pagination through a set of `AppPermission`. | `offset` | Int | ```typescript -const result = await db.query.appPermissionsGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +const result = await db.query.appCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); ``` -### `db.query.appPermissionsGetMask` +### `db.query.appCapabilitiesGetMask` -appPermissionsGetMask +appCapabilitiesGetMask - **Type:** query - **Arguments:** @@ -1154,12 +1590,12 @@ appPermissionsGetMask | `ids` | [UUID] | ```typescript -const result = await db.query.appPermissionsGetMask({ ids: '' }).execute(); +const result = await db.query.appCapabilitiesGetMask({ ids: '' }).execute(); ``` -### `db.query.appPermissionsGetMaskByNames` +### `db.query.appCapabilitiesGetMaskByNames` -appPermissionsGetMaskByNames +appCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** @@ -1169,12 +1605,12 @@ appPermissionsGetMaskByNames | `names` | [String] | ```typescript -const result = await db.query.appPermissionsGetMaskByNames({ names: '' }).execute(); +const result = await db.query.appCapabilitiesGetMaskByNames({ names: '' }).execute(); ``` -### `db.query.appPermissionsGetPaddedMask` +### `db.query.appCapabilitiesGetPaddedMask` -appPermissionsGetPaddedMask +appCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** @@ -1184,88 +1620,88 @@ appPermissionsGetPaddedMask | `mask` | BitString | ```typescript -const result = await db.query.appPermissionsGetPaddedMask({ mask: '' }).execute(); +const result = await db.query.appCapabilitiesGetPaddedMask({ mask: '' }).execute(); ``` -### `db.query.orgIsManagerOf` +### `db.query.orgCapabilitiesGetByMask` -orgIsManagerOf +Reads and enables pagination through a set of `OrgCapability`. - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `managerId` | UUID | - | `maxDepth` | Int | - | `targetEntityId` | UUID | - | `userId` | UUID | + | `after` | Cursor | + | `first` | Int | + | `mask` | BitString | + | `offset` | Int | ```typescript -const result = await db.query.orgIsManagerOf({ managerId: '', maxDepth: '', targetEntityId: '', userId: '' }).execute(); +const result = await db.query.orgCapabilitiesGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); ``` -### `db.query.orgPermissionsGetByMask` +### `db.query.orgCapabilitiesGetMask` -Reads and enables pagination through a set of `OrgPermission`. +orgCapabilitiesGetMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `after` | Cursor | - | `first` | Int | - | `mask` | BitString | - | `offset` | Int | + | `ids` | [UUID] | ```typescript -const result = await db.query.orgPermissionsGetByMask({ after: '', first: '', mask: '', offset: '' }).execute(); +const result = await db.query.orgCapabilitiesGetMask({ ids: '' }).execute(); ``` -### `db.query.orgPermissionsGetMask` +### `db.query.orgCapabilitiesGetMaskByNames` -orgPermissionsGetMask +orgCapabilitiesGetMaskByNames - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `ids` | [UUID] | + | `names` | [String] | ```typescript -const result = await db.query.orgPermissionsGetMask({ ids: '' }).execute(); +const result = await db.query.orgCapabilitiesGetMaskByNames({ names: '' }).execute(); ``` -### `db.query.orgPermissionsGetMaskByNames` +### `db.query.orgCapabilitiesGetPaddedMask` -orgPermissionsGetMaskByNames +orgCapabilitiesGetPaddedMask - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `names` | [String] | + | `mask` | BitString | ```typescript -const result = await db.query.orgPermissionsGetMaskByNames({ names: '' }).execute(); +const result = await db.query.orgCapabilitiesGetPaddedMask({ mask: '' }).execute(); ``` -### `db.query.orgPermissionsGetPaddedMask` +### `db.query.orgIsManagerOf` -orgPermissionsGetPaddedMask +orgIsManagerOf - **Type:** query - **Arguments:** | Argument | Type | |----------|------| - | `mask` | BitString | + | `managerId` | UUID | + | `maxDepth` | Int | + | `targetEntityId` | UUID | + | `userId` | UUID | ```typescript -const result = await db.query.orgPermissionsGetPaddedMask({ mask: '' }).execute(); +const result = await db.query.orgIsManagerOf({ managerId: '', maxDepth: '', targetEntityId: '', userId: '' }).execute(); ``` ### `db.mutation.provisionBucket` diff --git a/sdk/constructive-sdk/src/admin/orm/index.ts b/sdk/constructive-sdk/src/admin/orm/index.ts index 5a87e5498e..6da89c57c7 100644 --- a/sdk/constructive-sdk/src/admin/orm/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/index.ts @@ -6,18 +6,28 @@ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; import { AppAdminGrantModel } from './models/appAdminGrant'; +import { AppCapabilityModel } from './models/appCapability'; +import { AppCapabilityDefaultCapabilityModel } from './models/appCapabilityDefaultCapability'; +import { AppCapabilityDefaultModel } from './models/appCapabilityDefault'; +import { AppCapabilityDefaultGrantModel } from './models/appCapabilityDefaultGrant'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { AppGrantModel } from './models/appGrant'; import { AppInviteModel } from './models/appInvite'; import { AppMembershipModel } from './models/appMembership'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; +import { AppMembershipProfileModel } from './models/appMembershipProfile'; import { AppOwnerGrantModel } from './models/appOwnerGrant'; -import { AppPermissionModel } from './models/appPermission'; -import { AppPermissionDefaultModel } from './models/appPermissionDefault'; -import { AppPermissionDefaultGrantModel } from './models/appPermissionDefaultGrant'; -import { AppPermissionDefaultPermissionModel } from './models/appPermissionDefaultPermission'; +import { AppProfileCapabilityModel } from './models/appProfileCapability'; +import { AppProfileModel } from './models/appProfile'; +import { AppProfileDefinitionGrantModel } from './models/appProfileDefinitionGrant'; +import { AppProfileGrantModel } from './models/appProfileGrant'; +import { AppProfileTemplateModel } from './models/appProfileTemplate'; import { MembershipTypeModel } from './models/membershipType'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; +import { OrgCapabilityModel } from './models/orgCapability'; +import { OrgCapabilityDefaultCapabilityModel } from './models/orgCapabilityDefaultCapability'; +import { OrgCapabilityDefaultModel } from './models/orgCapabilityDefault'; +import { OrgCapabilityDefaultGrantModel } from './models/orgCapabilityDefaultGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; import { OrgClaimedInviteModel } from './models/orgClaimedInvite'; @@ -29,12 +39,14 @@ import { OrgMemberModel } from './models/orgMember'; import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { OrgMembershipModel } from './models/orgMembership'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; +import { OrgMembershipProfileModel } from './models/orgMembershipProfile'; import { OrgMembershipSettingModel } from './models/orgMembershipSetting'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; -import { OrgPermissionModel } from './models/orgPermission'; -import { OrgPermissionDefaultModel } from './models/orgPermissionDefault'; -import { OrgPermissionDefaultGrantModel } from './models/orgPermissionDefaultGrant'; -import { OrgPermissionDefaultPermissionModel } from './models/orgPermissionDefaultPermission'; +import { OrgProfileCapabilityModel } from './models/orgProfileCapability'; +import { OrgProfileModel } from './models/orgProfile'; +import { OrgProfileDefinitionGrantModel } from './models/orgProfileDefinitionGrant'; +import { OrgProfileGrantModel } from './models/orgProfileGrant'; +import { OrgProfileTemplateModel } from './models/orgProfileTemplate'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; @@ -71,18 +83,28 @@ export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { appAdminGrant: new AppAdminGrantModel(client), + appCapability: new AppCapabilityModel(client), + appCapabilityDefaultCapability: new AppCapabilityDefaultCapabilityModel(client), + appCapabilityDefault: new AppCapabilityDefaultModel(client), + appCapabilityDefaultGrant: new AppCapabilityDefaultGrantModel(client), appClaimedInvite: new AppClaimedInviteModel(client), appGrant: new AppGrantModel(client), appInvite: new AppInviteModel(client), appMembership: new AppMembershipModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), + appMembershipProfile: new AppMembershipProfileModel(client), appOwnerGrant: new AppOwnerGrantModel(client), - appPermission: new AppPermissionModel(client), - appPermissionDefault: new AppPermissionDefaultModel(client), - appPermissionDefaultGrant: new AppPermissionDefaultGrantModel(client), - appPermissionDefaultPermission: new AppPermissionDefaultPermissionModel(client), + appProfileCapability: new AppProfileCapabilityModel(client), + appProfile: new AppProfileModel(client), + appProfileDefinitionGrant: new AppProfileDefinitionGrantModel(client), + appProfileGrant: new AppProfileGrantModel(client), + appProfileTemplate: new AppProfileTemplateModel(client), membershipType: new MembershipTypeModel(client), orgAdminGrant: new OrgAdminGrantModel(client), + orgCapability: new OrgCapabilityModel(client), + orgCapabilityDefaultCapability: new OrgCapabilityDefaultCapabilityModel(client), + orgCapabilityDefault: new OrgCapabilityDefaultModel(client), + orgCapabilityDefaultGrant: new OrgCapabilityDefaultGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), orgClaimedInvite: new OrgClaimedInviteModel(client), @@ -94,12 +116,14 @@ export function createClient(config: OrmClientConfig) { orgMemberProfile: new OrgMemberProfileModel(client), orgMembership: new OrgMembershipModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), + orgMembershipProfile: new OrgMembershipProfileModel(client), orgMembershipSetting: new OrgMembershipSettingModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), - orgPermission: new OrgPermissionModel(client), - orgPermissionDefault: new OrgPermissionDefaultModel(client), - orgPermissionDefaultGrant: new OrgPermissionDefaultGrantModel(client), - orgPermissionDefaultPermission: new OrgPermissionDefaultPermissionModel(client), + orgProfileCapability: new OrgProfileCapabilityModel(client), + orgProfile: new OrgProfileModel(client), + orgProfileDefinitionGrant: new OrgProfileDefinitionGrantModel(client), + orgProfileGrant: new OrgProfileGrantModel(client), + orgProfileTemplate: new OrgProfileTemplateModel(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 8942c14919..cfe70fd2f2 100644 --- a/sdk/constructive-sdk/src/admin/orm/input-types.ts +++ b/sdk/constructive-sdk/src/admin/orm/input-types.ts @@ -245,6 +245,45 @@ export interface AppAdminGrant { isGrant?: boolean | null; updatedAt?: string | null; } +/** Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control */ +export interface AppCapability { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number | null; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string | null; + /** Human-readable description of what this capability allows */ + description?: string | null; + id: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string | null; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string | null; +} +/** Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask */ +export interface AppCapabilityDefaultCapability { + /** References the capability included in the defaults bundle */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + updatedAt?: string | null; +} +/** Stores the default capability bitmask assigned to new members upon joining */ +export interface AppCapabilityDefault { + /** Default capability bitmask applied to new members */ + capabilities?: string | null; + id: string; +} +/** Audit log of capability additions and removals from the defaults bitmask */ +export interface AppCapabilityDefaultGrant { + /** References the capability being added to or removed from defaults */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; + id: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean | null; + updatedAt?: string | null; +} /** Records of successfully claimed invitations, linking senders to receivers */ export interface AppClaimedInvite { createdAt?: string | null; @@ -257,17 +296,17 @@ export interface AppClaimedInvite { senderId?: string | null; updatedAt?: string | null; } -/** Records of individual permission grants and revocations for members via bitmask */ +/** Records of individual capability grants and revocations for members via bitmask */ export interface AppGrant { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string | null; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string | null; createdAt?: string | null; grantorId?: string | null; id: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean | null; - /** Bitmask of permissions being granted or revoked */ - permissions?: string | null; updatedAt?: string | null; } /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ @@ -300,13 +339,15 @@ export interface AppInvite { senderId?: string | null; updatedAt?: string | null; } -/** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ +/** Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status */ export interface AppMembership { /** References the user who holds this membership */ actorId?: string | null; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string | null; createdAt?: string | null; createdBy?: string | null; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string | null; id: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -323,8 +364,6 @@ export interface AppMembership { isOwner?: boolean | null; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean | null; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string | null; profileId?: string | null; updatedAt?: string | null; updatedBy?: string | null; @@ -341,6 +380,18 @@ export interface AppMembershipDefault { updatedAt?: string | null; updatedBy?: string | null; } +/** Every profile a membership holds; memberships.profile_id points at one of them */ +export interface AppMembershipProfile { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string | null; + createdAt?: string | null; + id: string; + /** References the membership holding the profile */ + membershipId?: string | null; + /** References the held profile */ + profileId?: string | null; + updatedAt?: string | null; +} /** Records of ownership transfers and grants between members */ export interface AppOwnerGrant { /** The member receiving or losing the ownership grant; NULL if user was deleted */ @@ -352,41 +403,74 @@ export interface AppOwnerGrant { isGrant?: boolean | null; updatedAt?: string | null; } -/** Defines available permissions as named bits within a bitmask, used by the RBAC system for access control */ -export interface AppPermission { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number | null; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string | null; - /** Human-readable description of what this permission allows */ +/** Join table linking profiles to individual capabilities they include */ +export interface AppProfileCapability { + /** References the capability included in this profile */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + /** References the profile this capability belongs to */ + profileId?: string | null; + updatedAt?: string | null; +} +/** Named capability bundles (roles) that group multiple capabilities into reusable profiles */ +export interface AppProfile { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string | null; + createdAt?: string | null; + /** Human-readable description of this profile and its intended use */ description?: string | null; id: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean | null; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean | null; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ name?: string | null; + /** URL-safe identifier for this profile, used in API references */ + slug?: string | null; + updatedAt?: string | null; } -/** Stores the default permission bitmask assigned to new members upon joining */ -export interface AppPermissionDefault { +/** Audit log of capability additions and removals from profile definitions */ +export interface AppProfileDefinitionGrant { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; id: string; - /** Default permission bitmask applied to new members */ - permissions?: string | null; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean | null; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string | null; + updatedAt?: string | null; } -/** Audit log of permission additions and removals from the defaults bitmask */ -export interface AppPermissionDefaultGrant { +/** Audit log of profile assignments and revocations for members */ +export interface AppProfileGrant { createdAt?: string | null; grantorId?: string | null; id: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean | null; - /** References the permission being added to or removed from defaults */ - permissionId?: string | null; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string | null; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string | null; updatedAt?: string | null; } -/** Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask */ -export interface AppPermissionDefaultPermission { +/** Template profiles that are automatically seeded into new entities when created */ +export interface AppProfileTemplate { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string | null; createdAt?: string | null; + /** Human-readable description of this template profile */ + description?: string | null; id: string; - /** References the permission included in the defaults bundle */ - permissionId?: string | null; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean | null; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name?: string | null; + /** URL-safe identifier for the template profile */ + slug?: string | null; updatedAt?: string | null; } /** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ @@ -417,6 +501,51 @@ export interface OrgAdminGrant { isGrant?: boolean | null; updatedAt?: string | null; } +/** Defines available capabilities as named bits within a bitmask, used by the RBAC system for access control */ +export interface OrgCapability { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number | null; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string | null; + /** Human-readable description of what this capability allows */ + description?: string | null; + id: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string | null; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string | null; +} +/** Join table linking capability defaults to individual capabilities; recompute trigger rebuilds the defaults bitmask */ +export interface OrgCapabilityDefaultCapability { + /** References the capability included in the defaults bundle */ + capabilityId?: string | null; + createdAt?: string | null; + /** Scopes this default capability to a specific entity */ + entityId?: string | null; + id: string; + updatedAt?: string | null; +} +/** Stores the default capability bitmask assigned to new members upon joining */ +export interface OrgCapabilityDefault { + /** Default capability bitmask applied to new members */ + capabilities?: string | null; + /** References the entity these default capabilities apply to */ + entityId?: string | null; + id: string; +} +/** Audit log of capability additions and removals from the defaults bitmask */ +export interface OrgCapabilityDefaultGrant { + /** References the capability being added to or removed from defaults */ + capabilityId?: string | null; + createdAt?: string | null; + /** Scopes this audit entry to a specific entity */ + entityId?: string | null; + grantorId?: string | null; + id: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean | null; + updatedAt?: string | null; +} /** Organizational chart edges defining parent-child reporting relationships between members within an entity */ export interface OrgChartEdge { /** User ID of the subordinate (employee) in this reporting relationship */ @@ -474,19 +603,19 @@ export interface OrgGetSubordinatesRecord { depth?: number | null; userId?: string | null; } -/** Records of individual permission grants and revocations for members via bitmask */ +/** Records of individual capability grants and revocations for members via bitmask */ export interface OrgGrant { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string | null; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string | null; createdAt?: string | null; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId?: string | null; grantorId?: string | null; id: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean | null; - /** Bitmask of permissions being granted or revoked */ - permissions?: string | null; updatedAt?: string | null; } /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ @@ -556,15 +685,17 @@ export interface OrgMemberProfile { title?: string | null; updatedAt?: string | null; } -/** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ +/** Tracks membership records linking actors to entities with capability bitmasks, ownership, and admin status */ export interface OrgMembership { /** References the user who holds this membership */ actorId?: string | null; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string | null; createdAt?: string | null; createdBy?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string | null; id: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -577,14 +708,12 @@ export interface OrgMembership { isBanned?: boolean | null; /** Whether this membership is temporarily disabled */ isDisabled?: boolean | null; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean | null; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string | null; profileId?: string | null; updatedAt?: string | null; updatedBy?: string | null; @@ -601,6 +730,18 @@ export interface OrgMembershipDefault { updatedAt?: string | null; updatedBy?: string | null; } +/** Every profile a membership holds; memberships.profile_id points at one of them */ +export interface OrgMembershipProfile { + /** References the user holding the profile, denormalised from the membership */ + actorId?: string | null; + createdAt?: string | null; + id: string; + /** References the membership holding the profile */ + membershipId?: string | null; + /** References the held profile */ + profileId?: string | null; + updatedAt?: string | null; +} /** Per-entity settings for the memberships module */ export interface OrgMembershipSetting { /** Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) */ @@ -618,7 +759,7 @@ export interface OrgMembershipSetting { /** References the entity these settings apply to */ entityId?: string | null; id: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string | null; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string | null; @@ -640,47 +781,78 @@ export interface OrgOwnerGrant { isGrant?: boolean | null; updatedAt?: string | null; } -/** Defines available permissions as named bits within a bitmask, used by the RBAC system for access control */ -export interface OrgPermission { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number | null; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string | null; - /** Human-readable description of what this permission allows */ +/** Join table linking profiles to individual capabilities they include */ +export interface OrgProfileCapability { + /** References the capability included in this profile */ + capabilityId?: string | null; + createdAt?: string | null; + id: string; + /** References the profile this capability belongs to */ + profileId?: string | null; + updatedAt?: string | null; +} +/** Named capability bundles (roles) that group multiple capabilities into reusable profiles */ +export interface OrgProfile { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string | null; + createdAt?: string | null; + /** Human-readable description of this profile and its intended use */ description?: string | null; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ + entityId?: string | null; id: string; - /** Human-readable permission name (e.g. read, write, manage) */ + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean | null; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean | null; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ name?: string | null; + /** URL-safe identifier for this profile, used in API references */ + slug?: string | null; + updatedAt?: string | null; } -/** Stores the default permission bitmask assigned to new members upon joining */ -export interface OrgPermissionDefault { - /** References the entity these default permissions apply to */ - entityId?: string | null; +/** Audit log of capability additions and removals from profile definitions */ +export interface OrgProfileDefinitionGrant { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string | null; + createdAt?: string | null; + grantorId?: string | null; id: string; - /** Default permission bitmask applied to new members */ - permissions?: string | null; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean | null; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string | null; + updatedAt?: string | null; } -/** Audit log of permission additions and removals from the defaults bitmask */ -export interface OrgPermissionDefaultGrant { +/** Audit log of profile assignments and revocations for members */ +export interface OrgProfileGrant { createdAt?: string | null; - /** Scopes this audit entry to a specific entity */ + /** The entity (org or group) scope for this profile grant */ entityId?: string | null; grantorId?: string | null; id: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean | null; - /** References the permission being added to or removed from defaults */ - permissionId?: string | null; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string | null; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string | null; updatedAt?: string | null; } -/** Join table linking permission defaults to individual permissions; recompute trigger rebuilds the defaults bitmask */ -export interface OrgPermissionDefaultPermission { +/** Template profiles that are automatically seeded into new entities when created */ +export interface OrgProfileTemplate { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string | null; createdAt?: string | null; - /** Scopes this default permission to a specific entity */ - entityId?: string | null; + /** Human-readable description of this template profile */ + description?: string | null; id: string; - /** References the permission included in the defaults bundle */ - permissionId?: string | null; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean | null; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name?: string | null; + /** URL-safe identifier for the template profile */ + slug?: string | null; updatedAt?: string | null; } // ============ Relation Helper Types ============ @@ -697,71 +869,152 @@ export interface PageInfo { } // ============ Entity Relation Types ============ export interface AppAdminGrantRelations {} +export interface AppCapabilityRelations { + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultGrantsByCapabilityId?: ConnectionResult; + appProfileCapabilitiesByCapabilityId?: ConnectionResult; + appProfileDefinitionGrantsByCapabilityId?: ConnectionResult; +} +export interface AppCapabilityDefaultCapabilityRelations { + capability?: AppCapability | null; +} +export interface AppCapabilityDefaultRelations {} +export interface AppCapabilityDefaultGrantRelations { + capability?: AppCapability | null; +} export interface AppClaimedInviteRelations {} export interface AppGrantRelations {} -export interface AppInviteRelations {} -export interface AppMembershipRelations {} -export interface AppMembershipDefaultRelations {} -export interface AppOwnerGrantRelations {} -export interface AppPermissionRelations { - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermission | null; - appPermissionDefaultGrantsByPermissionId?: ConnectionResult; +export interface AppInviteRelations { + profile?: AppProfile | null; } -export interface AppPermissionDefaultRelations {} -export interface AppPermissionDefaultGrantRelations { - permission?: AppPermission | null; +export interface AppMembershipRelations { + profile?: AppProfile | null; + appMembershipProfilesByMembershipId?: ConnectionResult; + appProfileGrantsByMembershipId?: ConnectionResult; } -export interface AppPermissionDefaultPermissionRelations { - permission?: AppPermission | null; +export interface AppMembershipDefaultRelations {} +export interface AppMembershipProfileRelations { + membership?: AppMembership | null; + profile?: AppProfile | null; } +export interface AppOwnerGrantRelations {} +export interface AppProfileCapabilityRelations { + capability?: AppCapability | null; + profile?: AppProfile | null; +} +export interface AppProfileRelations { + appInvitesByProfileId?: ConnectionResult; + appMembershipProfilesByProfileId?: ConnectionResult; + appMembershipsByProfileId?: ConnectionResult; + appProfileCapabilitiesByProfileId?: ConnectionResult; + appProfileDefinitionGrantsByProfileId?: ConnectionResult; + appProfileGrantsByProfileId?: ConnectionResult; +} +export interface AppProfileDefinitionGrantRelations { + capability?: AppCapability | null; + profile?: AppProfile | null; +} +export interface AppProfileGrantRelations { + membership?: AppMembership | null; + profile?: AppProfile | null; +} +export interface AppProfileTemplateRelations {} export interface MembershipTypeRelations {} export interface OrgAdminGrantRelations {} +export interface OrgCapabilityRelations { + orgCapabilityDefaultCapabilitiesByCapabilityId?: ConnectionResult; + orgCapabilityDefaultGrantsByCapabilityId?: ConnectionResult; + orgProfileCapabilitiesByCapabilityId?: ConnectionResult; + orgProfileDefinitionGrantsByCapabilityId?: ConnectionResult; +} +export interface OrgCapabilityDefaultCapabilityRelations { + capability?: OrgCapability | null; +} +export interface OrgCapabilityDefaultRelations {} +export interface OrgCapabilityDefaultGrantRelations { + capability?: OrgCapability | null; +} export interface OrgChartEdgeRelations {} export interface OrgChartEdgeGrantRelations {} export interface OrgClaimedInviteRelations {} export interface OrgGetManagersRecordRelations {} export interface OrgGetSubordinatesRecordRelations {} export interface OrgGrantRelations {} -export interface OrgInviteRelations {} +export interface OrgInviteRelations { + profile?: OrgProfile | null; +} export interface OrgMemberRelations {} export interface OrgMemberProfileRelations { membership?: OrgMembership | null; } export interface OrgMembershipRelations { orgMemberProfileByMembershipId?: OrgMemberProfile | null; + profile?: OrgProfile | null; + orgMembershipProfilesByMembershipId?: ConnectionResult; + orgProfileGrantsByMembershipId?: ConnectionResult; } export interface OrgMembershipDefaultRelations {} +export interface OrgMembershipProfileRelations { + membership?: OrgMembership | null; + profile?: OrgProfile | null; +} export interface OrgMembershipSettingRelations {} export interface OrgOwnerGrantRelations {} -export interface OrgPermissionRelations { - orgPermissionDefaultGrantsByPermissionId?: ConnectionResult; - orgPermissionDefaultPermissionsByPermissionId?: ConnectionResult; -} -export interface OrgPermissionDefaultRelations {} -export interface OrgPermissionDefaultGrantRelations { - permission?: OrgPermission | null; -} -export interface OrgPermissionDefaultPermissionRelations { - permission?: OrgPermission | null; +export interface OrgProfileCapabilityRelations { + capability?: OrgCapability | null; + profile?: OrgProfile | null; +} +export interface OrgProfileRelations { + orgInvitesByProfileId?: ConnectionResult; + orgMembershipProfilesByProfileId?: ConnectionResult; + orgMembershipsByProfileId?: ConnectionResult; + orgProfileCapabilitiesByProfileId?: ConnectionResult; + orgProfileDefinitionGrantsByProfileId?: ConnectionResult; + orgProfileGrantsByProfileId?: ConnectionResult; +} +export interface OrgProfileDefinitionGrantRelations { + capability?: OrgCapability | null; + profile?: OrgProfile | null; +} +export interface OrgProfileGrantRelations { + membership?: OrgMembership | null; + profile?: OrgProfile | null; } +export interface OrgProfileTemplateRelations {} // ============ Entity Types With Relations ============ export type AppAdminGrantWithRelations = AppAdminGrant & AppAdminGrantRelations; +export type AppCapabilityWithRelations = AppCapability & AppCapabilityRelations; +export type AppCapabilityDefaultCapabilityWithRelations = AppCapabilityDefaultCapability & + AppCapabilityDefaultCapabilityRelations; +export type AppCapabilityDefaultWithRelations = AppCapabilityDefault & + AppCapabilityDefaultRelations; +export type AppCapabilityDefaultGrantWithRelations = AppCapabilityDefaultGrant & + AppCapabilityDefaultGrantRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type AppGrantWithRelations = AppGrant & AppGrantRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; export type AppMembershipWithRelations = AppMembership & AppMembershipRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; +export type AppMembershipProfileWithRelations = AppMembershipProfile & + AppMembershipProfileRelations; export type AppOwnerGrantWithRelations = AppOwnerGrant & AppOwnerGrantRelations; -export type AppPermissionWithRelations = AppPermission & AppPermissionRelations; -export type AppPermissionDefaultWithRelations = AppPermissionDefault & - AppPermissionDefaultRelations; -export type AppPermissionDefaultGrantWithRelations = AppPermissionDefaultGrant & - AppPermissionDefaultGrantRelations; -export type AppPermissionDefaultPermissionWithRelations = AppPermissionDefaultPermission & - AppPermissionDefaultPermissionRelations; +export type AppProfileCapabilityWithRelations = AppProfileCapability & + AppProfileCapabilityRelations; +export type AppProfileWithRelations = AppProfile & AppProfileRelations; +export type AppProfileDefinitionGrantWithRelations = AppProfileDefinitionGrant & + AppProfileDefinitionGrantRelations; +export type AppProfileGrantWithRelations = AppProfileGrant & AppProfileGrantRelations; +export type AppProfileTemplateWithRelations = AppProfileTemplate & AppProfileTemplateRelations; export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; +export type OrgCapabilityWithRelations = OrgCapability & OrgCapabilityRelations; +export type OrgCapabilityDefaultCapabilityWithRelations = OrgCapabilityDefaultCapability & + OrgCapabilityDefaultCapabilityRelations; +export type OrgCapabilityDefaultWithRelations = OrgCapabilityDefault & + OrgCapabilityDefaultRelations; +export type OrgCapabilityDefaultGrantWithRelations = OrgCapabilityDefaultGrant & + OrgCapabilityDefaultGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; export type OrgClaimedInviteWithRelations = OrgClaimedInvite & OrgClaimedInviteRelations; @@ -776,16 +1029,18 @@ export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileR export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; +export type OrgMembershipProfileWithRelations = OrgMembershipProfile & + OrgMembershipProfileRelations; export type OrgMembershipSettingWithRelations = OrgMembershipSetting & OrgMembershipSettingRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; -export type OrgPermissionWithRelations = OrgPermission & OrgPermissionRelations; -export type OrgPermissionDefaultWithRelations = OrgPermissionDefault & - OrgPermissionDefaultRelations; -export type OrgPermissionDefaultGrantWithRelations = OrgPermissionDefaultGrant & - OrgPermissionDefaultGrantRelations; -export type OrgPermissionDefaultPermissionWithRelations = OrgPermissionDefaultPermission & - OrgPermissionDefaultPermissionRelations; +export type OrgProfileCapabilityWithRelations = OrgProfileCapability & + OrgProfileCapabilityRelations; +export type OrgProfileWithRelations = OrgProfile & OrgProfileRelations; +export type OrgProfileDefinitionGrantWithRelations = OrgProfileDefinitionGrant & + OrgProfileDefinitionGrantRelations; +export type OrgProfileGrantWithRelations = OrgProfileGrant & OrgProfileGrantRelations; +export type OrgProfileTemplateWithRelations = OrgProfileTemplate & OrgProfileTemplateRelations; // ============ Entity Select Types ============ export type AppAdminGrantSelect = { actorId?: boolean; @@ -795,6 +1050,59 @@ export type AppAdminGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; +export type AppCapabilitySelect = { + bitnum?: boolean; + bitstr?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + name?: boolean; + appCapabilityDefaultCapabilityByCapabilityId?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultGrantsByCapabilityId?: { + select: AppCapabilityDefaultGrantSelect; + first?: number; + filter?: AppCapabilityDefaultGrantFilter; + orderBy?: AppCapabilityDefaultGrantOrderBy[]; + }; + appProfileCapabilitiesByCapabilityId?: { + select: AppProfileCapabilitySelect; + first?: number; + filter?: AppProfileCapabilityFilter; + orderBy?: AppProfileCapabilityOrderBy[]; + }; + appProfileDefinitionGrantsByCapabilityId?: { + select: AppProfileDefinitionGrantSelect; + first?: number; + filter?: AppProfileDefinitionGrantFilter; + orderBy?: AppProfileDefinitionGrantOrderBy[]; + }; +}; +export type AppCapabilityDefaultCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + id?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; +}; +export type AppCapabilityDefaultSelect = { + capabilities?: boolean; + id?: boolean; +}; +export type AppCapabilityDefaultGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; +}; export type AppClaimedInviteSelect = { createdAt?: boolean; data?: boolean; @@ -805,11 +1113,11 @@ export type AppClaimedInviteSelect = { }; export type AppGrantSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissions?: boolean; updatedAt?: boolean; }; export type AppInviteSelect = { @@ -828,9 +1136,13 @@ export type AppInviteSelect = { profileId?: boolean; senderId?: boolean; updatedAt?: boolean; + profile?: { + select: AppProfileSelect; + }; }; export type AppMembershipSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; createdBy?: boolean; granted?: boolean; @@ -842,10 +1154,24 @@ export type AppMembershipSelect = { isDisabled?: boolean; isOwner?: boolean; isVerified?: boolean; - permissions?: boolean; profileId?: boolean; updatedAt?: boolean; updatedBy?: boolean; + profile?: { + select: AppProfileSelect; + }; + appMembershipProfilesByMembershipId?: { + select: AppMembershipProfileSelect; + first?: number; + filter?: AppMembershipProfileFilter; + orderBy?: AppMembershipProfileOrderBy[]; + }; + appProfileGrantsByMembershipId?: { + select: AppProfileGrantSelect; + first?: number; + filter?: AppProfileGrantFilter; + orderBy?: AppProfileGrantOrderBy[]; + }; }; export type AppMembershipDefaultSelect = { createdAt?: boolean; @@ -856,6 +1182,20 @@ export type AppMembershipDefaultSelect = { updatedAt?: boolean; updatedBy?: boolean; }; +export type AppMembershipProfileSelect = { + actorId?: boolean; + createdAt?: boolean; + id?: boolean; + membershipId?: boolean; + profileId?: boolean; + updatedAt?: boolean; + membership?: { + select: AppMembershipSelect; + }; + profile?: { + select: AppProfileSelect; + }; +}; export type AppOwnerGrantSelect = { actorId?: boolean; createdAt?: boolean; @@ -864,45 +1204,105 @@ export type AppOwnerGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; -export type AppPermissionSelect = { - bitnum?: boolean; - bitstr?: boolean; +export type AppProfileCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + id?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; + profile?: { + select: AppProfileSelect; + }; +}; +export type AppProfileSelect = { + capabilities?: boolean; + createdAt?: boolean; description?: boolean; id?: boolean; + isDefault?: boolean; + isSystem?: boolean; name?: boolean; - appPermissionDefaultPermissionByPermissionId?: { - select: AppPermissionDefaultPermissionSelect; + slug?: boolean; + updatedAt?: boolean; + appInvitesByProfileId?: { + select: AppInviteSelect; + first?: number; + filter?: AppInviteFilter; + orderBy?: AppInviteOrderBy[]; + }; + appMembershipProfilesByProfileId?: { + select: AppMembershipProfileSelect; + first?: number; + filter?: AppMembershipProfileFilter; + orderBy?: AppMembershipProfileOrderBy[]; + }; + appMembershipsByProfileId?: { + select: AppMembershipSelect; + first?: number; + filter?: AppMembershipFilter; + orderBy?: AppMembershipOrderBy[]; + }; + appProfileCapabilitiesByProfileId?: { + select: AppProfileCapabilitySelect; + first?: number; + filter?: AppProfileCapabilityFilter; + orderBy?: AppProfileCapabilityOrderBy[]; + }; + appProfileDefinitionGrantsByProfileId?: { + select: AppProfileDefinitionGrantSelect; + first?: number; + filter?: AppProfileDefinitionGrantFilter; + orderBy?: AppProfileDefinitionGrantOrderBy[]; }; - appPermissionDefaultGrantsByPermissionId?: { - select: AppPermissionDefaultGrantSelect; + appProfileGrantsByProfileId?: { + select: AppProfileGrantSelect; first?: number; - filter?: AppPermissionDefaultGrantFilter; - orderBy?: AppPermissionDefaultGrantOrderBy[]; + filter?: AppProfileGrantFilter; + orderBy?: AppProfileGrantOrderBy[]; }; }; -export type AppPermissionDefaultSelect = { +export type AppProfileDefinitionGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; id?: boolean; - permissions?: boolean; + isGrant?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: AppCapabilitySelect; + }; + profile?: { + select: AppProfileSelect; + }; }; -export type AppPermissionDefaultGrantSelect = { +export type AppProfileGrantSelect = { createdAt?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissionId?: boolean; + membershipId?: boolean; + profileId?: boolean; updatedAt?: boolean; - permission?: { - select: AppPermissionSelect; + membership?: { + select: AppMembershipSelect; + }; + profile?: { + select: AppProfileSelect; }; }; -export type AppPermissionDefaultPermissionSelect = { +export type AppProfileTemplateSelect = { + capabilities?: boolean; createdAt?: boolean; + description?: boolean; id?: boolean; - permissionId?: boolean; + isDefault?: boolean; + name?: boolean; + slug?: boolean; updatedAt?: boolean; - permission?: { - select: AppPermissionSelect; - }; }; export type MembershipTypeSelect = { description?: boolean; @@ -921,6 +1321,65 @@ export type OrgAdminGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; +export type OrgCapabilitySelect = { + bitnum?: boolean; + bitstr?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + name?: boolean; + orgCapabilityDefaultCapabilitiesByCapabilityId?: { + select: OrgCapabilityDefaultCapabilitySelect; + first?: number; + filter?: OrgCapabilityDefaultCapabilityFilter; + orderBy?: OrgCapabilityDefaultCapabilityOrderBy[]; + }; + orgCapabilityDefaultGrantsByCapabilityId?: { + select: OrgCapabilityDefaultGrantSelect; + first?: number; + filter?: OrgCapabilityDefaultGrantFilter; + orderBy?: OrgCapabilityDefaultGrantOrderBy[]; + }; + orgProfileCapabilitiesByCapabilityId?: { + select: OrgProfileCapabilitySelect; + first?: number; + filter?: OrgProfileCapabilityFilter; + orderBy?: OrgProfileCapabilityOrderBy[]; + }; + orgProfileDefinitionGrantsByCapabilityId?: { + select: OrgProfileDefinitionGrantSelect; + first?: number; + filter?: OrgProfileDefinitionGrantFilter; + orderBy?: OrgProfileDefinitionGrantOrderBy[]; + }; +}; +export type OrgCapabilityDefaultCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; + entityId?: boolean; + id?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; +}; +export type OrgCapabilityDefaultSelect = { + capabilities?: boolean; + entityId?: boolean; + id?: boolean; +}; +export type OrgCapabilityDefaultGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + entityId?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; +}; export type OrgChartEdgeSelect = { childId?: boolean; createdAt?: boolean; @@ -961,12 +1420,12 @@ export type OrgGetSubordinatesRecordSelect = { }; export type OrgGrantSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; entityId?: boolean; grantorId?: boolean; id?: boolean; isGrant?: boolean; - permissions?: boolean; updatedAt?: boolean; }; export type OrgInviteSelect = { @@ -988,6 +1447,9 @@ export type OrgInviteSelect = { receiverId?: boolean; senderId?: boolean; updatedAt?: boolean; + profile?: { + select: OrgProfileSelect; + }; }; export type OrgMemberSelect = { actorId?: boolean; @@ -1013,6 +1475,7 @@ export type OrgMemberProfileSelect = { }; export type OrgMembershipSelect = { actorId?: boolean; + capabilities?: boolean; createdAt?: boolean; createdBy?: boolean; entityId?: boolean; @@ -1026,13 +1489,27 @@ export type OrgMembershipSelect = { isExternal?: boolean; isOwner?: boolean; isReadOnly?: boolean; - permissions?: boolean; profileId?: boolean; updatedAt?: boolean; updatedBy?: boolean; orgMemberProfileByMembershipId?: { select: OrgMemberProfileSelect; }; + profile?: { + select: OrgProfileSelect; + }; + orgMembershipProfilesByMembershipId?: { + select: OrgMembershipProfileSelect; + first?: number; + filter?: OrgMembershipProfileFilter; + orderBy?: OrgMembershipProfileOrderBy[]; + }; + orgProfileGrantsByMembershipId?: { + select: OrgProfileGrantSelect; + first?: number; + filter?: OrgProfileGrantFilter; + orderBy?: OrgProfileGrantOrderBy[]; + }; }; export type OrgMembershipDefaultSelect = { createdAt?: boolean; @@ -1043,6 +1520,20 @@ export type OrgMembershipDefaultSelect = { updatedAt?: boolean; updatedBy?: boolean; }; +export type OrgMembershipProfileSelect = { + actorId?: boolean; + createdAt?: boolean; + id?: boolean; + membershipId?: boolean; + profileId?: boolean; + updatedAt?: boolean; + membership?: { + select: OrgMembershipSelect; + }; + profile?: { + select: OrgProfileSelect; + }; +}; export type OrgMembershipSettingSelect = { allowExternalMembers?: boolean; createChildCascadeAdmins?: boolean; @@ -1068,52 +1559,108 @@ export type OrgOwnerGrantSelect = { isGrant?: boolean; updatedAt?: boolean; }; -export type OrgPermissionSelect = { - bitnum?: boolean; - bitstr?: boolean; - description?: boolean; +export type OrgProfileCapabilitySelect = { + capabilityId?: boolean; + createdAt?: boolean; id?: boolean; - name?: boolean; - orgPermissionDefaultGrantsByPermissionId?: { - select: OrgPermissionDefaultGrantSelect; - first?: number; - filter?: OrgPermissionDefaultGrantFilter; - orderBy?: OrgPermissionDefaultGrantOrderBy[]; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; }; - orgPermissionDefaultPermissionsByPermissionId?: { - select: OrgPermissionDefaultPermissionSelect; - first?: number; - filter?: OrgPermissionDefaultPermissionFilter; - orderBy?: OrgPermissionDefaultPermissionOrderBy[]; + profile?: { + select: OrgProfileSelect; }; }; -export type OrgPermissionDefaultSelect = { - entityId?: boolean; - id?: boolean; - permissions?: boolean; -}; -export type OrgPermissionDefaultGrantSelect = { +export type OrgProfileSelect = { + capabilities?: boolean; createdAt?: boolean; + description?: boolean; entityId?: boolean; - grantorId?: boolean; id?: boolean; - isGrant?: boolean; - permissionId?: boolean; + isDefault?: boolean; + isSystem?: boolean; + name?: boolean; + slug?: boolean; updatedAt?: boolean; - permission?: { - select: OrgPermissionSelect; - }; + orgInvitesByProfileId?: { + select: OrgInviteSelect; + first?: number; + filter?: OrgInviteFilter; + orderBy?: OrgInviteOrderBy[]; + }; + orgMembershipProfilesByProfileId?: { + select: OrgMembershipProfileSelect; + first?: number; + filter?: OrgMembershipProfileFilter; + orderBy?: OrgMembershipProfileOrderBy[]; + }; + orgMembershipsByProfileId?: { + select: OrgMembershipSelect; + first?: number; + filter?: OrgMembershipFilter; + orderBy?: OrgMembershipOrderBy[]; + }; + orgProfileCapabilitiesByProfileId?: { + select: OrgProfileCapabilitySelect; + first?: number; + filter?: OrgProfileCapabilityFilter; + orderBy?: OrgProfileCapabilityOrderBy[]; + }; + orgProfileDefinitionGrantsByProfileId?: { + select: OrgProfileDefinitionGrantSelect; + first?: number; + filter?: OrgProfileDefinitionGrantFilter; + orderBy?: OrgProfileDefinitionGrantOrderBy[]; + }; + orgProfileGrantsByProfileId?: { + select: OrgProfileGrantSelect; + first?: number; + filter?: OrgProfileGrantFilter; + orderBy?: OrgProfileGrantOrderBy[]; + }; +}; +export type OrgProfileDefinitionGrantSelect = { + capabilityId?: boolean; + createdAt?: boolean; + grantorId?: boolean; + id?: boolean; + isGrant?: boolean; + profileId?: boolean; + updatedAt?: boolean; + capability?: { + select: OrgCapabilitySelect; + }; + profile?: { + select: OrgProfileSelect; + }; }; -export type OrgPermissionDefaultPermissionSelect = { +export type OrgProfileGrantSelect = { createdAt?: boolean; entityId?: boolean; + grantorId?: boolean; id?: boolean; - permissionId?: boolean; + isGrant?: boolean; + membershipId?: boolean; + profileId?: boolean; updatedAt?: boolean; - permission?: { - select: OrgPermissionSelect; + membership?: { + select: OrgMembershipSelect; + }; + profile?: { + select: OrgProfileSelect; }; }; +export type OrgProfileTemplateSelect = { + capabilities?: boolean; + createdAt?: boolean; + description?: boolean; + id?: boolean; + isDefault?: boolean; + name?: boolean; + slug?: boolean; + updatedAt?: boolean; +}; // ============ Table Filter Types ============ export interface AppAdminGrantFilter { /** Filter by the object’s `actorId` field. */ @@ -1135,6 +1682,94 @@ export interface AppAdminGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface AppCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityFilter[]; + /** Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. */ + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapabilityFilter; + /** A related `appCapabilityDefaultCapabilityByCapabilityId` exists. */ + appCapabilityDefaultCapabilityByCapabilityIdExists?: boolean; + /** Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. */ + appCapabilityDefaultGrantsByCapabilityId?: AppCapabilityToManyAppCapabilityDefaultGrantFilter; + /** `appCapabilityDefaultGrantsByCapabilityId` exist. */ + appCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. */ + appProfileCapabilitiesByCapabilityId?: AppCapabilityToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByCapabilityId` exist. */ + appProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. */ + appProfileDefinitionGrantsByCapabilityId?: AppCapabilityToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByCapabilityId` exist. */ + appProfileDefinitionGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityFilter[]; +} +export interface AppCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultFilter[]; +} +export interface AppCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface AppClaimedInviteFilter { /** Checks for all expressions in this list. */ and?: AppClaimedInviteFilter[]; @@ -1158,6 +1793,8 @@ export interface AppGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -1170,8 +1807,6 @@ export interface AppGrantFilter { not?: AppGrantFilter; /** Checks for any expressions in this list. */ or?: AppGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1204,6 +1839,10 @@ export interface AppInviteFilter { or?: AppInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `senderId` field. */ @@ -1216,6 +1855,16 @@ export interface AppMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: AppMembershipFilter[]; + /** Filter by the object’s `appMembershipProfilesByMembershipId` relation. */ + appMembershipProfilesByMembershipId?: AppMembershipToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByMembershipId` exist. */ + appMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByMembershipId` relation. */ + appProfileGrantsByMembershipId?: AppMembershipToManyAppProfileGrantFilter; + /** `appProfileGrantsByMembershipId` exist. */ + appProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -1242,8 +1891,10 @@ export interface AppMembershipFilter { not?: AppMembershipFilter; /** Checks for any expressions in this list. */ or?: AppMembershipFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -1273,6 +1924,30 @@ export interface AppMembershipDefaultFilter { /** Filter by the object’s `updatedBy` field. */ updatedBy?: UUIDFilter; } +export interface AppMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: AppMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface AppOwnerGrantFilter { /** Filter by the object’s `actorId` field. */ actorId?: UUIDFilter; @@ -1293,47 +1968,111 @@ export interface AppOwnerGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AppPermissionFilter { +export interface AppProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionFilter[]; - /** Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. */ - appPermissionDefaultGrantsByPermissionId?: AppPermissionToManyAppPermissionDefaultGrantFilter; - /** `appPermissionDefaultGrantsByPermissionId` exist. */ - appPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. */ - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermissionFilter; - /** A related `appPermissionDefaultPermissionByPermissionId` exists. */ - appPermissionDefaultPermissionByPermissionIdExists?: boolean; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppProfileFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileFilter[]; + /** Filter by the object’s `appInvitesByProfileId` relation. */ + appInvitesByProfileId?: AppProfileToManyAppInviteFilter; + /** `appInvitesByProfileId` exist. */ + appInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipProfilesByProfileId` relation. */ + appMembershipProfilesByProfileId?: AppProfileToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByProfileId` exist. */ + appMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipsByProfileId` relation. */ + appMembershipsByProfileId?: AppProfileToManyAppMembershipFilter; + /** `appMembershipsByProfileId` exist. */ + appMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByProfileId` relation. */ + appProfileCapabilitiesByProfileId?: AppProfileToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByProfileId` exist. */ + appProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. */ + appProfileDefinitionGrantsByProfileId?: AppProfileToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByProfileId` exist. */ + appProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByProfileId` relation. */ + appProfileGrantsByProfileId?: AppProfileToManyAppProfileGrantFilter; + /** `appProfileGrantsByProfileId` exist. */ + appProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppPermissionFilter; + not?: AppProfileFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionFilter[]; + or?: AppProfileFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultFilter { +export interface AppProfileDefinitionGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultFilter[]; + and?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultFilter; + not?: AppProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultGrantFilter { +export interface AppProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultGrantFilter[]; + and?: AppProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -1342,32 +2081,46 @@ export interface AppPermissionDefaultGrantFilter { id?: UUIDFilter; /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: AppPermissionDefaultGrantFilter; + not?: AppProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AppPermissionDefaultPermissionFilter { +export interface AppProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultPermissionFilter[]; + and?: AppProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: AppPermissionDefaultPermissionFilter; + not?: AppProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1413,6 +2166,100 @@ export interface OrgAdminGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface OrgCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityFilter[]; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityFilter[]; + /** Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. */ + orgCapabilityDefaultCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter; + /** `orgCapabilityDefaultCapabilitiesByCapabilityId` exist. */ + orgCapabilityDefaultCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. */ + orgCapabilityDefaultGrantsByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter; + /** `orgCapabilityDefaultGrantsByCapabilityId` exist. */ + orgCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. */ + orgProfileCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByCapabilityId` exist. */ + orgProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. */ + orgProfileDefinitionGrantsByCapabilityId?: OrgCapabilityToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByCapabilityId` exist. */ + orgProfileDefinitionGrantsByCapabilityIdExist?: boolean; +} +export interface OrgCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgCapabilityDefaultFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultFilter[]; +} +export interface OrgCapabilityDefaultGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgCapabilityDefaultGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface OrgChartEdgeFilter { /** Checks for all expressions in this list. */ and?: OrgChartEdgeFilter[]; @@ -1502,6 +2349,8 @@ export interface OrgGrantFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgGrantFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -1516,8 +2365,6 @@ export interface OrgGrantFilter { not?: OrgGrantFilter; /** Checks for any expressions in this list. */ or?: OrgGrantFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1554,6 +2401,10 @@ export interface OrgInviteFilter { or?: OrgInviteFilter[]; /** Filter by the object’s `phone` field. */ phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `receiverId` field. */ @@ -1616,6 +2467,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: OrgMembershipFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `createdBy` field. */ @@ -1650,8 +2503,18 @@ export interface OrgMembershipFilter { orgMemberProfileByMembershipId?: OrgMemberProfileFilter; /** A related `orgMemberProfileByMembershipId` exists. */ orgMemberProfileByMembershipIdExists?: boolean; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + /** Filter by the object’s `orgMembershipProfilesByMembershipId` relation. */ + orgMembershipProfilesByMembershipId?: OrgMembershipToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByMembershipId` exist. */ + orgMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByMembershipId` relation. */ + orgProfileGrantsByMembershipId?: OrgMembershipToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByMembershipId` exist. */ + orgProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ @@ -1681,6 +2544,30 @@ export interface OrgMembershipDefaultFilter { /** Filter by the object’s `updatedBy` field. */ updatedBy?: UUIDFilter; } +export interface OrgMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface OrgMembershipSettingFilter { /** Filter by the object’s `allowExternalMembers` field. */ allowExternalMembers?: BooleanFilter; @@ -1739,49 +2626,113 @@ export interface OrgOwnerGrantFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface OrgPermissionFilter { +export interface OrgProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionFilter[]; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; + and?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgProfileFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionFilter; + not?: OrgProfileFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionFilter[]; - /** Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. */ - orgPermissionDefaultGrantsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultGrantFilter; - /** `orgPermissionDefaultGrantsByPermissionId` exist. */ - orgPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. */ - orgPermissionDefaultPermissionsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultPermissionFilter; - /** `orgPermissionDefaultPermissionsByPermissionId` exist. */ - orgPermissionDefaultPermissionsByPermissionIdExist?: boolean; -} -export interface OrgPermissionDefaultFilter { + or?: OrgProfileFilter[]; + /** Filter by the object’s `orgInvitesByProfileId` relation. */ + orgInvitesByProfileId?: OrgProfileToManyOrgInviteFilter; + /** `orgInvitesByProfileId` exist. */ + orgInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipProfilesByProfileId` relation. */ + orgMembershipProfilesByProfileId?: OrgProfileToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByProfileId` exist. */ + orgMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipsByProfileId` relation. */ + orgMembershipsByProfileId?: OrgProfileToManyOrgMembershipFilter; + /** `orgMembershipsByProfileId` exist. */ + orgMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByProfileId` relation. */ + orgProfileCapabilitiesByProfileId?: OrgProfileToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByProfileId` exist. */ + orgProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. */ + orgProfileDefinitionGrantsByProfileId?: OrgProfileToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByProfileId` exist. */ + orgProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByProfileId` relation. */ + orgProfileGrantsByProfileId?: OrgProfileToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByProfileId` exist. */ + orgProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface OrgProfileDefinitionGrantFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultFilter[]; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + and?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultFilter; + not?: OrgProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultFilter[]; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; + or?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface OrgPermissionDefaultGrantFilter { +export interface OrgProfileGrantFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultGrantFilter[]; + and?: OrgProfileGrantFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `entityId` field. */ @@ -1792,34 +2743,46 @@ export interface OrgPermissionDefaultGrantFilter { id?: UUIDFilter; /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultGrantFilter; + not?: OrgProfileGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface OrgPermissionDefaultPermissionFilter { +export interface OrgProfileTemplateFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultPermissionFilter[]; + and?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultPermissionFilter; + not?: OrgProfileTemplateFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgProfileTemplateFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } @@ -1840,12 +2803,64 @@ export type AppAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppClaimedInviteOrderBy = - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'ID_ASC' +export type AppCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppClaimedInviteOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'ID_ASC' | 'ID_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1859,6 +2874,8 @@ export type AppClaimedInviteOrderBy = export type AppGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -1868,8 +2885,6 @@ export type AppGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -1911,6 +2926,8 @@ export type AppInviteOrderBy = export type AppMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -1934,8 +2951,6 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -1962,6 +2977,22 @@ export type AppMembershipDefaultOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +export type AppMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppOwnerGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' @@ -1978,29 +3009,61 @@ export type AppOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +export type AppProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type AppPermissionDefaultOrderBy = + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type AppPermissionDefaultGrantOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppProfileGrantOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'GRANTOR_ID_ASC' @@ -2009,23 +3072,33 @@ export type AppPermissionDefaultGrantOrderBy = | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AppPermissionDefaultPermissionOrderBy = +export type AppProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; export type MembershipTypeOrderBy = @@ -2062,6 +3135,64 @@ export type OrgAdminGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgCapabilityOrderBy = + | 'BITNUM_ASC' + | 'BITNUM_DESC' + | 'BITSTR_ASC' + | 'BITSTR_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type OrgCapabilityDefaultCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgCapabilityDefaultOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type OrgCapabilityDefaultGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type OrgChartEdgeOrderBy = | 'CHILD_ID_ASC' | 'CHILD_ID_DESC' @@ -2141,6 +3272,8 @@ export type OrgGetSubordinatesRecordsOrderBy = export type OrgGrantOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' @@ -2152,8 +3285,6 @@ export type OrgGrantOrderBy = | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' @@ -2239,6 +3370,8 @@ export type OrgMemberProfileOrderBy = export type OrgMembershipOrderBy = | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'CREATED_BY_ASC' @@ -2266,8 +3399,6 @@ export type OrgMembershipOrderBy = | 'IS_READ_ONLY_ASC' | 'IS_READ_ONLY_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROFILE_ID_ASC' @@ -2294,6 +3425,22 @@ export type OrgMembershipDefaultOrderBy = | 'UPDATED_AT_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC'; +export type OrgMembershipProfileOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type OrgMembershipSettingOrderBy = | 'ALLOW_EXTERNAL_MEMBERS_ASC' | 'ALLOW_EXTERNAL_MEMBERS_DESC' @@ -2344,31 +3491,63 @@ export type OrgOwnerGrantOrderBy = | 'PRIMARY_KEY_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type OrgPermissionOrderBy = - | 'BITNUM_ASC' - | 'BITNUM_DESC' - | 'BITSTR_ASC' - | 'BITSTR_DESC' +export type OrgProfileCapabilityOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'IS_SYSTEM_ASC' + | 'IS_SYSTEM_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type OrgPermissionDefaultOrderBy = - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileDefinitionGrantOrderBy = + | 'CAPABILITY_ID_ASC' + | 'CAPABILITY_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'GRANTOR_ID_ASC' + | 'GRANTOR_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_GRANT_ASC' + | 'IS_GRANT_DESC' | 'NATURAL' - | 'PERMISSIONS_ASC' - | 'PERMISSIONS_DESC' | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC'; -export type OrgPermissionDefaultGrantOrderBy = + | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type OrgProfileGrantOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ENTITY_ID_ASC' @@ -2379,25 +3558,33 @@ export type OrgPermissionDefaultGrantOrderBy = | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'PROFILE_ID_ASC' + | 'PROFILE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type OrgPermissionDefaultPermissionOrderBy = +export type OrgProfileTemplateOrderBy = + | 'CAPABILITIES_ASC' + | 'CAPABILITIES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' | 'NATURAL' - | 'PERMISSION_ID_ASC' - | 'PERMISSION_ID_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; // ============ CRUD Input Types ============ @@ -2423,67 +3610,151 @@ export interface DeleteAppAdminGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppClaimedInviteInput { +export interface CreateAppCapabilityInput { clientMutationId?: string; - appClaimedInvite: { - data?: Record; - receiverId?: string; - senderId?: string; + appCapability: { + bitnum?: number; + bitstr?: string; + description?: string; + kind?: string; + name?: string; }; } -export interface AppClaimedInvitePatch { - data?: Record | null; - receiverId?: string | null; - senderId?: string | null; +export interface AppCapabilityPatch { + bitnum?: number | null; + bitstr?: string | null; + description?: string | null; + kind?: string | null; + name?: string | null; } -export interface UpdateAppClaimedInviteInput { +export interface UpdateAppCapabilityInput { clientMutationId?: string; id: string; - appClaimedInvitePatch: AppClaimedInvitePatch; + appCapabilityPatch: AppCapabilityPatch; } -export interface DeleteAppClaimedInviteInput { +export interface DeleteAppCapabilityInput { clientMutationId?: string; id: string; } -export interface CreateAppGrantInput { +export interface CreateAppCapabilityDefaultCapabilityInput { clientMutationId?: string; - appGrant: { - actorId?: string; - grantorId?: string; - isGrant?: boolean; - permissions?: string; + appCapabilityDefaultCapability: { + capabilityId: string; }; } -export interface AppGrantPatch { - actorId?: string | null; - grantorId?: string | null; - isGrant?: boolean | null; - permissions?: string | null; +export interface AppCapabilityDefaultCapabilityPatch { + capabilityId?: string | null; } -export interface UpdateAppGrantInput { +export interface UpdateAppCapabilityDefaultCapabilityInput { clientMutationId?: string; id: string; - appGrantPatch: AppGrantPatch; + appCapabilityDefaultCapabilityPatch: AppCapabilityDefaultCapabilityPatch; } -export interface DeleteAppGrantInput { +export interface DeleteAppCapabilityDefaultCapabilityInput { clientMutationId?: string; id: string; } -export interface CreateAppInviteInput { +export interface CreateAppCapabilityDefaultInput { clientMutationId?: string; - appInvite: { - channel?: string; - data?: Record; - email?: ConstructiveInternalTypeEmail; - expiresAt?: string; - inviteCount?: number; - inviteLimit?: number; - inviteToken?: string; - inviteValid?: boolean; - multiple?: boolean; - phone?: string; - profileId?: string; - senderId?: string; + appCapabilityDefault: { + capabilities?: string; + }; +} +export interface AppCapabilityDefaultPatch { + capabilities?: string | null; +} +export interface UpdateAppCapabilityDefaultInput { + clientMutationId?: string; + id: string; + appCapabilityDefaultPatch: AppCapabilityDefaultPatch; +} +export interface DeleteAppCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppCapabilityDefaultGrantInput { + clientMutationId?: string; + appCapabilityDefaultGrant: { + capabilityId: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface AppCapabilityDefaultGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateAppCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; + appCapabilityDefaultGrantPatch: AppCapabilityDefaultGrantPatch; +} +export interface DeleteAppCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppClaimedInviteInput { + clientMutationId?: string; + appClaimedInvite: { + data?: Record; + receiverId?: string; + senderId?: string; + }; +} +export interface AppClaimedInvitePatch { + data?: Record | null; + receiverId?: string | null; + senderId?: string | null; +} +export interface UpdateAppClaimedInviteInput { + clientMutationId?: string; + id: string; + appClaimedInvitePatch: AppClaimedInvitePatch; +} +export interface DeleteAppClaimedInviteInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppGrantInput { + clientMutationId?: string; + appGrant: { + actorId?: string; + capabilities?: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface AppGrantPatch { + actorId?: string | null; + capabilities?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateAppGrantInput { + clientMutationId?: string; + id: string; + appGrantPatch: AppGrantPatch; +} +export interface DeleteAppGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppInviteInput { + clientMutationId?: string; + appInvite: { + channel?: string; + data?: Record; + email?: ConstructiveInternalTypeEmail; + expiresAt?: string; + inviteCount?: number; + inviteLimit?: number; + inviteToken?: string; + inviteValid?: boolean; + multiple?: boolean; + phone?: string; + profileId?: string; + senderId?: string; }; } export interface AppInvitePatch { @@ -2513,6 +3784,7 @@ export interface CreateAppMembershipInput { clientMutationId?: string; appMembership: { actorId: string; + capabilities?: string; createdBy?: string; granted?: string; isActive?: boolean; @@ -2522,13 +3794,13 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isOwner?: boolean; isVerified?: boolean; - permissions?: string; profileId?: string; updatedBy?: string; }; } export interface AppMembershipPatch { actorId?: string | null; + capabilities?: string | null; createdBy?: string | null; granted?: string | null; isActive?: boolean | null; @@ -2538,7 +3810,6 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isOwner?: boolean | null; isVerified?: boolean | null; - permissions?: string | null; profileId?: string | null; updatedBy?: string | null; } @@ -2575,6 +3846,28 @@ export interface DeleteAppMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateAppMembershipProfileInput { + clientMutationId?: string; + appMembershipProfile: { + actorId: string; + membershipId: string; + profileId: string; + }; +} +export interface AppMembershipProfilePatch { + actorId?: string | null; + membershipId?: string | null; + profileId?: string | null; +} +export interface UpdateAppMembershipProfileInput { + clientMutationId?: string; + id: string; + appMembershipProfilePatch: AppMembershipProfilePatch; +} +export interface DeleteAppMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateAppOwnerGrantInput { clientMutationId?: string; appOwnerGrant: { @@ -2597,85 +3890,125 @@ export interface DeleteAppOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionInput { +export interface CreateAppProfileCapabilityInput { clientMutationId?: string; - appPermission: { - bitnum?: number; - bitstr?: string; + appProfileCapability: { + capabilityId: string; + profileId: string; + }; +} +export interface AppProfileCapabilityPatch { + capabilityId?: string | null; + profileId?: string | null; +} +export interface UpdateAppProfileCapabilityInput { + clientMutationId?: string; + id: string; + appProfileCapabilityPatch: AppProfileCapabilityPatch; +} +export interface DeleteAppProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppProfileInput { + clientMutationId?: string; + appProfile: { + capabilities?: string; description?: string; - name?: string; + isDefault?: boolean; + isSystem?: boolean; + name: string; + slug: string; }; } -export interface AppPermissionPatch { - bitnum?: number | null; - bitstr?: string | null; +export interface AppProfilePatch { + capabilities?: string | null; description?: string | null; + isDefault?: boolean | null; + isSystem?: boolean | null; name?: string | null; + slug?: string | null; } -export interface UpdateAppPermissionInput { +export interface UpdateAppProfileInput { clientMutationId?: string; id: string; - appPermissionPatch: AppPermissionPatch; + appProfilePatch: AppProfilePatch; } -export interface DeleteAppPermissionInput { +export interface DeleteAppProfileInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultInput { +export interface CreateAppProfileDefinitionGrantInput { clientMutationId?: string; - appPermissionDefault: { - permissions?: string; + appProfileDefinitionGrant: { + capabilityId?: string; + grantorId?: string; + isGrant?: boolean; + profileId?: string; }; } -export interface AppPermissionDefaultPatch { - permissions?: string | null; +export interface AppProfileDefinitionGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; + profileId?: string | null; } -export interface UpdateAppPermissionDefaultInput { +export interface UpdateAppProfileDefinitionGrantInput { clientMutationId?: string; id: string; - appPermissionDefaultPatch: AppPermissionDefaultPatch; + appProfileDefinitionGrantPatch: AppProfileDefinitionGrantPatch; } -export interface DeleteAppPermissionDefaultInput { +export interface DeleteAppProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultGrantInput { +export interface CreateAppProfileGrantInput { clientMutationId?: string; - appPermissionDefaultGrant: { + appProfileGrant: { grantorId?: string; isGrant?: boolean; - permissionId: string; + membershipId?: string; + profileId?: string; }; } -export interface AppPermissionDefaultGrantPatch { +export interface AppProfileGrantPatch { grantorId?: string | null; isGrant?: boolean | null; - permissionId?: string | null; + membershipId?: string | null; + profileId?: string | null; } -export interface UpdateAppPermissionDefaultGrantInput { +export interface UpdateAppProfileGrantInput { clientMutationId?: string; id: string; - appPermissionDefaultGrantPatch: AppPermissionDefaultGrantPatch; + appProfileGrantPatch: AppProfileGrantPatch; } -export interface DeleteAppPermissionDefaultGrantInput { +export interface DeleteAppProfileGrantInput { clientMutationId?: string; id: string; } -export interface CreateAppPermissionDefaultPermissionInput { +export interface CreateAppProfileTemplateInput { clientMutationId?: string; - appPermissionDefaultPermission: { - permissionId: string; + appProfileTemplate: { + capabilities?: string; + description?: string; + isDefault?: boolean; + name: string; + slug: string; }; } -export interface AppPermissionDefaultPermissionPatch { - permissionId?: string | null; +export interface AppProfileTemplatePatch { + capabilities?: string | null; + description?: string | null; + isDefault?: boolean | null; + name?: string | null; + slug?: string | null; } -export interface UpdateAppPermissionDefaultPermissionInput { +export interface UpdateAppProfileTemplateInput { clientMutationId?: string; id: string; - appPermissionDefaultPermissionPatch: AppPermissionDefaultPermissionPatch; + appProfileTemplatePatch: AppProfileTemplatePatch; } -export interface DeleteAppPermissionDefaultPermissionInput { +export interface DeleteAppProfileTemplateInput { clientMutationId?: string; id: string; } @@ -2729,6 +4062,96 @@ export interface DeleteOrgAdminGrantInput { clientMutationId?: string; id: string; } +export interface CreateOrgCapabilityInput { + clientMutationId?: string; + orgCapability: { + bitnum?: number; + bitstr?: string; + description?: string; + kind?: string; + name?: string; + }; +} +export interface OrgCapabilityPatch { + bitnum?: number | null; + bitstr?: string | null; + description?: string | null; + kind?: string | null; + name?: string | null; +} +export interface UpdateOrgCapabilityInput { + clientMutationId?: string; + id: string; + orgCapabilityPatch: OrgCapabilityPatch; +} +export interface DeleteOrgCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + orgCapabilityDefaultCapability: { + capabilityId: string; + entityId: string; + }; +} +export interface OrgCapabilityDefaultCapabilityPatch { + capabilityId?: string | null; + entityId?: string | null; +} +export interface UpdateOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultCapabilityPatch: OrgCapabilityDefaultCapabilityPatch; +} +export interface DeleteOrgCapabilityDefaultCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultInput { + clientMutationId?: string; + orgCapabilityDefault: { + capabilities?: string; + entityId: string; + }; +} +export interface OrgCapabilityDefaultPatch { + capabilities?: string | null; + entityId?: string | null; +} +export interface UpdateOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultPatch: OrgCapabilityDefaultPatch; +} +export interface DeleteOrgCapabilityDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + orgCapabilityDefaultGrant: { + capabilityId: string; + entityId: string; + grantorId?: string; + isGrant?: boolean; + }; +} +export interface OrgCapabilityDefaultGrantPatch { + capabilityId?: string | null; + entityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; +} +export interface UpdateOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; + orgCapabilityDefaultGrantPatch: OrgCapabilityDefaultGrantPatch; +} +export interface DeleteOrgCapabilityDefaultGrantInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgChartEdgeInput { clientMutationId?: string; orgChartEdge: { @@ -2853,18 +4276,18 @@ export interface CreateOrgGrantInput { clientMutationId?: string; orgGrant: { actorId?: string; + capabilities?: string; entityId: string; grantorId?: string; isGrant?: boolean; - permissions?: string; }; } export interface OrgGrantPatch { actorId?: string | null; + capabilities?: string | null; entityId?: string | null; grantorId?: string | null; isGrant?: boolean | null; - permissions?: string | null; } export interface UpdateOrgGrantInput { clientMutationId?: string; @@ -2980,6 +4403,7 @@ export interface CreateOrgMembershipInput { clientMutationId?: string; orgMembership: { actorId: string; + capabilities?: string; createdBy?: string; entityId: string; granted?: string; @@ -2991,13 +4415,13 @@ export interface CreateOrgMembershipInput { isExternal?: boolean; isOwner?: boolean; isReadOnly?: boolean; - permissions?: string; profileId?: string; updatedBy?: string; }; } export interface OrgMembershipPatch { actorId?: string | null; + capabilities?: string | null; createdBy?: string | null; entityId?: string | null; granted?: string | null; @@ -3009,7 +4433,6 @@ export interface OrgMembershipPatch { isExternal?: boolean | null; isOwner?: boolean | null; isReadOnly?: boolean | null; - permissions?: string | null; profileId?: string | null; updatedBy?: string | null; } @@ -3046,6 +4469,28 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateOrgMembershipProfileInput { + clientMutationId?: string; + orgMembershipProfile: { + actorId: string; + membershipId: string; + profileId: string; + }; +} +export interface OrgMembershipProfilePatch { + actorId?: string | null; + membershipId?: string | null; + profileId?: string | null; +} +export interface UpdateOrgMembershipProfileInput { + clientMutationId?: string; + id: string; + orgMembershipProfilePatch: OrgMembershipProfilePatch; +} +export interface DeleteOrgMembershipProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgMembershipSettingInput { clientMutationId?: string; orgMembershipSetting: { @@ -3108,102 +4553,168 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionInput { +export interface CreateOrgProfileCapabilityInput { clientMutationId?: string; - orgPermission: { - bitnum?: number; - bitstr?: string; + orgProfileCapability: { + capabilityId: string; + profileId: string; + }; +} +export interface OrgProfileCapabilityPatch { + capabilityId?: string | null; + profileId?: string | null; +} +export interface UpdateOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; + orgProfileCapabilityPatch: OrgProfileCapabilityPatch; +} +export interface DeleteOrgProfileCapabilityInput { + clientMutationId?: string; + id: string; +} +export interface CreateOrgProfileInput { + clientMutationId?: string; + orgProfile: { + capabilities?: string; description?: string; - name?: string; + entityId?: string; + isDefault?: boolean; + isSystem?: boolean; + name: string; + slug: string; }; } -export interface OrgPermissionPatch { - bitnum?: number | null; - bitstr?: string | null; +export interface OrgProfilePatch { + capabilities?: string | null; description?: string | null; + entityId?: string | null; + isDefault?: boolean | null; + isSystem?: boolean | null; name?: string | null; + slug?: string | null; } -export interface UpdateOrgPermissionInput { +export interface UpdateOrgProfileInput { clientMutationId?: string; id: string; - orgPermissionPatch: OrgPermissionPatch; + orgProfilePatch: OrgProfilePatch; } -export interface DeleteOrgPermissionInput { +export interface DeleteOrgProfileInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultInput { +export interface CreateOrgProfileDefinitionGrantInput { clientMutationId?: string; - orgPermissionDefault: { - entityId: string; - permissions?: string; + orgProfileDefinitionGrant: { + capabilityId?: string; + grantorId?: string; + isGrant?: boolean; + profileId?: string; }; } -export interface OrgPermissionDefaultPatch { - entityId?: string | null; - permissions?: string | null; +export interface OrgProfileDefinitionGrantPatch { + capabilityId?: string | null; + grantorId?: string | null; + isGrant?: boolean | null; + profileId?: string | null; } -export interface UpdateOrgPermissionDefaultInput { +export interface UpdateOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; - orgPermissionDefaultPatch: OrgPermissionDefaultPatch; + orgProfileDefinitionGrantPatch: OrgProfileDefinitionGrantPatch; } -export interface DeleteOrgPermissionDefaultInput { +export interface DeleteOrgProfileDefinitionGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultGrantInput { +export interface CreateOrgProfileGrantInput { clientMutationId?: string; - orgPermissionDefaultGrant: { - entityId: string; + orgProfileGrant: { + entityId?: string; grantorId?: string; isGrant?: boolean; - permissionId: string; + membershipId?: string; + profileId?: string; }; } -export interface OrgPermissionDefaultGrantPatch { +export interface OrgProfileGrantPatch { entityId?: string | null; grantorId?: string | null; isGrant?: boolean | null; - permissionId?: string | null; + membershipId?: string | null; + profileId?: string | null; } -export interface UpdateOrgPermissionDefaultGrantInput { +export interface UpdateOrgProfileGrantInput { clientMutationId?: string; id: string; - orgPermissionDefaultGrantPatch: OrgPermissionDefaultGrantPatch; + orgProfileGrantPatch: OrgProfileGrantPatch; } -export interface DeleteOrgPermissionDefaultGrantInput { +export interface DeleteOrgProfileGrantInput { clientMutationId?: string; id: string; } -export interface CreateOrgPermissionDefaultPermissionInput { +export interface CreateOrgProfileTemplateInput { clientMutationId?: string; - orgPermissionDefaultPermission: { - entityId: string; - permissionId: string; + orgProfileTemplate: { + capabilities?: string; + description?: string; + isDefault?: boolean; + name: string; + slug: string; }; } -export interface OrgPermissionDefaultPermissionPatch { - entityId?: string | null; - permissionId?: string | null; +export interface OrgProfileTemplatePatch { + capabilities?: string | null; + description?: string | null; + isDefault?: boolean | null; + name?: string | null; + slug?: string | null; } -export interface UpdateOrgPermissionDefaultPermissionInput { +export interface UpdateOrgProfileTemplateInput { clientMutationId?: string; id: string; - orgPermissionDefaultPermissionPatch: OrgPermissionDefaultPermissionPatch; + orgProfileTemplatePatch: OrgProfileTemplatePatch; } -export interface DeleteOrgPermissionDefaultPermissionInput { +export interface DeleteOrgProfileTemplateInput { clientMutationId?: string; id: string; } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - AppPermission: { - appPermissionDefaultGrantsByPermissionId: 'AppPermissionDefaultGrant', + AppCapability: { + appCapabilityDefaultGrantsByCapabilityId: 'AppCapabilityDefaultGrant', + appProfileCapabilitiesByCapabilityId: 'AppProfileCapability', + appProfileDefinitionGrantsByCapabilityId: 'AppProfileDefinitionGrant', + }, + AppMembership: { + appMembershipProfilesByMembershipId: 'AppMembershipProfile', + appProfileGrantsByMembershipId: 'AppProfileGrant', + }, + AppProfile: { + appInvitesByProfileId: 'AppInvite', + appMembershipProfilesByProfileId: 'AppMembershipProfile', + appMembershipsByProfileId: 'AppMembership', + appProfileCapabilitiesByProfileId: 'AppProfileCapability', + appProfileDefinitionGrantsByProfileId: 'AppProfileDefinitionGrant', + appProfileGrantsByProfileId: 'AppProfileGrant', + }, + OrgCapability: { + orgCapabilityDefaultCapabilitiesByCapabilityId: 'OrgCapabilityDefaultCapability', + orgCapabilityDefaultGrantsByCapabilityId: 'OrgCapabilityDefaultGrant', + orgProfileCapabilitiesByCapabilityId: 'OrgProfileCapability', + orgProfileDefinitionGrantsByCapabilityId: 'OrgProfileDefinitionGrant', + }, + OrgMembership: { + orgMembershipProfilesByMembershipId: 'OrgMembershipProfile', + orgProfileGrantsByMembershipId: 'OrgProfileGrant', }, - OrgPermission: { - orgPermissionDefaultGrantsByPermissionId: 'OrgPermissionDefaultGrant', - orgPermissionDefaultPermissionsByPermissionId: 'OrgPermissionDefaultPermission', + OrgProfile: { + orgInvitesByProfileId: 'OrgInvite', + orgMembershipProfilesByProfileId: 'OrgMembershipProfile', + orgMembershipsByProfileId: 'OrgMembership', + orgProfileCapabilitiesByProfileId: 'OrgProfileCapability', + orgProfileDefinitionGrantsByProfileId: 'OrgProfileDefinitionGrant', + orgProfileGrantsByProfileId: 'OrgProfileGrant', }, } as Record>; // ============ Custom Input Types (from schema) ============ @@ -3224,6 +4735,33 @@ export interface SubmitOrgInviteCodeInput { clientMutationId?: string; token?: string; } +/** A filter to be used against many `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} /** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeEmailFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -3301,19 +4839,118 @@ export interface ConstructiveInternalTypeEmailFilter { /** Starts with the specified string (case-insensitive). */ startsWithInsensitive?: ConstructiveInternalTypeEmail; } -/** A filter to be used against many `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionToManyAppPermissionDefaultGrantFilter { +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppMembershipProfileFilter { /** Filters to entities where every related entity matches. */ - every?: AppPermissionDefaultGrantFilter; + every?: AppMembershipProfileFilter; /** Filters to entities where no related entity matches. */ - none?: AppPermissionDefaultGrantFilter; + none?: AppMembershipProfileFilter; /** Filters to entities where at least one related entity matches. */ - some?: AppPermissionDefaultGrantFilter; + some?: AppMembershipProfileFilter; } -/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ -export interface ConstructiveInternalTypeImageFilter { - /** Contained by the specified JSON. */ - containedBy?: ConstructiveInternalTypeImage; +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; +} +/** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppInviteFilter { + /** Filters to entities where every related entity matches. */ + every?: AppInviteFilter; + /** Filters to entities where no related entity matches. */ + none?: AppInviteFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppInviteFilter; +} +/** A filter to be used against many `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipProfileFilter; +} +/** A filter to be used against many `AppMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppMembershipFilter { + /** Filters to entities where every related entity matches. */ + every?: AppMembershipFilter; + /** Filters to entities where no related entity matches. */ + none?: AppMembershipFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppMembershipFilter; +} +/** A filter to be used against many `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileCapabilityFilter; +} +/** A filter to be used against many `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileDefinitionGrantFilter; +} +/** A filter to be used against many `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileToManyAppProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: AppProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: AppProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppProfileGrantFilter; +} +/** A filter to be used against many `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultCapabilityFilter; +} +/** A filter to be used against many `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgCapabilityDefaultGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgCapabilityDefaultGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgCapabilityDefaultGrantFilter; +} +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileCapabilityFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileCapabilityFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileCapabilityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} +/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeImageFilter { + /** Contained by the specified JSON. */ + containedBy?: ConstructiveInternalTypeImage; /** Contains the specified JSON. */ contains?: ConstructiveInternalTypeImage; /** Contains all of the specified keys. */ @@ -3345,23 +4982,77 @@ export interface ConstructiveInternalTypeImageFilter { /** Not included in the specified list. */ notIn?: ConstructiveInternalTypeImage[]; } -/** A filter to be used against many `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultGrantFilter { +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipProfileFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; +} +/** A filter to be used against many `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgInviteFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgInviteFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgInviteFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgInviteFilter; +} +/** A filter to be used against many `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipProfileFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgMembershipProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMembershipProfileFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgMembershipProfileFilter; +} +/** A filter to be used against many `OrgMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgMembershipFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultGrantFilter; + every?: OrgMembershipFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultGrantFilter; + none?: OrgMembershipFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultGrantFilter; + some?: OrgMembershipFilter; } -/** A filter to be used against many `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionToManyOrgPermissionDefaultPermissionFilter { +/** A filter to be used against many `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileCapabilityFilter { /** Filters to entities where every related entity matches. */ - every?: OrgPermissionDefaultPermissionFilter; + every?: OrgProfileCapabilityFilter; /** Filters to entities where no related entity matches. */ - none?: OrgPermissionDefaultPermissionFilter; + none?: OrgProfileCapabilityFilter; /** Filters to entities where at least one related entity matches. */ - some?: OrgPermissionDefaultPermissionFilter; + some?: OrgProfileCapabilityFilter; +} +/** A filter to be used against many `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileDefinitionGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileDefinitionGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileDefinitionGrantFilter; +} +/** A filter to be used against many `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileToManyOrgProfileGrantFilter { + /** Filters to entities where every related entity matches. */ + every?: OrgProfileGrantFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgProfileGrantFilter; + /** Filters to entities where at least one related entity matches. */ + some?: OrgProfileGrantFilter; } /** An input for mutations affecting `AppAdminGrant` */ export interface AppAdminGrantInput { @@ -3374,6 +5065,45 @@ export interface AppAdminGrantInput { isGrant?: boolean; updatedAt?: string; } +/** An input for mutations affecting `AppCapability` */ +export interface AppCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** An input for mutations affecting `AppCapabilityDefaultCapability` */ +export interface AppCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + id?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppCapabilityDefault` */ +export interface AppCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + id?: string; +} +/** An input for mutations affecting `AppCapabilityDefaultGrant` */ +export interface AppCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} /** An input for mutations affecting `AppClaimedInvite` */ export interface AppClaimedInviteInput { createdAt?: string; @@ -3388,15 +5118,15 @@ export interface AppClaimedInviteInput { } /** An input for mutations affecting `AppGrant` */ export interface AppGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** An input for mutations affecting `AppInvite` */ @@ -3433,9 +5163,11 @@ export interface AppInviteInput { export interface AppMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -3452,8 +5184,6 @@ export interface AppMembershipInput { isOwner?: boolean; /** Whether this member has been verified (e.g. email confirmation) */ isVerified?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -3470,6 +5200,18 @@ export interface AppMembershipDefaultInput { updatedAt?: string; updatedBy?: string; } +/** An input for mutations affecting `AppMembershipProfile` */ +export interface AppMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} /** An input for mutations affecting `AppOwnerGrant` */ export interface AppOwnerGrantInput { /** The member receiving or losing the ownership grant; NULL if user was deleted */ @@ -3481,41 +5223,74 @@ export interface AppOwnerGrantInput { isGrant?: boolean; updatedAt?: string; } -/** An input for mutations affecting `AppPermission` */ -export interface AppPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** An input for mutations affecting `AppProfileCapability` */ +export interface AppProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppProfile` */ +export interface AppProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this profile and its intended use */ description?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; + updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefault` */ -export interface AppPermissionDefaultInput { +/** An input for mutations affecting `AppProfileDefinitionGrant` */ +export interface AppProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; + updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefaultGrant` */ -export interface AppPermissionDefaultGrantInput { +/** An input for mutations affecting `AppProfileGrant` */ +export interface AppProfileGrantInput { createdAt?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `AppPermissionDefaultPermission` */ -export interface AppPermissionDefaultPermissionInput { +/** An input for mutations affecting `AppProfileTemplate` */ +export interface AppProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; createdAt?: string; + /** Human-readable description of this template profile */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; updatedAt?: string; } /** An input for mutations affecting `MembershipType` */ @@ -3546,6 +5321,51 @@ export interface OrgAdminGrantInput { isGrant?: boolean; updatedAt?: string; } +/** An input for mutations affecting `OrgCapability` */ +export interface OrgCapabilityInput { + /** Position of this capability in the bitmask (1-indexed), must be unique per capability set */ + bitnum?: number; + /** Pre-computed bitmask with only this capability bit set, used for bitwise OR/AND operations */ + bitstr?: string; + /** Human-readable description of what this capability allows */ + description?: string; + id?: string; + /** Kind of catalog entry: capability (capability) or level (achievement level) */ + kind?: string; + /** Human-readable capability name (e.g. read, write, manage) */ + name?: string; +} +/** An input for mutations affecting `OrgCapabilityDefaultCapability` */ +export interface OrgCapabilityDefaultCapabilityInput { + /** References the capability included in the defaults bundle */ + capabilityId: string; + createdAt?: string; + /** Scopes this default capability to a specific entity */ + entityId: string; + id?: string; + updatedAt?: string; +} +/** An input for mutations affecting `OrgCapabilityDefault` */ +export interface OrgCapabilityDefaultInput { + /** Default capability bitmask applied to new members */ + capabilities?: string; + /** References the entity these default capabilities apply to */ + entityId: string; + id?: string; +} +/** An input for mutations affecting `OrgCapabilityDefaultGrant` */ +export interface OrgCapabilityDefaultGrantInput { + /** References the capability being added to or removed from defaults */ + capabilityId: string; + createdAt?: string; + /** Scopes this audit entry to a specific entity */ + entityId: string; + grantorId?: string; + id?: string; + /** True to add the capability to defaults, false to remove it */ + isGrant?: boolean; + updatedAt?: string; +} /** An input for mutations affecting `OrgChartEdge` */ export interface OrgChartEdgeInput { /** User ID of the subordinate (employee) in this reporting relationship */ @@ -3597,17 +5417,17 @@ export interface OrgClaimedInviteInput { } /** An input for mutations affecting `OrgGrant` */ export interface OrgGrantInput { - /** The member receiving or losing the permission grant; NULL if user was deleted */ + /** The member receiving or losing the capability grant; NULL if user was deleted */ actorId?: string; + /** Bitmask of capabilities being granted or revoked */ + capabilities?: string; createdAt?: string; - /** The entity (org or group) this permission grant applies to */ + /** The entity (org or group) this capability grant applies to */ entityId: string; grantorId?: string; id?: string; - /** True to grant the permissions, false to revoke them */ + /** True to grant the capabilities, false to revoke them */ isGrant?: boolean; - /** Bitmask of permissions being granted or revoked */ - permissions?: string; updatedAt?: string; } /** An input for mutations affecting `OrgInvite` */ @@ -3681,11 +5501,13 @@ export interface OrgMemberProfileInput { export interface OrgMembershipInput { /** References the user who holds this membership */ actorId: string; + /** Aggregated capability bitmask combining profile-based and directly granted capabilities */ + capabilities?: string; createdAt?: string; createdBy?: string; /** References the entity (org or group) this membership belongs to */ entityId: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ + /** Bitmask of capabilities directly granted to this member (not from profiles) */ granted?: string; id?: string; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ @@ -3698,14 +5520,12 @@ export interface OrgMembershipInput { isBanned?: boolean; /** Whether this membership is temporarily disabled */ isDisabled?: boolean; - /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + /** Whether this member is external (not a member of the parent scope). External members may have restricted capabilities. */ isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether this member has read-only access (blocks mutations when true) */ isReadOnly?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; profileId?: string; updatedAt?: string; updatedBy?: string; @@ -3722,6 +5542,18 @@ export interface OrgMembershipDefaultInput { updatedAt?: string; updatedBy?: string; } +/** An input for mutations affecting `OrgMembershipProfile` */ +export interface OrgMembershipProfileInput { + /** References the user holding the profile, denormalised from the membership */ + actorId: string; + createdAt?: string; + id?: string; + /** References the membership holding the profile */ + membershipId: string; + /** References the held profile */ + profileId: string; + updatedAt?: string; +} /** An input for mutations affecting `OrgMembershipSetting` */ export interface OrgMembershipSettingInput { /** Whether descendants of this org may admit members who are not already org members (outside-collaborators toggle) */ @@ -3739,7 +5571,7 @@ export interface OrgMembershipSettingInput { /** References the entity these settings apply to */ entityId: string; id?: string; - /** Controls how profile assignment on invites is validated: strict (permission + subset check), permission_only (permission only), or subset_only (subset check only) */ + /** Controls how profile assignment on invites is validated: strict (capability + subset check), capability_only (capability only), or subset_only (subset check only) */ inviteProfileAssignmentMode?: string; /** Allocation mode for sub-entity limits: pooled (shared parent cap, no per-entity budgets) or budgeted (explicit per-entity allocations, transfer enabled) */ limitAllocationMode?: string; @@ -3761,53 +5593,88 @@ export interface OrgOwnerGrantInput { isGrant?: boolean; updatedAt?: string; } -/** An input for mutations affecting `OrgPermission` */ -export interface OrgPermissionInput { - /** Position of this permission in the bitmask (1-indexed), must be unique per permission set */ - bitnum?: number; - /** Pre-computed bitmask with only this permission bit set, used for bitwise OR/AND operations */ - bitstr?: string; - /** Human-readable description of what this permission allows */ +/** An input for mutations affecting `OrgProfileCapability` */ +export interface OrgProfileCapabilityInput { + /** References the capability included in this profile */ + capabilityId: string; + createdAt?: string; + id?: string; + /** References the profile this capability belongs to */ + profileId: string; + updatedAt?: string; +} +/** An input for mutations affecting `OrgProfile` */ +export interface OrgProfileInput { + /** Pre-computed capability bitmask aggregating all capabilities in this profile */ + capabilities?: string; + createdAt?: string; + /** Human-readable description of this profile and its intended use */ description?: string; + /** Scopes this profile to a specific entity; NULL means it is a global profile */ + entityId?: string; id?: string; - /** Human-readable permission name (e.g. read, write, manage) */ - name?: string; + /** The default profile is automatically assigned to new members when they join */ + isDefault?: boolean; + /** System profiles are built-in and cannot be deleted or renamed by users */ + isSystem?: boolean; + /** Display name for this profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for this profile, used in API references */ + slug: string; + updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefault` */ -export interface OrgPermissionDefaultInput { - /** References the entity these default permissions apply to */ - entityId: string; +/** An input for mutations affecting `OrgProfileDefinitionGrant` */ +export interface OrgProfileDefinitionGrantInput { + /** References the capability that was added to or removed from the profile; NULL if capability was deleted */ + capabilityId?: string; + createdAt?: string; + grantorId?: string; id?: string; - /** Default permission bitmask applied to new members */ - permissions?: string; + /** True to add the capability to the profile, false to remove it */ + isGrant?: boolean; + /** References the profile whose definition was modified; NULL if profile was deleted */ + profileId?: string; + updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefaultGrant` */ -export interface OrgPermissionDefaultGrantInput { +/** An input for mutations affecting `OrgProfileGrant` */ +export interface OrgProfileGrantInput { createdAt?: string; - /** Scopes this audit entry to a specific entity */ - entityId: string; + /** The entity (org or group) scope for this profile grant */ + entityId?: string; grantorId?: string; id?: string; - /** True to add the permission to defaults, false to remove it */ + /** True to assign the profile, false to revoke it */ isGrant?: boolean; - /** References the permission being added to or removed from defaults */ - permissionId: string; + /** References the membership that received or lost this profile; NULL if membership was deleted */ + membershipId?: string; + /** References the profile being assigned; NULL indicates the profile was removed */ + profileId?: string; updatedAt?: string; } -/** An input for mutations affecting `OrgPermissionDefaultPermission` */ -export interface OrgPermissionDefaultPermissionInput { +/** An input for mutations affecting `OrgProfileTemplate` */ +export interface OrgProfileTemplateInput { + /** Pre-computed capability bitmask for the seeded profile */ + capabilities?: string; createdAt?: string; - /** Scopes this default permission to a specific entity */ - entityId: string; + /** Human-readable description of this template profile */ + description?: string; id?: string; - /** References the permission included in the defaults bundle */ - permissionId: string; + /** Whether the seeded profile should be the default for new members */ + isDefault?: boolean; + /** Display name for the template profile (e.g. Admin, Editor, Viewer) */ + name: string; + /** URL-safe identifier for the template profile */ + slug: string; updatedAt?: string; } -/** A filter to be used against `AppPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultGrantFilter { +/** A filter to be used against `AppCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultGrantFilter[]; + and?: AppCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `grantorId` field. */ @@ -3817,24 +5684,47 @@ export interface AppPermissionDefaultGrantFilter { /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultGrantFilter; + not?: AppCapabilityDefaultGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppCapabilityDefaultGrantFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `OrgPermissionDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultGrantFilter { +/** A filter to be used against `AppProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultGrantFilter[]; + and?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `AppProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileDefinitionGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `grantorId` field. */ grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ @@ -3842,234 +5732,596 @@ export interface OrgPermissionDefaultGrantFilter { /** Filter by the object’s `isGrant` field. */ isGrant?: BooleanFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultGrantFilter; + not?: AppProfileDefinitionGrantFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultGrantFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `OrgPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionDefaultPermissionFilter { +/** A filter to be used against `AppMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: OrgPermissionDefaultPermissionFilter[]; + and?: AppMembershipProfileFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; /** Negates the expression. */ - not?: OrgPermissionDefaultPermissionFilter; + not?: AppMembershipProfileFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: OrgPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: AppMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Included in the specified list. */ - in?: string[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not included in the specified list. */ - notIn?: string[]; -} -/** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ -export interface UUIDFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Included in the specified list. */ - in?: string[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not included in the specified list. */ - notIn?: string[]; +/** A filter to be used against `AppProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileGrantFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: AppMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: AppProfileGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ -export interface BooleanFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: boolean; - /** Equal to the specified value. */ - equalTo?: boolean; - /** Greater than the specified value. */ - greaterThan?: boolean; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: boolean; - /** Included in the specified list. */ - in?: boolean[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: boolean; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: boolean; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: boolean; - /** Not equal to the specified value. */ - notEqualTo?: boolean; - /** Not included in the specified list. */ - notIn?: boolean[]; +/** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface AppInviteFilter { + /** Checks for all expressions in this list. */ + and?: AppInviteFilter[]; + /** Filter by the object’s `channel` field. */ + channel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Negates the expression. */ + not?: AppInviteFilter; + /** Checks for any expressions in this list. */ + or?: AppInviteFilter[]; + /** Filter by the object’s `phone` field. */ + phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionFilter { +/** 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 `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: AppPermissionFilter[]; - /** Filter by the object’s `appPermissionDefaultGrantsByPermissionId` relation. */ - appPermissionDefaultGrantsByPermissionId?: AppPermissionToManyAppPermissionDefaultGrantFilter; - /** `appPermissionDefaultGrantsByPermissionId` exist. */ - appPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `appPermissionDefaultPermissionByPermissionId` relation. */ - appPermissionDefaultPermissionByPermissionId?: AppPermissionDefaultPermissionFilter; - /** A related `appPermissionDefaultPermissionByPermissionId` exists. */ - appPermissionDefaultPermissionByPermissionIdExists?: boolean; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + and?: AppMembershipFilter[]; + /** Filter by the object’s `appMembershipProfilesByMembershipId` relation. */ + appMembershipProfilesByMembershipId?: AppMembershipToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByMembershipId` exist. */ + appMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByMembershipId` relation. */ + appProfileGrantsByMembershipId?: AppMembershipToManyAppProfileGrantFilter; + /** `appProfileGrantsByMembershipId` exist. */ + appProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `granted` field. */ + granted?: BitStringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** 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 `isOwner` field. */ + isOwner?: BooleanFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionFilter; + not?: AppMembershipFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionFilter[]; + or?: AppMembershipFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: AppProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; } -/** A filter to be used against `OrgPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgPermissionFilter { +/** A filter to be used against `OrgCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultCapabilityFilter { /** Checks for all expressions in this list. */ - and?: OrgPermissionFilter[]; - /** Filter by the object’s `bitnum` field. */ - bitnum?: IntFilter; - /** Filter by the object’s `bitstr` field. */ - bitstr?: BitStringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + and?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; /** Negates the expression. */ - not?: OrgPermissionFilter; + not?: OrgCapabilityDefaultCapabilityFilter; /** Checks for any expressions in this list. */ - or?: OrgPermissionFilter[]; - /** Filter by the object’s `orgPermissionDefaultGrantsByPermissionId` relation. */ - orgPermissionDefaultGrantsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultGrantFilter; - /** `orgPermissionDefaultGrantsByPermissionId` exist. */ - orgPermissionDefaultGrantsByPermissionIdExist?: boolean; - /** Filter by the object’s `orgPermissionDefaultPermissionsByPermissionId` relation. */ - orgPermissionDefaultPermissionsByPermissionId?: OrgPermissionToManyOrgPermissionDefaultPermissionFilter; - /** `orgPermissionDefaultPermissionsByPermissionId` exist. */ - orgPermissionDefaultPermissionsByPermissionIdExist?: boolean; -} -/** A filter to be used against `AppPermissionDefaultPermission` object types. All fields are combined with a logical ‘and.’ */ -export interface AppPermissionDefaultPermissionFilter { + or?: OrgCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgCapabilityDefaultGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityDefaultGrantFilter { /** Checks for all expressions in this list. */ - and?: AppPermissionDefaultPermissionFilter[]; + and?: OrgCapabilityDefaultGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; /** Negates the expression. */ - not?: AppPermissionDefaultPermissionFilter; + not?: OrgCapabilityDefaultGrantFilter; /** Checks for any expressions in this list. */ - or?: AppPermissionDefaultPermissionFilter[]; - /** Filter by the object’s `permission` relation. */ - permission?: AppPermissionFilter; - /** Filter by the object’s `permissionId` field. */ - permissionId?: UUIDFilter; + or?: OrgCapabilityDefaultGrantFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { +/** A filter to be used against `OrgProfileCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileCapabilityFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgProfileDefinitionGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileDefinitionGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: OrgCapabilityFilter; + /** A related `capability` exists. */ + capabilityExists?: boolean; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Negates the expression. */ + not?: OrgProfileDefinitionGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileDefinitionGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgMembershipProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipProfileFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMembershipProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipProfileFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgProfileGrant` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileGrantFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `grantorId` field. */ + grantorId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isGrant` field. */ + isGrant?: BooleanFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** A related `membership` exists. */ + membershipExists?: boolean; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgProfileGrantFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileGrantFilter[]; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgInviteFilter { + /** Checks for all expressions in this list. */ + and?: OrgInviteFilter[]; + /** Filter by the object’s `channel` field. */ + channel?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Negates the expression. */ + not?: OrgInviteFilter; + /** Checks for any expressions in this list. */ + or?: OrgInviteFilter[]; + /** Filter by the object’s `phone` field. */ + phone?: StringFilter; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** 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 `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `granted` field. */ + granted?: BitStringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** 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 `isExternal` field. */ + isExternal?: BooleanFilter; + /** Filter by the object’s `isOwner` field. */ + isOwner?: BooleanFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Negates the expression. */ + not?: OrgMembershipFilter; + /** Checks for any expressions in this list. */ + or?: OrgMembershipFilter[]; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; + /** Filter by the object’s `orgMembershipProfilesByMembershipId` relation. */ + orgMembershipProfilesByMembershipId?: OrgMembershipToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByMembershipId` exist. */ + orgMembershipProfilesByMembershipIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByMembershipId` relation. */ + orgProfileGrantsByMembershipId?: OrgMembershipToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByMembershipId` exist. */ + orgProfileGrantsByMembershipIdExist?: boolean; + /** Filter by the object’s `profile` relation. */ + profile?: OrgProfileFilter; + /** A related `profile` exists. */ + profileExists?: boolean; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; +} +/** A filter to be used against `AppCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityFilter[]; + /** Filter by the object’s `appCapabilityDefaultCapabilityByCapabilityId` relation. */ + appCapabilityDefaultCapabilityByCapabilityId?: AppCapabilityDefaultCapabilityFilter; + /** A related `appCapabilityDefaultCapabilityByCapabilityId` exists. */ + appCapabilityDefaultCapabilityByCapabilityIdExists?: boolean; + /** Filter by the object’s `appCapabilityDefaultGrantsByCapabilityId` relation. */ + appCapabilityDefaultGrantsByCapabilityId?: AppCapabilityToManyAppCapabilityDefaultGrantFilter; + /** `appCapabilityDefaultGrantsByCapabilityId` exist. */ + appCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByCapabilityId` relation. */ + appProfileCapabilitiesByCapabilityId?: AppCapabilityToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByCapabilityId` exist. */ + appProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByCapabilityId` relation. */ + appProfileDefinitionGrantsByCapabilityId?: AppCapabilityToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByCapabilityId` exist. */ + appProfileDefinitionGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityFilter[]; +} +/** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ +export interface UUIDFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; + distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: number; + equalTo?: string; /** Greater than the specified value. */ - greaterThan?: number; + greaterThan?: string; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; + greaterThanOrEqualTo?: string; /** Included in the specified list. */ - in?: number[]; + in?: string[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: number; + lessThan?: string; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; + lessThanOrEqualTo?: string; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; + notDistinctFrom?: string; /** Not equal to the specified value. */ - notEqualTo?: number; + notEqualTo?: string; /** Not included in the specified list. */ - notIn?: number[]; + notIn?: string[]; } -/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ -export interface BitStringFilter { +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { /** Not equal to the specified value, treating null like an ordinary value. */ distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: string; + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: boolean; + /** Equal to the specified value. */ + equalTo?: boolean; /** Greater than the specified value. */ - greaterThan?: string; + greaterThan?: boolean; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; + greaterThanOrEqualTo?: boolean; /** Included in the specified list. */ - in?: string[]; + in?: boolean[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: string; + lessThan?: boolean; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; + lessThanOrEqualTo?: boolean; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; + notDistinctFrom?: boolean; /** Not equal to the specified value. */ - notEqualTo?: string; + notEqualTo?: boolean; /** Not included in the specified list. */ - notIn?: string[]; + notIn?: boolean[]; +} +/** A filter to be used against `AppProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface AppProfileFilter { + /** Checks for all expressions in this list. */ + and?: AppProfileFilter[]; + /** Filter by the object’s `appInvitesByProfileId` relation. */ + appInvitesByProfileId?: AppProfileToManyAppInviteFilter; + /** `appInvitesByProfileId` exist. */ + appInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipProfilesByProfileId` relation. */ + appMembershipProfilesByProfileId?: AppProfileToManyAppMembershipProfileFilter; + /** `appMembershipProfilesByProfileId` exist. */ + appMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `appMembershipsByProfileId` relation. */ + appMembershipsByProfileId?: AppProfileToManyAppMembershipFilter; + /** `appMembershipsByProfileId` exist. */ + appMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileCapabilitiesByProfileId` relation. */ + appProfileCapabilitiesByProfileId?: AppProfileToManyAppProfileCapabilityFilter; + /** `appProfileCapabilitiesByProfileId` exist. */ + appProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileDefinitionGrantsByProfileId` relation. */ + appProfileDefinitionGrantsByProfileId?: AppProfileToManyAppProfileDefinitionGrantFilter; + /** `appProfileDefinitionGrantsByProfileId` exist. */ + appProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `appProfileGrantsByProfileId` relation. */ + appProfileGrantsByProfileId?: AppProfileToManyAppProfileGrantFilter; + /** `appProfileGrantsByProfileId` exist. */ + appProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppProfileFilter; + /** Checks for any expressions in this list. */ + or?: AppProfileFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } /** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ export interface StringFilter { @@ -4148,39 +6400,231 @@ export interface StringFilter { /** Starts with the specified string (case-insensitive). */ startsWithInsensitive?: string; } -/** A connection to a list of `AppPermission` values. */ +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value. */ + equalTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; + /** Included in the specified list. */ + in?: number[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not included in the specified list. */ + notIn?: number[]; +} +/** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ +export interface BitStringFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against `OrgCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: OrgCapabilityFilter[]; + /** Filter by the object’s `bitnum` field. */ + bitnum?: IntFilter; + /** Filter by the object’s `bitstr` field. */ + bitstr?: BitStringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: OrgCapabilityFilter[]; + /** Filter by the object’s `orgCapabilityDefaultCapabilitiesByCapabilityId` relation. */ + orgCapabilityDefaultCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultCapabilityFilter; + /** `orgCapabilityDefaultCapabilitiesByCapabilityId` exist. */ + orgCapabilityDefaultCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgCapabilityDefaultGrantsByCapabilityId` relation. */ + orgCapabilityDefaultGrantsByCapabilityId?: OrgCapabilityToManyOrgCapabilityDefaultGrantFilter; + /** `orgCapabilityDefaultGrantsByCapabilityId` exist. */ + orgCapabilityDefaultGrantsByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByCapabilityId` relation. */ + orgProfileCapabilitiesByCapabilityId?: OrgCapabilityToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByCapabilityId` exist. */ + orgProfileCapabilitiesByCapabilityIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByCapabilityId` relation. */ + orgProfileDefinitionGrantsByCapabilityId?: OrgCapabilityToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByCapabilityId` exist. */ + orgProfileDefinitionGrantsByCapabilityIdExist?: boolean; +} +/** A filter to be used against `OrgProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgProfileFilter { + /** Checks for all expressions in this list. */ + and?: OrgProfileFilter[]; + /** Filter by the object’s `capabilities` field. */ + capabilities?: BitStringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `isSystem` field. */ + isSystem?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: OrgProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgProfileFilter[]; + /** Filter by the object’s `orgInvitesByProfileId` relation. */ + orgInvitesByProfileId?: OrgProfileToManyOrgInviteFilter; + /** `orgInvitesByProfileId` exist. */ + orgInvitesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipProfilesByProfileId` relation. */ + orgMembershipProfilesByProfileId?: OrgProfileToManyOrgMembershipProfileFilter; + /** `orgMembershipProfilesByProfileId` exist. */ + orgMembershipProfilesByProfileIdExist?: boolean; + /** Filter by the object’s `orgMembershipsByProfileId` relation. */ + orgMembershipsByProfileId?: OrgProfileToManyOrgMembershipFilter; + /** `orgMembershipsByProfileId` exist. */ + orgMembershipsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileCapabilitiesByProfileId` relation. */ + orgProfileCapabilitiesByProfileId?: OrgProfileToManyOrgProfileCapabilityFilter; + /** `orgProfileCapabilitiesByProfileId` exist. */ + orgProfileCapabilitiesByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileDefinitionGrantsByProfileId` relation. */ + orgProfileDefinitionGrantsByProfileId?: OrgProfileToManyOrgProfileDefinitionGrantFilter; + /** `orgProfileDefinitionGrantsByProfileId` exist. */ + orgProfileDefinitionGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `orgProfileGrantsByProfileId` relation. */ + orgProfileGrantsByProfileId?: OrgProfileToManyOrgProfileGrantFilter; + /** `orgProfileGrantsByProfileId` exist. */ + orgProfileGrantsByProfileIdExist?: boolean; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** 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 `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `AppCapabilityDefaultCapability` object types. All fields are combined with a logical ‘and.’ */ +export interface AppCapabilityDefaultCapabilityFilter { + /** Checks for all expressions in this list. */ + and?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `capability` relation. */ + capability?: AppCapabilityFilter; + /** Filter by the object’s `capabilityId` field. */ + capabilityId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppCapabilityDefaultCapabilityFilter; + /** Checks for any expressions in this list. */ + or?: AppCapabilityDefaultCapabilityFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A connection to a list of `AppCapability` values. */ // ============ Payload/Return Types (for custom operations) ============ -export interface AppPermissionConnection { - edges: AppPermissionEdge[]; - nodes: AppPermission[]; +export interface AppCapabilityConnection { + edges: AppCapabilityEdge[]; + nodes: AppCapability[]; pageInfo: PageInfo; totalCount: number; } -export type AppPermissionConnectionSelect = { +export type AppCapabilityConnectionSelect = { edges?: { - select: AppPermissionEdgeSelect; + select: AppCapabilityEdgeSelect; }; nodes?: { - select: AppPermissionSelect; + select: AppCapabilitySelect; }; pageInfo?: { select: PageInfoSelect; }; totalCount?: boolean; }; -/** A connection to a list of `OrgPermission` values. */ -export interface OrgPermissionConnection { - edges: OrgPermissionEdge[]; - nodes: OrgPermission[]; +/** A connection to a list of `OrgCapability` values. */ +export interface OrgCapabilityConnection { + edges: OrgCapabilityEdge[]; + nodes: OrgCapability[]; pageInfo: PageInfo; totalCount: number; } -export type OrgPermissionConnectionSelect = { +export type OrgCapabilityConnectionSelect = { edges?: { - select: OrgPermissionEdgeSelect; + select: OrgCapabilityEdgeSelect; }; nodes?: { - select: OrgPermissionSelect; + select: OrgCapabilitySelect; }; pageInfo?: { select: PageInfoSelect; @@ -4209,64 +6653,244 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface SubmitAppInviteCodePayload { +export interface SubmitAppInviteCodePayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SubmitAppInviteCodePayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface SubmitOrgInviteCodePayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SubmitOrgInviteCodePayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreateAppAdminGrantPayload { + /** The `AppAdminGrant` that was created by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type CreateAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppAdminGrantPayload { + /** The `AppAdminGrant` that was updated by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppAdminGrantPayload { + /** The `AppAdminGrant` that was deleted by this mutation. */ + appAdminGrant?: AppAdminGrant | null; + appAdminGrantEdge?: AppAdminGrantEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppAdminGrantPayloadSelect = { + appAdminGrant?: { + select: AppAdminGrantSelect; + }; + appAdminGrantEdge?: { + select: AppAdminGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityPayload { + /** The `AppCapability` that was created by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityPayload { + /** The `AppCapability` that was updated by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppCapabilityPayload { + /** The `AppCapability` that was deleted by this mutation. */ + appCapability?: AppCapability | null; + appCapabilityEdge?: AppCapabilityEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppCapabilityPayloadSelect = { + appCapability?: { + select: AppCapabilitySelect; + }; + appCapabilityEdge?: { + select: AppCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was created by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was updated by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppCapabilityDefaultCapabilityPayload { + /** The `AppCapabilityDefaultCapability` that was deleted by this mutation. */ + appCapabilityDefaultCapability?: AppCapabilityDefaultCapability | null; + appCapabilityDefaultCapabilityEdge?: AppCapabilityDefaultCapabilityEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppCapabilityDefaultCapabilityPayloadSelect = { + appCapabilityDefaultCapability?: { + select: AppCapabilityDefaultCapabilitySelect; + }; + appCapabilityDefaultCapabilityEdge?: { + select: AppCapabilityDefaultCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was created by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; + clientMutationId?: string | null; +} +export type CreateAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was updated by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; clientMutationId?: string | null; - result?: boolean | null; } -export type SubmitAppInviteCodePayloadSelect = { +export type UpdateAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; }; -export interface SubmitOrgInviteCodePayload { +export interface DeleteAppCapabilityDefaultPayload { + /** The `AppCapabilityDefault` that was deleted by this mutation. */ + appCapabilityDefault?: AppCapabilityDefault | null; + appCapabilityDefaultEdge?: AppCapabilityDefaultEdge | null; clientMutationId?: string | null; - result?: boolean | null; } -export type SubmitOrgInviteCodePayloadSelect = { +export type DeleteAppCapabilityDefaultPayloadSelect = { + appCapabilityDefault?: { + select: AppCapabilityDefaultSelect; + }; + appCapabilityDefaultEdge?: { + select: AppCapabilityDefaultEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; }; -export interface CreateAppAdminGrantPayload { - /** The `AppAdminGrant` that was created by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface CreateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was created by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type CreateAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppAdminGrantPayload { - /** The `AppAdminGrant` that was updated by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface UpdateAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was updated by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type UpdateAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppAdminGrantPayload { - /** The `AppAdminGrant` that was deleted by this mutation. */ - appAdminGrant?: AppAdminGrant | null; - appAdminGrantEdge?: AppAdminGrantEdge | null; +export interface DeleteAppCapabilityDefaultGrantPayload { + /** The `AppCapabilityDefaultGrant` that was deleted by this mutation. */ + appCapabilityDefaultGrant?: AppCapabilityDefaultGrant | null; + appCapabilityDefaultGrantEdge?: AppCapabilityDefaultGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppAdminGrantPayloadSelect = { - appAdminGrant?: { - select: AppAdminGrantSelect; +export type DeleteAppCapabilityDefaultGrantPayloadSelect = { + appCapabilityDefaultGrant?: { + select: AppCapabilityDefaultGrantSelect; }; - appAdminGrantEdge?: { - select: AppAdminGrantEdgeSelect; + appCapabilityDefaultGrantEdge?: { + select: AppCapabilityDefaultGrantEdgeSelect; }; clientMutationId?: boolean; }; @@ -4495,6 +7119,51 @@ export type DeleteAppMembershipDefaultPayloadSelect = { }; clientMutationId?: boolean; }; +export interface CreateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was created by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type CreateAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was updated by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppMembershipProfilePayload { + /** The `AppMembershipProfile` that was deleted by this mutation. */ + appMembershipProfile?: AppMembershipProfile | null; + appMembershipProfileEdge?: AppMembershipProfileEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppMembershipProfilePayloadSelect = { + appMembershipProfile?: { + select: AppMembershipProfileSelect; + }; + appMembershipProfileEdge?: { + select: AppMembershipProfileEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateAppOwnerGrantPayload { /** The `AppOwnerGrant` that was created by this mutation. */ appOwnerGrant?: AppOwnerGrant | null; @@ -4540,183 +7209,228 @@ export type DeleteAppOwnerGrantPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateAppPermissionPayload { - /** The `AppPermission` that was created by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface CreateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was created by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; + clientMutationId?: string | null; +} +export type CreateAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; + }; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was updated by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type UpdateAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionPayload { - /** The `AppPermission` that was updated by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface DeleteAppProfileCapabilityPayload { + /** The `AppProfileCapability` that was deleted by this mutation. */ + appProfileCapability?: AppProfileCapability | null; + appProfileCapabilityEdge?: AppProfileCapabilityEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type DeleteAppProfileCapabilityPayloadSelect = { + appProfileCapability?: { + select: AppProfileCapabilitySelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileCapabilityEdge?: { + select: AppProfileCapabilityEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionPayload { - /** The `AppPermission` that was deleted by this mutation. */ - appPermission?: AppPermission | null; - appPermissionEdge?: AppPermissionEdge | null; +export interface CreateAppProfilePayload { + /** The `AppProfile` that was created by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionPayloadSelect = { - appPermission?: { - select: AppPermissionSelect; +export type CreateAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionEdge?: { - select: AppPermissionEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was created by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface UpdateAppProfilePayload { + /** The `AppProfile` that was updated by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type UpdateAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was updated by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface DeleteAppProfilePayload { + /** The `AppProfile` that was deleted by this mutation. */ + appProfile?: AppProfile | null; + appProfileEdge?: AppProfileEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type DeleteAppProfilePayloadSelect = { + appProfile?: { + select: AppProfileSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileEdge?: { + select: AppProfileEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultPayload { - /** The `AppPermissionDefault` that was deleted by this mutation. */ - appPermissionDefault?: AppPermissionDefault | null; - appPermissionDefaultEdge?: AppPermissionDefaultEdge | null; +export interface CreateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was created by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultPayloadSelect = { - appPermissionDefault?: { - select: AppPermissionDefaultSelect; +export type CreateAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultEdge?: { - select: AppPermissionDefaultEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was created by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface UpdateAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was updated by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type UpdateAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was updated by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface DeleteAppProfileDefinitionGrantPayload { + /** The `AppProfileDefinitionGrant` that was deleted by this mutation. */ + appProfileDefinitionGrant?: AppProfileDefinitionGrant | null; + appProfileDefinitionGrantEdge?: AppProfileDefinitionGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type DeleteAppProfileDefinitionGrantPayloadSelect = { + appProfileDefinitionGrant?: { + select: AppProfileDefinitionGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileDefinitionGrantEdge?: { + select: AppProfileDefinitionGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultGrantPayload { - /** The `AppPermissionDefaultGrant` that was deleted by this mutation. */ - appPermissionDefaultGrant?: AppPermissionDefaultGrant | null; - appPermissionDefaultGrantEdge?: AppPermissionDefaultGrantEdge | null; +export interface CreateAppProfileGrantPayload { + /** The `AppProfileGrant` that was created by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultGrantPayloadSelect = { - appPermissionDefaultGrant?: { - select: AppPermissionDefaultGrantSelect; +export type CreateAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultGrantEdge?: { - select: AppPermissionDefaultGrantEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface CreateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was created by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface UpdateAppProfileGrantPayload { + /** The `AppProfileGrant` that was updated by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type CreateAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type UpdateAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was updated by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface DeleteAppProfileGrantPayload { + /** The `AppProfileGrant` that was deleted by this mutation. */ + appProfileGrant?: AppProfileGrant | null; + appProfileGrantEdge?: AppProfileGrantEdge | null; clientMutationId?: string | null; } -export type UpdateAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type DeleteAppProfileGrantPayloadSelect = { + appProfileGrant?: { + select: AppProfileGrantSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileGrantEdge?: { + select: AppProfileGrantEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteAppPermissionDefaultPermissionPayload { - /** The `AppPermissionDefaultPermission` that was deleted by this mutation. */ - appPermissionDefaultPermission?: AppPermissionDefaultPermission | null; - appPermissionDefaultPermissionEdge?: AppPermissionDefaultPermissionEdge | null; +export interface CreateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was created by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; clientMutationId?: string | null; } -export type DeleteAppPermissionDefaultPermissionPayloadSelect = { - appPermissionDefaultPermission?: { - select: AppPermissionDefaultPermissionSelect; +export type CreateAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; }; - appPermissionDefaultPermissionEdge?: { - select: AppPermissionDefaultPermissionEdgeSelect; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was updated by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; + }; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppProfileTemplatePayload { + /** The `AppProfileTemplate` that was deleted by this mutation. */ + appProfileTemplate?: AppProfileTemplate | null; + appProfileTemplateEdge?: AppProfileTemplateEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppProfileTemplatePayloadSelect = { + appProfileTemplate?: { + select: AppProfileTemplateSelect; + }; + appProfileTemplateEdge?: { + select: AppProfileTemplateEdgeSelect; }; clientMutationId?: boolean; }; @@ -4810,6 +7524,186 @@ export type DeleteOrgAdminGrantPayloadSelect = { select: OrgAdminGrantEdgeSelect; }; }; +export interface CreateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was created by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type CreateOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was updated by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type UpdateOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapability` that was deleted by this mutation. */ + orgCapability?: OrgCapability | null; + orgCapabilityEdge?: OrgCapabilityEdge | null; +} +export type DeleteOrgCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapability?: { + select: OrgCapabilitySelect; + }; + orgCapabilityEdge?: { + select: OrgCapabilityEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was created by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type CreateOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was updated by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type UpdateOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultCapability` that was deleted by this mutation. */ + orgCapabilityDefaultCapability?: OrgCapabilityDefaultCapability | null; + orgCapabilityDefaultCapabilityEdge?: OrgCapabilityDefaultCapabilityEdge | null; +} +export type DeleteOrgCapabilityDefaultCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultCapability?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; + orgCapabilityDefaultCapabilityEdge?: { + select: OrgCapabilityDefaultCapabilityEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was created by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type CreateOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was updated by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type UpdateOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefault` that was deleted by this mutation. */ + orgCapabilityDefault?: OrgCapabilityDefault | null; + orgCapabilityDefaultEdge?: OrgCapabilityDefaultEdge | null; +} +export type DeleteOrgCapabilityDefaultPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefault?: { + select: OrgCapabilityDefaultSelect; + }; + orgCapabilityDefaultEdge?: { + select: OrgCapabilityDefaultEdgeSelect; + }; +}; +export interface CreateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was created by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type CreateOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; +export interface UpdateOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was updated by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type UpdateOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; +export interface DeleteOrgCapabilityDefaultGrantPayload { + clientMutationId?: string | null; + /** The `OrgCapabilityDefaultGrant` that was deleted by this mutation. */ + orgCapabilityDefaultGrant?: OrgCapabilityDefaultGrant | null; + orgCapabilityDefaultGrantEdge?: OrgCapabilityDefaultGrantEdge | null; +} +export type DeleteOrgCapabilityDefaultGrantPayloadSelect = { + clientMutationId?: boolean; + orgCapabilityDefaultGrant?: { + select: OrgCapabilityDefaultGrantSelect; + }; + orgCapabilityDefaultGrantEdge?: { + select: OrgCapabilityDefaultGrantEdgeSelect; + }; +}; export interface CreateOrgChartEdgePayload { clientMutationId?: string | null; /** The `OrgChartEdge` that was created by this mutation. */ @@ -5215,6 +8109,51 @@ export type DeleteOrgMembershipDefaultPayloadSelect = { select: OrgMembershipDefaultEdgeSelect; }; }; +export interface CreateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was created by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type CreateOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; +export interface UpdateOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was updated by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type UpdateOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; +export interface DeleteOrgMembershipProfilePayload { + clientMutationId?: string | null; + /** The `OrgMembershipProfile` that was deleted by this mutation. */ + orgMembershipProfile?: OrgMembershipProfile | null; + orgMembershipProfileEdge?: OrgMembershipProfileEdge | null; +} +export type DeleteOrgMembershipProfilePayloadSelect = { + clientMutationId?: boolean; + orgMembershipProfile?: { + select: OrgMembershipProfileSelect; + }; + orgMembershipProfileEdge?: { + select: OrgMembershipProfileEdgeSelect; + }; +}; export interface CreateOrgMembershipSettingPayload { clientMutationId?: string | null; /** The `OrgMembershipSetting` that was created by this mutation. */ @@ -5305,196 +8244,241 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; -export interface CreateOrgPermissionPayload { +export interface CreateOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was created by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type CreateOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface UpdateOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was updated by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type UpdateOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface DeleteOrgProfileCapabilityPayload { + clientMutationId?: string | null; + /** The `OrgProfileCapability` that was deleted by this mutation. */ + orgProfileCapability?: OrgProfileCapability | null; + orgProfileCapabilityEdge?: OrgProfileCapabilityEdge | null; +} +export type DeleteOrgProfileCapabilityPayloadSelect = { + clientMutationId?: boolean; + orgProfileCapability?: { + select: OrgProfileCapabilitySelect; + }; + orgProfileCapabilityEdge?: { + select: OrgProfileCapabilityEdgeSelect; + }; +}; +export interface CreateOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was created by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was created by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type CreateOrgPermissionPayloadSelect = { +export type CreateOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface UpdateOrgPermissionPayload { +export interface UpdateOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was updated by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was updated by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type UpdateOrgPermissionPayloadSelect = { +export type UpdateOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface DeleteOrgPermissionPayload { +export interface DeleteOrgProfilePayload { clientMutationId?: string | null; - /** The `OrgPermission` that was deleted by this mutation. */ - orgPermission?: OrgPermission | null; - orgPermissionEdge?: OrgPermissionEdge | null; + /** The `OrgProfile` that was deleted by this mutation. */ + orgProfile?: OrgProfile | null; + orgProfileEdge?: OrgProfileEdge | null; } -export type DeleteOrgPermissionPayloadSelect = { +export type DeleteOrgProfilePayloadSelect = { clientMutationId?: boolean; - orgPermission?: { - select: OrgPermissionSelect; + orgProfile?: { + select: OrgProfileSelect; }; - orgPermissionEdge?: { - select: OrgPermissionEdgeSelect; + orgProfileEdge?: { + select: OrgProfileEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultPayload { +export interface CreateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was created by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was created by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type CreateOrgPermissionDefaultPayloadSelect = { +export type CreateOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultPayload { +export interface UpdateOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was updated by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was updated by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type UpdateOrgPermissionDefaultPayloadSelect = { +export type UpdateOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultPayload { +export interface DeleteOrgProfileDefinitionGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefault` that was deleted by this mutation. */ - orgPermissionDefault?: OrgPermissionDefault | null; - orgPermissionDefaultEdge?: OrgPermissionDefaultEdge | null; + /** The `OrgProfileDefinitionGrant` that was deleted by this mutation. */ + orgProfileDefinitionGrant?: OrgProfileDefinitionGrant | null; + orgProfileDefinitionGrantEdge?: OrgProfileDefinitionGrantEdge | null; } -export type DeleteOrgPermissionDefaultPayloadSelect = { +export type DeleteOrgProfileDefinitionGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefault?: { - select: OrgPermissionDefaultSelect; + orgProfileDefinitionGrant?: { + select: OrgProfileDefinitionGrantSelect; }; - orgPermissionDefaultEdge?: { - select: OrgPermissionDefaultEdgeSelect; + orgProfileDefinitionGrantEdge?: { + select: OrgProfileDefinitionGrantEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultGrantPayload { +export interface CreateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was created by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was created by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type CreateOrgPermissionDefaultGrantPayloadSelect = { +export type CreateOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultGrantPayload { +export interface UpdateOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was updated by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was updated by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type UpdateOrgPermissionDefaultGrantPayloadSelect = { +export type UpdateOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultGrantPayload { +export interface DeleteOrgProfileGrantPayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultGrant` that was deleted by this mutation. */ - orgPermissionDefaultGrant?: OrgPermissionDefaultGrant | null; - orgPermissionDefaultGrantEdge?: OrgPermissionDefaultGrantEdge | null; + /** The `OrgProfileGrant` that was deleted by this mutation. */ + orgProfileGrant?: OrgProfileGrant | null; + orgProfileGrantEdge?: OrgProfileGrantEdge | null; } -export type DeleteOrgPermissionDefaultGrantPayloadSelect = { +export type DeleteOrgProfileGrantPayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultGrant?: { - select: OrgPermissionDefaultGrantSelect; + orgProfileGrant?: { + select: OrgProfileGrantSelect; }; - orgPermissionDefaultGrantEdge?: { - select: OrgPermissionDefaultGrantEdgeSelect; + orgProfileGrantEdge?: { + select: OrgProfileGrantEdgeSelect; }; }; -export interface CreateOrgPermissionDefaultPermissionPayload { +export interface CreateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was created by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was created by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type CreateOrgPermissionDefaultPermissionPayloadSelect = { +export type CreateOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -export interface UpdateOrgPermissionDefaultPermissionPayload { +export interface UpdateOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was updated by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was updated by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type UpdateOrgPermissionDefaultPermissionPayloadSelect = { +export type UpdateOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -export interface DeleteOrgPermissionDefaultPermissionPayload { +export interface DeleteOrgProfileTemplatePayload { clientMutationId?: string | null; - /** The `OrgPermissionDefaultPermission` that was deleted by this mutation. */ - orgPermissionDefaultPermission?: OrgPermissionDefaultPermission | null; - orgPermissionDefaultPermissionEdge?: OrgPermissionDefaultPermissionEdge | null; + /** The `OrgProfileTemplate` that was deleted by this mutation. */ + orgProfileTemplate?: OrgProfileTemplate | null; + orgProfileTemplateEdge?: OrgProfileTemplateEdge | null; } -export type DeleteOrgPermissionDefaultPermissionPayloadSelect = { +export type DeleteOrgProfileTemplatePayloadSelect = { clientMutationId?: boolean; - orgPermissionDefaultPermission?: { - select: OrgPermissionDefaultPermissionSelect; + orgProfileTemplate?: { + select: OrgProfileTemplateSelect; }; - orgPermissionDefaultPermissionEdge?: { - select: OrgPermissionDefaultPermissionEdgeSelect; + orgProfileTemplateEdge?: { + select: OrgProfileTemplateEdgeSelect; }; }; -/** A `AppPermission` edge in the connection. */ -export interface AppPermissionEdge { +/** A `AppCapability` edge in the connection. */ +export interface AppCapabilityEdge { cursor?: string | null; - /** The `AppPermission` at the end of the edge. */ - node?: AppPermission | null; + /** The `AppCapability` at the end of the edge. */ + node?: AppCapability | null; } -export type AppPermissionEdgeSelect = { +export type AppCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionSelect; + select: AppCapabilitySelect; }; }; /** Information about pagination in a connection. */ @@ -5514,16 +8498,16 @@ export type PageInfoSelect = { hasPreviousPage?: boolean; startCursor?: boolean; }; -/** A `OrgPermission` edge in the connection. */ -export interface OrgPermissionEdge { +/** A `OrgCapability` edge in the connection. */ +export interface OrgCapabilityEdge { cursor?: string | null; - /** The `OrgPermission` at the end of the edge. */ - node?: OrgPermission | null; + /** The `OrgCapability` at the end of the edge. */ + node?: OrgCapability | null; } -export type OrgPermissionEdgeSelect = { +export type OrgCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionSelect; + select: OrgCapabilitySelect; }; }; /** A `AppAdminGrant` edge in the connection. */ @@ -5538,6 +8522,42 @@ export type AppAdminGrantEdgeSelect = { select: AppAdminGrantSelect; }; }; +/** A `AppCapabilityDefaultCapability` edge in the connection. */ +export interface AppCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultCapability` at the end of the edge. */ + node?: AppCapabilityDefaultCapability | null; +} +export type AppCapabilityDefaultCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultCapabilitySelect; + }; +}; +/** A `AppCapabilityDefault` edge in the connection. */ +export interface AppCapabilityDefaultEdge { + cursor?: string | null; + /** The `AppCapabilityDefault` at the end of the edge. */ + node?: AppCapabilityDefault | null; +} +export type AppCapabilityDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultSelect; + }; +}; +/** A `AppCapabilityDefaultGrant` edge in the connection. */ +export interface AppCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `AppCapabilityDefaultGrant` at the end of the edge. */ + node?: AppCapabilityDefaultGrant | null; +} +export type AppCapabilityDefaultGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppCapabilityDefaultGrantSelect; + }; +}; /** A `AppClaimedInvite` edge in the connection. */ export interface AppClaimedInviteEdge { cursor?: string | null; @@ -5598,6 +8618,18 @@ export type AppMembershipDefaultEdgeSelect = { select: AppMembershipDefaultSelect; }; }; +/** A `AppMembershipProfile` edge in the connection. */ +export interface AppMembershipProfileEdge { + cursor?: string | null; + /** The `AppMembershipProfile` at the end of the edge. */ + node?: AppMembershipProfile | null; +} +export type AppMembershipProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: AppMembershipProfileSelect; + }; +}; /** A `AppOwnerGrant` edge in the connection. */ export interface AppOwnerGrantEdge { cursor?: string | null; @@ -5610,40 +8642,64 @@ export type AppOwnerGrantEdgeSelect = { select: AppOwnerGrantSelect; }; }; -/** A `AppPermissionDefault` edge in the connection. */ -export interface AppPermissionDefaultEdge { +/** A `AppProfileCapability` edge in the connection. */ +export interface AppProfileCapabilityEdge { cursor?: string | null; - /** The `AppPermissionDefault` at the end of the edge. */ - node?: AppPermissionDefault | null; + /** The `AppProfileCapability` at the end of the edge. */ + node?: AppProfileCapability | null; } -export type AppPermissionDefaultEdgeSelect = { +export type AppProfileCapabilityEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultSelect; + select: AppProfileCapabilitySelect; }; }; -/** A `AppPermissionDefaultGrant` edge in the connection. */ -export interface AppPermissionDefaultGrantEdge { +/** A `AppProfile` edge in the connection. */ +export interface AppProfileEdge { cursor?: string | null; - /** The `AppPermissionDefaultGrant` at the end of the edge. */ - node?: AppPermissionDefaultGrant | null; + /** The `AppProfile` at the end of the edge. */ + node?: AppProfile | null; } -export type AppPermissionDefaultGrantEdgeSelect = { +export type AppProfileEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultGrantSelect; + select: AppProfileSelect; }; }; -/** A `AppPermissionDefaultPermission` edge in the connection. */ -export interface AppPermissionDefaultPermissionEdge { +/** A `AppProfileDefinitionGrant` edge in the connection. */ +export interface AppProfileDefinitionGrantEdge { cursor?: string | null; - /** The `AppPermissionDefaultPermission` at the end of the edge. */ - node?: AppPermissionDefaultPermission | null; + /** The `AppProfileDefinitionGrant` at the end of the edge. */ + node?: AppProfileDefinitionGrant | null; } -export type AppPermissionDefaultPermissionEdgeSelect = { +export type AppProfileDefinitionGrantEdgeSelect = { cursor?: boolean; node?: { - select: AppPermissionDefaultPermissionSelect; + select: AppProfileDefinitionGrantSelect; + }; +}; +/** A `AppProfileGrant` edge in the connection. */ +export interface AppProfileGrantEdge { + cursor?: string | null; + /** The `AppProfileGrant` at the end of the edge. */ + node?: AppProfileGrant | null; +} +export type AppProfileGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppProfileGrantSelect; + }; +}; +/** A `AppProfileTemplate` edge in the connection. */ +export interface AppProfileTemplateEdge { + cursor?: string | null; + /** The `AppProfileTemplate` at the end of the edge. */ + node?: AppProfileTemplate | null; +} +export type AppProfileTemplateEdgeSelect = { + cursor?: boolean; + node?: { + select: AppProfileTemplateSelect; }; }; /** A `MembershipType` edge in the connection. */ @@ -5670,6 +8726,42 @@ export type OrgAdminGrantEdgeSelect = { select: OrgAdminGrantSelect; }; }; +/** A `OrgCapabilityDefaultCapability` edge in the connection. */ +export interface OrgCapabilityDefaultCapabilityEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultCapability` at the end of the edge. */ + node?: OrgCapabilityDefaultCapability | null; +} +export type OrgCapabilityDefaultCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultCapabilitySelect; + }; +}; +/** A `OrgCapabilityDefault` edge in the connection. */ +export interface OrgCapabilityDefaultEdge { + cursor?: string | null; + /** The `OrgCapabilityDefault` at the end of the edge. */ + node?: OrgCapabilityDefault | null; +} +export type OrgCapabilityDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultSelect; + }; +}; +/** A `OrgCapabilityDefaultGrant` edge in the connection. */ +export interface OrgCapabilityDefaultGrantEdge { + cursor?: string | null; + /** The `OrgCapabilityDefaultGrant` at the end of the edge. */ + node?: OrgCapabilityDefaultGrant | null; +} +export type OrgCapabilityDefaultGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgCapabilityDefaultGrantSelect; + }; +}; /** A `OrgChartEdge` edge in the connection. */ export interface OrgChartEdgeEdge { cursor?: string | null; @@ -5778,6 +8870,18 @@ export type OrgMembershipDefaultEdgeSelect = { select: OrgMembershipDefaultSelect; }; }; +/** A `OrgMembershipProfile` edge in the connection. */ +export interface OrgMembershipProfileEdge { + cursor?: string | null; + /** The `OrgMembershipProfile` at the end of the edge. */ + node?: OrgMembershipProfile | null; +} +export type OrgMembershipProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMembershipProfileSelect; + }; +}; /** A `OrgMembershipSetting` edge in the connection. */ export interface OrgMembershipSettingEdge { cursor?: string | null; @@ -5802,39 +8906,63 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; -/** A `OrgPermissionDefault` edge in the connection. */ -export interface OrgPermissionDefaultEdge { +/** A `OrgProfileCapability` edge in the connection. */ +export interface OrgProfileCapabilityEdge { + cursor?: string | null; + /** The `OrgProfileCapability` at the end of the edge. */ + node?: OrgProfileCapability | null; +} +export type OrgProfileCapabilityEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgProfileCapabilitySelect; + }; +}; +/** A `OrgProfile` edge in the connection. */ +export interface OrgProfileEdge { + cursor?: string | null; + /** The `OrgProfile` at the end of the edge. */ + node?: OrgProfile | null; +} +export type OrgProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgProfileSelect; + }; +}; +/** A `OrgProfileDefinitionGrant` edge in the connection. */ +export interface OrgProfileDefinitionGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefault` at the end of the edge. */ - node?: OrgPermissionDefault | null; + /** The `OrgProfileDefinitionGrant` at the end of the edge. */ + node?: OrgProfileDefinitionGrant | null; } -export type OrgPermissionDefaultEdgeSelect = { +export type OrgProfileDefinitionGrantEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultSelect; + select: OrgProfileDefinitionGrantSelect; }; }; -/** A `OrgPermissionDefaultGrant` edge in the connection. */ -export interface OrgPermissionDefaultGrantEdge { +/** A `OrgProfileGrant` edge in the connection. */ +export interface OrgProfileGrantEdge { cursor?: string | null; - /** The `OrgPermissionDefaultGrant` at the end of the edge. */ - node?: OrgPermissionDefaultGrant | null; + /** The `OrgProfileGrant` at the end of the edge. */ + node?: OrgProfileGrant | null; } -export type OrgPermissionDefaultGrantEdgeSelect = { +export type OrgProfileGrantEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultGrantSelect; + select: OrgProfileGrantSelect; }; }; -/** A `OrgPermissionDefaultPermission` edge in the connection. */ -export interface OrgPermissionDefaultPermissionEdge { +/** A `OrgProfileTemplate` edge in the connection. */ +export interface OrgProfileTemplateEdge { cursor?: string | null; - /** The `OrgPermissionDefaultPermission` at the end of the edge. */ - node?: OrgPermissionDefaultPermission | null; + /** The `OrgProfileTemplate` at the end of the edge. */ + node?: OrgProfileTemplate | null; } -export type OrgPermissionDefaultPermissionEdgeSelect = { +export type OrgProfileTemplateEdgeSelect = { cursor?: boolean; node?: { - select: OrgPermissionDefaultPermissionSelect; + select: OrgProfileTemplateSelect; }; }; diff --git a/sdk/constructive-sdk/src/admin/orm/models/appCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/appCapability.ts new file mode 100644 index 0000000000..fc1636fe62 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appCapability.ts @@ -0,0 +1,245 @@ +/** + * AppCapability 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 { + AppCapability, + AppCapabilityWithRelations, + AppCapabilitySelect, + AppCapabilityFilter, + AppCapabilityOrderBy, + CreateAppCapabilityInput, + UpdateAppCapabilityInput, + AppCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapability', + 'appCapabilities', + 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, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapability', + 'appCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapability', + document, + variables, + transform: (data: { + appCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapability: data.appCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapability', + 'appCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityFilter', + 'AppCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapability', + fieldName: 'appCapability', + document, + variables, + transform: (data: { + appCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapability: data.appCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapability', + 'createAppCapability', + 'appCapability', + args.select, + args.data, + 'CreateAppCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'createAppCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapability', + 'updateAppCapability', + 'appCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityInput', + 'id', + 'appCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'updateAppCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapability: { + appCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapability', + 'deleteAppCapability', + 'appCapability', + { + id: args.where.id, + }, + 'DeleteAppCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapability', + fieldName: 'deleteAppCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefault.ts new file mode 100644 index 0000000000..815d62d3fc --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefault.ts @@ -0,0 +1,247 @@ +/** + * AppCapabilityDefault 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 { + AppCapabilityDefault, + AppCapabilityDefaultWithRelations, + AppCapabilityDefaultSelect, + AppCapabilityDefaultFilter, + AppCapabilityDefaultOrderBy, + CreateAppCapabilityDefaultInput, + UpdateAppCapabilityDefaultInput, + AppCapabilityDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + 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, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefault', + document, + variables, + transform: (data: { + appCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefault: data.appCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefault', + 'appCapabilityDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultFilter', + 'AppCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefault', + fieldName: 'appCapabilityDefault', + document, + variables, + transform: (data: { + appCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefault: data.appCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefault', + 'createAppCapabilityDefault', + 'appCapabilityDefault', + args.select, + args.data, + 'CreateAppCapabilityDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'createAppCapabilityDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefault', + 'updateAppCapabilityDefault', + 'appCapabilityDefault', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultInput', + 'id', + 'appCapabilityDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'updateAppCapabilityDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefault: { + appCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefault', + 'deleteAppCapabilityDefault', + 'appCapabilityDefault', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefault', + fieldName: 'deleteAppCapabilityDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultCapability.ts new file mode 100644 index 0000000000..2f90833f58 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultCapability.ts @@ -0,0 +1,273 @@ +/** + * AppCapabilityDefaultCapability 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 { + AppCapabilityDefaultCapability, + AppCapabilityDefaultCapabilityWithRelations, + AppCapabilityDefaultCapabilitySelect, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy, + CreateAppCapabilityDefaultCapabilityInput, + UpdateAppCapabilityDefaultCapabilityInput, + AppCapabilityDefaultCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + 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, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + AppCapabilityDefaultCapabilityFilter, + AppCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapability', + document, + variables, + transform: (data: { + appCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultCapability: data.appCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultCapability', + 'appCapabilityDefaultCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultCapabilityFilter', + 'AppCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'appCapabilityDefaultCapability', + document, + variables, + transform: (data: { + appCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultCapability: data.appCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs< + S, + CreateAppCapabilityDefaultCapabilityInput['appCapabilityDefaultCapability'] + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefaultCapability', + 'createAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + args.select, + args.data, + 'CreateAppCapabilityDefaultCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'createAppCapabilityDefaultCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefaultCapability', + 'updateAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultCapabilityInput', + 'id', + 'appCapabilityDefaultCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'updateAppCapabilityDefaultCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefaultCapability: { + appCapabilityDefaultCapability: InferSelectResult< + AppCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefaultCapability', + 'deleteAppCapabilityDefaultCapability', + 'appCapabilityDefaultCapability', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultCapability', + fieldName: 'deleteAppCapabilityDefaultCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultGrant.ts new file mode 100644 index 0000000000..174d579999 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appCapabilityDefaultGrant.ts @@ -0,0 +1,247 @@ +/** + * AppCapabilityDefaultGrant 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 { + AppCapabilityDefaultGrant, + AppCapabilityDefaultGrantWithRelations, + AppCapabilityDefaultGrantSelect, + AppCapabilityDefaultGrantFilter, + AppCapabilityDefaultGrantOrderBy, + CreateAppCapabilityDefaultGrantInput, + UpdateAppCapabilityDefaultGrantInput, + AppCapabilityDefaultGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppCapabilityDefaultGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + 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, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrant', + document, + variables, + transform: (data: { + appCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultGrant: data.appCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppCapabilityDefaultGrant', + 'appCapabilityDefaultGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppCapabilityDefaultGrantFilter', + 'AppCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'appCapabilityDefaultGrant', + document, + variables, + transform: (data: { + appCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appCapabilityDefaultGrant: data.appCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppCapabilityDefaultGrant', + 'createAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + args.select, + args.data, + 'CreateAppCapabilityDefaultGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'createAppCapabilityDefaultGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppCapabilityDefaultGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppCapabilityDefaultGrant', + 'updateAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppCapabilityDefaultGrantInput', + 'id', + 'appCapabilityDefaultGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'updateAppCapabilityDefaultGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppCapabilityDefaultGrant: { + appCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppCapabilityDefaultGrant', + 'deleteAppCapabilityDefaultGrant', + 'appCapabilityDefaultGrant', + { + id: args.where.id, + }, + 'DeleteAppCapabilityDefaultGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppCapabilityDefaultGrant', + fieldName: 'deleteAppCapabilityDefaultGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appMembershipProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/appMembershipProfile.ts new file mode 100644 index 0000000000..b3c39ef078 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appMembershipProfile.ts @@ -0,0 +1,247 @@ +/** + * AppMembershipProfile 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 { + AppMembershipProfile, + AppMembershipProfileWithRelations, + AppMembershipProfileSelect, + AppMembershipProfileFilter, + AppMembershipProfileOrderBy, + CreateAppMembershipProfileInput, + UpdateAppMembershipProfileInput, + AppMembershipProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppMembershipProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + 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, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfile', + document, + variables, + transform: (data: { + appMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipProfile: data.appMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppMembershipProfile', + 'appMembershipProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppMembershipProfileFilter', + 'AppMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppMembershipProfile', + fieldName: 'appMembershipProfile', + document, + variables, + transform: (data: { + appMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipProfile: data.appMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppMembershipProfile', + 'createAppMembershipProfile', + 'appMembershipProfile', + args.select, + args.data, + 'CreateAppMembershipProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'createAppMembershipProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppMembershipProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppMembershipProfile', + 'updateAppMembershipProfile', + 'appMembershipProfile', + args.select, + args.where.id, + args.data, + 'UpdateAppMembershipProfileInput', + 'id', + 'appMembershipProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'updateAppMembershipProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppMembershipProfile: { + appMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppMembershipProfile', + 'deleteAppMembershipProfile', + 'appMembershipProfile', + { + id: args.where.id, + }, + 'DeleteAppMembershipProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppMembershipProfile', + fieldName: 'deleteAppMembershipProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts deleted file mode 100644 index c967364f31..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * AppPermissionDefault 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 { - AppPermissionDefault, - AppPermissionDefaultWithRelations, - AppPermissionDefaultSelect, - AppPermissionDefaultFilter, - AppPermissionDefaultOrderBy, - CreateAppPermissionDefaultInput, - UpdateAppPermissionDefaultInput, - AppPermissionDefaultPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - 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, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefault', - document, - variables, - transform: (data: { - appPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefault', - 'appPermissionDefaults', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultFilter', - 'AppPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefault', - document, - variables, - transform: (data: { - appPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefault', - 'createAppPermissionDefault', - 'appPermissionDefault', - args.select, - args.data, - 'CreateAppPermissionDefaultInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'createAppPermissionDefault', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefault', - 'updateAppPermissionDefault', - 'appPermissionDefault', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultInput', - 'id', - 'appPermissionDefaultPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'updateAppPermissionDefault', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefault: { - appPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefault', - 'deleteAppPermissionDefault', - 'appPermissionDefault', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefault', - fieldName: 'deleteAppPermissionDefault', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultGrant.ts deleted file mode 100644 index b6a3b10748..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultGrant.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * AppPermissionDefaultGrant 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 { - AppPermissionDefaultGrant, - AppPermissionDefaultGrantWithRelations, - AppPermissionDefaultGrantSelect, - AppPermissionDefaultGrantFilter, - AppPermissionDefaultGrantOrderBy, - CreateAppPermissionDefaultGrantInput, - UpdateAppPermissionDefaultGrantInput, - AppPermissionDefaultGrantPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultGrantModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - 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, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrants', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrant', - document, - variables, - transform: (data: { - appPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultGrant: data.appPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultGrant', - 'appPermissionDefaultGrants', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultGrantFilter', - 'AppPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'appPermissionDefaultGrant', - document, - variables, - transform: (data: { - appPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultGrant: data.appPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefaultGrant', - 'createAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - args.select, - args.data, - 'CreateAppPermissionDefaultGrantInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'createAppPermissionDefaultGrant', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultGrantPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefaultGrant', - 'updateAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultGrantInput', - 'id', - 'appPermissionDefaultGrantPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'updateAppPermissionDefaultGrant', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefaultGrant: { - appPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefaultGrant', - 'deleteAppPermissionDefaultGrant', - 'appPermissionDefaultGrant', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultGrantInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultGrant', - fieldName: 'deleteAppPermissionDefaultGrant', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultPermission.ts b/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultPermission.ts deleted file mode 100644 index 6e47d9eeec..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefaultPermission.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * AppPermissionDefaultPermission 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 { - AppPermissionDefaultPermission, - AppPermissionDefaultPermissionWithRelations, - AppPermissionDefaultPermissionSelect, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy, - CreateAppPermissionDefaultPermissionInput, - UpdateAppPermissionDefaultPermissionInput, - AppPermissionDefaultPermissionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AppPermissionDefaultPermissionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - 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, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermissions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs< - S, - AppPermissionDefaultPermissionFilter, - AppPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermission', - document, - variables, - transform: (data: { - appPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultPermission: data.appPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AppPermissionDefaultPermission', - 'appPermissionDefaultPermissions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AppPermissionDefaultPermissionFilter', - 'AppPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'appPermissionDefaultPermission', - document, - variables, - transform: (data: { - appPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - appPermissionDefaultPermission: data.appPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs< - S, - CreateAppPermissionDefaultPermissionInput['appPermissionDefaultPermission'] - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AppPermissionDefaultPermission', - 'createAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - args.select, - args.data, - 'CreateAppPermissionDefaultPermissionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'createAppPermissionDefaultPermission', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - AppPermissionDefaultPermissionPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'AppPermissionDefaultPermission', - 'updateAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - args.select, - args.where.id, - args.data, - 'UpdateAppPermissionDefaultPermissionInput', - 'id', - 'appPermissionDefaultPermissionPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'updateAppPermissionDefaultPermission', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteAppPermissionDefaultPermission: { - appPermissionDefaultPermission: InferSelectResult< - AppPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'AppPermissionDefaultPermission', - 'deleteAppPermissionDefaultPermission', - 'appPermissionDefaultPermission', - { - id: args.where.id, - }, - 'DeleteAppPermissionDefaultPermissionInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AppPermissionDefaultPermission', - fieldName: 'deleteAppPermissionDefaultPermission', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/appProfile.ts new file mode 100644 index 0000000000..b8a4c48d92 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appProfile.ts @@ -0,0 +1,245 @@ +/** + * AppProfile 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 { + AppProfile, + AppProfileWithRelations, + AppProfileSelect, + AppProfileFilter, + AppProfileOrderBy, + CreateAppProfileInput, + UpdateAppProfileInput, + AppProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfile', + 'appProfiles', + 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, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfile', + 'appProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfile', + document, + variables, + transform: (data: { + appProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfile: data.appProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfile', + 'appProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileFilter', + 'AppProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfile', + fieldName: 'appProfile', + document, + variables, + transform: (data: { + appProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfile: data.appProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfile', + 'createAppProfile', + 'appProfile', + args.select, + args.data, + 'CreateAppProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'createAppProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfile', + 'updateAppProfile', + 'appProfile', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileInput', + 'id', + 'appProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'updateAppProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfile: { + appProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfile', + 'deleteAppProfile', + 'appProfile', + { + id: args.where.id, + }, + 'DeleteAppProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfile', + fieldName: 'deleteAppProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appProfileCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/appProfileCapability.ts new file mode 100644 index 0000000000..86c05be461 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appProfileCapability.ts @@ -0,0 +1,247 @@ +/** + * AppProfileCapability 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 { + AppProfileCapability, + AppProfileCapabilityWithRelations, + AppProfileCapabilitySelect, + AppProfileCapabilityFilter, + AppProfileCapabilityOrderBy, + CreateAppProfileCapabilityInput, + UpdateAppProfileCapabilityInput, + AppProfileCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + 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, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapability', + document, + variables, + transform: (data: { + appProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileCapability: data.appProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileCapability', + 'appProfileCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileCapabilityFilter', + 'AppProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileCapability', + fieldName: 'appProfileCapability', + document, + variables, + transform: (data: { + appProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileCapability: data.appProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileCapability', + 'createAppProfileCapability', + 'appProfileCapability', + args.select, + args.data, + 'CreateAppProfileCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'createAppProfileCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileCapability', + 'updateAppProfileCapability', + 'appProfileCapability', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileCapabilityInput', + 'id', + 'appProfileCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'updateAppProfileCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileCapability: { + appProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileCapability', + 'deleteAppProfileCapability', + 'appProfileCapability', + { + id: args.where.id, + }, + 'DeleteAppProfileCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileCapability', + fieldName: 'deleteAppProfileCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appProfileDefinitionGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appProfileDefinitionGrant.ts new file mode 100644 index 0000000000..8ff9167a12 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appProfileDefinitionGrant.ts @@ -0,0 +1,247 @@ +/** + * AppProfileDefinitionGrant 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 { + AppProfileDefinitionGrant, + AppProfileDefinitionGrantWithRelations, + AppProfileDefinitionGrantSelect, + AppProfileDefinitionGrantFilter, + AppProfileDefinitionGrantOrderBy, + CreateAppProfileDefinitionGrantInput, + UpdateAppProfileDefinitionGrantInput, + AppProfileDefinitionGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileDefinitionGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + 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, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrant', + document, + variables, + transform: (data: { + appProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileDefinitionGrant: data.appProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileDefinitionGrant', + 'appProfileDefinitionGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileDefinitionGrantFilter', + 'AppProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'appProfileDefinitionGrant', + document, + variables, + transform: (data: { + appProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileDefinitionGrant: data.appProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileDefinitionGrant', + 'createAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + args.select, + args.data, + 'CreateAppProfileDefinitionGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'createAppProfileDefinitionGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileDefinitionGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileDefinitionGrant', + 'updateAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileDefinitionGrantInput', + 'id', + 'appProfileDefinitionGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'updateAppProfileDefinitionGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileDefinitionGrant: { + appProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileDefinitionGrant', + 'deleteAppProfileDefinitionGrant', + 'appProfileDefinitionGrant', + { + id: args.where.id, + }, + 'DeleteAppProfileDefinitionGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileDefinitionGrant', + fieldName: 'deleteAppProfileDefinitionGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appProfileGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appProfileGrant.ts new file mode 100644 index 0000000000..b22276182b --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appProfileGrant.ts @@ -0,0 +1,245 @@ +/** + * AppProfileGrant 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 { + AppProfileGrant, + AppProfileGrantWithRelations, + AppProfileGrantSelect, + AppProfileGrantFilter, + AppProfileGrantOrderBy, + CreateAppProfileGrantInput, + UpdateAppProfileGrantInput, + AppProfileGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrants: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileGrant', + 'appProfileGrants', + 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, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileGrant', + 'appProfileGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrant', + document, + variables, + transform: (data: { + appProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileGrant: data.appProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileGrant', + 'appProfileGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileGrantFilter', + 'AppProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileGrant', + fieldName: 'appProfileGrant', + document, + variables, + transform: (data: { + appProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileGrant: data.appProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileGrant', + 'createAppProfileGrant', + 'appProfileGrant', + args.select, + args.data, + 'CreateAppProfileGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'createAppProfileGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileGrant', + 'updateAppProfileGrant', + 'appProfileGrant', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileGrantInput', + 'id', + 'appProfileGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'updateAppProfileGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileGrant: { + appProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileGrant', + 'deleteAppProfileGrant', + 'appProfileGrant', + { + id: args.where.id, + }, + 'DeleteAppProfileGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileGrant', + fieldName: 'deleteAppProfileGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/appProfileTemplate.ts b/sdk/constructive-sdk/src/admin/orm/models/appProfileTemplate.ts new file mode 100644 index 0000000000..273bb28e3f --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/appProfileTemplate.ts @@ -0,0 +1,245 @@ +/** + * AppProfileTemplate 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 { + AppProfileTemplate, + AppProfileTemplateWithRelations, + AppProfileTemplateSelect, + AppProfileTemplateFilter, + AppProfileTemplateOrderBy, + CreateAppProfileTemplateInput, + UpdateAppProfileTemplateInput, + AppProfileTemplatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppProfileTemplateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + 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, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplate', + document, + variables, + transform: (data: { + appProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileTemplate: data.appProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppProfileTemplate', + 'appProfileTemplates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppProfileTemplateFilter', + 'AppProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppProfileTemplate', + fieldName: 'appProfileTemplate', + document, + variables, + transform: (data: { + appProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appProfileTemplate: data.appProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppProfileTemplate', + 'createAppProfileTemplate', + 'appProfileTemplate', + args.select, + args.data, + 'CreateAppProfileTemplateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'createAppProfileTemplate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppProfileTemplatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppProfileTemplate', + 'updateAppProfileTemplate', + 'appProfileTemplate', + args.select, + args.where.id, + args.data, + 'UpdateAppProfileTemplateInput', + 'id', + 'appProfileTemplatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'updateAppProfileTemplate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppProfileTemplate: { + appProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppProfileTemplate', + 'deleteAppProfileTemplate', + 'appProfileTemplate', + { + id: args.where.id, + }, + 'DeleteAppProfileTemplateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppProfileTemplate', + fieldName: 'deleteAppProfileTemplate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/index.ts b/sdk/constructive-sdk/src/admin/orm/models/index.ts index b952c1e1d9..016cb0e8b4 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/index.ts @@ -4,18 +4,28 @@ * DO NOT EDIT - changes will be overwritten */ export { AppAdminGrantModel } from './appAdminGrant'; +export { AppCapabilityModel } from './appCapability'; +export { AppCapabilityDefaultCapabilityModel } from './appCapabilityDefaultCapability'; +export { AppCapabilityDefaultModel } from './appCapabilityDefault'; +export { AppCapabilityDefaultGrantModel } from './appCapabilityDefaultGrant'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { AppGrantModel } from './appGrant'; export { AppInviteModel } from './appInvite'; export { AppMembershipModel } from './appMembership'; export { AppMembershipDefaultModel } from './appMembershipDefault'; +export { AppMembershipProfileModel } from './appMembershipProfile'; export { AppOwnerGrantModel } from './appOwnerGrant'; -export { AppPermissionModel } from './appPermission'; -export { AppPermissionDefaultModel } from './appPermissionDefault'; -export { AppPermissionDefaultGrantModel } from './appPermissionDefaultGrant'; -export { AppPermissionDefaultPermissionModel } from './appPermissionDefaultPermission'; +export { AppProfileCapabilityModel } from './appProfileCapability'; +export { AppProfileModel } from './appProfile'; +export { AppProfileDefinitionGrantModel } from './appProfileDefinitionGrant'; +export { AppProfileGrantModel } from './appProfileGrant'; +export { AppProfileTemplateModel } from './appProfileTemplate'; export { MembershipTypeModel } from './membershipType'; export { OrgAdminGrantModel } from './orgAdminGrant'; +export { OrgCapabilityModel } from './orgCapability'; +export { OrgCapabilityDefaultCapabilityModel } from './orgCapabilityDefaultCapability'; +export { OrgCapabilityDefaultModel } from './orgCapabilityDefault'; +export { OrgCapabilityDefaultGrantModel } from './orgCapabilityDefaultGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; export { OrgClaimedInviteModel } from './orgClaimedInvite'; @@ -27,9 +37,11 @@ export { OrgMemberModel } from './orgMember'; export { OrgMemberProfileModel } from './orgMemberProfile'; export { OrgMembershipModel } from './orgMembership'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; +export { OrgMembershipProfileModel } from './orgMembershipProfile'; export { OrgMembershipSettingModel } from './orgMembershipSetting'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; -export { OrgPermissionModel } from './orgPermission'; -export { OrgPermissionDefaultModel } from './orgPermissionDefault'; -export { OrgPermissionDefaultGrantModel } from './orgPermissionDefaultGrant'; -export { OrgPermissionDefaultPermissionModel } from './orgPermissionDefaultPermission'; +export { OrgProfileCapabilityModel } from './orgProfileCapability'; +export { OrgProfileModel } from './orgProfile'; +export { OrgProfileDefinitionGrantModel } from './orgProfileDefinitionGrant'; +export { OrgProfileGrantModel } from './orgProfileGrant'; +export { OrgProfileTemplateModel } from './orgProfileTemplate'; diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/orgCapability.ts new file mode 100644 index 0000000000..e97c3538d1 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgCapability.ts @@ -0,0 +1,245 @@ +/** + * OrgCapability 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 { + OrgCapability, + OrgCapabilityWithRelations, + OrgCapabilitySelect, + OrgCapabilityFilter, + OrgCapabilityOrderBy, + CreateOrgCapabilityInput, + UpdateOrgCapabilityInput, + OrgCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapability', + 'orgCapabilities', + 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, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapability', + 'orgCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapability', + document, + variables, + transform: (data: { + orgCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapability: data.orgCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapability', + 'orgCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityFilter', + 'OrgCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapability', + fieldName: 'orgCapability', + document, + variables, + transform: (data: { + orgCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapability: data.orgCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapability', + 'createOrgCapability', + 'orgCapability', + args.select, + args.data, + 'CreateOrgCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'createOrgCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapability', + 'updateOrgCapability', + 'orgCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityInput', + 'id', + 'orgCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'updateOrgCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapability: { + orgCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapability', + 'deleteOrgCapability', + 'orgCapability', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapability', + fieldName: 'deleteOrgCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefault.ts new file mode 100644 index 0000000000..90328fd612 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefault.ts @@ -0,0 +1,247 @@ +/** + * OrgCapabilityDefault 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 { + OrgCapabilityDefault, + OrgCapabilityDefaultWithRelations, + OrgCapabilityDefaultSelect, + OrgCapabilityDefaultFilter, + OrgCapabilityDefaultOrderBy, + CreateOrgCapabilityDefaultInput, + UpdateOrgCapabilityDefaultInput, + OrgCapabilityDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaults: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + 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, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefault', + document, + variables, + transform: (data: { + orgCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefault: data.orgCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefault', + 'orgCapabilityDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultFilter', + 'OrgCapabilityDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefault', + fieldName: 'orgCapabilityDefault', + document, + variables, + transform: (data: { + orgCapabilityDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefault: data.orgCapabilityDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefault', + 'createOrgCapabilityDefault', + 'orgCapabilityDefault', + args.select, + args.data, + 'CreateOrgCapabilityDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'createOrgCapabilityDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefault', + 'updateOrgCapabilityDefault', + 'orgCapabilityDefault', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultInput', + 'id', + 'orgCapabilityDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'updateOrgCapabilityDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefault: { + orgCapabilityDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefault', + 'deleteOrgCapabilityDefault', + 'orgCapabilityDefault', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefault', + fieldName: 'deleteOrgCapabilityDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultCapability.ts new file mode 100644 index 0000000000..5f902d96ac --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultCapability.ts @@ -0,0 +1,273 @@ +/** + * OrgCapabilityDefaultCapability 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 { + OrgCapabilityDefaultCapability, + OrgCapabilityDefaultCapabilityWithRelations, + OrgCapabilityDefaultCapabilitySelect, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy, + CreateOrgCapabilityDefaultCapabilityInput, + UpdateOrgCapabilityDefaultCapabilityInput, + OrgCapabilityDefaultCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + 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, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + OrgCapabilityDefaultCapabilityFilter, + OrgCapabilityDefaultCapabilityOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapability', + document, + variables, + transform: (data: { + orgCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultCapability: data.orgCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultCapabilityFilter', + 'OrgCapabilityDefaultCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'orgCapabilityDefaultCapability', + document, + variables, + transform: (data: { + orgCapabilityDefaultCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultCapability: data.orgCapabilityDefaultCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs< + S, + CreateOrgCapabilityDefaultCapabilityInput['orgCapabilityDefaultCapability'] + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefaultCapability', + 'createOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + args.select, + args.data, + 'CreateOrgCapabilityDefaultCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'createOrgCapabilityDefaultCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefaultCapability', + 'updateOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultCapabilityInput', + 'id', + 'orgCapabilityDefaultCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'updateOrgCapabilityDefaultCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefaultCapability: { + orgCapabilityDefaultCapability: InferSelectResult< + OrgCapabilityDefaultCapabilityWithRelations, + S + >; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefaultCapability', + 'deleteOrgCapabilityDefaultCapability', + 'orgCapabilityDefaultCapability', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultCapability', + fieldName: 'deleteOrgCapabilityDefaultCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultGrant.ts new file mode 100644 index 0000000000..9cce27ce2b --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgCapabilityDefaultGrant.ts @@ -0,0 +1,247 @@ +/** + * OrgCapabilityDefaultGrant 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 { + OrgCapabilityDefaultGrant, + OrgCapabilityDefaultGrantWithRelations, + OrgCapabilityDefaultGrantSelect, + OrgCapabilityDefaultGrantFilter, + OrgCapabilityDefaultGrantOrderBy, + CreateOrgCapabilityDefaultGrantInput, + UpdateOrgCapabilityDefaultGrantInput, + OrgCapabilityDefaultGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgCapabilityDefaultGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + 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, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrant', + document, + variables, + transform: (data: { + orgCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultGrant: data.orgCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgCapabilityDefaultGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgCapabilityDefaultGrantFilter', + 'OrgCapabilityDefaultGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'orgCapabilityDefaultGrant', + document, + variables, + transform: (data: { + orgCapabilityDefaultGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgCapabilityDefaultGrant: data.orgCapabilityDefaultGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgCapabilityDefaultGrant', + 'createOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + args.select, + args.data, + 'CreateOrgCapabilityDefaultGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'createOrgCapabilityDefaultGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgCapabilityDefaultGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgCapabilityDefaultGrant', + 'updateOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgCapabilityDefaultGrantInput', + 'id', + 'orgCapabilityDefaultGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'updateOrgCapabilityDefaultGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgCapabilityDefaultGrant: { + orgCapabilityDefaultGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgCapabilityDefaultGrant', + 'deleteOrgCapabilityDefaultGrant', + 'orgCapabilityDefaultGrant', + { + id: args.where.id, + }, + 'DeleteOrgCapabilityDefaultGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgCapabilityDefaultGrant', + fieldName: 'deleteOrgCapabilityDefaultGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMembershipProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipProfile.ts new file mode 100644 index 0000000000..74a6532a57 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipProfile.ts @@ -0,0 +1,247 @@ +/** + * OrgMembershipProfile 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 { + OrgMembershipProfile, + OrgMembershipProfileWithRelations, + OrgMembershipProfileSelect, + OrgMembershipProfileFilter, + OrgMembershipProfileOrderBy, + CreateOrgMembershipProfileInput, + UpdateOrgMembershipProfileInput, + OrgMembershipProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgMembershipProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfiles: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + 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, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfile', + document, + variables, + transform: (data: { + orgMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipProfile: data.orgMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMembershipProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMembershipProfile', + 'orgMembershipProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgMembershipProfileFilter', + 'OrgMembershipProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMembershipProfile', + fieldName: 'orgMembershipProfile', + document, + variables, + transform: (data: { + orgMembershipProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipProfile: data.orgMembershipProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgMembershipProfile', + 'createOrgMembershipProfile', + 'orgMembershipProfile', + args.select, + args.data, + 'CreateOrgMembershipProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'createOrgMembershipProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgMembershipProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgMembershipProfile', + 'updateOrgMembershipProfile', + 'orgMembershipProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgMembershipProfileInput', + 'id', + 'orgMembershipProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'updateOrgMembershipProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgMembershipProfile: { + orgMembershipProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgMembershipProfile', + 'deleteOrgMembershipProfile', + 'orgMembershipProfile', + { + id: args.where.id, + }, + 'DeleteOrgMembershipProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMembershipProfile', + fieldName: 'deleteOrgMembershipProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts deleted file mode 100644 index 20ed957d15..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * OrgPermissionDefault 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 { - OrgPermissionDefault, - OrgPermissionDefaultWithRelations, - OrgPermissionDefaultSelect, - OrgPermissionDefaultFilter, - OrgPermissionDefaultOrderBy, - CreateOrgPermissionDefaultInput, - UpdateOrgPermissionDefaultInput, - OrgPermissionDefaultPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaults: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - 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, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefault', - document, - variables, - transform: (data: { - orgPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefault: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefault', - 'orgPermissionDefaults', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultFilter', - 'OrgPermissionDefaultOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefault', - document, - variables, - transform: (data: { - orgPermissionDefaults?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefault', - 'createOrgPermissionDefault', - 'orgPermissionDefault', - args.select, - args.data, - 'CreateOrgPermissionDefaultInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'createOrgPermissionDefault', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefault', - 'updateOrgPermissionDefault', - 'orgPermissionDefault', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultInput', - 'id', - 'orgPermissionDefaultPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'updateOrgPermissionDefault', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefault: { - orgPermissionDefault: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefault', - 'deleteOrgPermissionDefault', - 'orgPermissionDefault', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefault', - fieldName: 'deleteOrgPermissionDefault', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultGrant.ts deleted file mode 100644 index 07d5976acb..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultGrant.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * OrgPermissionDefaultGrant 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 { - OrgPermissionDefaultGrant, - OrgPermissionDefaultGrantWithRelations, - OrgPermissionDefaultGrantSelect, - OrgPermissionDefaultGrantFilter, - OrgPermissionDefaultGrantOrderBy, - CreateOrgPermissionDefaultGrantInput, - UpdateOrgPermissionDefaultGrantInput, - OrgPermissionDefaultGrantPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultGrantModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrants: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - 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, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrants', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrant', - document, - variables, - transform: (data: { - orgPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultGrant: data.orgPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultGrant: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultGrant', - 'orgPermissionDefaultGrants', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultGrantFilter', - 'OrgPermissionDefaultGrantOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'orgPermissionDefaultGrant', - document, - variables, - transform: (data: { - orgPermissionDefaultGrants?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultGrant: data.orgPermissionDefaultGrants?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefaultGrant', - 'createOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - args.select, - args.data, - 'CreateOrgPermissionDefaultGrantInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'createOrgPermissionDefaultGrant', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultGrantPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefaultGrant', - 'updateOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultGrantInput', - 'id', - 'orgPermissionDefaultGrantPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'updateOrgPermissionDefaultGrant', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefaultGrant: { - orgPermissionDefaultGrant: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefaultGrant', - 'deleteOrgPermissionDefaultGrant', - 'orgPermissionDefaultGrant', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultGrantInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultGrant', - fieldName: 'deleteOrgPermissionDefaultGrant', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultPermission.ts b/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultPermission.ts deleted file mode 100644 index 3339ceaeca..0000000000 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefaultPermission.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * OrgPermissionDefaultPermission 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 { - OrgPermissionDefaultPermission, - OrgPermissionDefaultPermissionWithRelations, - OrgPermissionDefaultPermissionSelect, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy, - CreateOrgPermissionDefaultPermissionInput, - UpdateOrgPermissionDefaultPermissionInput, - OrgPermissionDefaultPermissionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionDefaultPermissionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermissions: ConnectionResult< - InferSelectResult - >; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - 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, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermissions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs< - S, - OrgPermissionDefaultPermissionFilter, - OrgPermissionDefaultPermissionOrderBy - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermission', - document, - variables, - transform: (data: { - orgPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - > | null; - }> { - const { document, variables } = buildFindManyDocument( - 'OrgPermissionDefaultPermission', - 'orgPermissionDefaultPermissions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'OrgPermissionDefaultPermissionFilter', - 'OrgPermissionDefaultPermissionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'orgPermissionDefaultPermission', - document, - variables, - transform: (data: { - orgPermissionDefaultPermissions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - orgPermissionDefaultPermission: data.orgPermissionDefaultPermissions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs< - S, - CreateOrgPermissionDefaultPermissionInput['orgPermissionDefaultPermission'] - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildCreateDocument( - 'OrgPermissionDefaultPermission', - 'createOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - args.select, - args.data, - 'CreateOrgPermissionDefaultPermissionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'createOrgPermissionDefaultPermission', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - OrgPermissionDefaultPermissionPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'OrgPermissionDefaultPermission', - 'updateOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - args.select, - args.where.id, - args.data, - 'UpdateOrgPermissionDefaultPermissionInput', - 'id', - 'orgPermissionDefaultPermissionPatch', - connectionFieldsMap, - undefined - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'updateOrgPermissionDefaultPermission', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteOrgPermissionDefaultPermission: { - orgPermissionDefaultPermission: InferSelectResult< - OrgPermissionDefaultPermissionWithRelations, - S - >; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'OrgPermissionDefaultPermission', - 'deleteOrgPermissionDefaultPermission', - 'orgPermissionDefaultPermission', - { - id: args.where.id, - }, - 'DeleteOrgPermissionDefaultPermissionInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'OrgPermissionDefaultPermission', - fieldName: 'deleteOrgPermissionDefaultPermission', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/orgProfile.ts new file mode 100644 index 0000000000..415b856a47 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgProfile.ts @@ -0,0 +1,245 @@ +/** + * OrgProfile 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 { + OrgProfile, + OrgProfileWithRelations, + OrgProfileSelect, + OrgProfileFilter, + OrgProfileOrderBy, + CreateOrgProfileInput, + UpdateOrgProfileInput, + OrgProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfile', + 'orgProfiles', + 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, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfile', + 'orgProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfile', + document, + variables, + transform: (data: { + orgProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfile: data.orgProfiles?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfile', + 'orgProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileFilter', + 'OrgProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfile', + fieldName: 'orgProfile', + document, + variables, + transform: (data: { + orgProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfile: data.orgProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfile', + 'createOrgProfile', + 'orgProfile', + args.select, + args.data, + 'CreateOrgProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'createOrgProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfile', + 'updateOrgProfile', + 'orgProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileInput', + 'id', + 'orgProfilePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'updateOrgProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfile: { + orgProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfile', + 'deleteOrgProfile', + 'orgProfile', + { + id: args.where.id, + }, + 'DeleteOrgProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfile', + fieldName: 'deleteOrgProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgProfileCapability.ts b/sdk/constructive-sdk/src/admin/orm/models/orgProfileCapability.ts new file mode 100644 index 0000000000..4b020b426c --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgProfileCapability.ts @@ -0,0 +1,247 @@ +/** + * OrgProfileCapability 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 { + OrgProfileCapability, + OrgProfileCapabilityWithRelations, + OrgProfileCapabilitySelect, + OrgProfileCapabilityFilter, + OrgProfileCapabilityOrderBy, + CreateOrgProfileCapabilityInput, + UpdateOrgProfileCapabilityInput, + OrgProfileCapabilityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileCapabilityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapabilities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + 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, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapabilities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapability', + document, + variables, + transform: (data: { + orgProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileCapability: data.orgProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileCapability: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileCapability', + 'orgProfileCapabilities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileCapabilityFilter', + 'OrgProfileCapabilityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileCapability', + fieldName: 'orgProfileCapability', + document, + variables, + transform: (data: { + orgProfileCapabilities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileCapability: data.orgProfileCapabilities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileCapability', + 'createOrgProfileCapability', + 'orgProfileCapability', + args.select, + args.data, + 'CreateOrgProfileCapabilityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'createOrgProfileCapability', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileCapabilityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileCapability', + 'updateOrgProfileCapability', + 'orgProfileCapability', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileCapabilityInput', + 'id', + 'orgProfileCapabilityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'updateOrgProfileCapability', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileCapability: { + orgProfileCapability: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileCapability', + 'deleteOrgProfileCapability', + 'orgProfileCapability', + { + id: args.where.id, + }, + 'DeleteOrgProfileCapabilityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileCapability', + fieldName: 'deleteOrgProfileCapability', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgProfileDefinitionGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgProfileDefinitionGrant.ts new file mode 100644 index 0000000000..1438737920 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgProfileDefinitionGrant.ts @@ -0,0 +1,247 @@ +/** + * OrgProfileDefinitionGrant 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 { + OrgProfileDefinitionGrant, + OrgProfileDefinitionGrantWithRelations, + OrgProfileDefinitionGrantSelect, + OrgProfileDefinitionGrantFilter, + OrgProfileDefinitionGrantOrderBy, + CreateOrgProfileDefinitionGrantInput, + UpdateOrgProfileDefinitionGrantInput, + OrgProfileDefinitionGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileDefinitionGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrants: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + 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, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrant', + document, + variables, + transform: (data: { + orgProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileDefinitionGrant: data.orgProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileDefinitionGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileDefinitionGrant', + 'orgProfileDefinitionGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileDefinitionGrantFilter', + 'OrgProfileDefinitionGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'orgProfileDefinitionGrant', + document, + variables, + transform: (data: { + orgProfileDefinitionGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileDefinitionGrant: data.orgProfileDefinitionGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileDefinitionGrant', + 'createOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + args.select, + args.data, + 'CreateOrgProfileDefinitionGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'createOrgProfileDefinitionGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileDefinitionGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileDefinitionGrant', + 'updateOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileDefinitionGrantInput', + 'id', + 'orgProfileDefinitionGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'updateOrgProfileDefinitionGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileDefinitionGrant: { + orgProfileDefinitionGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileDefinitionGrant', + 'deleteOrgProfileDefinitionGrant', + 'orgProfileDefinitionGrant', + { + id: args.where.id, + }, + 'DeleteOrgProfileDefinitionGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileDefinitionGrant', + fieldName: 'deleteOrgProfileDefinitionGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgProfileGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgProfileGrant.ts new file mode 100644 index 0000000000..141311e738 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgProfileGrant.ts @@ -0,0 +1,245 @@ +/** + * OrgProfileGrant 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 { + OrgProfileGrant, + OrgProfileGrantWithRelations, + OrgProfileGrantSelect, + OrgProfileGrantFilter, + OrgProfileGrantOrderBy, + CreateOrgProfileGrantInput, + UpdateOrgProfileGrantInput, + OrgProfileGrantPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileGrantModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrants: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + 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, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrants', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrant', + document, + variables, + transform: (data: { + orgProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileGrant: data.orgProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileGrant: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileGrant', + 'orgProfileGrants', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileGrantFilter', + 'OrgProfileGrantOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileGrant', + fieldName: 'orgProfileGrant', + document, + variables, + transform: (data: { + orgProfileGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileGrant: data.orgProfileGrants?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileGrant', + 'createOrgProfileGrant', + 'orgProfileGrant', + args.select, + args.data, + 'CreateOrgProfileGrantInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'createOrgProfileGrant', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileGrantPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileGrant', + 'updateOrgProfileGrant', + 'orgProfileGrant', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileGrantInput', + 'id', + 'orgProfileGrantPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'updateOrgProfileGrant', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileGrant: { + orgProfileGrant: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileGrant', + 'deleteOrgProfileGrant', + 'orgProfileGrant', + { + id: args.where.id, + }, + 'DeleteOrgProfileGrantInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileGrant', + fieldName: 'deleteOrgProfileGrant', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgProfileTemplate.ts b/sdk/constructive-sdk/src/admin/orm/models/orgProfileTemplate.ts new file mode 100644 index 0000000000..45499bc627 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgProfileTemplate.ts @@ -0,0 +1,245 @@ +/** + * OrgProfileTemplate 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 { + OrgProfileTemplate, + OrgProfileTemplateWithRelations, + OrgProfileTemplateSelect, + OrgProfileTemplateFilter, + OrgProfileTemplateOrderBy, + CreateOrgProfileTemplateInput, + UpdateOrgProfileTemplateInput, + OrgProfileTemplatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgProfileTemplateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + 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, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplate', + document, + variables, + transform: (data: { + orgProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileTemplate: data.orgProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgProfileTemplate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgProfileTemplate', + 'orgProfileTemplates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgProfileTemplateFilter', + 'OrgProfileTemplateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgProfileTemplate', + fieldName: 'orgProfileTemplate', + document, + variables, + transform: (data: { + orgProfileTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgProfileTemplate: data.orgProfileTemplates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgProfileTemplate', + 'createOrgProfileTemplate', + 'orgProfileTemplate', + args.select, + args.data, + 'CreateOrgProfileTemplateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'createOrgProfileTemplate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgProfileTemplatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgProfileTemplate', + 'updateOrgProfileTemplate', + 'orgProfileTemplate', + args.select, + args.where.id, + args.data, + 'UpdateOrgProfileTemplateInput', + 'id', + 'orgProfileTemplatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'updateOrgProfileTemplate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgProfileTemplate: { + orgProfileTemplate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgProfileTemplate', + 'deleteOrgProfileTemplate', + 'orgProfileTemplate', + { + id: args.where.id, + }, + 'DeleteOrgProfileTemplateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgProfileTemplate', + fieldName: 'deleteOrgProfileTemplate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/admin/orm/query/index.ts b/sdk/constructive-sdk/src/admin/orm/query/index.ts index 6d5f48130e..cb4b15d057 100644 --- a/sdk/constructive-sdk/src/admin/orm/query/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/query/index.ts @@ -6,9 +6,9 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; -import type { AppPermissionConnection, OrgPermissionConnection } from '../input-types'; +import type { AppCapabilityConnection, OrgCapabilityConnection } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface AppPermissionsGetByMaskVariables { +export interface AppCapabilitiesGetByMaskVariables { /** Read all values in the set after (below) this cursor. */ after?: string; /** Only read the first `n` values of the set. */ @@ -20,22 +20,16 @@ export interface AppPermissionsGetByMaskVariables { */ offset?: number; } -export interface AppPermissionsGetMaskVariables { +export interface AppCapabilitiesGetMaskVariables { ids?: string[]; } -export interface AppPermissionsGetMaskByNamesVariables { +export interface AppCapabilitiesGetMaskByNamesVariables { names?: string[]; } -export interface AppPermissionsGetPaddedMaskVariables { +export interface AppCapabilitiesGetPaddedMaskVariables { mask?: string; } -export interface OrgIsManagerOfVariables { - managerId?: string; - maxDepth?: number; - targetEntityId?: string; - userId?: string; -} -export interface OrgPermissionsGetByMaskVariables { +export interface OrgCapabilitiesGetByMaskVariables { /** Read all values in the set after (below) this cursor. */ after?: string; /** Only read the first `n` values of the set. */ @@ -47,34 +41,40 @@ export interface OrgPermissionsGetByMaskVariables { */ offset?: number; } -export interface OrgPermissionsGetMaskVariables { +export interface OrgCapabilitiesGetMaskVariables { ids?: string[]; } -export interface OrgPermissionsGetMaskByNamesVariables { +export interface OrgCapabilitiesGetMaskByNamesVariables { names?: string[]; } -export interface OrgPermissionsGetPaddedMaskVariables { +export interface OrgCapabilitiesGetPaddedMaskVariables { mask?: string; } +export interface OrgIsManagerOfVariables { + managerId?: string; + maxDepth?: number; + targetEntityId?: string; + userId?: string; +} export function createQueryOperations(client: OrmClient) { return { - appPermissionsGetByMask: ( - args: AppPermissionsGetByMaskVariables, + appCapabilitiesGetByMask: ( + args: AppCapabilitiesGetByMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetByMask: AppPermissionConnection | null; + appCapabilitiesGetByMask: AppCapabilityConnection | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetByMask', - fieldName: 'appPermissionsGetByMask', + operationName: 'AppCapabilitiesGetByMask', + fieldName: 'appCapabilitiesGetByMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetByMask', - 'appPermissionsGetByMask', + 'AppCapabilitiesGetByMask', + 'appCapabilitiesGetByMask', options?.select, args, [ @@ -99,23 +99,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetMask: ( - args: AppPermissionsGetMaskVariables, + appCapabilitiesGetMask: ( + args: AppCapabilitiesGetMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetMask: string | null; + appCapabilitiesGetMask: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetMask', - fieldName: 'appPermissionsGetMask', + operationName: 'AppCapabilitiesGetMask', + fieldName: 'appCapabilitiesGetMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetMask', - 'appPermissionsGetMask', + 'AppCapabilitiesGetMask', + 'appCapabilitiesGetMask', options?.select, args, [ @@ -128,23 +128,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetMaskByNames: ( - args: AppPermissionsGetMaskByNamesVariables, + appCapabilitiesGetMaskByNames: ( + args: AppCapabilitiesGetMaskByNamesVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetMaskByNames: string | null; + appCapabilitiesGetMaskByNames: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetMaskByNames', - fieldName: 'appPermissionsGetMaskByNames', + operationName: 'AppCapabilitiesGetMaskByNames', + fieldName: 'appCapabilitiesGetMaskByNames', ...buildCustomDocument( 'query', - 'AppPermissionsGetMaskByNames', - 'appPermissionsGetMaskByNames', + 'AppCapabilitiesGetMaskByNames', + 'appCapabilitiesGetMaskByNames', options?.select, args, [ @@ -157,23 +157,23 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - appPermissionsGetPaddedMask: ( - args: AppPermissionsGetPaddedMaskVariables, + appCapabilitiesGetPaddedMask: ( + args: AppCapabilitiesGetPaddedMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - appPermissionsGetPaddedMask: string | null; + appCapabilitiesGetPaddedMask: string | null; }>({ client, operation: 'query', - operationName: 'AppPermissionsGetPaddedMask', - fieldName: 'appPermissionsGetPaddedMask', + operationName: 'AppCapabilitiesGetPaddedMask', + fieldName: 'appCapabilitiesGetPaddedMask', ...buildCustomDocument( 'query', - 'AppPermissionsGetPaddedMask', - 'appPermissionsGetPaddedMask', + 'AppCapabilitiesGetPaddedMask', + 'appCapabilitiesGetPaddedMask', options?.select, args, [ @@ -186,169 +186,169 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - orgIsManagerOf: ( - args: OrgIsManagerOfVariables, + orgCapabilitiesGetByMask: ( + args: OrgCapabilitiesGetByMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgIsManagerOf: boolean | null; + orgCapabilitiesGetByMask: OrgCapabilityConnection | null; }>({ client, operation: 'query', - operationName: 'OrgIsManagerOf', - fieldName: 'orgIsManagerOf', + operationName: 'OrgCapabilitiesGetByMask', + fieldName: 'orgCapabilitiesGetByMask', ...buildCustomDocument( 'query', - 'OrgIsManagerOf', - 'orgIsManagerOf', + 'OrgCapabilitiesGetByMask', + 'orgCapabilitiesGetByMask', options?.select, args, [ { - name: 'managerId', - type: 'UUID', + name: 'after', + type: 'Cursor', }, { - name: 'maxDepth', + name: 'first', type: 'Int', }, { - name: 'targetEntityId', - type: 'UUID', + name: 'mask', + type: 'BitString', }, { - name: 'userId', - type: 'UUID', + name: 'offset', + type: 'Int', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetByMask: ( - args: OrgPermissionsGetByMaskVariables, + orgCapabilitiesGetMask: ( + args: OrgCapabilitiesGetMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetByMask: OrgPermissionConnection | null; + orgCapabilitiesGetMask: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetByMask', - fieldName: 'orgPermissionsGetByMask', + operationName: 'OrgCapabilitiesGetMask', + fieldName: 'orgCapabilitiesGetMask', ...buildCustomDocument( 'query', - 'OrgPermissionsGetByMask', - 'orgPermissionsGetByMask', + 'OrgCapabilitiesGetMask', + 'orgCapabilitiesGetMask', options?.select, args, [ { - name: 'after', - type: 'Cursor', - }, - { - name: 'first', - type: 'Int', - }, - { - name: 'mask', - type: 'BitString', - }, - { - name: 'offset', - type: 'Int', + name: 'ids', + type: '[UUID]', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetMask: ( - args: OrgPermissionsGetMaskVariables, + orgCapabilitiesGetMaskByNames: ( + args: OrgCapabilitiesGetMaskByNamesVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetMask: string | null; + orgCapabilitiesGetMaskByNames: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetMask', - fieldName: 'orgPermissionsGetMask', + operationName: 'OrgCapabilitiesGetMaskByNames', + fieldName: 'orgCapabilitiesGetMaskByNames', ...buildCustomDocument( 'query', - 'OrgPermissionsGetMask', - 'orgPermissionsGetMask', + 'OrgCapabilitiesGetMaskByNames', + 'orgCapabilitiesGetMaskByNames', options?.select, args, [ { - name: 'ids', - type: '[UUID]', + name: 'names', + type: '[String]', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetMaskByNames: ( - args: OrgPermissionsGetMaskByNamesVariables, + orgCapabilitiesGetPaddedMask: ( + args: OrgCapabilitiesGetPaddedMaskVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetMaskByNames: string | null; + orgCapabilitiesGetPaddedMask: string | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetMaskByNames', - fieldName: 'orgPermissionsGetMaskByNames', + operationName: 'OrgCapabilitiesGetPaddedMask', + fieldName: 'orgCapabilitiesGetPaddedMask', ...buildCustomDocument( 'query', - 'OrgPermissionsGetMaskByNames', - 'orgPermissionsGetMaskByNames', + 'OrgCapabilitiesGetPaddedMask', + 'orgCapabilitiesGetPaddedMask', options?.select, args, [ { - name: 'names', - type: '[String]', + name: 'mask', + type: 'BitString', }, ], connectionFieldsMap, undefined ), }), - orgPermissionsGetPaddedMask: ( - args: OrgPermissionsGetPaddedMaskVariables, + orgIsManagerOf: ( + args: OrgIsManagerOfVariables, options?: { select?: Record; } ) => new QueryBuilder<{ - orgPermissionsGetPaddedMask: string | null; + orgIsManagerOf: boolean | null; }>({ client, operation: 'query', - operationName: 'OrgPermissionsGetPaddedMask', - fieldName: 'orgPermissionsGetPaddedMask', + operationName: 'OrgIsManagerOf', + fieldName: 'orgIsManagerOf', ...buildCustomDocument( 'query', - 'OrgPermissionsGetPaddedMask', - 'orgPermissionsGetPaddedMask', + 'OrgIsManagerOf', + 'orgIsManagerOf', options?.select, args, [ { - name: 'mask', - type: 'BitString', + name: 'managerId', + type: 'UUID', + }, + { + name: 'maxDepth', + type: 'Int', + }, + { + name: 'targetEntityId', + type: 'UUID', + }, + { + name: 'userId', + type: 'UUID', }, ], connectionFieldsMap, diff --git a/sdk/constructive-sdk/src/api/README.md b/sdk/constructive-sdk/src/api/README.md index 27e7800079..79505f3138 100644 --- a/sdk/constructive-sdk/src/api/README.md +++ b/sdk/constructive-sdk/src/api/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 80 +- **Tables:** 86 - **Custom queries:** 6 - **Custom mutations:** 11 diff --git a/sdk/constructive-sdk/src/api/orm/README.md b/sdk/constructive-sdk/src/api/orm/README.md index 485932a4b7..c3d6e0dbad 100644 --- a/sdk/constructive-sdk/src/api/orm/README.md +++ b/sdk/constructive-sdk/src/api/orm/README.md @@ -21,10 +21,11 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `api` | findMany, findOne, create, update, delete | | `apiSchema` | findMany, findOne, create, update, delete | | `apiSetting` | findMany, findOne, create, update, delete | -| `apis` | findMany, findOne, create, update, delete | -| `astMigration` | findMany, findOne, create, update, delete | +| `appComponent` | findMany, findOne, create, update, delete | +| `app` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `compositeType` | findMany, findOne, create, update, delete | | `corsSetting` | findMany, findOne, create, update, delete | @@ -37,6 +38,9 @@ const db = createClient({ | `domainEvent` | findMany, findOne, create, update, delete | | `domainType` | findMany, findOne, create, update, delete | | `domainVerification` | findMany, findOne, create, update, delete | +| `emailIdentity` | findMany, findOne, create, update, delete | +| `emailProviderAccount` | findMany, findOne, create, update, delete | +| `emailSiteIdentity` | findMany, findOne, create, update, delete | | `embeddingChunk` | findMany, findOne, create, update, delete | | `enum` | findMany, findOne, create, update, delete | | `exclusionConstraint` | findMany, findOne, create, update, delete | @@ -53,13 +57,16 @@ const db = createClient({ | `nodeTypeRegistry` | findMany, findOne, create, update, delete | | `page` | findMany, findOne, create, update, delete | | `partition` | findMany, findOne, create, update, delete | +| `platformApi` | findMany, findOne, create, update, delete | | `platformApiSchema` | findMany, findOne, create, update, delete | | `platformApiSetting` | findMany, findOne, create, update, delete | -| `platformApis` | findMany, findOne, create, update, delete | | `platformCorsSetting` | findMany, findOne, create, update, delete | | `platformDomain` | findMany, findOne, create, update, delete | | `platformDomainEvent` | findMany, findOne, create, update, delete | | `platformDomainVerification` | findMany, findOne, create, update, delete | +| `platformEmailIdentity` | findMany, findOne, create, update, delete | +| `platformEmailProviderAccount` | findMany, findOne, create, update, delete | +| `platformEmailSiteIdentity` | findMany, findOne, create, update, delete | | `platformManagedDomain` | findMany, findOne, create, update, delete | | `platformPage` | findMany, findOne, create, update, delete | | `platformSiteAppLink` | findMany, findOne, create, update, delete | @@ -87,7 +94,6 @@ const db = createClient({ | `siteTheme` | findMany, findOne, create, update, delete | | `siteWebConfig` | findMany, findOne, create, update, delete | | `spatialRelation` | findMany, findOne, create, update, delete | -| `sqlAction` | findMany, findOne, create, update, delete | | `tableBehavior` | findMany, findOne, create, update, delete | | `table` | findMany, findOne, create, update, delete | | `tableGrant` | findMany, findOne, create, update, delete | @@ -104,6 +110,44 @@ const db = createClient({ ## Table Operations +### `db.api` + +CRUD operations for Api records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all api records +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.api.delete({ where: { id: '' } }).execute(); +``` + ### `db.apiSchema` CRUD operations for ApiSchema records. @@ -185,83 +229,81 @@ const updated = await db.apiSetting.update({ where: { id: '' }, data: { ap const deleted = await db.apiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.apis` +### `db.appComponent` -CRUD operations for Apis records. +CRUD operations for AppComponent records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `anonRole` | String | Yes | +| `appId` | UUID | Yes | +| `componentApiId` | UUID | Yes | +| `componentDomainId` | UUID | Yes | +| `componentInstallationId` | UUID | Yes | +| `componentSiteId` | UUID | Yes | +| `componentType` | String | Yes | | `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `dbname` | String | Yes | | `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | | `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all apis records -const items = await db.apis.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); +// List all appComponent records +const items = await db.appComponent.findMany({ select: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.apis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); +const item = await db.appComponent.findOne({ id: '', select: { appId: true, componentApiId: true, componentDomainId: true, componentInstallationId: true, componentSiteId: true, componentType: true, config: true, createdAt: true, databaseId: true, id: true, updatedAt: true } }).execute(); // Create -const created = await db.apis.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); +const created = await db.appComponent.create({ data: { appId: '', componentApiId: '', componentDomainId: '', componentInstallationId: '', componentSiteId: '', componentType: '', config: '', databaseId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.apis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); +const updated = await db.appComponent.update({ where: { id: '' }, data: { appId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.apis.delete({ where: { id: '' } }).execute(); +const deleted = await db.appComponent.delete({ where: { id: '' } }).execute(); ``` -### `db.astMigration` +### `db.app` -CRUD operations for AstMigration records. +CRUD operations for App records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actionId` | UUID | Yes | -| `actionName` | String | Yes | -| `actorId` | UUID | Yes | +| `config` | JSON | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `deploy` | JSON | Yes | -| `deploys` | String | Yes | -| `id` | Int | No | +| `description` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | | `name` | String | Yes | -| `payload` | JSON | Yes | -| `requires` | String | Yes | -| `revert` | JSON | Yes | -| `verify` | JSON | Yes | +| `status` | String | Yes | +| `title` | String | Yes | +| `updatedAt` | Datetime | No | **Operations:** ```typescript -// List all astMigration records -const items = await db.astMigration.findMany({ select: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }).execute(); +// List all app records +const items = await db.app.findMany({ select: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.astMigration.findOne({ id: '', select: { actionId: true, actionName: true, actorId: true, createdAt: true, databaseId: true, deploy: true, deploys: true, id: true, name: true, payload: true, requires: true, revert: true, verify: true } }).execute(); +const item = await db.app.findOne({ id: '', select: { config: true, createdAt: true, databaseId: true, description: true, id: true, isPublished: true, name: true, status: true, title: true, updatedAt: true } }).execute(); // Create -const created = await db.astMigration.create({ data: { actionId: '', actionName: '', actorId: '', databaseId: '', deploy: '', deploys: '', name: '', payload: '', requires: '', revert: '', verify: '' }, select: { id: true } }).execute(); +const created = await db.app.create({ data: { config: '', databaseId: '', description: '', isPublished: '', name: '', status: '', title: '' }, select: { id: true } }).execute(); // Update -const updated = await db.astMigration.update({ where: { id: '' }, data: { actionId: '' }, select: { id: true } }).execute(); +const updated = await db.app.update({ where: { id: '' }, data: { config: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.astMigration.delete({ where: { id: '' } }).execute(); +const deleted = await db.app.delete({ where: { id: '' } }).execute(); ``` ### `db.checkConstraint` @@ -743,6 +785,125 @@ const updated = await db.domainVerification.update({ where: { id: '' }, da const deleted = await db.domainVerification.delete({ where: { id: '' } }).execute(); ``` +### `db.emailIdentity` + +CRUD operations for EmailIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `fromAddress` | String | Yes | +| `fromName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `providerAccountId` | UUID | Yes | +| `replyToAddress` | String | Yes | +| `supportAddress` | String | Yes | +| `transportMode` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all emailIdentity records +const items = await db.emailIdentity.findMany({ select: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.emailIdentity.findOne({ id: '', select: { createdAt: true, databaseId: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Create +const created = await db.emailIdentity.create({ data: { databaseId: '', fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailIdentity.delete({ where: { id: '' } }).execute(); +``` + +### `db.emailProviderAccount` + +CRUD operations for EmailProviderAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiBaseUrl` | String | Yes | +| `createdAt` | Datetime | No | +| `credentialsSecretName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `provider` | String | Yes | +| `providerAccountName` | String | Yes | +| `region` | String | Yes | +| `smtpHost` | String | Yes | +| `smtpPort` | Int | Yes | +| `smtpSecure` | Boolean | Yes | +| `smtpUser` | String | Yes | +| `updatedAt` | Datetime | No | +| `webhookSigningSecretName` | String | Yes | + +**Operations:** + +```typescript +// List all emailProviderAccount records +const items = await db.emailProviderAccount.findMany({ select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Get one by id +const item = await db.emailProviderAccount.findOne({ id: '', select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, databaseId: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Create +const created = await db.emailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', databaseId: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailProviderAccount.delete({ where: { id: '' } }).execute(); +``` + +### `db.emailSiteIdentity` + +CRUD operations for EmailSiteIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `emailIdentityId` | UUID | Yes | +| `id` | UUID | No | +| `siteId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all emailSiteIdentity records +const items = await db.emailSiteIdentity.findMany({ select: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.emailSiteIdentity.findOne({ id: '', select: { createdAt: true, databaseId: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.emailSiteIdentity.create({ data: { databaseId: '', emailIdentityId: '', siteId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailSiteIdentity.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailSiteIdentity.delete({ where: { id: '' } }).execute(); +``` + ### `db.embeddingChunk` CRUD operations for EmbeddingChunk records. @@ -1394,6 +1555,43 @@ const updated = await db.partition.update({ where: { id: '' }, data: { dat const deleted = await db.partition.delete({ where: { id: '' } }).execute(); ``` +### `db.platformApi` + +CRUD operations for PlatformApi records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformApi records +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformApi.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformApiSchema` CRUD operations for PlatformApiSchema records. @@ -1473,43 +1671,6 @@ const updated = await db.platformApiSetting.update({ where: { id: '' }, da const deleted = await db.platformApiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.platformApis` - -CRUD operations for PlatformApis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all platformApis records -const items = await db.platformApis.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.platformApis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.platformApis.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformApis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformApis.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformCorsSetting` CRUD operations for PlatformCorsSetting records. @@ -1666,6 +1827,122 @@ const updated = await db.platformDomainVerification.update({ where: { id: '' } }).execute(); ``` +### `db.platformEmailIdentity` + +CRUD operations for PlatformEmailIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `fromAddress` | String | Yes | +| `fromName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `isDefault` | Boolean | Yes | +| `name` | String | Yes | +| `providerAccountId` | UUID | Yes | +| `replyToAddress` | String | Yes | +| `supportAddress` | String | Yes | +| `transportMode` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformEmailIdentity records +const items = await db.platformEmailIdentity.findMany({ select: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformEmailIdentity.findOne({ id: '', select: { createdAt: true, fromAddress: true, fromName: true, id: true, isActive: true, isDefault: true, name: true, providerAccountId: true, replyToAddress: true, supportAddress: true, transportMode: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformEmailIdentity.create({ data: { fromAddress: '', fromName: '', isActive: '', isDefault: '', name: '', providerAccountId: '', replyToAddress: '', supportAddress: '', transportMode: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailIdentity.update({ where: { id: '' }, data: { fromAddress: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailIdentity.delete({ where: { id: '' } }).execute(); +``` + +### `db.platformEmailProviderAccount` + +CRUD operations for PlatformEmailProviderAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiBaseUrl` | String | Yes | +| `createdAt` | Datetime | No | +| `credentialsSecretName` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `provider` | String | Yes | +| `providerAccountName` | String | Yes | +| `region` | String | Yes | +| `smtpHost` | String | Yes | +| `smtpPort` | Int | Yes | +| `smtpSecure` | Boolean | Yes | +| `smtpUser` | String | Yes | +| `updatedAt` | Datetime | No | +| `webhookSigningSecretName` | String | Yes | + +**Operations:** + +```typescript +// List all platformEmailProviderAccount records +const items = await db.platformEmailProviderAccount.findMany({ select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Get one by id +const item = await db.platformEmailProviderAccount.findOne({ id: '', select: { apiBaseUrl: true, createdAt: true, credentialsSecretName: true, id: true, isActive: true, name: true, provider: true, providerAccountName: true, region: true, smtpHost: true, smtpPort: true, smtpSecure: true, smtpUser: true, updatedAt: true, webhookSigningSecretName: true } }).execute(); + +// Create +const created = await db.platformEmailProviderAccount.create({ data: { apiBaseUrl: '', credentialsSecretName: '', isActive: '', name: '', provider: '', providerAccountName: '', region: '', smtpHost: '', smtpPort: '', smtpSecure: '', smtpUser: '', webhookSigningSecretName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailProviderAccount.update({ where: { id: '' }, data: { apiBaseUrl: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailProviderAccount.delete({ where: { id: '' } }).execute(); +``` + +### `db.platformEmailSiteIdentity` + +CRUD operations for PlatformEmailSiteIdentity records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `emailIdentityId` | UUID | Yes | +| `id` | UUID | No | +| `siteId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformEmailSiteIdentity records +const items = await db.platformEmailSiteIdentity.findMany({ select: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformEmailSiteIdentity.findOne({ id: '', select: { createdAt: true, emailIdentityId: true, id: true, siteId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformEmailSiteIdentity.create({ data: { emailIdentityId: '', siteId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformEmailSiteIdentity.update({ where: { id: '' }, data: { emailIdentityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformEmailSiteIdentity.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformManagedDomain` CRUD operations for PlatformManagedDomain records. @@ -2718,47 +2995,6 @@ const updated = await db.spatialRelation.update({ where: { id: '' }, data: const deleted = await db.spatialRelation.delete({ where: { id: '' } }).execute(); ``` -### `db.sqlAction` - -CRUD operations for SqlAction records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `actionId` | UUID | Yes | -| `actionName` | String | Yes | -| `actorId` | UUID | Yes | -| `content` | String | Yes | -| `createdAt` | Datetime | No | -| `databaseId` | UUID | Yes | -| `deploy` | String | Yes | -| `deps` | String | Yes | -| `id` | Int | No | -| `name` | String | Yes | -| `payload` | JSON | Yes | -| `revert` | String | Yes | -| `verify` | String | Yes | - -**Operations:** - -```typescript -// List all sqlAction records -const items = await db.sqlAction.findMany({ select: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }).execute(); - -// Get one by id -const item = await db.sqlAction.findOne({ id: '', select: { actionId: true, actionName: true, actorId: true, content: true, createdAt: true, databaseId: true, deploy: true, deps: true, id: true, name: true, payload: true, revert: true, verify: true } }).execute(); - -// Create -const created = await db.sqlAction.create({ data: { actionId: '', actionName: '', actorId: '', content: '', databaseId: '', deploy: '', deps: '', name: '', payload: '', revert: '', verify: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.sqlAction.update({ where: { id: '' }, data: { actionId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.sqlAction.delete({ where: { id: '' } }).execute(); -``` - ### `db.tableBehavior` CRUD operations for TableBehavior records. @@ -3363,49 +3599,64 @@ resolveSiteAppLinks const result = await db.query.resolveSiteAppLinks({ targetSiteId: '' }).execute(); ``` -### `db.mutation.acceptDatabaseTransfer` +### `db.mutation.applyRls` -acceptDatabaseTransfer +applyRls - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | AcceptDatabaseTransferInput (required) | + | `input` | ApplyRlsInput (required) | ```typescript -const result = await db.mutation.acceptDatabaseTransfer({ input: { transferId: '' } }).execute(); +const result = await db.mutation.applyRls({ input: '' }).execute(); ``` -### `db.mutation.applyRls` +### `db.mutation.appsInstallApp` -applyRls +appsInstallApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | ApplyRlsInput (required) | + | `input` | AppsInstallAppInput (required) | ```typescript -const result = await db.mutation.applyRls({ input: '' }).execute(); +const result = await db.mutation.appsInstallApp({ input: '' }).execute(); +``` + +### `db.mutation.appsUninstallApp` + +appsUninstallApp + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | AppsUninstallAppInput (required) | + +```typescript +const result = await db.mutation.appsUninstallApp({ input: { targetAppId: '' } }).execute(); ``` -### `db.mutation.cancelDatabaseTransfer` +### `db.mutation.appsUpgradeApp` -cancelDatabaseTransfer +appsUpgradeApp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | CancelDatabaseTransferInput (required) | + | `input` | AppsUpgradeAppInput (required) | ```typescript -const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '' } }).execute(); +const result = await db.mutation.appsUpgradeApp({ input: { newParams: '', targetAppId: '' } }).execute(); ``` ### `db.mutation.domainsAssignSubdomain` @@ -3471,21 +3722,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.rejectDatabaseTransfer` - -rejectDatabaseTransfer - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | RejectDatabaseTransferInput (required) | - -```typescript -const result = await db.mutation.rejectDatabaseTransfer({ input: { transferId: '' } }).execute(); -``` - ### `db.mutation.requestDatabase` Requests a database and returns a ticket (database_provision_module row) to poll. diff --git a/sdk/constructive-sdk/src/api/orm/index.ts b/sdk/constructive-sdk/src/api/orm/index.ts index 98c5108b79..1e0236a966 100644 --- a/sdk/constructive-sdk/src/api/orm/index.ts +++ b/sdk/constructive-sdk/src/api/orm/index.ts @@ -5,10 +5,11 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ApiModel } from './models/api'; import { ApiSchemaModel } from './models/apiSchema'; import { ApiSettingModel } from './models/apiSetting'; -import { ApisModel } from './models/apis'; -import { AstMigrationModel } from './models/astMigration'; +import { AppComponentModel } from './models/appComponent'; +import { AppModel } from './models/app'; import { CheckConstraintModel } from './models/checkConstraint'; import { CompositeTypeModel } from './models/compositeType'; import { CorsSettingModel } from './models/corsSetting'; @@ -21,6 +22,9 @@ import { DomainModel } from './models/domain'; import { DomainEventModel } from './models/domainEvent'; import { DomainTypeModel } from './models/domainType'; import { DomainVerificationModel } from './models/domainVerification'; +import { EmailIdentityModel } from './models/emailIdentity'; +import { EmailProviderAccountModel } from './models/emailProviderAccount'; +import { EmailSiteIdentityModel } from './models/emailSiteIdentity'; import { EmbeddingChunkModel } from './models/embeddingChunk'; import { EnumModel } from './models/enum'; import { ExclusionConstraintModel } from './models/exclusionConstraint'; @@ -37,13 +41,16 @@ import { ManagedDomainModel } from './models/managedDomain'; import { NodeTypeRegistryModel } from './models/nodeTypeRegistry'; import { PageModel } from './models/page'; import { PartitionModel } from './models/partition'; +import { PlatformApiModel } from './models/platformApi'; import { PlatformApiSchemaModel } from './models/platformApiSchema'; import { PlatformApiSettingModel } from './models/platformApiSetting'; -import { PlatformApisModel } from './models/platformApis'; import { PlatformCorsSettingModel } from './models/platformCorsSetting'; import { PlatformDomainModel } from './models/platformDomain'; import { PlatformDomainEventModel } from './models/platformDomainEvent'; import { PlatformDomainVerificationModel } from './models/platformDomainVerification'; +import { PlatformEmailIdentityModel } from './models/platformEmailIdentity'; +import { PlatformEmailProviderAccountModel } from './models/platformEmailProviderAccount'; +import { PlatformEmailSiteIdentityModel } from './models/platformEmailSiteIdentity'; import { PlatformManagedDomainModel } from './models/platformManagedDomain'; import { PlatformPageModel } from './models/platformPage'; import { PlatformSiteAppLinkModel } from './models/platformSiteAppLink'; @@ -71,7 +78,6 @@ import { SiteModuleModel } from './models/siteModule'; import { SiteThemeModel } from './models/siteTheme'; import { SiteWebConfigModel } from './models/siteWebConfig'; import { SpatialRelationModel } from './models/spatialRelation'; -import { SqlActionModel } from './models/sqlAction'; import { TableBehaviorModel } from './models/tableBehavior'; import { TableModel } from './models/table'; import { TableGrantModel } from './models/tableGrant'; @@ -120,10 +126,11 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + api: new ApiModel(client), apiSchema: new ApiSchemaModel(client), apiSetting: new ApiSettingModel(client), - apis: new ApisModel(client), - astMigration: new AstMigrationModel(client), + appComponent: new AppComponentModel(client), + app: new AppModel(client), checkConstraint: new CheckConstraintModel(client), compositeType: new CompositeTypeModel(client), corsSetting: new CorsSettingModel(client), @@ -136,6 +143,9 @@ export function createClient(config: OrmClientConfig) { domainEvent: new DomainEventModel(client), domainType: new DomainTypeModel(client), domainVerification: new DomainVerificationModel(client), + emailIdentity: new EmailIdentityModel(client), + emailProviderAccount: new EmailProviderAccountModel(client), + emailSiteIdentity: new EmailSiteIdentityModel(client), embeddingChunk: new EmbeddingChunkModel(client), enum: new EnumModel(client), exclusionConstraint: new ExclusionConstraintModel(client), @@ -152,13 +162,16 @@ export function createClient(config: OrmClientConfig) { nodeTypeRegistry: new NodeTypeRegistryModel(client), page: new PageModel(client), partition: new PartitionModel(client), + platformApi: new PlatformApiModel(client), platformApiSchema: new PlatformApiSchemaModel(client), platformApiSetting: new PlatformApiSettingModel(client), - platformApis: new PlatformApisModel(client), platformCorsSetting: new PlatformCorsSettingModel(client), platformDomain: new PlatformDomainModel(client), platformDomainEvent: new PlatformDomainEventModel(client), platformDomainVerification: new PlatformDomainVerificationModel(client), + platformEmailIdentity: new PlatformEmailIdentityModel(client), + platformEmailProviderAccount: new PlatformEmailProviderAccountModel(client), + platformEmailSiteIdentity: new PlatformEmailSiteIdentityModel(client), platformManagedDomain: new PlatformManagedDomainModel(client), platformPage: new PlatformPageModel(client), platformSiteAppLink: new PlatformSiteAppLinkModel(client), @@ -186,7 +199,6 @@ export function createClient(config: OrmClientConfig) { siteTheme: new SiteThemeModel(client), siteWebConfig: new SiteWebConfigModel(client), spatialRelation: new SpatialRelationModel(client), - sqlAction: new SqlActionModel(client), tableBehavior: new TableBehaviorModel(client), table: new TableModel(client), tableGrant: new TableGrantModel(client), diff --git a/sdk/constructive-sdk/src/api/orm/input-types.ts b/sdk/constructive-sdk/src/api/orm/input-types.ts index 2347f17ca6..554d99df9d 100644 --- a/sdk/constructive-sdk/src/api/orm/input-types.ts +++ b/sdk/constructive-sdk/src/api/orm/input-types.ts @@ -232,11 +232,31 @@ export interface UUIDListFilter { } // ============ Enum Types ============ export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; -export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; +export type ObjectCategory = 'APP' | 'AUTH' | 'CAPABILITIES' | 'CORE' | 'MEMBERSHIPS' | 'MODULE'; // ============ Custom Scalar Types ============ export type ConstructiveInternalTypeImage = unknown; -/** Join table linking API surfaces to the metaschema schemas they expose */ +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ // ============ Entity Types ============ +export interface Api { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} +/** Join table linking API surfaces to the metaschema schemas they expose */ export interface ApiSchema { /** API surface that exposes this schema */ apiId?: string | null; @@ -286,40 +306,47 @@ export interface ApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface Apis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ +/** App component rows binding an app to typed catalog rows (exactly one typed component reference per row) */ +export interface AppComponent { + /** App this component belongs to */ + appId?: string | null; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string | null; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string | null; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string | null; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string | null; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string | null; + /** Component-specific configuration inside this app */ config?: Record | null; createdAt?: string | null; /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; - /** Database this API surface serves */ - dbname?: string | null; id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; updatedAt?: string | null; } -export interface AstMigration { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; +/** App aggregates: thin identity rows whose components are global catalog references */ +export interface App { + /** Module-specific configuration for this app */ + config?: Record | null; createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ databaseId?: string | null; - deploy?: Record | null; - deploys?: string | null; - id: number; + /** Human-readable app description */ + description?: string | null; + id: string; + /** Whether other scopes may see and reference this app */ + isPublished?: boolean | null; + /** Owner-local app name */ name?: string | null; - payload?: Record | null; - requires?: string[] | null; - revert?: Record | null; - verify?: Record | null; + /** App lifecycle status: active, suspended, archived */ + status?: string | null; + /** Human-readable app title */ + title?: string | null; + updatedAt?: string | null; } export interface CheckConstraint { category?: ObjectCategory | null; @@ -546,6 +573,76 @@ export interface DomainVerification { /** When this challenge succeeded */ verifiedAt?: string | null; } +/** Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through */ +export interface EmailIdentity { + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string | null; + /** Display name shown beside the from address */ + fromName?: string | null; + id: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean | null; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean | null; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string | null; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string | null; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string | null; + /** Support address rendered in message bodies and footers */ + supportAddress?: string | null; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string | null; + updatedAt?: string | null; +} +/** A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) */ +export interface EmailProviderAccount { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string | null; + createdAt?: string | null; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + id: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean | null; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string | null; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string | null; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string | null; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string | null; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string | null; + /** SMTP port */ + smtpPort?: number | null; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean | null; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string | null; + updatedAt?: string | null; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string | null; +} +/** Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. */ +export interface EmailSiteIdentity { + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Identity this site sends as */ + emailIdentityId?: string | null; + id: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string | null; + updatedAt?: string | null; +} export interface EmbeddingChunk { chunkOverlap?: number | null; chunkSize?: number | null; @@ -821,6 +918,24 @@ export interface Partition { tableId?: string | null; updatedAt?: string | null; } +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ +export interface PlatformApi { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} /** Join table linking API surfaces to the metaschema schemas they expose */ export interface PlatformApiSchema { /** API surface that exposes this schema */ @@ -867,24 +982,6 @@ export interface PlatformApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface PlatformApis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} /** Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default */ export interface PlatformCorsSetting { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -973,6 +1070,70 @@ export interface PlatformDomainVerification { /** When this challenge succeeded */ verifiedAt?: string | null; } +/** Outbound sender identity: the from/reply-to/support addresses a tenant sends as, and the provider account the mail leaves through */ +export interface PlatformEmailIdentity { + createdAt?: string | null; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress?: string | null; + /** Display name shown beside the from address */ + fromName?: string | null; + id: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean | null; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean | null; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name?: string | null; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string | null; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string | null; + /** Support address rendered in message bodies and footers */ + supportAddress?: string | null; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string | null; + updatedAt?: string | null; +} +/** A tenant's configured account at an email provider: provider slug, endpoint coordinates, and the NAME of the secret holding its credentials (never the credential itself) */ +export interface PlatformEmailProviderAccount { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string | null; + createdAt?: string | null; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName?: string | null; + id: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean | null; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name?: string | null; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider?: string | null; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string | null; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string | null; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string | null; + /** SMTP port */ + smtpPort?: number | null; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean | null; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string | null; + updatedAt?: string | null; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string | null; +} +/** Binds a site to the identity it sends as. Unique on site_id: one identity per site, but many sites may share an identity. */ +export interface PlatformEmailSiteIdentity { + createdAt?: string | null; + /** Identity this site sends as */ + emailIdentityId?: string | null; + id: string; + /** Site whose mail is sent as the bound identity */ + siteId?: string | null; + updatedAt?: string | null; +} /** Platform-operated hostnames whose DNS and certificate lifecycle the platform drives */ export interface PlatformManagedDomain { /** Whether tenants may claim subdomains under this managed hostname */ @@ -1517,21 +1678,6 @@ export interface SpatialRelation { tags?: string[] | null; updatedAt?: string | null; } -export interface SqlAction { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; - content?: string | null; - createdAt?: string | null; - databaseId?: string | null; - deploy?: string | null; - deps?: string[] | null; - id: number; - name?: string | null; - payload?: Record | null; - revert?: string | null; - verify?: string | null; -} export interface TableBehavior { createdAt?: string | null; databaseId?: string | null; @@ -1736,19 +1882,24 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ApiRelations { + apiSetting?: ApiSetting | null; + apiSchemas?: ConnectionResult; + corsSettings?: ConnectionResult; +} export interface ApiSchemaRelations { - api?: Apis | null; + api?: Api | null; schema?: Schema | null; } export interface ApiSettingRelations { - api?: Apis | null; + api?: Api | null; } -export interface ApisRelations { - apiSettingByApiId?: ApiSetting | null; - apiSchemasByApiId?: ConnectionResult; - corsSettingsByApiId?: ConnectionResult; +export interface AppComponentRelations { + app?: App | null; +} +export interface AppRelations { + appComponents?: ConnectionResult; } -export interface AstMigrationRelations {} export interface CheckConstraintRelations { database?: Database | null; table?: Table | null; @@ -1758,7 +1909,7 @@ export interface CompositeTypeRelations { schema?: Schema | null; } export interface CorsSettingRelations { - api?: Apis | null; + api?: Api | null; } export interface DatabaseRelations { checkConstraints?: ConnectionResult; @@ -1828,6 +1979,17 @@ export interface DomainVerificationRelations { domain?: Domain | null; managedDomain?: ManagedDomain | null; } +export interface EmailIdentityRelations { + providerAccount?: EmailProviderAccount | null; + emailSiteIdentities?: ConnectionResult; +} +export interface EmailProviderAccountRelations { + emailIdentitiesByProviderAccountId?: ConnectionResult; +} +export interface EmailSiteIdentityRelations { + emailIdentity?: EmailIdentity | null; + site?: Site | null; +} export interface EmbeddingChunkRelations { chunksTable?: Table | null; database?: Database | null; @@ -1896,20 +2058,20 @@ export interface PartitionRelations { partitionKey?: Field | null; table?: Table | null; } +export interface PlatformApiRelations { + platformApiSettingByApiId?: PlatformApiSetting | null; + platformCorsSettingByApiId?: PlatformCorsSetting | null; + platformApiSchemasByApiId?: ConnectionResult; +} export interface PlatformApiSchemaRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; schema?: Schema | null; } export interface PlatformApiSettingRelations { - api?: PlatformApis | null; -} -export interface PlatformApisRelations { - platformApiSettingByApiId?: PlatformApiSetting | null; - platformCorsSettingByApiId?: PlatformCorsSetting | null; - platformApiSchemasByApiId?: ConnectionResult; + api?: PlatformApi | null; } export interface PlatformCorsSettingRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; } export interface PlatformDomainRelations { platformDomainEventsByDomainId?: ConnectionResult; @@ -1924,6 +2086,17 @@ export interface PlatformDomainVerificationRelations { domain?: PlatformDomain | null; managedDomain?: PlatformManagedDomain | null; } +export interface PlatformEmailIdentityRelations { + providerAccount?: PlatformEmailProviderAccount | null; + platformEmailSiteIdentitiesByEmailIdentityId?: ConnectionResult; +} +export interface PlatformEmailProviderAccountRelations { + platformEmailIdentitiesByProviderAccountId?: ConnectionResult; +} +export interface PlatformEmailSiteIdentityRelations { + emailIdentity?: PlatformEmailIdentity | null; + site?: PlatformSite | null; +} export interface PlatformManagedDomainRelations { platformDomainEventsByManagedDomainId?: ConnectionResult; platformDomainVerificationsByManagedDomainId?: ConnectionResult; @@ -1935,6 +2108,7 @@ export interface PlatformSiteAppLinkRelations { site?: PlatformSite | null; } export interface PlatformSiteRelations { + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentity | null; platformSiteMetadatumBySiteId?: PlatformSiteMetadatum | null; platformSiteWebConfigBySiteId?: PlatformSiteWebConfig | null; platformPagesBySiteId?: ConnectionResult; @@ -2014,6 +2188,7 @@ export interface SiteAppLinkRelations { site?: Site | null; } export interface SiteRelations { + emailSiteIdentity?: EmailSiteIdentity | null; siteMetadatum?: SiteMetadatum | null; siteWebConfig?: SiteWebConfig | null; pages?: ConnectionResult; @@ -2048,7 +2223,6 @@ export interface SpatialRelationRelations { refTable?: Table | null; table?: Table | null; } -export interface SqlActionRelations {} export interface TableBehaviorRelations { database?: Database | null; table?: Table | null; @@ -2139,10 +2313,11 @@ export interface WebauthnSettingRelations { userField?: Field | null; } // ============ Entity Types With Relations ============ +export type ApiWithRelations = Api & ApiRelations; export type ApiSchemaWithRelations = ApiSchema & ApiSchemaRelations; export type ApiSettingWithRelations = ApiSetting & ApiSettingRelations; -export type ApisWithRelations = Apis & ApisRelations; -export type AstMigrationWithRelations = AstMigration & AstMigrationRelations; +export type AppComponentWithRelations = AppComponent & AppComponentRelations; +export type AppWithRelations = App & AppRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type CompositeTypeWithRelations = CompositeType & CompositeTypeRelations; export type CorsSettingWithRelations = CorsSetting & CorsSettingRelations; @@ -2155,6 +2330,10 @@ export type DomainWithRelations = Domain & DomainRelations; export type DomainEventWithRelations = DomainEvent & DomainEventRelations; export type DomainTypeWithRelations = DomainType & DomainTypeRelations; export type DomainVerificationWithRelations = DomainVerification & DomainVerificationRelations; +export type EmailIdentityWithRelations = EmailIdentity & EmailIdentityRelations; +export type EmailProviderAccountWithRelations = EmailProviderAccount & + EmailProviderAccountRelations; +export type EmailSiteIdentityWithRelations = EmailSiteIdentity & EmailSiteIdentityRelations; export type EmbeddingChunkWithRelations = EmbeddingChunk & EmbeddingChunkRelations; export type EnumWithRelations = Enum & EnumRelations; export type ExclusionConstraintWithRelations = ExclusionConstraint & ExclusionConstraintRelations; @@ -2173,14 +2352,20 @@ export type ManagedDomainWithRelations = ManagedDomain & ManagedDomainRelations; export type NodeTypeRegistryWithRelations = NodeTypeRegistry & NodeTypeRegistryRelations; export type PageWithRelations = Page & PageRelations; export type PartitionWithRelations = Partition & PartitionRelations; +export type PlatformApiWithRelations = PlatformApi & PlatformApiRelations; export type PlatformApiSchemaWithRelations = PlatformApiSchema & PlatformApiSchemaRelations; export type PlatformApiSettingWithRelations = PlatformApiSetting & PlatformApiSettingRelations; -export type PlatformApisWithRelations = PlatformApis & PlatformApisRelations; export type PlatformCorsSettingWithRelations = PlatformCorsSetting & PlatformCorsSettingRelations; export type PlatformDomainWithRelations = PlatformDomain & PlatformDomainRelations; export type PlatformDomainEventWithRelations = PlatformDomainEvent & PlatformDomainEventRelations; export type PlatformDomainVerificationWithRelations = PlatformDomainVerification & PlatformDomainVerificationRelations; +export type PlatformEmailIdentityWithRelations = PlatformEmailIdentity & + PlatformEmailIdentityRelations; +export type PlatformEmailProviderAccountWithRelations = PlatformEmailProviderAccount & + PlatformEmailProviderAccountRelations; +export type PlatformEmailSiteIdentityWithRelations = PlatformEmailSiteIdentity & + PlatformEmailSiteIdentityRelations; export type PlatformManagedDomainWithRelations = PlatformManagedDomain & PlatformManagedDomainRelations; export type PlatformPageWithRelations = PlatformPage & PlatformPageRelations; @@ -2214,7 +2399,6 @@ export type SiteModuleWithRelations = SiteModule & SiteModuleRelations; export type SiteThemeWithRelations = SiteTheme & SiteThemeRelations; export type SiteWebConfigWithRelations = SiteWebConfig & SiteWebConfigRelations; export type SpatialRelationWithRelations = SpatialRelation & SpatialRelationRelations; -export type SqlActionWithRelations = SqlAction & SqlActionRelations; export type TableBehaviorWithRelations = TableBehavior & TableBehaviorRelations; export type TableWithRelations = Table & TableRelations; export type TableGrantWithRelations = TableGrant & TableGrantRelations; @@ -2230,6 +2414,33 @@ export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type WebauthnSettingWithRelations = WebauthnSetting & WebauthnSettingRelations; // ============ Entity Select Types ============ +export type ApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + databaseId?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + apiSetting?: { + select: ApiSettingSelect; + }; + apiSchemas?: { + select: ApiSchemaSelect; + first?: number; + filter?: ApiSchemaFilter; + orderBy?: ApiSchemaOrderBy[]; + }; + corsSettings?: { + select: CorsSettingSelect; + first?: number; + filter?: CorsSettingFilter; + orderBy?: CorsSettingOrderBy[]; + }; +}; export type ApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -2238,7 +2449,7 @@ export type ApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; schema?: { select: SchemaSelect; @@ -2265,50 +2476,42 @@ export type ApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; -export type ApisSelect = { - anonRole?: boolean; +export type AppComponentSelect = { + appId?: boolean; + componentApiId?: boolean; + componentDomainId?: boolean; + componentInstallationId?: boolean; + componentSiteId?: boolean; + componentType?: boolean; config?: boolean; createdAt?: boolean; databaseId?: boolean; - dbname?: boolean; id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; updatedAt?: boolean; - apiSettingByApiId?: { - select: ApiSettingSelect; - }; - apiSchemasByApiId?: { - select: ApiSchemaSelect; - first?: number; - filter?: ApiSchemaFilter; - orderBy?: ApiSchemaOrderBy[]; - }; - corsSettingsByApiId?: { - select: CorsSettingSelect; - first?: number; - filter?: CorsSettingFilter; - orderBy?: CorsSettingOrderBy[]; + app?: { + select: AppSelect; }; }; -export type AstMigrationSelect = { - actionId?: boolean; - actionName?: boolean; - actorId?: boolean; +export type AppSelect = { + config?: boolean; createdAt?: boolean; databaseId?: boolean; - deploy?: boolean; - deploys?: boolean; + description?: boolean; id?: boolean; + isPublished?: boolean; name?: boolean; - payload?: boolean; - requires?: boolean; - revert?: boolean; - verify?: boolean; + status?: boolean; + title?: boolean; + updatedAt?: boolean; + appComponents?: { + select: AppComponentSelect; + first?: number; + filter?: AppComponentFilter; + orderBy?: AppComponentOrderBy[]; + }; }; export type CheckConstraintSelect = { category?: boolean; @@ -2358,7 +2561,7 @@ export type CorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; export type DatabaseSelect = { @@ -2759,6 +2962,68 @@ export type DomainVerificationSelect = { select: ManagedDomainSelect; }; }; +export type EmailIdentitySelect = { + createdAt?: boolean; + databaseId?: boolean; + fromAddress?: boolean; + fromName?: boolean; + id?: boolean; + isActive?: boolean; + isDefault?: boolean; + name?: boolean; + providerAccountId?: boolean; + replyToAddress?: boolean; + supportAddress?: boolean; + transportMode?: boolean; + updatedAt?: boolean; + providerAccount?: { + select: EmailProviderAccountSelect; + }; + emailSiteIdentities?: { + select: EmailSiteIdentitySelect; + first?: number; + filter?: EmailSiteIdentityFilter; + orderBy?: EmailSiteIdentityOrderBy[]; + }; +}; +export type EmailProviderAccountSelect = { + apiBaseUrl?: boolean; + createdAt?: boolean; + credentialsSecretName?: boolean; + databaseId?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + provider?: boolean; + providerAccountName?: boolean; + region?: boolean; + smtpHost?: boolean; + smtpPort?: boolean; + smtpSecure?: boolean; + smtpUser?: boolean; + updatedAt?: boolean; + webhookSigningSecretName?: boolean; + emailIdentitiesByProviderAccountId?: { + select: EmailIdentitySelect; + first?: number; + filter?: EmailIdentityFilter; + orderBy?: EmailIdentityOrderBy[]; + }; +}; +export type EmailSiteIdentitySelect = { + createdAt?: boolean; + databaseId?: boolean; + emailIdentityId?: boolean; + id?: boolean; + siteId?: boolean; + updatedAt?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + site?: { + select: SiteSelect; + }; +}; export type EmbeddingChunkSelect = { chunkOverlap?: boolean; chunkSize?: boolean; @@ -3135,6 +3400,29 @@ export type PartitionSelect = { select: TableSelect; }; }; +export type PlatformApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + platformApiSettingByApiId?: { + select: PlatformApiSettingSelect; + }; + platformCorsSettingByApiId?: { + select: PlatformCorsSettingSelect; + }; + platformApiSchemasByApiId?: { + select: PlatformApiSchemaSelect; + first?: number; + filter?: PlatformApiSchemaFilter; + orderBy?: PlatformApiSchemaOrderBy[]; + }; +}; export type PlatformApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -3142,7 +3430,7 @@ export type PlatformApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; schema?: { select: SchemaSelect; @@ -3168,40 +3456,17 @@ export type PlatformApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; }; -export type PlatformApisSelect = { - anonRole?: boolean; - config?: boolean; +export type PlatformCorsSettingSelect = { + allowedOrigins?: boolean; + apiId?: boolean; createdAt?: boolean; - dbname?: boolean; id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; updatedAt?: boolean; - platformApiSettingByApiId?: { - select: PlatformApiSettingSelect; - }; - platformCorsSettingByApiId?: { - select: PlatformCorsSettingSelect; - }; - platformApiSchemasByApiId?: { - select: PlatformApiSchemaSelect; - first?: number; - filter?: PlatformApiSchemaFilter; - orderBy?: PlatformApiSchemaOrderBy[]; - }; -}; -export type PlatformCorsSettingSelect = { - allowedOrigins?: boolean; - apiId?: boolean; - createdAt?: boolean; - id?: boolean; - updatedAt?: boolean; - api?: { - select: PlatformApisSelect; + api?: { + select: PlatformApiSelect; }; }; export type PlatformDomainSelect = { @@ -3276,6 +3541,65 @@ export type PlatformDomainVerificationSelect = { select: PlatformManagedDomainSelect; }; }; +export type PlatformEmailIdentitySelect = { + createdAt?: boolean; + fromAddress?: boolean; + fromName?: boolean; + id?: boolean; + isActive?: boolean; + isDefault?: boolean; + name?: boolean; + providerAccountId?: boolean; + replyToAddress?: boolean; + supportAddress?: boolean; + transportMode?: boolean; + updatedAt?: boolean; + providerAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailSiteIdentitiesByEmailIdentityId?: { + select: PlatformEmailSiteIdentitySelect; + first?: number; + filter?: PlatformEmailSiteIdentityFilter; + orderBy?: PlatformEmailSiteIdentityOrderBy[]; + }; +}; +export type PlatformEmailProviderAccountSelect = { + apiBaseUrl?: boolean; + createdAt?: boolean; + credentialsSecretName?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + provider?: boolean; + providerAccountName?: boolean; + region?: boolean; + smtpHost?: boolean; + smtpPort?: boolean; + smtpSecure?: boolean; + smtpUser?: boolean; + updatedAt?: boolean; + webhookSigningSecretName?: boolean; + platformEmailIdentitiesByProviderAccountId?: { + select: PlatformEmailIdentitySelect; + first?: number; + filter?: PlatformEmailIdentityFilter; + orderBy?: PlatformEmailIdentityOrderBy[]; + }; +}; +export type PlatformEmailSiteIdentitySelect = { + createdAt?: boolean; + emailIdentityId?: boolean; + id?: boolean; + siteId?: boolean; + updatedAt?: boolean; + emailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + site?: { + select: PlatformSiteSelect; + }; +}; export type PlatformManagedDomainSelect = { allowPublicUsage?: boolean; annotations?: boolean; @@ -3344,6 +3668,9 @@ export type PlatformSiteSelect = { resourceId?: boolean; title?: boolean; updatedAt?: boolean; + platformEmailSiteIdentityBySiteId?: { + select: PlatformEmailSiteIdentitySelect; + }; platformSiteMetadatumBySiteId?: { select: PlatformSiteMetadatumSelect; }; @@ -3748,6 +4075,9 @@ export type SiteSelect = { resourceId?: boolean; title?: boolean; updatedAt?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; siteMetadatum?: { select: SiteMetadatumSelect; }; @@ -3911,21 +4241,6 @@ export type SpatialRelationSelect = { select: TableSelect; }; }; -export type SqlActionSelect = { - actionId?: boolean; - actionName?: boolean; - actorId?: boolean; - content?: boolean; - createdAt?: boolean; - databaseId?: boolean; - deploy?: boolean; - deps?: boolean; - id?: boolean; - name?: boolean; - payload?: boolean; - revert?: boolean; - verify?: boolean; -}; export type TableBehaviorSelect = { createdAt?: boolean; databaseId?: boolean; @@ -4365,11 +4680,51 @@ export type WebauthnSettingSelect = { }; }; // ============ Table Filter Types ============ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4393,7 +4748,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4437,79 +4792,69 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface ApisFilter { +export interface AppComponentFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + and?: AppComponentFilter[]; + /** Filter by the object’s `app` relation. */ + app?: AppFilter; + /** Filter by the object’s `appId` field. */ + appId?: UUIDFilter; + /** Filter by the object’s `componentApiId` field. */ + componentApiId?: UUIDFilter; + /** Filter by the object’s `componentDomainId` field. */ + componentDomainId?: UUIDFilter; + /** Filter by the object’s `componentInstallationId` field. */ + componentInstallationId?: UUIDFilter; + /** Filter by the object’s `componentSiteId` field. */ + componentSiteId?: UUIDFilter; + /** Filter by the object’s `componentType` field. */ + componentType?: StringFilter; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: AppComponentFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; + or?: AppComponentFilter[]; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface AstMigrationFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; +export interface AppFilter { /** Checks for all expressions in this list. */ - and?: AstMigrationFilter[]; + and?: AppFilter[]; + /** Filter by the object’s `appComponents` relation. */ + appComponents?: AppToManyAppComponentFilter; + /** `appComponents` exist. */ + appComponentsExist?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: JSONFilter; - /** Filter by the object’s `deploys` field. */ - deploys?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; /** Filter by the object’s `id` field. */ - id?: IntFilter; + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AstMigrationFilter; + not?: AppFilter; /** Checks for any expressions in this list. */ - or?: AstMigrationFilter[]; - /** Filter by the object’s `payload` field. */ - payload?: JSONFilter; - /** Filter by the object’s `requires` field. */ - requires?: StringListFilter; - /** Filter by the object’s `revert` field. */ - revert?: JSONFilter; - /** Filter by the object’s `verify` field. */ - verify?: JSONFilter; + or?: AppFilter[]; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } export interface CheckConstraintFilter { /** Checks for all expressions in this list. */ @@ -4589,7 +4934,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5093,6 +5438,116 @@ export interface DomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } +export interface EmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentities` relation. */ + emailSiteIdentities?: EmailIdentityToManyEmailSiteIdentityFilter; + /** `emailSiteIdentities` exist. */ + emailSiteIdentitiesExist?: boolean; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailIdentityFilter[]; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: EmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface EmailProviderAccountFilter { + /** Checks for all expressions in this list. */ + and?: EmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesByProviderAccountId` relation. */ + emailIdentitiesByProviderAccountId?: EmailProviderAccountToManyEmailIdentityFilter; + /** `emailIdentitiesByProviderAccountId` exist. */ + emailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: EmailProviderAccountFilter[]; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +export interface EmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: EmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ and?: EmbeddingChunkFilter[]; @@ -5727,11 +6182,49 @@ export interface PartitionFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5753,7 +6246,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5795,51 +6288,13 @@ export interface PlatformApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface PlatformCorsSettingFilter { /** Filter by the object’s `allowedOrigins` field. */ allowedOrigins?: StringListFilter; /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5985,50 +6440,154 @@ export interface PlatformDomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } -export interface PlatformManagedDomainFilter { - /** Filter by the object’s `allowPublicUsage` field. */ - allowPublicUsage?: BooleanFilter; +export interface PlatformEmailIdentityFilter { /** Checks for all expressions in this list. */ - and?: PlatformManagedDomainFilter[]; - /** Filter by the object’s `annotations` field. */ - annotations?: JSONFilter; - /** Filter by the object’s `certStatus` field. */ - certStatus?: StringFilter; + and?: PlatformEmailIdentityFilter[]; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: PlatformManagedDomainFilter; + not?: PlatformEmailIdentityFilter; /** Checks for any expressions in this list. */ - or?: PlatformManagedDomainFilter[]; - /** Filter by the object’s `platformDomainEventsByManagedDomainId` relation. */ - platformDomainEventsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainEventFilter; - /** `platformDomainEventsByManagedDomainId` exist. */ - platformDomainEventsByManagedDomainIdExist?: boolean; - /** Filter by the object’s `platformDomainVerificationsByManagedDomainId` relation. */ - platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; - /** `platformDomainVerificationsByManagedDomainId` exist. */ - platformDomainVerificationsByManagedDomainIdExist?: boolean; - /** Filter by the object’s `tlsReadyAt` field. */ - tlsReadyAt?: DatetimeFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; + or?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. */ + platformEmailSiteIdentitiesByEmailIdentityId?: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter; + /** `platformEmailSiteIdentitiesByEmailIdentityId` exist. */ + platformEmailSiteIdentitiesByEmailIdentityIdExist?: boolean; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: PlatformEmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; } -export interface PlatformPageFilter { +export interface PlatformEmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: PlatformPageFilter[]; - /** Filter by the object’s `commitId` field. */ + and?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailProviderAccountFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. */ + platformEmailIdentitiesByProviderAccountId?: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter; + /** `platformEmailIdentitiesByProviderAccountId` exist. */ + platformEmailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; +} +export interface PlatformEmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: PlatformEmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformEmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: PlatformSiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface PlatformManagedDomainFilter { + /** Filter by the object’s `allowPublicUsage` field. */ + allowPublicUsage?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: PlatformManagedDomainFilter[]; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `certStatus` field. */ + certStatus?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isWildcard` field. */ + isWildcard?: BooleanFilter; + /** Negates the expression. */ + not?: PlatformManagedDomainFilter; + /** Checks for any expressions in this list. */ + or?: PlatformManagedDomainFilter[]; + /** Filter by the object’s `platformDomainEventsByManagedDomainId` relation. */ + platformDomainEventsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainEventFilter; + /** `platformDomainEventsByManagedDomainId` exist. */ + platformDomainEventsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `platformDomainVerificationsByManagedDomainId` relation. */ + platformDomainVerificationsByManagedDomainId?: PlatformManagedDomainToManyPlatformDomainVerificationFilter; + /** `platformDomainVerificationsByManagedDomainId` exist. */ + platformDomainVerificationsByManagedDomainIdExist?: boolean; + /** Filter by the object’s `tlsReadyAt` field. */ + tlsReadyAt?: DatetimeFilter; + /** Filter by the object’s `tlsStatus` field. */ + tlsStatus?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +export interface PlatformPageFilter { + /** Checks for all expressions in this list. */ + and?: PlatformPageFilter[]; + /** Filter by the object’s `commitId` field. */ commitId?: UUIDFilter; /** Filter by the object’s `content` field. */ content?: JSONFilter; @@ -6108,6 +6667,10 @@ export interface PlatformSiteFilter { not?: PlatformSiteFilter; /** Checks for any expressions in this list. */ or?: PlatformSiteFilter[]; + /** Filter by the object’s `platformEmailSiteIdentityBySiteId` relation. */ + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentityFilter; + /** A related `platformEmailSiteIdentityBySiteId` exists. */ + platformEmailSiteIdentityBySiteIdExists?: boolean; /** Filter by the object’s `platformPagesBySiteId` relation. */ platformPagesBySiteId?: PlatformSiteToManyPlatformPageFilter; /** `platformPagesBySiteId` exist. */ @@ -6742,6 +7305,10 @@ export interface SiteFilter { databaseId?: UUIDFilter; /** Filter by the object’s `description` field. */ description?: StringFilter; + /** Filter by the object’s `emailSiteIdentity` relation. */ + emailSiteIdentity?: EmailSiteIdentityFilter; + /** A related `emailSiteIdentity` exists. */ + emailSiteIdentityExists?: boolean; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `installationId` field. */ @@ -7017,38 +7584,6 @@ export interface SpatialRelationFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface SqlActionFilter { - /** Filter by the object’s `actionId` field. */ - actionId?: UUIDFilter; - /** Filter by the object’s `actionName` field. */ - actionName?: StringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: SqlActionFilter[]; - /** Filter by the object’s `content` field. */ - content?: StringFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `deploy` field. */ - deploy?: StringFilter; - /** Filter by the object’s `deps` field. */ - deps?: StringListFilter; - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: SqlActionFilter; - /** Checks for any expressions in this list. */ - or?: SqlActionFilter[]; - /** Filter by the object’s `revert` field. */ - revert?: StringFilter; - /** Filter by the object’s `verify` field. */ - verify?: StringFilter; -} export interface TableBehaviorFilter { /** Checks for all expressions in this list. */ and?: TableBehaviorFilter[]; @@ -7642,6 +8177,30 @@ export interface WebauthnSettingFilter { userFieldId?: UUIDFilter; } // ============ OrderBy Types ============ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -7700,58 +8259,56 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' +export type AppComponentOrderBy = + | 'APP_ID_ASC' + | 'APP_ID_DESC' + | 'COMPONENT_API_ID_ASC' + | 'COMPONENT_API_ID_DESC' + | 'COMPONENT_DOMAIN_ID_ASC' + | 'COMPONENT_DOMAIN_ID_DESC' + | 'COMPONENT_INSTALLATION_ID_ASC' + | 'COMPONENT_INSTALLATION_ID_DESC' + | 'COMPONENT_SITE_ID_ASC' + | 'COMPONENT_SITE_ID_DESC' + | 'COMPONENT_TYPE_ASC' + | 'COMPONENT_TYPE_DESC' | 'CONFIG_ASC' | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' | 'ID_ASC' | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type AstMigrationOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' +export type AppOrderBy = + | 'CONFIG_ASC' + | 'CONFIG_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEPLOYS_ASC' - | 'DEPLOYS_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' | 'ID_ASC' | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REQUIRES_ASC' - | 'REQUIRES_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STATUS_ASC' + | 'STATUS_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type CheckConstraintOrderBy = | 'CATEGORY_ASC' | 'CATEGORY_DESC' @@ -8086,6 +8643,88 @@ export type DomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +export type EmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type EmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +export type EmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type EmbeddingChunkOrderBy = | 'CHUNKING_TASK_NAME_ASC' | 'CHUNKING_TASK_NAME_DESC' @@ -8556,6 +9195,28 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -8610,28 +9271,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' @@ -8736,6 +9375,82 @@ export type PlatformDomainVerificationOrderBy = | 'UPDATED_AT_DESC' | 'VERIFIED_AT_ASC' | 'VERIFIED_AT_DESC'; +export type PlatformEmailIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'FROM_ADDRESS_ASC' + | 'FROM_ADDRESS_DESC' + | 'FROM_NAME_ASC' + | 'FROM_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'IS_DEFAULT_ASC' + | 'IS_DEFAULT_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_ID_ASC' + | 'PROVIDER_ACCOUNT_ID_DESC' + | 'REPLY_TO_ADDRESS_ASC' + | 'REPLY_TO_ADDRESS_DESC' + | 'SUPPORT_ADDRESS_ASC' + | 'SUPPORT_ADDRESS_DESC' + | 'TRANSPORT_MODE_ASC' + | 'TRANSPORT_MODE_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type PlatformEmailProviderAccountOrderBy = + | 'API_BASE_URL_ASC' + | 'API_BASE_URL_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDENTIALS_SECRET_NAME_ASC' + | 'CREDENTIALS_SECRET_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PROVIDER_ACCOUNT_NAME_ASC' + | 'PROVIDER_ACCOUNT_NAME_DESC' + | 'PROVIDER_ASC' + | 'PROVIDER_DESC' + | 'REGION_ASC' + | 'REGION_DESC' + | 'SMTP_HOST_ASC' + | 'SMTP_HOST_DESC' + | 'SMTP_PORT_ASC' + | 'SMTP_PORT_DESC' + | 'SMTP_SECURE_ASC' + | 'SMTP_SECURE_DESC' + | 'SMTP_USER_ASC' + | 'SMTP_USER_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'WEBHOOK_SIGNING_SECRET_NAME_ASC' + | 'WEBHOOK_SIGNING_SECRET_NAME_DESC'; +export type PlatformEmailSiteIdentityOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EMAIL_IDENTITY_ID_ASC' + | 'EMAIL_IDENTITY_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SITE_ID_ASC' + | 'SITE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformManagedDomainOrderBy = | 'ALLOW_PUBLIC_USAGE_ASC' | 'ALLOW_PUBLIC_USAGE_DESC' @@ -9436,34 +10151,6 @@ export type SpatialRelationOrderBy = | 'TAGS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type SqlActionOrderBy = - | 'ACTION_ID_ASC' - | 'ACTION_ID_DESC' - | 'ACTION_NAME_ASC' - | 'ACTION_NAME_DESC' - | 'ACTOR_ID_ASC' - | 'ACTOR_ID_DESC' - | 'CONTENT_ASC' - | 'CONTENT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEPLOY_ASC' - | 'DEPLOY_DESC' - | 'DEPS_ASC' - | 'DEPS_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PAYLOAD_ASC' - | 'PAYLOAD_DESC' - | 'REVERT_ASC' - | 'REVERT_DESC' - | 'VERIFY_ASC' - | 'VERIFY_DESC'; export type TableBehaviorOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -9801,6 +10488,36 @@ export type WebauthnSettingOrderBy = | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; // ============ CRUD Input Types ============ +export interface CreateApiInput { + clientMutationId?: string; + api: { + anonRole?: string; + config?: Record; + databaseId: string; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface ApiPatch { + anonRole?: string | null; + config?: Record | null; + databaseId?: string | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdateApiInput { + clientMutationId?: string; + id: string; + apiPatch: ApiPatch; +} +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface CreateApiSchemaInput { clientMutationId?: string; apiSchema: { @@ -9871,73 +10588,67 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface CreateApisInput { +export interface CreateAppComponentInput { clientMutationId?: string; - apis: { - anonRole?: string; + appComponent: { + appId: string; + componentApiId?: string; + componentDomainId?: string; + componentInstallationId?: string; + componentSiteId?: string; + componentType?: string; config?: Record; databaseId: string; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; }; } -export interface ApisPatch { - anonRole?: string | null; +export interface AppComponentPatch { + appId?: string | null; + componentApiId?: string | null; + componentDomainId?: string | null; + componentInstallationId?: string | null; + componentSiteId?: string | null; + componentType?: string | null; config?: Record | null; databaseId?: string | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; } -export interface UpdateApisInput { +export interface UpdateAppComponentInput { clientMutationId?: string; id: string; - apisPatch: ApisPatch; + appComponentPatch: AppComponentPatch; } -export interface DeleteApisInput { +export interface DeleteAppComponentInput { clientMutationId?: string; id: string; } -export interface CreateAstMigrationInput { +export interface CreateAppInput { clientMutationId?: string; - astMigration: { - actionId: string; - actionName?: string; - actorId: string; + app: { + config?: Record; databaseId: string; - deploy?: Record; - deploys?: string; - name?: string; - payload?: Record; - requires?: string[]; - revert?: Record; - verify?: Record; + description?: string; + isPublished?: boolean; + name: string; + status?: string; + title?: string; }; } -export interface AstMigrationPatch { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; +export interface AppPatch { + config?: Record | null; databaseId?: string | null; - deploy?: Record | null; - deploys?: string | null; + description?: string | null; + isPublished?: boolean | null; name?: string | null; - payload?: Record | null; - requires?: string[] | null; - revert?: Record | null; - verify?: Record | null; + status?: string | null; + title?: string | null; } -export interface UpdateAstMigrationInput { +export interface UpdateAppInput { clientMutationId?: string; - id: number; - astMigrationPatch: AstMigrationPatch; + id: string; + appPatch: AppPatch; } -export interface DeleteAstMigrationInput { +export interface DeleteAppInput { clientMutationId?: string; - id: number; + id: string; } export interface CreateCheckConstraintInput { clientMutationId?: string; @@ -10357,6 +11068,106 @@ export interface DeleteDomainVerificationInput { clientMutationId?: string; id: string; } +export interface CreateEmailIdentityInput { + clientMutationId?: string; + emailIdentity: { + databaseId: string; + fromAddress: string; + fromName?: string; + isActive?: boolean; + isDefault?: boolean; + name: string; + providerAccountId?: string; + replyToAddress?: string; + supportAddress?: string; + transportMode?: string; + }; +} +export interface EmailIdentityPatch { + databaseId?: string | null; + fromAddress?: string | null; + fromName?: string | null; + isActive?: boolean | null; + isDefault?: boolean | null; + name?: string | null; + providerAccountId?: string | null; + replyToAddress?: string | null; + supportAddress?: string | null; + transportMode?: string | null; +} +export interface UpdateEmailIdentityInput { + clientMutationId?: string; + id: string; + emailIdentityPatch: EmailIdentityPatch; +} +export interface DeleteEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface CreateEmailProviderAccountInput { + clientMutationId?: string; + emailProviderAccount: { + apiBaseUrl?: string; + credentialsSecretName: string; + databaseId: string; + isActive?: boolean; + name: string; + provider: string; + providerAccountName?: string; + region?: string; + smtpHost?: string; + smtpPort?: number; + smtpSecure?: boolean; + smtpUser?: string; + webhookSigningSecretName?: string; + }; +} +export interface EmailProviderAccountPatch { + apiBaseUrl?: string | null; + credentialsSecretName?: string | null; + databaseId?: string | null; + isActive?: boolean | null; + name?: string | null; + provider?: string | null; + providerAccountName?: string | null; + region?: string | null; + smtpHost?: string | null; + smtpPort?: number | null; + smtpSecure?: boolean | null; + smtpUser?: string | null; + webhookSigningSecretName?: string | null; +} +export interface UpdateEmailProviderAccountInput { + clientMutationId?: string; + id: string; + emailProviderAccountPatch: EmailProviderAccountPatch; +} +export interface DeleteEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface CreateEmailSiteIdentityInput { + clientMutationId?: string; + emailSiteIdentity: { + databaseId: string; + emailIdentityId: string; + siteId: string; + }; +} +export interface EmailSiteIdentityPatch { + databaseId?: string | null; + emailIdentityId?: string | null; + siteId?: string | null; +} +export interface UpdateEmailSiteIdentityInput { + clientMutationId?: string; + id: string; + emailSiteIdentityPatch: EmailSiteIdentityPatch; +} +export interface DeleteEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface CreateEmbeddingChunkInput { clientMutationId?: string; embeddingChunk: { @@ -10939,6 +11750,34 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + platformApi: { + anonRole?: string; + config?: Record; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface PlatformApiPatch { + anonRole?: string | null; + config?: Record | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + platformApiPatch: PlatformApiPatch; +} +export interface DeletePlatformApiInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; platformApiSchema: { @@ -11005,34 +11844,6 @@ export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - platformApis: { - anonRole?: string; - config?: Record; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface PlatformApisPatch { - anonRole?: string | null; - config?: Record | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - platformApisPatch: PlatformApisPatch; -} -export interface DeletePlatformApisInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; platformCorsSetting: { @@ -11161,6 +11972,100 @@ export interface DeletePlatformDomainVerificationInput { clientMutationId?: string; id: string; } +export interface CreatePlatformEmailIdentityInput { + clientMutationId?: string; + platformEmailIdentity: { + fromAddress: string; + fromName?: string; + isActive?: boolean; + isDefault?: boolean; + name: string; + providerAccountId?: string; + replyToAddress?: string; + supportAddress?: string; + transportMode?: string; + }; +} +export interface PlatformEmailIdentityPatch { + fromAddress?: string | null; + fromName?: string | null; + isActive?: boolean | null; + isDefault?: boolean | null; + name?: string | null; + providerAccountId?: string | null; + replyToAddress?: string | null; + supportAddress?: string | null; + transportMode?: string | null; +} +export interface UpdatePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; + platformEmailIdentityPatch: PlatformEmailIdentityPatch; +} +export interface DeletePlatformEmailIdentityInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlatformEmailProviderAccountInput { + clientMutationId?: string; + platformEmailProviderAccount: { + apiBaseUrl?: string; + credentialsSecretName: string; + isActive?: boolean; + name: string; + provider: string; + providerAccountName?: string; + region?: string; + smtpHost?: string; + smtpPort?: number; + smtpSecure?: boolean; + smtpUser?: string; + webhookSigningSecretName?: string; + }; +} +export interface PlatformEmailProviderAccountPatch { + apiBaseUrl?: string | null; + credentialsSecretName?: string | null; + isActive?: boolean | null; + name?: string | null; + provider?: string | null; + providerAccountName?: string | null; + region?: string | null; + smtpHost?: string | null; + smtpPort?: number | null; + smtpSecure?: boolean | null; + smtpUser?: string | null; + webhookSigningSecretName?: string | null; +} +export interface UpdatePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; + platformEmailProviderAccountPatch: PlatformEmailProviderAccountPatch; +} +export interface DeletePlatformEmailProviderAccountInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + platformEmailSiteIdentity: { + emailIdentityId: string; + siteId: string; + }; +} +export interface PlatformEmailSiteIdentityPatch { + emailIdentityId?: string | null; + siteId?: string | null; +} +export interface UpdatePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; + platformEmailSiteIdentityPatch: PlatformEmailSiteIdentityPatch; +} +export interface DeletePlatformEmailSiteIdentityInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformManagedDomainInput { clientMutationId?: string; platformManagedDomain: { @@ -12033,44 +12938,6 @@ export interface DeleteSpatialRelationInput { clientMutationId?: string; id: string; } -export interface CreateSqlActionInput { - clientMutationId?: string; - sqlAction: { - actionId: string; - actionName?: string; - actorId: string; - content?: string; - databaseId: string; - deploy?: string; - deps?: string[]; - name?: string; - payload?: Record; - revert?: string; - verify?: string; - }; -} -export interface SqlActionPatch { - actionId?: string | null; - actionName?: string | null; - actorId?: string | null; - content?: string | null; - databaseId?: string | null; - deploy?: string | null; - deps?: string[] | null; - name?: string | null; - payload?: Record | null; - revert?: string | null; - verify?: string | null; -} -export interface UpdateSqlActionInput { - clientMutationId?: string; - id: number; - sqlActionPatch: SqlActionPatch; -} -export interface DeleteSqlActionInput { - clientMutationId?: string; - id: number; -} export interface CreateTableBehaviorInput { clientMutationId?: string; tableBehavior: { @@ -12503,9 +13370,12 @@ export interface DeleteWebauthnSettingInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - Apis: { - apiSchemasByApiId: 'ApiSchema', - corsSettingsByApiId: 'CorsSetting', + Api: { + apiSchemas: 'ApiSchema', + corsSettings: 'CorsSetting', + }, + App: { + appComponents: 'AppComponent', }, Database: { checkConstraints: 'CheckConstraint', @@ -12549,6 +13419,12 @@ export const connectionFieldsMap = { httpRoutes: 'HttpRoute', routes: 'Route', }, + EmailIdentity: { + emailSiteIdentities: 'EmailSiteIdentity', + }, + EmailProviderAccount: { + emailIdentitiesByProviderAccountId: 'EmailIdentity', + }, Field: { embeddingChunksByEmbeddingFieldId: 'EmbeddingChunk', embeddingChunksByParentFkFieldId: 'EmbeddingChunk', @@ -12564,13 +13440,19 @@ export const connectionFieldsMap = { domainEvents: 'DomainEvent', domainVerifications: 'DomainVerification', }, - PlatformApis: { + PlatformApi: { platformApiSchemasByApiId: 'PlatformApiSchema', }, PlatformDomain: { platformDomainEventsByDomainId: 'PlatformDomainEvent', platformDomainVerificationsByDomainId: 'PlatformDomainVerification', }, + PlatformEmailIdentity: { + platformEmailSiteIdentitiesByEmailIdentityId: 'PlatformEmailSiteIdentity', + }, + PlatformEmailProviderAccount: { + platformEmailIdentitiesByProviderAccountId: 'PlatformEmailIdentity', + }, PlatformManagedDomain: { platformDomainEventsByManagedDomainId: 'PlatformDomainEvent', platformDomainVerificationsByManagedDomainId: 'PlatformDomainVerification', @@ -12638,10 +13520,6 @@ export const connectionFieldsMap = { }, } as Record>; // ============ Custom Input Types (from schema) ============ -export interface AcceptDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} export interface ApplyRlsInput { clientMutationId?: string; fieldIds?: string[]; @@ -12652,9 +13530,28 @@ export interface ApplyRlsInput { tableId?: string; vars?: Record; } -export interface CancelDatabaseTransferInput { +export interface AppsInstallAppInput { + apex?: string; + clientMutationId?: string; + config?: Record; + definitionIds?: string[]; + hostname?: string; + label?: string; + name?: string; + namespaceId?: string; + params?: Record; + routePath?: string; + slug?: string; + title?: string; +} +export interface AppsUninstallAppInput { clientMutationId?: string; - transferId?: string; + targetAppId?: string; +} +export interface AppsUpgradeAppInput { + clientMutationId?: string; + newParams?: Record; + targetAppId?: string; } export interface DomainsAssignSubdomainInput { apex?: string; @@ -12686,10 +13583,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface RejectDatabaseTransferInput { - clientMutationId?: string; - transferId?: string; -} export interface RequestDatabaseInput { clientMutationId?: string; databaseName?: string; @@ -12713,7 +13606,7 @@ export interface SitesProvisionStaticSiteInput { siteConfig?: Record; } /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -12722,7 +13615,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -12730,6 +13623,15 @@ export interface ApisToManyCorsSettingFilter { /** Filters to entities where at least one related entity matches. */ some?: CorsSettingFilter; } +/** A filter to be used against many `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppToManyAppComponentFilter { + /** Filters to entities where every related entity matches. */ + every?: AppComponentFilter; + /** Filters to entities where no related entity matches. */ + none?: AppComponentFilter; + /** Filters to entities where at least one related entity matches. */ + some?: AppComponentFilter; +} /** A filter to be used against ObjectCategory fields. All fields are combined with a logical ‘and.’ */ export interface ObjectCategoryFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -13097,6 +13999,24 @@ export interface DomainToManyRouteFilter { /** Filters to entities where at least one related entity matches. */ some?: RouteFilter; } +/** A filter to be used against many `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityToManyEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSiteIdentityFilter; +} +/** A filter to be used against many `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountToManyEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailIdentityFilter; +} /** A filter to be used against many `EmbeddingChunk` object types. All fields are combined with a logical ‘and.’ */ export interface FieldToManyEmbeddingChunkFilter { /** Filters to entities where every related entity matches. */ @@ -13161,7 +14081,7 @@ export interface ManagedDomainToManyDomainVerificationFilter { some?: DomainVerificationFilter; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -13187,6 +14107,24 @@ export interface PlatformDomainToManyPlatformDomainVerificationFilter { /** Filters to entities where at least one related entity matches. */ some?: PlatformDomainVerificationFilter; } +/** A filter to be used against many `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailSiteIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailSiteIdentityFilter; +} +/** A filter to be used against many `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter { + /** Filters to entities where every related entity matches. */ + every?: PlatformEmailIdentityFilter; + /** Filters to entities where no related entity matches. */ + none?: PlatformEmailIdentityFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlatformEmailIdentityFilter; +} /** A filter to be used against many `PlatformDomainEvent` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformManagedDomainToManyPlatformDomainEventFilter { /** Filters to entities where every related entity matches. */ @@ -13670,20 +14608,40 @@ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ some?: ViewTableFilter; } -/** An input for mutations affecting `ApiSchema` */ -export interface ApiSchemaInput { - /** API surface that exposes this schema */ - apiId: string; +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; + /** Database this API surface serves */ + dbname?: string; id?: string; - /** Metaschema schema exposed through the API surface */ - schemaId: string; - updatedAt?: string; -} -/** An input for mutations affecting `ApiSetting` */ -export interface ApiSettingInput { + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** An input for mutations affecting `ApiSchema` */ +export interface ApiSchemaInput { + /** API surface that exposes this schema */ + apiId: string; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Metaschema schema exposed through the API surface */ + schemaId: string; + updatedAt?: string; +} +/** An input for mutations affecting `ApiSetting` */ +export interface ApiSettingInput { /** API surface these settings override for */ apiId: string; createdAt?: string; @@ -13720,24 +14678,46 @@ export interface ApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ +/** An input for mutations affecting `AppComponent` */ +export interface AppComponentInput { + /** App this component belongs to */ + appId: string; + /** Typed catalog api row of the component surface; must be owner-matched or visible cross-scope */ + componentApiId?: string; + /** Typed catalog domain row of the component surface; must be owner-matched or visible cross-scope */ + componentDomainId?: string; + /** Typed catalog resource installation row of the component release; must be owner-matched or visible cross-scope */ + componentInstallationId?: string; + /** Typed catalog site row of the component surface; must be owner-matched or visible cross-scope */ + componentSiteId?: string; + /** Which kind of catalog row this component binds (api, site, domain, installation) */ + componentType?: string; + /** Component-specific configuration inside this app */ config?: Record; createdAt?: string; /** Database that owns this resource (database-scoped isolation) */ databaseId: string; - /** Database this API surface serves */ - dbname?: string; id?: string; - /** Whether other scopes may see and route to this API surface */ + updatedAt?: string; +} +/** An input for mutations affecting `App` */ +export interface AppInput { + /** Module-specific configuration for this app */ + config?: Record; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Human-readable app description */ + description?: string; + id?: string; + /** Whether other scopes may see and reference this app */ isPublished?: boolean; - /** Owner-local API surface name */ + /** Owner-local app name */ name: string; - /** Authenticated role the API executes as */ - roleName?: string; + /** App lifecycle status: active, suspended, archived */ + status?: string; + /** Human-readable app title */ + title?: string; updatedAt?: string; } /** An input for mutations affecting `CheckConstraint` */ @@ -13972,6 +14952,76 @@ export interface DomainVerificationInput { /** When this challenge succeeded */ verifiedAt?: string; } +/** An input for mutations affecting `EmailIdentity` */ +export interface EmailIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** An input for mutations affecting `EmailProviderAccount` */ +export interface EmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** An input for mutations affecting `EmailSiteIdentity` */ +export interface EmailSiteIdentityInput { + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} /** An input for mutations affecting `EmbeddingChunk` */ export interface EmbeddingChunkInput { chunkOverlap?: number; @@ -14259,6 +15309,24 @@ export interface PartitionInput { tableId: string; updatedAt?: string; } +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformApiSchema` */ export interface PlatformApiSchemaInput { /** API surface that exposes this schema */ @@ -14305,24 +15373,6 @@ export interface PlatformApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `PlatformCorsSetting` */ export interface PlatformCorsSettingInput { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -14411,6 +15461,70 @@ export interface PlatformDomainVerificationInput { /** When this challenge succeeded */ verifiedAt?: string; } +/** An input for mutations affecting `PlatformEmailIdentity` */ +export interface PlatformEmailIdentityInput { + createdAt?: string; + /** Envelope/header From address, lower-case. Must be accepted by the sending account at the provider. */ + fromAddress: string; + /** Display name shown beside the from address */ + fromName?: string; + id?: string; + /** Whether this identity may be resolved for a send */ + isActive?: boolean; + /** The scope default identity, used when no site binding resolves. At most one per scope key. */ + isDefault?: boolean; + /** Operator-facing name for this identity (e.g. transactional, support) */ + name: string; + /** Same-scope provider account this identity sends through. Required for transport_mode = own, NULL for platform_shared. */ + providerAccountId?: string; + /** Reply-To address when replies should not go to the from address */ + replyToAddress?: string; + /** Support address rendered in message bodies and footers */ + supportAddress?: string; + /** own = send through provider_account_id in this scope; platform_shared = send through the platform installation's shared account, an explicit recorded choice and never an implicit fallback */ + transportMode?: string; + updatedAt?: string; +} +/** An input for mutations affecting `PlatformEmailProviderAccount` */ +export interface PlatformEmailProviderAccountInput { + /** Provider API base URL when it is not the provider default (e.g. Mailgun EU) */ + apiBaseUrl?: string; + createdAt?: string; + /** Name of the secret holding this account's API key or SMTP password. The value is resolved from the secret store at send time (realm = this row's id) and is never stored here. */ + credentialsSecretName: string; + id?: string; + /** Whether identities may send through this account. Disabling one row stops every identity that references it. */ + isActive?: boolean; + /** Operator-facing name for this account (e.g. transactional, marketing) */ + name: string; + /** integration_providers.slug of the provider this account is at (mailgun, ses, postmark, smtp), matched by string not by FK */ + provider: string; + /** Account identifier at the provider — the Mailgun sending domain, the SES verified identity, the Postmark server name */ + providerAccountName?: string; + /** Provider region for region-addressed providers (e.g. SES us-east-1) */ + region?: string; + /** SMTP host (provider = smtp, or a provider addressed over SMTP) */ + smtpHost?: string; + /** SMTP port */ + smtpPort?: number; + /** Whether the SMTP connection uses implicit TLS */ + smtpSecure?: boolean; + /** SMTP username; the password is a secret, addressed by credentials_secret_name */ + smtpUser?: string; + updatedAt?: string; + /** Name of the secret used to verify this provider's delivery/bounce webhooks. Name only; the value stays in the secret store. */ + webhookSigningSecretName?: string; +} +/** An input for mutations affecting `PlatformEmailSiteIdentity` */ +export interface PlatformEmailSiteIdentityInput { + createdAt?: string; + /** Identity this site sends as */ + emailIdentityId: string; + id?: string; + /** Site whose mail is sent as the bound identity */ + siteId: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformManagedDomain` */ export interface PlatformManagedDomainInput { /** Whether tenants may claim subdomains under this managed hostname */ @@ -15166,7 +16280,7 @@ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -15193,7 +16307,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -15211,6 +16325,39 @@ export interface CorsSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `AppComponent` object types. All fields are combined with a logical ‘and.’ */ +export interface AppComponentFilter { + /** Checks for all expressions in this list. */ + and?: AppComponentFilter[]; + /** Filter by the object’s `app` relation. */ + app?: AppFilter; + /** Filter by the object’s `appId` field. */ + appId?: UUIDFilter; + /** Filter by the object’s `componentApiId` field. */ + componentApiId?: UUIDFilter; + /** Filter by the object’s `componentDomainId` field. */ + componentDomainId?: UUIDFilter; + /** Filter by the object’s `componentInstallationId` field. */ + componentInstallationId?: UUIDFilter; + /** Filter by the object’s `componentSiteId` field. */ + componentSiteId?: UUIDFilter; + /** Filter by the object’s `componentType` field. */ + componentType?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: AppComponentFilter; + /** Checks for any expressions in this list. */ + or?: AppComponentFilter[]; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { /** Checks for all expressions in this list. */ @@ -16847,12 +17994,80 @@ export interface RouteFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `EmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: EmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `EmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: EmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentities` relation. */ + emailSiteIdentities?: EmailIdentityToManyEmailSiteIdentityFilter; + /** `emailSiteIdentities` exist. */ + emailSiteIdentitiesExist?: boolean; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: EmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: EmailIdentityFilter[]; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: EmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -16958,6 +18173,70 @@ export interface PlatformDomainVerificationFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } +/** A filter to be used against `PlatformEmailSiteIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailSiteIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `emailIdentity` relation. */ + emailIdentity?: PlatformEmailIdentityFilter; + /** Filter by the object’s `emailIdentityId` field. */ + emailIdentityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlatformEmailSiteIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailSiteIdentityFilter[]; + /** Filter by the object’s `site` relation. */ + site?: PlatformSiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `PlatformEmailIdentity` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailIdentityFilter { + /** Checks for all expressions in this list. */ + and?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `fromAddress` field. */ + fromAddress?: StringFilter; + /** Filter by the object’s `fromName` field. */ + fromName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isDefault` field. */ + isDefault?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformEmailIdentityFilter; + /** Checks for any expressions in this list. */ + or?: PlatformEmailIdentityFilter[]; + /** Filter by the object’s `platformEmailSiteIdentitiesByEmailIdentityId` relation. */ + platformEmailSiteIdentitiesByEmailIdentityId?: PlatformEmailIdentityToManyPlatformEmailSiteIdentityFilter; + /** `platformEmailSiteIdentitiesByEmailIdentityId` exist. */ + platformEmailSiteIdentitiesByEmailIdentityIdExist?: boolean; + /** Filter by the object’s `providerAccount` relation. */ + providerAccount?: PlatformEmailProviderAccountFilter; + /** A related `providerAccount` exists. */ + providerAccountExists?: boolean; + /** Filter by the object’s `providerAccountId` field. */ + providerAccountId?: UUIDFilter; + /** Filter by the object’s `replyToAddress` field. */ + replyToAddress?: StringFilter; + /** Filter by the object’s `supportAddress` field. */ + supportAddress?: StringFilter; + /** Filter by the object’s `transportMode` field. */ + transportMode?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformPage` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformPageFilter { /** Checks for all expressions in this list. */ @@ -17302,26 +18581,26 @@ export interface SiteThemeFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; + and?: ApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -17335,9 +18614,9 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: ApiFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; + or?: ApiFilter[]; /** Filter by the object’s `roleName` field. */ roleName?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -17432,71 +18711,216 @@ export interface StringListFilter { /** Overlaps the specified list of values. */ overlaps?: string[]; } -/** A filter to be used against `Database` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseFilter { +/** A filter to be used against `App` object types. All fields are combined with a logical ‘and.’ */ +export interface AppFilter { /** Checks for all expressions in this list. */ - and?: DatabaseFilter[]; - /** Filter by the object’s `checkConstraints` relation. */ - checkConstraints?: DatabaseToManyCheckConstraintFilter; - /** `checkConstraints` exist. */ - checkConstraintsExist?: boolean; - /** Filter by the object’s `compositeTypes` relation. */ - compositeTypes?: DatabaseToManyCompositeTypeFilter; - /** `compositeTypes` exist. */ - compositeTypesExist?: boolean; + and?: AppFilter[]; + /** Filter by the object’s `appComponents` relation. */ + appComponents?: AppToManyAppComponentFilter; + /** `appComponents` exist. */ + appComponentsExist?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseTransfers` relation. */ - databaseTransfers?: DatabaseToManyDatabaseTransferFilter; - /** `databaseTransfers` exist. */ - databaseTransfersExist?: boolean; - /** Filter by the object’s `defaultPrivileges` relation. */ - defaultPrivileges?: DatabaseToManyDefaultPrivilegeFilter; - /** `defaultPrivileges` exist. */ - defaultPrivilegesExist?: boolean; - /** Filter by the object’s `derives` relation. */ - derives?: DatabaseToManyDeriveFilter; - /** `derives` exist. */ - derivesExist?: boolean; - /** Filter by the object’s `domainTypes` relation. */ - domainTypes?: DatabaseToManyDomainTypeFilter; - /** `domainTypes` exist. */ - domainTypesExist?: boolean; - /** Filter by the object’s `embeddingChunks` relation. */ - embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; - /** `embeddingChunks` exist. */ - embeddingChunksExist?: boolean; - /** Filter by the object’s `enums` relation. */ - enums?: DatabaseToManyEnumFilter; - /** `enums` exist. */ - enumsExist?: boolean; - /** Filter by the object’s `exclusionConstraints` relation. */ - exclusionConstraints?: DatabaseToManyExclusionConstraintFilter; - /** `exclusionConstraints` exist. */ - exclusionConstraintsExist?: boolean; - /** Filter by the object’s `fieldBehaviors` relation. */ - fieldBehaviors?: DatabaseToManyFieldBehaviorFilter; - /** `fieldBehaviors` exist. */ - fieldBehaviorsExist?: boolean; - /** Filter by the object’s `fields` relation. */ - fields?: DatabaseToManyFieldFilter; - /** `fields` exist. */ - fieldsExist?: boolean; - /** Filter by the object’s `foreignKeyConstraintBehaviors` relation. */ - foreignKeyConstraintBehaviors?: DatabaseToManyForeignKeyConstraintBehaviorFilter; - /** `foreignKeyConstraintBehaviors` exist. */ - foreignKeyConstraintBehaviorsExist?: boolean; - /** Filter by the object’s `foreignKeyConstraints` relation. */ - foreignKeyConstraints?: DatabaseToManyForeignKeyConstraintFilter; - /** `foreignKeyConstraints` exist. */ - foreignKeyConstraintsExist?: boolean; - /** Filter by the object’s `fullTextSearches` relation. */ - fullTextSearches?: DatabaseToManyFullTextSearchFilter; - /** `fullTextSearches` exist. */ - fullTextSearchesExist?: boolean; - /** Filter by the object’s `functions` relation. */ - functions?: DatabaseToManyFunctionFilter; - /** `functions` exist. */ + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppFilter; + /** Checks for any expressions in this list. */ + or?: AppFilter[]; + /** Filter by the object’s `status` field. */ + status?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ +export interface StringFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ + distinctFromInsensitive?: string; + /** Ends with the specified string (case-sensitive). */ + endsWith?: string; + /** Ends with the specified string (case-insensitive). */ + endsWithInsensitive?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Equal to the specified value (case-insensitive). */ + equalToInsensitive?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than the specified value (case-insensitive). */ + greaterThanInsensitive?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Greater than or equal to the specified value (case-insensitive). */ + greaterThanOrEqualToInsensitive?: string; + /** Included in the specified list. */ + in?: string[]; + /** Included in the specified list (case-insensitive). */ + inInsensitive?: string[]; + /** Contains the specified string (case-sensitive). */ + includes?: string; + /** Contains the specified string (case-insensitive). */ + includesInsensitive?: string; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than the specified value (case-insensitive). */ + lessThanInsensitive?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Less than or equal to the specified value (case-insensitive). */ + lessThanOrEqualToInsensitive?: string; + /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + like?: string; + /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + likeInsensitive?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ + notDistinctFromInsensitive?: string; + /** Does not end with the specified string (case-sensitive). */ + notEndsWith?: string; + /** Does not end with the specified string (case-insensitive). */ + notEndsWithInsensitive?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not equal to the specified value (case-insensitive). */ + notEqualToInsensitive?: string; + /** Not included in the specified list. */ + notIn?: string[]; + /** Not included in the specified list (case-insensitive). */ + notInInsensitive?: string[]; + /** Does not contain the specified string (case-sensitive). */ + notIncludes?: string; + /** Does not contain the specified string (case-insensitive). */ + notIncludesInsensitive?: string; + /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLike?: string; + /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ + notLikeInsensitive?: string; + /** Does not start with the specified string (case-sensitive). */ + notStartsWith?: string; + /** Does not start with the specified string (case-insensitive). */ + notStartsWithInsensitive?: string; + /** Starts with the specified string (case-sensitive). */ + startsWith?: string; + /** Starts with the specified string (case-insensitive). */ + startsWithInsensitive?: string; +} +/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ +export interface JSONFilter { + /** Contained by the specified JSON. */ + containedBy?: Record; + /** Contains the specified JSON. */ + contains?: Record; + /** Contains all of the specified keys. */ + containsAllKeys?: string[]; + /** Contains any of the specified keys. */ + containsAnyKeys?: string[]; + /** Contains the specified key. */ + containsKey?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: Record; + /** Equal to the specified value. */ + equalTo?: Record; + /** Greater than the specified value. */ + greaterThan?: Record; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: Record; + /** Included in the specified list. */ + in?: Record[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: Record; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: Record; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: Record; + /** Not equal to the specified value. */ + notEqualTo?: Record; + /** Not included in the specified list. */ + notIn?: Record[]; +} +/** A filter to be used against `Database` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseFilter { + /** Checks for all expressions in this list. */ + and?: DatabaseFilter[]; + /** Filter by the object’s `checkConstraints` relation. */ + checkConstraints?: DatabaseToManyCheckConstraintFilter; + /** `checkConstraints` exist. */ + checkConstraintsExist?: boolean; + /** Filter by the object’s `compositeTypes` relation. */ + compositeTypes?: DatabaseToManyCompositeTypeFilter; + /** `compositeTypes` exist. */ + compositeTypesExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseTransfers` relation. */ + databaseTransfers?: DatabaseToManyDatabaseTransferFilter; + /** `databaseTransfers` exist. */ + databaseTransfersExist?: boolean; + /** Filter by the object’s `defaultPrivileges` relation. */ + defaultPrivileges?: DatabaseToManyDefaultPrivilegeFilter; + /** `defaultPrivileges` exist. */ + defaultPrivilegesExist?: boolean; + /** Filter by the object’s `derives` relation. */ + derives?: DatabaseToManyDeriveFilter; + /** `derives` exist. */ + derivesExist?: boolean; + /** Filter by the object’s `domainTypes` relation. */ + domainTypes?: DatabaseToManyDomainTypeFilter; + /** `domainTypes` exist. */ + domainTypesExist?: boolean; + /** Filter by the object’s `embeddingChunks` relation. */ + embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; + /** `embeddingChunks` exist. */ + embeddingChunksExist?: boolean; + /** Filter by the object’s `enums` relation. */ + enums?: DatabaseToManyEnumFilter; + /** `enums` exist. */ + enumsExist?: boolean; + /** Filter by the object’s `exclusionConstraints` relation. */ + exclusionConstraints?: DatabaseToManyExclusionConstraintFilter; + /** `exclusionConstraints` exist. */ + exclusionConstraintsExist?: boolean; + /** Filter by the object’s `fieldBehaviors` relation. */ + fieldBehaviors?: DatabaseToManyFieldBehaviorFilter; + /** `fieldBehaviors` exist. */ + fieldBehaviorsExist?: boolean; + /** Filter by the object’s `fields` relation. */ + fields?: DatabaseToManyFieldFilter; + /** `fields` exist. */ + fieldsExist?: boolean; + /** Filter by the object’s `foreignKeyConstraintBehaviors` relation. */ + foreignKeyConstraintBehaviors?: DatabaseToManyForeignKeyConstraintBehaviorFilter; + /** `foreignKeyConstraintBehaviors` exist. */ + foreignKeyConstraintBehaviorsExist?: boolean; + /** Filter by the object’s `foreignKeyConstraints` relation. */ + foreignKeyConstraints?: DatabaseToManyForeignKeyConstraintFilter; + /** `foreignKeyConstraints` exist. */ + foreignKeyConstraintsExist?: boolean; + /** Filter by the object’s `fullTextSearches` relation. */ + fullTextSearches?: DatabaseToManyFullTextSearchFilter; + /** `fullTextSearches` exist. */ + fullTextSearchesExist?: boolean; + /** Filter by the object’s `functions` relation. */ + functions?: DatabaseToManyFunctionFilter; + /** `functions` exist. */ functionsExist?: boolean; /** Filter by the object’s `hash` field. */ hash?: UUIDFilter; @@ -17593,41 +19017,6 @@ export interface DatabaseFilter { /** `views` exist. */ viewsExist?: boolean; } -/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ -export interface JSONFilter { - /** Contained by the specified JSON. */ - containedBy?: Record; - /** Contains the specified JSON. */ - contains?: Record; - /** Contains all of the specified keys. */ - containsAllKeys?: string[]; - /** Contains any of the specified keys. */ - containsAnyKeys?: string[]; - /** Contains the specified key. */ - containsKey?: string; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: Record; - /** Equal to the specified value. */ - equalTo?: Record; - /** Greater than the specified value. */ - greaterThan?: Record; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: Record; - /** Included in the specified list. */ - in?: Record[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: Record; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: Record; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: Record; - /** Not equal to the specified value. */ - notEqualTo?: Record; - /** Not included in the specified list. */ - notIn?: Record[]; -} /** A filter to be used against UUID List fields. All fields are combined with a logical ‘and.’ */ export interface UUIDListFilter { /** Any array item is equal to the specified value. */ @@ -17692,83 +19081,6 @@ export interface BooleanFilter { /** Not included in the specified list. */ notIn?: boolean[]; } -/** A filter to be used against String fields. All fields are combined with a logical ‘and.’ */ -export interface StringFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; - /** Not equal to the specified value, treating null like an ordinary value (case-insensitive). */ - distinctFromInsensitive?: string; - /** Ends with the specified string (case-sensitive). */ - endsWith?: string; - /** Ends with the specified string (case-insensitive). */ - endsWithInsensitive?: string; - /** Equal to the specified value. */ - equalTo?: string; - /** Equal to the specified value (case-insensitive). */ - equalToInsensitive?: string; - /** Greater than the specified value. */ - greaterThan?: string; - /** Greater than the specified value (case-insensitive). */ - greaterThanInsensitive?: string; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; - /** Greater than or equal to the specified value (case-insensitive). */ - greaterThanOrEqualToInsensitive?: string; - /** Included in the specified list. */ - in?: string[]; - /** Included in the specified list (case-insensitive). */ - inInsensitive?: string[]; - /** Contains the specified string (case-sensitive). */ - includes?: string; - /** Contains the specified string (case-insensitive). */ - includesInsensitive?: string; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: string; - /** Less than the specified value (case-insensitive). */ - lessThanInsensitive?: string; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; - /** Less than or equal to the specified value (case-insensitive). */ - lessThanOrEqualToInsensitive?: string; - /** Matches the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - like?: string; - /** Matches the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - likeInsensitive?: string; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; - /** Equal to the specified value, treating null like an ordinary value (case-insensitive). */ - notDistinctFromInsensitive?: string; - /** Does not end with the specified string (case-sensitive). */ - notEndsWith?: string; - /** Does not end with the specified string (case-insensitive). */ - notEndsWithInsensitive?: string; - /** Not equal to the specified value. */ - notEqualTo?: string; - /** Not equal to the specified value (case-insensitive). */ - notEqualToInsensitive?: string; - /** Not included in the specified list. */ - notIn?: string[]; - /** Not included in the specified list (case-insensitive). */ - notInInsensitive?: string[]; - /** Does not contain the specified string (case-sensitive). */ - notIncludes?: string; - /** Does not contain the specified string (case-insensitive). */ - notIncludesInsensitive?: string; - /** Does not match the specified pattern (case-sensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLike?: string; - /** Does not match the specified pattern (case-insensitive). An underscore (_) matches any single character; a percent sign (%) matches any sequence of zero or more characters. */ - notLikeInsensitive?: string; - /** Does not start with the specified string (case-sensitive). */ - notStartsWith?: string; - /** Does not start with the specified string (case-insensitive). */ - notStartsWithInsensitive?: string; - /** Starts with the specified string (case-sensitive). */ - startsWith?: string; - /** Starts with the specified string (case-insensitive). */ - startsWithInsensitive?: string; -} /** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ export interface IntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -17869,58 +19181,174 @@ export interface DomainFilter { tlsStatus?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +/** A filter to be used against `ManagedDomain` object types. All fields are combined with a logical ‘and.’ */ +export interface ManagedDomainFilter { + /** Filter by the object’s `allowPublicUsage` field. */ + allowPublicUsage?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ManagedDomainFilter[]; + /** Filter by the object’s `annotations` field. */ + annotations?: JSONFilter; + /** Filter by the object’s `certStatus` field. */ + certStatus?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `domain` field. */ + domain?: StringFilter; + /** Filter by the object’s `domainEvents` relation. */ + domainEvents?: ManagedDomainToManyDomainEventFilter; + /** `domainEvents` exist. */ + domainEventsExist?: boolean; + /** Filter by the object’s `domainVerifications` relation. */ + domainVerifications?: ManagedDomainToManyDomainVerificationFilter; + /** `domainVerifications` exist. */ + domainVerificationsExist?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isWildcard` field. */ + isWildcard?: BooleanFilter; + /** Negates the expression. */ + not?: ManagedDomainFilter; + /** Checks for any expressions in this list. */ + or?: ManagedDomainFilter[]; + /** Filter by the object’s `tlsReadyAt` field. */ + tlsReadyAt?: DatetimeFilter; + /** Filter by the object’s `tlsStatus` field. */ + tlsStatus?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `verificationStatus` field. */ + verificationStatus?: StringFilter; + /** Filter by the object’s `verifiedAt` field. */ + verifiedAt?: DatetimeFilter; +} +/** A filter to be used against `Site` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteFilter { + /** Filter by the object’s `activeCommitId` field. */ + activeCommitId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SiteFilter[]; + /** Filter by the object’s `bucketId` field. */ + bucketId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `emailSiteIdentity` relation. */ + emailSiteIdentity?: EmailSiteIdentityFilter; + /** A related `emailSiteIdentity` exists. */ + emailSiteIdentityExists?: boolean; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `installationId` field. */ + installationId?: UUIDFilter; + /** Filter by the object’s `installationMemberSlug` field. */ + installationMemberSlug?: StringFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: SiteFilter; + /** Checks for any expressions in this list. */ + or?: SiteFilter[]; + /** Filter by the object’s `pages` relation. */ + pages?: SiteToManyPageFilter; + /** `pages` exist. */ + pagesExist?: boolean; + /** Filter by the object’s `resourceId` field. */ + resourceId?: UUIDFilter; + /** Filter by the object’s `siteAppLinks` relation. */ + siteAppLinks?: SiteToManySiteAppLinkFilter; + /** `siteAppLinks` exist. */ + siteAppLinksExist?: boolean; + /** Filter by the object’s `siteDeepLinks` relation. */ + siteDeepLinks?: SiteToManySiteDeepLinkFilter; + /** `siteDeepLinks` exist. */ + siteDeepLinksExist?: boolean; + /** Filter by the object’s `siteErrorPages` relation. */ + siteErrorPages?: SiteToManySiteErrorPageFilter; + /** `siteErrorPages` exist. */ + siteErrorPagesExist?: boolean; + /** Filter by the object’s `siteMetadatum` relation. */ + siteMetadatum?: SiteMetadatumFilter; + /** A related `siteMetadatum` exists. */ + siteMetadatumExists?: boolean; + /** Filter by the object’s `siteModules` relation. */ + siteModules?: SiteToManySiteModuleFilter; + /** `siteModules` exist. */ + siteModulesExist?: boolean; + /** Filter by the object’s `siteThemes` relation. */ + siteThemes?: SiteToManySiteThemeFilter; + /** `siteThemes` exist. */ + siteThemesExist?: boolean; + /** Filter by the object’s `siteWebConfig` relation. */ + siteWebConfig?: SiteWebConfigFilter; + /** A related `siteWebConfig` exists. */ + siteWebConfigExists?: boolean; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -/** A filter to be used against `ManagedDomain` object types. All fields are combined with a logical ‘and.’ */ -export interface ManagedDomainFilter { - /** Filter by the object’s `allowPublicUsage` field. */ - allowPublicUsage?: BooleanFilter; +/** A filter to be used against `EmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: ManagedDomainFilter[]; - /** Filter by the object’s `annotations` field. */ - annotations?: JSONFilter; - /** Filter by the object’s `certStatus` field. */ - certStatus?: StringFilter; + and?: EmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `domain` field. */ - domain?: StringFilter; - /** Filter by the object’s `domainEvents` relation. */ - domainEvents?: ManagedDomainToManyDomainEventFilter; - /** `domainEvents` exist. */ - domainEventsExist?: boolean; - /** Filter by the object’s `domainVerifications` relation. */ - domainVerifications?: ManagedDomainToManyDomainVerificationFilter; - /** `domainVerifications` exist. */ - domainVerificationsExist?: boolean; + /** Filter by the object’s `emailIdentitiesByProviderAccountId` relation. */ + emailIdentitiesByProviderAccountId?: EmailProviderAccountToManyEmailIdentityFilter; + /** `emailIdentitiesByProviderAccountId` exist. */ + emailIdentitiesByProviderAccountIdExist?: boolean; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `isWildcard` field. */ - isWildcard?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; /** Negates the expression. */ - not?: ManagedDomainFilter; + not?: EmailProviderAccountFilter; /** Checks for any expressions in this list. */ - or?: ManagedDomainFilter[]; - /** Filter by the object’s `tlsReadyAt` field. */ - tlsReadyAt?: DatetimeFilter; - /** Filter by the object’s `tlsStatus` field. */ - tlsStatus?: StringFilter; + or?: EmailProviderAccountFilter[]; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `verificationStatus` field. */ - verificationStatus?: StringFilter; - /** Filter by the object’s `verifiedAt` field. */ - verifiedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; + and?: PlatformApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; /** Filter by the object’s `config` field. */ @@ -17936,11 +19364,11 @@ export interface PlatformApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: PlatformApisFilter; + not?: PlatformApiFilter; /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; + or?: PlatformApiFilter[]; /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; /** `platformApiSchemasByApiId` exist. */ platformApiSchemasByApiIdExist?: boolean; /** Filter by the object’s `platformApiSettingByApiId` relation. */ @@ -18068,6 +19496,10 @@ export interface PlatformSiteFilter { not?: PlatformSiteFilter; /** Checks for any expressions in this list. */ or?: PlatformSiteFilter[]; + /** Filter by the object’s `platformEmailSiteIdentityBySiteId` relation. */ + platformEmailSiteIdentityBySiteId?: PlatformEmailSiteIdentityFilter; + /** A related `platformEmailSiteIdentityBySiteId` exists. */ + platformEmailSiteIdentityBySiteIdExists?: boolean; /** Filter by the object’s `platformPagesBySiteId` relation. */ platformPagesBySiteId?: PlatformSiteToManyPlatformPageFilter; /** `platformPagesBySiteId` exist. */ @@ -18107,79 +19539,55 @@ export interface PlatformSiteFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Site` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteFilter { - /** Filter by the object’s `activeCommitId` field. */ - activeCommitId?: UUIDFilter; +/** A filter to be used against `PlatformEmailProviderAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformEmailProviderAccountFilter { /** Checks for all expressions in this list. */ - and?: SiteFilter[]; - /** Filter by the object’s `bucketId` field. */ - bucketId?: UUIDFilter; + and?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `apiBaseUrl` field. */ + apiBaseUrl?: StringFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; + /** Filter by the object’s `credentialsSecretName` field. */ + credentialsSecretName?: StringFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `installationId` field. */ - installationId?: UUIDFilter; - /** Filter by the object’s `installationMemberSlug` field. */ - installationMemberSlug?: StringFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: SiteFilter; + not?: PlatformEmailProviderAccountFilter; /** Checks for any expressions in this list. */ - or?: SiteFilter[]; - /** Filter by the object’s `pages` relation. */ - pages?: SiteToManyPageFilter; - /** `pages` exist. */ - pagesExist?: boolean; - /** Filter by the object’s `resourceId` field. */ - resourceId?: UUIDFilter; - /** Filter by the object’s `siteAppLinks` relation. */ - siteAppLinks?: SiteToManySiteAppLinkFilter; - /** `siteAppLinks` exist. */ - siteAppLinksExist?: boolean; - /** Filter by the object’s `siteDeepLinks` relation. */ - siteDeepLinks?: SiteToManySiteDeepLinkFilter; - /** `siteDeepLinks` exist. */ - siteDeepLinksExist?: boolean; - /** Filter by the object’s `siteErrorPages` relation. */ - siteErrorPages?: SiteToManySiteErrorPageFilter; - /** `siteErrorPages` exist. */ - siteErrorPagesExist?: boolean; - /** Filter by the object’s `siteMetadatum` relation. */ - siteMetadatum?: SiteMetadatumFilter; - /** A related `siteMetadatum` exists. */ - siteMetadatumExists?: boolean; - /** Filter by the object’s `siteModules` relation. */ - siteModules?: SiteToManySiteModuleFilter; - /** `siteModules` exist. */ - siteModulesExist?: boolean; - /** Filter by the object’s `siteThemes` relation. */ - siteThemes?: SiteToManySiteThemeFilter; - /** `siteThemes` exist. */ - siteThemesExist?: boolean; - /** Filter by the object’s `siteWebConfig` relation. */ - siteWebConfig?: SiteWebConfigFilter; - /** A related `siteWebConfig` exists. */ - siteWebConfigExists?: boolean; - /** Filter by the object’s `title` field. */ - title?: StringFilter; + or?: PlatformEmailProviderAccountFilter[]; + /** Filter by the object’s `platformEmailIdentitiesByProviderAccountId` relation. */ + platformEmailIdentitiesByProviderAccountId?: PlatformEmailProviderAccountToManyPlatformEmailIdentityFilter; + /** `platformEmailIdentitiesByProviderAccountId` exist. */ + platformEmailIdentitiesByProviderAccountIdExist?: boolean; + /** Filter by the object’s `provider` field. */ + provider?: StringFilter; + /** Filter by the object’s `providerAccountName` field. */ + providerAccountName?: StringFilter; + /** Filter by the object’s `region` field. */ + region?: StringFilter; + /** Filter by the object’s `smtpHost` field. */ + smtpHost?: StringFilter; + /** Filter by the object’s `smtpPort` field. */ + smtpPort?: IntFilter; + /** Filter by the object’s `smtpSecure` field. */ + smtpSecure?: BooleanFilter; + /** Filter by the object’s `smtpUser` field. */ + smtpUser?: StringFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `webhookSigningSecretName` field. */ + webhookSigningSecretName?: StringFilter; } /** A filter to be used against `ApiSetting` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18223,12 +19631,82 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `SiteMetadatum` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteMetadatumFilter { + /** Checks for all expressions in this list. */ + and?: SiteMetadatumFilter[]; + /** Filter by the object’s `appleTouchIcon` field. */ + appleTouchIcon?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `canonicalUrl` field. */ + canonicalUrl?: StringFilter; + /** Filter by the object’s `commitId` field. */ + commitId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `favicon` field. */ + favicon?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `logo` field. */ + logo?: ConstructiveInternalTypeImageFilter; + /** Negates the expression. */ + not?: SiteMetadatumFilter; + /** Filter by the object’s `ogImage` field. */ + ogImage?: ConstructiveInternalTypeImageFilter; + /** Checks for any expressions in this list. */ + or?: SiteMetadatumFilter[]; + /** Filter by the object’s `robots` field. */ + robots?: StringFilter; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** A filter to be used against `SiteWebConfig` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteWebConfigFilter { + /** Checks for all expressions in this list. */ + and?: SiteWebConfigFilter[]; + /** Filter by the object’s `cleanUrls` field. */ + cleanUrls?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `indexDocument` field. */ + indexDocument?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Negates the expression. */ + not?: SiteWebConfigFilter; + /** Checks for any expressions in this list. */ + or?: SiteWebConfigFilter[]; + /** Filter by the object’s `site` relation. */ + site?: SiteFilter; + /** Filter by the object’s `siteId` field. */ + siteId?: UUIDFilter; + /** Filter by the object’s `spaFallback` field. */ + spaFallback?: BooleanFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} /** A filter to be used against `PlatformApiSetting` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18277,7 +19755,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -18359,76 +19837,6 @@ export interface PlatformSiteWebConfigFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `SiteMetadatum` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteMetadatumFilter { - /** Checks for all expressions in this list. */ - and?: SiteMetadatumFilter[]; - /** Filter by the object’s `appleTouchIcon` field. */ - appleTouchIcon?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `canonicalUrl` field. */ - canonicalUrl?: StringFilter; - /** Filter by the object’s `commitId` field. */ - commitId?: UUIDFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `favicon` field. */ - favicon?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `logo` field. */ - logo?: ConstructiveInternalTypeImageFilter; - /** Negates the expression. */ - not?: SiteMetadatumFilter; - /** Filter by the object’s `ogImage` field. */ - ogImage?: ConstructiveInternalTypeImageFilter; - /** Checks for any expressions in this list. */ - or?: SiteMetadatumFilter[]; - /** Filter by the object’s `robots` field. */ - robots?: StringFilter; - /** Filter by the object’s `site` relation. */ - site?: SiteFilter; - /** Filter by the object’s `siteId` field. */ - siteId?: UUIDFilter; - /** Filter by the object’s `storeId` field. */ - storeId?: UUIDFilter; - /** Filter by the object’s `title` field. */ - title?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** A filter to be used against `SiteWebConfig` object types. All fields are combined with a logical ‘and.’ */ -export interface SiteWebConfigFilter { - /** Checks for all expressions in this list. */ - and?: SiteWebConfigFilter[]; - /** Filter by the object’s `cleanUrls` field. */ - cleanUrls?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `indexDocument` field. */ - indexDocument?: StringFilter; - /** Filter by the object’s `metadata` field. */ - metadata?: JSONFilter; - /** Negates the expression. */ - not?: SiteWebConfigFilter; - /** Checks for any expressions in this list. */ - or?: SiteWebConfigFilter[]; - /** Filter by the object’s `site` relation. */ - site?: SiteFilter; - /** Filter by the object’s `siteId` field. */ - siteId?: UUIDFilter; - /** Filter by the object’s `spaFallback` field. */ - spaFallback?: BooleanFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -18511,27 +19919,37 @@ export type ResolveRouteRecordSelect = { tlsStatus?: boolean; verificationStatus?: boolean; }; -export interface AcceptDatabaseTransferPayload { +export interface ApplyRlsPayload { + clientMutationId?: string | null; +} +export type ApplyRlsPayloadSelect = { + clientMutationId?: boolean; +}; +export interface AppsInstallAppPayload { + appEdge?: AppEdge | null; clientMutationId?: string | null; - result?: boolean | null; + result?: App | null; } -export type AcceptDatabaseTransferPayloadSelect = { +export type AppsInstallAppPayloadSelect = { + appEdge?: { + select: AppEdgeSelect; + }; clientMutationId?: boolean; - result?: boolean; + result?: { + select: AppSelect; + }; }; -export interface ApplyRlsPayload { +export interface AppsUninstallAppPayload { clientMutationId?: string | null; } -export type ApplyRlsPayloadSelect = { +export type AppsUninstallAppPayloadSelect = { clientMutationId?: boolean; }; -export interface CancelDatabaseTransferPayload { +export interface AppsUpgradeAppPayload { clientMutationId?: string | null; - result?: boolean | null; } -export type CancelDatabaseTransferPayloadSelect = { +export type AppsUpgradeAppPayloadSelect = { clientMutationId?: boolean; - result?: boolean; }; export interface DomainsAssignSubdomainPayload { clientMutationId?: string | null; @@ -18593,14 +20011,6 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface RejectDatabaseTransferPayload { - clientMutationId?: string | null; - result?: boolean | null; -} -export type RejectDatabaseTransferPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; export interface RequestDatabasePayload { clientMutationId?: string | null; result?: DatabaseProvisionModule | null; @@ -18627,6 +20037,51 @@ export type SitesProvisionStaticSitePayloadSelect = { select: PlatformRouteSelect; }; }; +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type CreateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type UpdateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type DeleteApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -18717,48 +20172,93 @@ export type DeleteApiSettingPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface CreateAppComponentPayload { + /** The `AppComponent` that was created by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type CreateAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppComponentPayload { + /** The `AppComponent` that was updated by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppComponentPayload { + /** The `AppComponent` that was deleted by this mutation. */ + appComponent?: AppComponent | null; + appComponentEdge?: AppComponentEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppComponentPayloadSelect = { + appComponent?: { + select: AppComponentSelect; + }; + appComponentEdge?: { + select: AppComponentEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppPayload { + /** The `App` that was created by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type CreateApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type CreateAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface UpdateAppPayload { + /** The `App` that was updated by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type UpdateApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type UpdateAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; +export interface DeleteAppPayload { + /** The `App` that was deleted by this mutation. */ + app?: App | null; + appEdge?: AppEdge | null; clientMutationId?: string | null; } -export type DeleteApisPayloadSelect = { - apis?: { - select: ApisSelect; +export type DeleteAppPayloadSelect = { + app?: { + select: AppSelect; }; - apisEdge?: { - select: ApisEdgeSelect; + appEdge?: { + select: AppEdgeSelect; }; clientMutationId?: boolean; }; @@ -19302,6 +20802,141 @@ export type DeleteDomainVerificationPayloadSelect = { select: DomainVerificationEdgeSelect; }; }; +export interface CreateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was created by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type CreateEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface UpdateEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was updated by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type UpdateEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface DeleteEmailIdentityPayload { + clientMutationId?: string | null; + /** The `EmailIdentity` that was deleted by this mutation. */ + emailIdentity?: EmailIdentity | null; + emailIdentityEdge?: EmailIdentityEdge | null; +} +export type DeleteEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + emailIdentity?: { + select: EmailIdentitySelect; + }; + emailIdentityEdge?: { + select: EmailIdentityEdgeSelect; + }; +}; +export interface CreateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was created by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type CreateEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface UpdateEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was updated by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type UpdateEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface DeleteEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `EmailProviderAccount` that was deleted by this mutation. */ + emailProviderAccount?: EmailProviderAccount | null; + emailProviderAccountEdge?: EmailProviderAccountEdge | null; +} +export type DeleteEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + emailProviderAccount?: { + select: EmailProviderAccountSelect; + }; + emailProviderAccountEdge?: { + select: EmailProviderAccountEdgeSelect; + }; +}; +export interface CreateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was created by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type CreateEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; +export interface UpdateEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was updated by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type UpdateEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; +export interface DeleteEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `EmailSiteIdentity` that was deleted by this mutation. */ + emailSiteIdentity?: EmailSiteIdentity | null; + emailSiteIdentityEdge?: EmailSiteIdentityEdge | null; +} +export type DeleteEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + emailSiteIdentity?: { + select: EmailSiteIdentitySelect; + }; + emailSiteIdentityEdge?: { + select: EmailSiteIdentityEdgeSelect; + }; +}; export interface CreateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was created by this mutation. */ @@ -20022,6 +21657,51 @@ export type DeletePartitionPayloadSelect = { select: PartitionEdgeSelect; }; }; +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type CreatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type UpdatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type DeletePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -20112,51 +21792,6 @@ export type DeletePlatformApiSettingPayloadSelect = { select: PlatformApiSettingEdgeSelect; }; }; -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type CreatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type UpdatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type DeletePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -20337,6 +21972,141 @@ export type DeletePlatformDomainVerificationPayloadSelect = { select: PlatformDomainVerificationEdgeSelect; }; }; +export interface CreatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was created by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type CreatePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface UpdatePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was updated by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type UpdatePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface DeletePlatformEmailIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailIdentity` that was deleted by this mutation. */ + platformEmailIdentity?: PlatformEmailIdentity | null; + platformEmailIdentityEdge?: PlatformEmailIdentityEdge | null; +} +export type DeletePlatformEmailIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailIdentity?: { + select: PlatformEmailIdentitySelect; + }; + platformEmailIdentityEdge?: { + select: PlatformEmailIdentityEdgeSelect; + }; +}; +export interface CreatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was created by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type CreatePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface UpdatePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was updated by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type UpdatePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface DeletePlatformEmailProviderAccountPayload { + clientMutationId?: string | null; + /** The `PlatformEmailProviderAccount` that was deleted by this mutation. */ + platformEmailProviderAccount?: PlatformEmailProviderAccount | null; + platformEmailProviderAccountEdge?: PlatformEmailProviderAccountEdge | null; +} +export type DeletePlatformEmailProviderAccountPayloadSelect = { + clientMutationId?: boolean; + platformEmailProviderAccount?: { + select: PlatformEmailProviderAccountSelect; + }; + platformEmailProviderAccountEdge?: { + select: PlatformEmailProviderAccountEdgeSelect; + }; +}; +export interface CreatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was created by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type CreatePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; +export interface UpdatePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was updated by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type UpdatePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; +export interface DeletePlatformEmailSiteIdentityPayload { + clientMutationId?: string | null; + /** The `PlatformEmailSiteIdentity` that was deleted by this mutation. */ + platformEmailSiteIdentity?: PlatformEmailSiteIdentity | null; + platformEmailSiteIdentityEdge?: PlatformEmailSiteIdentityEdge | null; +} +export type DeletePlatformEmailSiteIdentityPayloadSelect = { + clientMutationId?: boolean; + platformEmailSiteIdentity?: { + select: PlatformEmailSiteIdentitySelect; + }; + platformEmailSiteIdentityEdge?: { + select: PlatformEmailSiteIdentityEdgeSelect; + }; +}; export interface CreatePlatformManagedDomainPayload { clientMutationId?: string | null; /** The `PlatformManagedDomain` that was created by this mutation. */ @@ -22137,6 +23907,18 @@ export type DeleteWebauthnSettingPayloadSelect = { select: WebauthnSettingEdgeSelect; }; }; +/** A `App` edge in the connection. */ +export interface AppEdge { + cursor?: string | null; + /** The `App` at the end of the edge. */ + node?: App | null; +} +export type AppEdgeSelect = { + cursor?: boolean; + node?: { + select: AppSelect; + }; +}; /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -22227,7 +24009,7 @@ export interface DatabaseProvisionModule { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string | null; id: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules: Record; /** Additional configuration options for provisioning */ options: Record; @@ -22262,6 +24044,18 @@ export type DatabaseProvisionModuleSelect = { subdomain?: boolean; updatedAt?: boolean; }; +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} +export type ApiEdgeSelect = { + cursor?: boolean; + node?: { + select: ApiSelect; + }; +}; /** A `ApiSchema` edge in the connection. */ export interface ApiSchemaEdge { cursor?: string | null; @@ -22286,16 +24080,16 @@ export type ApiSettingEdgeSelect = { select: ApiSettingSelect; }; }; -/** A `Apis` edge in the connection. */ -export interface ApisEdge { +/** A `AppComponent` edge in the connection. */ +export interface AppComponentEdge { cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; + /** The `AppComponent` at the end of the edge. */ + node?: AppComponent | null; } -export type ApisEdgeSelect = { +export type AppComponentEdgeSelect = { cursor?: boolean; node?: { - select: ApisSelect; + select: AppComponentSelect; }; }; /** A `CheckConstraint` edge in the connection. */ @@ -22430,6 +24224,42 @@ export type DomainVerificationEdgeSelect = { select: DomainVerificationSelect; }; }; +/** A `EmailIdentity` edge in the connection. */ +export interface EmailIdentityEdge { + cursor?: string | null; + /** The `EmailIdentity` at the end of the edge. */ + node?: EmailIdentity | null; +} +export type EmailIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailIdentitySelect; + }; +}; +/** A `EmailProviderAccount` edge in the connection. */ +export interface EmailProviderAccountEdge { + cursor?: string | null; + /** The `EmailProviderAccount` at the end of the edge. */ + node?: EmailProviderAccount | null; +} +export type EmailProviderAccountEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailProviderAccountSelect; + }; +}; +/** A `EmailSiteIdentity` edge in the connection. */ +export interface EmailSiteIdentityEdge { + cursor?: string | null; + /** The `EmailSiteIdentity` at the end of the edge. */ + node?: EmailSiteIdentity | null; +} +export type EmailSiteIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailSiteIdentitySelect; + }; +}; /** A `EmbeddingChunk` edge in the connection. */ export interface EmbeddingChunkEdge { cursor?: string | null; @@ -22622,6 +24452,18 @@ export type PartitionEdgeSelect = { select: PartitionSelect; }; }; +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { + cursor?: string | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; +} +export type PlatformApiEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformApiSelect; + }; +}; /** A `PlatformApiSchema` edge in the connection. */ export interface PlatformApiSchemaEdge { cursor?: string | null; @@ -22646,18 +24488,6 @@ export type PlatformApiSettingEdgeSelect = { select: PlatformApiSettingSelect; }; }; -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { - cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; -} -export type PlatformApisEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformApisSelect; - }; -}; /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { cursor?: string | null; @@ -22694,6 +24524,42 @@ export type PlatformDomainVerificationEdgeSelect = { select: PlatformDomainVerificationSelect; }; }; +/** A `PlatformEmailIdentity` edge in the connection. */ +export interface PlatformEmailIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailIdentity` at the end of the edge. */ + node?: PlatformEmailIdentity | null; +} +export type PlatformEmailIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailIdentitySelect; + }; +}; +/** A `PlatformEmailProviderAccount` edge in the connection. */ +export interface PlatformEmailProviderAccountEdge { + cursor?: string | null; + /** The `PlatformEmailProviderAccount` at the end of the edge. */ + node?: PlatformEmailProviderAccount | null; +} +export type PlatformEmailProviderAccountEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailProviderAccountSelect; + }; +}; +/** A `PlatformEmailSiteIdentity` edge in the connection. */ +export interface PlatformEmailSiteIdentityEdge { + cursor?: string | null; + /** The `PlatformEmailSiteIdentity` at the end of the edge. */ + node?: PlatformEmailSiteIdentity | null; +} +export type PlatformEmailSiteIdentityEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformEmailSiteIdentitySelect; + }; +}; /** A `PlatformManagedDomain` edge in the connection. */ export interface PlatformManagedDomainEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/orm/models/apis.ts b/sdk/constructive-sdk/src/api/orm/models/api.ts similarity index 60% rename from sdk/constructive-react/src/api/orm/models/apis.ts rename to sdk/constructive-sdk/src/api/orm/models/api.ts index a62444db0f..4d60695731 100644 --- a/sdk/constructive-react/src/api/orm/models/apis.ts +++ b/sdk/constructive-sdk/src/api/orm/models/api.ts @@ -1,5 +1,5 @@ /** - * Apis model for ORM client + * Api 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 { - Apis, - ApisWithRelations, - ApisSelect, - ApisFilter, - ApisOrderBy, - CreateApisInput, - UpdateApisInput, - ApisPatch, + Api, + ApiWithRelations, + ApiSelect, + ApiFilter, + ApiOrderBy, + CreateApiInput, + UpdateApiInput, + ApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ApisModel { +export class ApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apises: ConnectionResult>; + apis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class ApisModel { before: args?.before, offset: args?.offset, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apises', + operationName: 'Api', + fieldName: 'apis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: { @@ -124,91 +124,91 @@ export class ApisModel { }, first: 1, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'Apis', - 'createApis', - 'apis', + 'Api', + 'createApi', + 'api', args.select, args.data, - 'CreateApisInput', + 'CreateApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'createApis', + operationName: 'Api', + fieldName: 'createApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ApisPatch + ApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'Apis', - 'updateApis', - 'apis', + 'Api', + 'updateApi', + 'api', args.select, args.where.id, args.data, - 'UpdateApisInput', + 'UpdateApiInput', 'id', - 'apisPatch', + 'apiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'updateApis', + operationName: 'Api', + fieldName: 'updateApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class ApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'Apis', - 'deleteApis', - 'apis', + 'Api', + 'deleteApi', + 'api', { id: args.where.id, }, - 'DeleteApisInput', + 'DeleteApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'deleteApis', + operationName: 'Api', + fieldName: 'deleteApi', document, variables, }); diff --git a/sdk/constructive-sdk/src/api/orm/models/app.ts b/sdk/constructive-sdk/src/api/orm/models/app.ts new file mode 100644 index 0000000000..049d73f6c0 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/app.ts @@ -0,0 +1,245 @@ +/** + * App 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 { + App, + AppWithRelations, + AppSelect, + AppFilter, + AppOrderBy, + CreateAppInput, + UpdateAppInput, + AppPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + apps: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'App', + 'apps', + 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, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'apps', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + app: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'App', + 'apps', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'app', + document, + variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + app: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'App', + 'apps', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppFilter', + 'AppOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'App', + fieldName: 'app', + document, + variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'App', + 'createApp', + 'app', + args.select, + args.data, + 'CreateAppInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'createApp', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'App', + 'updateApp', + 'app', + args.select, + args.where.id, + args.data, + 'UpdateAppInput', + 'id', + 'appPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'updateApp', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteApp: { + app: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'App', + 'deleteApp', + 'app', + { + id: args.where.id, + }, + 'DeleteAppInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'App', + fieldName: 'deleteApp', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/appComponent.ts b/sdk/constructive-sdk/src/api/orm/models/appComponent.ts new file mode 100644 index 0000000000..2aa5994098 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/appComponent.ts @@ -0,0 +1,245 @@ +/** + * AppComponent 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 { + AppComponent, + AppComponentWithRelations, + AppComponentSelect, + AppComponentFilter, + AppComponentOrderBy, + CreateAppComponentInput, + UpdateAppComponentInput, + AppComponentPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppComponentModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppComponent', + 'appComponents', + 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, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppComponent', + 'appComponents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponent', + document, + variables, + transform: (data: { + appComponents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appComponent: data.appComponents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appComponent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppComponent', + 'appComponents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppComponentFilter', + 'AppComponentOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppComponent', + fieldName: 'appComponent', + document, + variables, + transform: (data: { + appComponents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appComponent: data.appComponents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppComponent', + 'createAppComponent', + 'appComponent', + args.select, + args.data, + 'CreateAppComponentInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'createAppComponent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppComponentPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppComponent', + 'updateAppComponent', + 'appComponent', + args.select, + args.where.id, + args.data, + 'UpdateAppComponentInput', + 'id', + 'appComponentPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'updateAppComponent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppComponent: { + appComponent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppComponent', + 'deleteAppComponent', + 'appComponent', + { + id: args.where.id, + }, + 'DeleteAppComponentInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppComponent', + fieldName: 'deleteAppComponent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/astMigration.ts b/sdk/constructive-sdk/src/api/orm/models/astMigration.ts deleted file mode 100644 index bfcc5f455a..0000000000 --- a/sdk/constructive-sdk/src/api/orm/models/astMigration.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * AstMigration 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 { - AstMigration, - AstMigrationWithRelations, - AstMigrationSelect, - AstMigrationFilter, - AstMigrationOrderBy, - CreateAstMigrationInput, - UpdateAstMigrationInput, - AstMigrationPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class AstMigrationModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigrations: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'AstMigration', - 'astMigrations', - 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, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigrations', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigration: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'AstMigration', - 'astMigrations', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigration', - document, - variables, - transform: (data: { - astMigrations?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - astMigration: data.astMigrations?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: number; - select: S; - } & StrictSelect - ): QueryBuilder<{ - astMigration: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'AstMigration', - 'astMigrations', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'AstMigrationFilter', - 'AstMigrationOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'AstMigration', - fieldName: 'astMigration', - document, - variables, - transform: (data: { - astMigrations?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - astMigration: data.astMigrations?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createAstMigration: { - astMigration: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'AstMigration', - 'createAstMigration', - 'astMigration', - args.select, - args.data, - 'CreateAstMigrationInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'AstMigration', - fieldName: 'createAstMigration', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/api/orm/models/emailIdentity.ts b/sdk/constructive-sdk/src/api/orm/models/emailIdentity.ts new file mode 100644 index 0000000000..ac0262d9d9 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/emailIdentity.ts @@ -0,0 +1,245 @@ +/** + * EmailIdentity 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 { + EmailIdentity, + EmailIdentityWithRelations, + EmailIdentitySelect, + EmailIdentityFilter, + EmailIdentityOrderBy, + CreateEmailIdentityInput, + UpdateEmailIdentityInput, + EmailIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailIdentity', + 'emailIdentities', + 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, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailIdentity', + 'emailIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentity', + document, + variables, + transform: (data: { + emailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailIdentity: data.emailIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailIdentity', + 'emailIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailIdentityFilter', + 'EmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailIdentity', + fieldName: 'emailIdentity', + document, + variables, + transform: (data: { + emailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailIdentity: data.emailIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailIdentity', + 'createEmailIdentity', + 'emailIdentity', + args.select, + args.data, + 'CreateEmailIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'createEmailIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailIdentity', + 'updateEmailIdentity', + 'emailIdentity', + args.select, + args.where.id, + args.data, + 'UpdateEmailIdentityInput', + 'id', + 'emailIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'updateEmailIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailIdentity: { + emailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailIdentity', + 'deleteEmailIdentity', + 'emailIdentity', + { + id: args.where.id, + }, + 'DeleteEmailIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailIdentity', + fieldName: 'deleteEmailIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/emailProviderAccount.ts b/sdk/constructive-sdk/src/api/orm/models/emailProviderAccount.ts new file mode 100644 index 0000000000..a720e8d015 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/emailProviderAccount.ts @@ -0,0 +1,247 @@ +/** + * EmailProviderAccount 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 { + EmailProviderAccount, + EmailProviderAccountWithRelations, + EmailProviderAccountSelect, + EmailProviderAccountFilter, + EmailProviderAccountOrderBy, + CreateEmailProviderAccountInput, + UpdateEmailProviderAccountInput, + EmailProviderAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailProviderAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + 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, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccount', + document, + variables, + transform: (data: { + emailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailProviderAccount: data.emailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailProviderAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailProviderAccount', + 'emailProviderAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailProviderAccountFilter', + 'EmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailProviderAccount', + fieldName: 'emailProviderAccount', + document, + variables, + transform: (data: { + emailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailProviderAccount: data.emailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailProviderAccount', + 'createEmailProviderAccount', + 'emailProviderAccount', + args.select, + args.data, + 'CreateEmailProviderAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'createEmailProviderAccount', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailProviderAccountPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailProviderAccount', + 'updateEmailProviderAccount', + 'emailProviderAccount', + args.select, + args.where.id, + args.data, + 'UpdateEmailProviderAccountInput', + 'id', + 'emailProviderAccountPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'updateEmailProviderAccount', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailProviderAccount: { + emailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailProviderAccount', + 'deleteEmailProviderAccount', + 'emailProviderAccount', + { + id: args.where.id, + }, + 'DeleteEmailProviderAccountInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailProviderAccount', + fieldName: 'deleteEmailProviderAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/emailSiteIdentity.ts b/sdk/constructive-sdk/src/api/orm/models/emailSiteIdentity.ts new file mode 100644 index 0000000000..408d8ffa81 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/emailSiteIdentity.ts @@ -0,0 +1,245 @@ +/** + * EmailSiteIdentity 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 { + EmailSiteIdentity, + EmailSiteIdentityWithRelations, + EmailSiteIdentitySelect, + EmailSiteIdentityFilter, + EmailSiteIdentityOrderBy, + CreateEmailSiteIdentityInput, + UpdateEmailSiteIdentityInput, + EmailSiteIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class EmailSiteIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentities: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + 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, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentity', + document, + variables, + transform: (data: { + emailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailSiteIdentity: data.emailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + emailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'EmailSiteIdentity', + 'emailSiteIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'EmailSiteIdentityFilter', + 'EmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'EmailSiteIdentity', + fieldName: 'emailSiteIdentity', + document, + variables, + transform: (data: { + emailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailSiteIdentity: data.emailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'EmailSiteIdentity', + 'createEmailSiteIdentity', + 'emailSiteIdentity', + args.select, + args.data, + 'CreateEmailSiteIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'createEmailSiteIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + EmailSiteIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'EmailSiteIdentity', + 'updateEmailSiteIdentity', + 'emailSiteIdentity', + args.select, + args.where.id, + args.data, + 'UpdateEmailSiteIdentityInput', + 'id', + 'emailSiteIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'updateEmailSiteIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteEmailSiteIdentity: { + emailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'EmailSiteIdentity', + 'deleteEmailSiteIdentity', + 'emailSiteIdentity', + { + id: args.where.id, + }, + 'DeleteEmailSiteIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'EmailSiteIdentity', + fieldName: 'deleteEmailSiteIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/index.ts b/sdk/constructive-sdk/src/api/orm/models/index.ts index a947c4f65f..e423940bea 100644 --- a/sdk/constructive-sdk/src/api/orm/models/index.ts +++ b/sdk/constructive-sdk/src/api/orm/models/index.ts @@ -3,10 +3,11 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ApiModel } from './api'; export { ApiSchemaModel } from './apiSchema'; export { ApiSettingModel } from './apiSetting'; -export { ApisModel } from './apis'; -export { AstMigrationModel } from './astMigration'; +export { AppComponentModel } from './appComponent'; +export { AppModel } from './app'; export { CheckConstraintModel } from './checkConstraint'; export { CompositeTypeModel } from './compositeType'; export { CorsSettingModel } from './corsSetting'; @@ -19,6 +20,9 @@ export { DomainModel } from './domain'; export { DomainEventModel } from './domainEvent'; export { DomainTypeModel } from './domainType'; export { DomainVerificationModel } from './domainVerification'; +export { EmailIdentityModel } from './emailIdentity'; +export { EmailProviderAccountModel } from './emailProviderAccount'; +export { EmailSiteIdentityModel } from './emailSiteIdentity'; export { EmbeddingChunkModel } from './embeddingChunk'; export { EnumModel } from './enum'; export { ExclusionConstraintModel } from './exclusionConstraint'; @@ -35,13 +39,16 @@ export { ManagedDomainModel } from './managedDomain'; export { NodeTypeRegistryModel } from './nodeTypeRegistry'; export { PageModel } from './page'; export { PartitionModel } from './partition'; +export { PlatformApiModel } from './platformApi'; export { PlatformApiSchemaModel } from './platformApiSchema'; export { PlatformApiSettingModel } from './platformApiSetting'; -export { PlatformApisModel } from './platformApis'; export { PlatformCorsSettingModel } from './platformCorsSetting'; export { PlatformDomainModel } from './platformDomain'; export { PlatformDomainEventModel } from './platformDomainEvent'; export { PlatformDomainVerificationModel } from './platformDomainVerification'; +export { PlatformEmailIdentityModel } from './platformEmailIdentity'; +export { PlatformEmailProviderAccountModel } from './platformEmailProviderAccount'; +export { PlatformEmailSiteIdentityModel } from './platformEmailSiteIdentity'; export { PlatformManagedDomainModel } from './platformManagedDomain'; export { PlatformPageModel } from './platformPage'; export { PlatformSiteAppLinkModel } from './platformSiteAppLink'; @@ -69,7 +76,6 @@ export { SiteModuleModel } from './siteModule'; export { SiteThemeModel } from './siteTheme'; export { SiteWebConfigModel } from './siteWebConfig'; export { SpatialRelationModel } from './spatialRelation'; -export { SqlActionModel } from './sqlAction'; export { TableBehaviorModel } from './tableBehavior'; export { TableModel } from './table'; export { TableGrantModel } from './tableGrant'; diff --git a/sdk/constructive-sdk/src/api/orm/models/platformApis.ts b/sdk/constructive-sdk/src/api/orm/models/platformApi.ts similarity index 54% rename from sdk/constructive-sdk/src/api/orm/models/platformApis.ts rename to sdk/constructive-sdk/src/api/orm/models/platformApi.ts index 43cd25c9d2..3eee59e6c8 100644 --- a/sdk/constructive-sdk/src/api/orm/models/platformApis.ts +++ b/sdk/constructive-sdk/src/api/orm/models/platformApi.ts @@ -1,5 +1,5 @@ /** - * PlatformApis model for ORM client + * PlatformApi 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 { - PlatformApis, - PlatformApisWithRelations, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, - CreatePlatformApisInput, - UpdatePlatformApisInput, - PlatformApisPatch, + PlatformApi, + PlatformApiWithRelations, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, + CreatePlatformApiInput, + UpdatePlatformApiInput, + PlatformApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PlatformApisModel { +export class PlatformApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApises: ConnectionResult>; + platformApis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PlatformApisModel { before: args?.before, offset: args?.offset, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApises', + operationName: 'PlatformApi', + fieldName: 'platformApis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: { @@ -124,91 +124,91 @@ export class PlatformApisModel { }, first: 1, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PlatformApis', - 'createPlatformApis', - 'platformApis', + 'PlatformApi', + 'createPlatformApi', + 'platformApi', args.select, args.data, - 'CreatePlatformApisInput', + 'CreatePlatformApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'createPlatformApis', + operationName: 'PlatformApi', + fieldName: 'createPlatformApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PlatformApisPatch + PlatformApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PlatformApis', - 'updatePlatformApis', - 'platformApis', + 'PlatformApi', + 'updatePlatformApi', + 'platformApi', args.select, args.where.id, args.data, - 'UpdatePlatformApisInput', + 'UpdatePlatformApiInput', 'id', - 'platformApisPatch', + 'platformApiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'updatePlatformApis', + operationName: 'PlatformApi', + fieldName: 'updatePlatformApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PlatformApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PlatformApis', - 'deletePlatformApis', - 'platformApis', + 'PlatformApi', + 'deletePlatformApi', + 'platformApi', { id: args.where.id, }, - 'DeletePlatformApisInput', + 'DeletePlatformApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'deletePlatformApis', + operationName: 'PlatformApi', + fieldName: 'deletePlatformApi', document, variables, }); diff --git a/sdk/constructive-sdk/src/api/orm/models/platformEmailIdentity.ts b/sdk/constructive-sdk/src/api/orm/models/platformEmailIdentity.ts new file mode 100644 index 0000000000..8cc262f318 --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/platformEmailIdentity.ts @@ -0,0 +1,247 @@ +/** + * PlatformEmailIdentity 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 { + PlatformEmailIdentity, + PlatformEmailIdentityWithRelations, + PlatformEmailIdentitySelect, + PlatformEmailIdentityFilter, + PlatformEmailIdentityOrderBy, + CreatePlatformEmailIdentityInput, + UpdatePlatformEmailIdentityInput, + PlatformEmailIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + 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, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentity', + document, + variables, + transform: (data: { + platformEmailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailIdentity: data.platformEmailIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailIdentity', + 'platformEmailIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailIdentityFilter', + 'PlatformEmailIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailIdentity', + fieldName: 'platformEmailIdentity', + document, + variables, + transform: (data: { + platformEmailIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailIdentity: data.platformEmailIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailIdentity', + 'createPlatformEmailIdentity', + 'platformEmailIdentity', + args.select, + args.data, + 'CreatePlatformEmailIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'createPlatformEmailIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailIdentity', + 'updatePlatformEmailIdentity', + 'platformEmailIdentity', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailIdentityInput', + 'id', + 'platformEmailIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'updatePlatformEmailIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailIdentity: { + platformEmailIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailIdentity', + 'deletePlatformEmailIdentity', + 'platformEmailIdentity', + { + id: args.where.id, + }, + 'DeletePlatformEmailIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailIdentity', + fieldName: 'deletePlatformEmailIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/platformEmailProviderAccount.ts b/sdk/constructive-sdk/src/api/orm/models/platformEmailProviderAccount.ts new file mode 100644 index 0000000000..07c760f30b --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/platformEmailProviderAccount.ts @@ -0,0 +1,261 @@ +/** + * PlatformEmailProviderAccount 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 { + PlatformEmailProviderAccount, + PlatformEmailProviderAccountWithRelations, + PlatformEmailProviderAccountSelect, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy, + CreatePlatformEmailProviderAccountInput, + UpdatePlatformEmailProviderAccountInput, + PlatformEmailProviderAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailProviderAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + 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, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs< + S, + PlatformEmailProviderAccountFilter, + PlatformEmailProviderAccountOrderBy + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccount', + document, + variables, + transform: (data: { + platformEmailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailProviderAccount: data.platformEmailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailProviderAccount: InferSelectResult< + PlatformEmailProviderAccountWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailProviderAccount', + 'platformEmailProviderAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailProviderAccountFilter', + 'PlatformEmailProviderAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'platformEmailProviderAccount', + document, + variables, + transform: (data: { + platformEmailProviderAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailProviderAccount: data.platformEmailProviderAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailProviderAccount', + 'createPlatformEmailProviderAccount', + 'platformEmailProviderAccount', + args.select, + args.data, + 'CreatePlatformEmailProviderAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'createPlatformEmailProviderAccount', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailProviderAccountPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailProviderAccount', + 'updatePlatformEmailProviderAccount', + 'platformEmailProviderAccount', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailProviderAccountInput', + 'id', + 'platformEmailProviderAccountPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'updatePlatformEmailProviderAccount', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailProviderAccount: { + platformEmailProviderAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailProviderAccount', + 'deletePlatformEmailProviderAccount', + 'platformEmailProviderAccount', + { + id: args.where.id, + }, + 'DeletePlatformEmailProviderAccountInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailProviderAccount', + fieldName: 'deletePlatformEmailProviderAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/platformEmailSiteIdentity.ts b/sdk/constructive-sdk/src/api/orm/models/platformEmailSiteIdentity.ts new file mode 100644 index 0000000000..bc3ff67daa --- /dev/null +++ b/sdk/constructive-sdk/src/api/orm/models/platformEmailSiteIdentity.ts @@ -0,0 +1,247 @@ +/** + * PlatformEmailSiteIdentity 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 { + PlatformEmailSiteIdentity, + PlatformEmailSiteIdentityWithRelations, + PlatformEmailSiteIdentitySelect, + PlatformEmailSiteIdentityFilter, + PlatformEmailSiteIdentityOrderBy, + CreatePlatformEmailSiteIdentityInput, + UpdatePlatformEmailSiteIdentityInput, + PlatformEmailSiteIdentityPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlatformEmailSiteIdentityModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentities: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + 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, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentities', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentity', + document, + variables, + transform: (data: { + platformEmailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailSiteIdentity: data.platformEmailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + platformEmailSiteIdentity: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlatformEmailSiteIdentity', + 'platformEmailSiteIdentities', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlatformEmailSiteIdentityFilter', + 'PlatformEmailSiteIdentityOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'platformEmailSiteIdentity', + document, + variables, + transform: (data: { + platformEmailSiteIdentities?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + platformEmailSiteIdentity: data.platformEmailSiteIdentities?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlatformEmailSiteIdentity', + 'createPlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + args.select, + args.data, + 'CreatePlatformEmailSiteIdentityInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'createPlatformEmailSiteIdentity', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlatformEmailSiteIdentityPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlatformEmailSiteIdentity', + 'updatePlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + args.select, + args.where.id, + args.data, + 'UpdatePlatformEmailSiteIdentityInput', + 'id', + 'platformEmailSiteIdentityPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'updatePlatformEmailSiteIdentity', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlatformEmailSiteIdentity: { + platformEmailSiteIdentity: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlatformEmailSiteIdentity', + 'deletePlatformEmailSiteIdentity', + 'platformEmailSiteIdentity', + { + id: args.where.id, + }, + 'DeletePlatformEmailSiteIdentityInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlatformEmailSiteIdentity', + fieldName: 'deletePlatformEmailSiteIdentity', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/api/orm/models/sqlAction.ts b/sdk/constructive-sdk/src/api/orm/models/sqlAction.ts deleted file mode 100644 index 74b4418688..0000000000 --- a/sdk/constructive-sdk/src/api/orm/models/sqlAction.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * SqlAction 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 { - SqlAction, - SqlActionWithRelations, - SqlActionSelect, - SqlActionFilter, - SqlActionOrderBy, - CreateSqlActionInput, - UpdateSqlActionInput, - SqlActionPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class SqlActionModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlActions: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'SqlAction', - 'sqlActions', - 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, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlActions', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlAction: InferSelectResult | null; - }> { - const { document, variables } = buildFindFirstDocument( - 'SqlAction', - 'sqlActions', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlAction', - document, - variables, - transform: (data: { - sqlActions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - sqlAction: data.sqlActions?.nodes?.[0] ?? null, - }), - }); - } - findOne( - args: { - id: number; - select: S; - } & StrictSelect - ): QueryBuilder<{ - sqlAction: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'SqlAction', - 'sqlActions', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'SqlActionFilter', - 'SqlActionOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'SqlAction', - fieldName: 'sqlAction', - document, - variables, - transform: (data: { - sqlActions?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - sqlAction: data.sqlActions?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createSqlAction: { - sqlAction: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'SqlAction', - 'createSqlAction', - 'sqlAction', - args.select, - args.data, - 'CreateSqlActionInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'SqlAction', - fieldName: 'createSqlAction', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/api/orm/mutation/index.ts b/sdk/constructive-sdk/src/api/orm/mutation/index.ts index 2629f518b2..2dd79f41bf 100644 --- a/sdk/constructive-sdk/src/api/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/api/orm/mutation/index.ts @@ -7,49 +7,52 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { - AcceptDatabaseTransferInput, ApplyRlsInput, - CancelDatabaseTransferInput, + AppsInstallAppInput, + AppsUninstallAppInput, + AppsUpgradeAppInput, DomainsAssignSubdomainInput, PlatformDomainsAssignSubdomainInput, PlatformSitesProvisionStaticSiteInput, ProvisionBucketInput, - RejectDatabaseTransferInput, RequestDatabaseInput, SetFieldOrderInput, SitesProvisionStaticSiteInput, - AcceptDatabaseTransferPayload, ApplyRlsPayload, - CancelDatabaseTransferPayload, + AppsInstallAppPayload, + AppsUninstallAppPayload, + AppsUpgradeAppPayload, DomainsAssignSubdomainPayload, PlatformDomainsAssignSubdomainPayload, PlatformSitesProvisionStaticSitePayload, ProvisionBucketPayload, - RejectDatabaseTransferPayload, RequestDatabasePayload, SetFieldOrderPayload, SitesProvisionStaticSitePayload, - AcceptDatabaseTransferPayloadSelect, ApplyRlsPayloadSelect, - CancelDatabaseTransferPayloadSelect, + AppsInstallAppPayloadSelect, + AppsUninstallAppPayloadSelect, + AppsUpgradeAppPayloadSelect, DomainsAssignSubdomainPayloadSelect, PlatformDomainsAssignSubdomainPayloadSelect, PlatformSitesProvisionStaticSitePayloadSelect, ProvisionBucketPayloadSelect, - RejectDatabaseTransferPayloadSelect, RequestDatabasePayloadSelect, SetFieldOrderPayloadSelect, SitesProvisionStaticSitePayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export interface AcceptDatabaseTransferVariables { - input: AcceptDatabaseTransferInput; -} export interface ApplyRlsVariables { input: ApplyRlsInput; } -export interface CancelDatabaseTransferVariables { - input: CancelDatabaseTransferInput; +export interface AppsInstallAppVariables { + input: AppsInstallAppInput; +} +export interface AppsUninstallAppVariables { + input: AppsUninstallAppInput; +} +export interface AppsUpgradeAppVariables { + input: AppsUpgradeAppInput; } export interface DomainsAssignSubdomainVariables { input: DomainsAssignSubdomainInput; @@ -70,9 +73,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -export interface RejectDatabaseTransferVariables { - input: RejectDatabaseTransferInput; -} /** * Variables for requestDatabase * Requests a database and returns a ticket (database_provision_module row) to poll. @@ -94,91 +94,120 @@ export interface SitesProvisionStaticSiteVariables { } export function createMutationOperations(client: OrmClient) { return { - acceptDatabaseTransfer: ( - args: AcceptDatabaseTransferVariables, + applyRls: ( + args: ApplyRlsVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - acceptDatabaseTransfer: InferSelectResult | null; + applyRls: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'AcceptDatabaseTransfer', - fieldName: 'acceptDatabaseTransfer', + operationName: 'ApplyRls', + fieldName: 'applyRls', ...buildCustomDocument( 'mutation', - 'AcceptDatabaseTransfer', - 'acceptDatabaseTransfer', + 'ApplyRls', + 'applyRls', options.select, args, [ { name: 'input', - type: 'AcceptDatabaseTransferInput!', + type: 'ApplyRlsInput!', }, ], connectionFieldsMap, - 'AcceptDatabaseTransferPayload' + 'ApplyRlsPayload' ), }), - applyRls: ( - args: ApplyRlsVariables, + appsInstallApp: ( + args: AppsInstallAppVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - applyRls: InferSelectResult | null; + appsInstallApp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'ApplyRls', - fieldName: 'applyRls', + operationName: 'AppsInstallApp', + fieldName: 'appsInstallApp', ...buildCustomDocument( 'mutation', - 'ApplyRls', - 'applyRls', + 'AppsInstallApp', + 'appsInstallApp', options.select, args, [ { name: 'input', - type: 'ApplyRlsInput!', + type: 'AppsInstallAppInput!', }, ], connectionFieldsMap, - 'ApplyRlsPayload' + 'AppsInstallAppPayload' + ), + }), + appsUninstallApp: ( + args: AppsUninstallAppVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + appsUninstallApp: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'AppsUninstallApp', + fieldName: 'appsUninstallApp', + ...buildCustomDocument( + 'mutation', + 'AppsUninstallApp', + 'appsUninstallApp', + options.select, + args, + [ + { + name: 'input', + type: 'AppsUninstallAppInput!', + }, + ], + connectionFieldsMap, + 'AppsUninstallAppPayload' ), }), - cancelDatabaseTransfer: ( - args: CancelDatabaseTransferVariables, + appsUpgradeApp: ( + args: AppsUpgradeAppVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - cancelDatabaseTransfer: InferSelectResult | null; + appsUpgradeApp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'CancelDatabaseTransfer', - fieldName: 'cancelDatabaseTransfer', + operationName: 'AppsUpgradeApp', + fieldName: 'appsUpgradeApp', ...buildCustomDocument( 'mutation', - 'CancelDatabaseTransfer', - 'cancelDatabaseTransfer', + 'AppsUpgradeApp', + 'appsUpgradeApp', options.select, args, [ { name: 'input', - type: 'CancelDatabaseTransferInput!', + type: 'AppsUpgradeAppInput!', }, ], connectionFieldsMap, - 'CancelDatabaseTransferPayload' + 'AppsUpgradeAppPayload' ), }), domainsAssignSubdomain: ( @@ -303,35 +332,6 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - rejectDatabaseTransfer: ( - args: RejectDatabaseTransferVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - rejectDatabaseTransfer: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'RejectDatabaseTransfer', - fieldName: 'rejectDatabaseTransfer', - ...buildCustomDocument( - 'mutation', - 'RejectDatabaseTransfer', - 'rejectDatabaseTransfer', - options.select, - args, - [ - { - name: 'input', - type: 'RejectDatabaseTransferInput!', - }, - ], - connectionFieldsMap, - 'RejectDatabaseTransferPayload' - ), - }), requestDatabase: ( args: RequestDatabaseVariables, options: { diff --git a/sdk/constructive-sdk/src/auth/README.md b/sdk/constructive-sdk/src/auth/README.md index b24922f1cc..8dfde0256e 100644 --- a/sdk/constructive-sdk/src/auth/README.md +++ b/sdk/constructive-sdk/src/auth/README.md @@ -10,7 +10,7 @@ - **Tables:** 13 - **Custom queries:** 5 -- **Custom mutations:** 30 +- **Custom mutations:** 32 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/auth/orm/README.md b/sdk/constructive-sdk/src/auth/orm/README.md index 79d52a6c09..1e4f99a142 100644 --- a/sdk/constructive-sdk/src/auth/orm/README.md +++ b/sdk/constructive-sdk/src/auth/orm/README.md @@ -921,6 +921,21 @@ signInCrossOrigin const result = await db.mutation.signInCrossOrigin({ input: { credentialKind: '', token: '' } }).execute(); ``` +### `db.mutation.signInMagicLink` + +signInMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInMagicLinkInput (required) | + +```typescript +const result = await db.mutation.signInMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` + ### `db.mutation.signInSmsOtp` signInSmsOtp @@ -966,6 +981,21 @@ signUp const result = await db.mutation.signUp({ input: '' }).execute(); ``` +### `db.mutation.signUpMagicLink` + +signUpMagicLink + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignUpMagicLinkInput (required) | + +```typescript +const result = await db.mutation.signUpMagicLink({ input: { credentialKind: '', deviceToken: '', rememberMe: '', token: '' } }).execute(); +``` + ### `db.mutation.signUpSms` signUpSms diff --git a/sdk/constructive-sdk/src/auth/orm/input-types.ts b/sdk/constructive-sdk/src/auth/orm/input-types.ts index b59a65f3f1..f2ea8e5716 100644 --- a/sdk/constructive-sdk/src/auth/orm/input-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/input-types.ts @@ -306,7 +306,7 @@ export interface OrgApiKeyList { } /** User phone numbers with country code, verification, and primary-number management */ export interface PhoneNumber { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc?: string | null; createdAt?: string | null; id: string; @@ -316,7 +316,7 @@ export interface PhoneNumber { isVerified?: boolean | null; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string | null; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number?: string | null; ownerId?: string | null; updatedAt?: string | null; @@ -351,9 +351,9 @@ export interface PrincipalEntity { principalId?: string | null; updatedAt?: string | null; } -/** Per-scope permission overrides for principals. No row = full access; row exists = apply restrictions. */ +/** Per-scope capability overrides for principals. No row = full access; row exists = apply restrictions. */ export interface PrincipalScopeOverride { - /** Optional permission mask; AND-masked with parent permissions during cascade. NULL means no extra mask. */ + /** Optional capability mask; AND-masked with parent capabilities during cascade. NULL means no extra mask. */ allowedMask?: string | null; createdAt?: string | null; id: string; @@ -1866,6 +1866,13 @@ export interface SignInCrossOriginInput { credentialKind?: string; token?: string; } +export interface SignInMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignInSmsOtpInput { clientMutationId?: string; code?: string; @@ -1886,6 +1893,13 @@ export interface SignUpInput { password?: string; rememberMe?: boolean; } +export interface SignUpMagicLinkInput { + clientMutationId?: string; + credentialKind?: string; + deviceToken?: string; + rememberMe?: boolean; + token?: string; +} export interface SignUpSmsInput { clientMutationId?: string; code?: string; @@ -2332,7 +2346,7 @@ export interface EmailInput { } /** An input for mutations affecting `PhoneNumber` */ export interface PhoneNumberInput { - /** Country calling code (e.g. +1, +44) */ + /** Country calling code the number was entered under (e.g. +1, +44). Display only: `number` already carries it, and sign-in matches `number`. */ cc: string; createdAt?: string; id?: string; @@ -2342,7 +2356,7 @@ export interface PhoneNumberInput { isVerified?: boolean; /** Optional user-provided label for this phone number (e.g. "Mobile", "Work"). */ name?: string; - /** The phone number without country code */ + /** The full number in E.164 form, country calling code included (e.g. +15551234567). This is the value SMS sign-in and MFA match, so it is unique across the table and constrained to that shape. */ number: string; ownerId?: string; updatedAt?: string; @@ -3271,6 +3285,16 @@ export type SignInCrossOriginPayloadSelect = { select: SignInCrossOriginRecordSelect; }; }; +export interface SignInMagicLinkPayload { + clientMutationId?: string | null; + result?: SignInMagicLinkRecord | null; +} +export type SignInMagicLinkPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInMagicLinkRecordSelect; + }; +}; export interface SignInSmsOtpPayload { clientMutationId?: string | null; result?: SignInSmsOtpRecord | null; @@ -3297,6 +3321,16 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; +export interface SignUpMagicLinkPayload { + clientMutationId?: string | null; + result?: SignUpMagicLinkRecord | null; +} +export type SignUpMagicLinkPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignUpMagicLinkRecordSelect; + }; +}; export interface SignUpSmsPayload { clientMutationId?: string | null; result?: SignUpSmsRecord | null; @@ -3765,6 +3799,16 @@ export type SignInCrossOriginRecordSelect = { totpEnabled?: boolean; userId?: boolean; }; +export interface SignInMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} +export type SignInMagicLinkRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + userId?: boolean; +}; export interface SignInSmsOtpRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; @@ -3791,6 +3835,16 @@ export type SignUpRecordSelect = { totpEnabled?: boolean; userId?: boolean; }; +export interface SignUpMagicLinkRecord { + accessToken?: string | null; + accessTokenExpiresAt?: string | null; + userId?: string | null; +} +export type SignUpMagicLinkRecordSelect = { + accessToken?: boolean; + accessTokenExpiresAt?: boolean; + userId?: boolean; +}; export interface SignUpSmsRecord { accessToken?: string | null; accessTokenExpiresAt?: string | null; diff --git a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts index ae0973c7fb..d1531288e5 100644 --- a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts @@ -30,9 +30,11 @@ import type { SetPasswordInput, SignInInput, SignInCrossOriginInput, + SignInMagicLinkInput, SignInSmsOtpInput, SignOutInput, SignUpInput, + SignUpMagicLinkInput, SignUpSmsInput, VerifyEmailInput, VerifyPasswordInput, @@ -60,9 +62,11 @@ import type { SetPasswordPayload, SignInPayload, SignInCrossOriginPayload, + SignInMagicLinkPayload, SignInSmsOtpPayload, SignOutPayload, SignUpPayload, + SignUpMagicLinkPayload, SignUpSmsPayload, VerifyEmailPayload, VerifyPasswordPayload, @@ -90,9 +94,11 @@ import type { SetPasswordPayloadSelect, SignInPayloadSelect, SignInCrossOriginPayloadSelect, + SignInMagicLinkPayloadSelect, SignInSmsOtpPayloadSelect, SignOutPayloadSelect, SignUpPayloadSelect, + SignUpMagicLinkPayloadSelect, SignUpSmsPayloadSelect, VerifyEmailPayloadSelect, VerifyPasswordPayloadSelect, @@ -175,6 +181,9 @@ export interface SignInVariables { export interface SignInCrossOriginVariables { input: SignInCrossOriginInput; } +export interface SignInMagicLinkVariables { + input: SignInMagicLinkInput; +} export interface SignInSmsOtpVariables { input: SignInSmsOtpInput; } @@ -184,6 +193,9 @@ export interface SignOutVariables { export interface SignUpVariables { input: SignUpInput; } +export interface SignUpMagicLinkVariables { + input: SignUpMagicLinkInput; +} export interface SignUpSmsVariables { input: SignUpSmsInput; } @@ -865,6 +877,35 @@ export function createMutationOperations(client: OrmClient) { 'SignInCrossOriginPayload' ), }), + signInMagicLink: ( + args: SignInMagicLinkVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signInMagicLink: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SignInMagicLink', + fieldName: 'signInMagicLink', + ...buildCustomDocument( + 'mutation', + 'SignInMagicLink', + 'signInMagicLink', + options.select, + args, + [ + { + name: 'input', + type: 'SignInMagicLinkInput!', + }, + ], + connectionFieldsMap, + 'SignInMagicLinkPayload' + ), + }), signInSmsOtp: ( args: SignInSmsOtpVariables, options: { @@ -952,6 +993,35 @@ export function createMutationOperations(client: OrmClient) { 'SignUpPayload' ), }), + signUpMagicLink: ( + args: SignUpMagicLinkVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + signUpMagicLink: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SignUpMagicLink', + fieldName: 'signUpMagicLink', + ...buildCustomDocument( + 'mutation', + 'SignUpMagicLink', + 'signUpMagicLink', + options.select, + args, + [ + { + name: 'input', + type: 'SignUpMagicLinkInput!', + }, + ], + connectionFieldsMap, + 'SignUpMagicLinkPayload' + ), + }), signUpSms: ( args: SignUpSmsVariables, options: { diff --git a/sdk/constructive-sdk/src/compute/README.md b/sdk/constructive-sdk/src/compute/README.md index 7842a63936..0451ebe896 100644 --- a/sdk/constructive-sdk/src/compute/README.md +++ b/sdk/constructive-sdk/src/compute/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 69 +- **Tables:** 70 - **Custom queries:** 1 -- **Custom mutations:** 28 +- **Custom mutations:** 37 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/compute/orm/README.md b/sdk/constructive-sdk/src/compute/orm/README.md index d1a03c4e98..a3ab572efd 100644 --- a/sdk/constructive-sdk/src/compute/orm/README.md +++ b/sdk/constructive-sdk/src/compute/orm/README.md @@ -21,6 +21,7 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `contentPreset` | findMany, findOne, create, update, delete | | `dbPreset` | findMany, findOne, create, update, delete | | `functionApiBinding` | findMany, findOne, create, update, delete | | `functionCapabilityBinding` | findMany, findOne, create, update, delete | @@ -93,6 +94,45 @@ const db = createClient({ ## Table Operations +### `db.contentPreset` + +CRUD operations for ContentPreset records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `active` | Boolean | Yes | +| `commitId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `definition` | JSON | Yes | +| `description` | String | Yes | +| `id` | UUID | No | +| `kind` | String | Yes | +| `label` | String | Yes | +| `slug` | String | Yes | +| `storeId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all contentPreset records +const items = await db.contentPreset.findMany({ select: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.contentPreset.findOne({ id: '', select: { active: true, commitId: true, createdAt: true, definition: true, description: true, id: true, kind: true, label: true, slug: true, storeId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.contentPreset.create({ data: { active: '', commitId: '', definition: '', description: '', kind: '', label: '', slug: '', storeId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.contentPreset.update({ where: { id: '' }, data: { active: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.contentPreset.delete({ where: { id: '' } }).execute(); +``` + ### `db.dbPreset` CRUD operations for DbPreset records. @@ -245,6 +285,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -261,13 +302,13 @@ CRUD operations for FunctionDefinition records. ```typescript // List all functionDefinition records -const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -297,6 +338,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -311,13 +353,13 @@ CRUD operations for FunctionDeployment records. ```typescript // List all functionDeployment records -const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -1227,6 +1269,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -1244,13 +1287,13 @@ CRUD operations for PlatformFunctionDefinition records. ```typescript // List all platformFunctionDefinition records -const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -1279,6 +1322,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -1293,13 +1337,13 @@ CRUD operations for PlatformFunctionDeployment records. ```typescript // List all platformFunctionDeployment records -const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -3053,6 +3097,36 @@ infraInsertNodeAtPath const result = await db.mutation.infraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.infraInsertNodesAtPaths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.infraSetAndCommit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.infraSetDataAtPath` infraSetDataAtPath @@ -3068,6 +3142,21 @@ infraSetDataAtPath const result = await db.mutation.infraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.infraSetManyAndCommit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.initEmptyRepo` initEmptyRepo @@ -3098,6 +3187,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraInitEmptyRepo` platformInfraInitEmptyRepo @@ -3128,6 +3232,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -3143,6 +3277,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.platformResourceInstallationsInstall` platformResourceInstallationsInstall @@ -3296,6 +3445,21 @@ saveGraph const result = await db.mutation.saveGraph({ input: { graphId: '', message: '', rootHash: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -3311,6 +3475,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.startExecution` startExecution diff --git a/sdk/constructive-sdk/src/compute/orm/index.ts b/sdk/constructive-sdk/src/compute/orm/index.ts index 531cf363ab..62973ed4f2 100644 --- a/sdk/constructive-sdk/src/compute/orm/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/index.ts @@ -5,6 +5,7 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ContentPresetModel } from './models/contentPreset'; import { DbPresetModel } from './models/dbPreset'; import { FunctionApiBindingModel } from './models/functionApiBinding'; import { FunctionCapabilityBindingModel } from './models/functionCapabilityBinding'; @@ -109,6 +110,7 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + contentPreset: new ContentPresetModel(client), dbPreset: new DbPresetModel(client), functionApiBinding: new FunctionApiBindingModel(client), functionCapabilityBinding: new FunctionCapabilityBindingModel(client), diff --git a/sdk/constructive-sdk/src/compute/orm/input-types.ts b/sdk/constructive-sdk/src/compute/orm/input-types.ts index a132305584..566e3f81b1 100644 --- a/sdk/constructive-sdk/src/compute/orm/input-types.ts +++ b/sdk/constructive-sdk/src/compute/orm/input-types.ts @@ -234,8 +234,33 @@ export interface UUIDListFilter { export type Base64EncodedBinary = unknown; export type ConstructiveInternalTypeImage = unknown; export type ResourceRequirement = unknown; -/** Database provisioning preset catalog — merkle-versioned head over the infra store */ +/** Seed-content preset catalog (limit defaults, trust ladders, ...) — merkle-versioned head over the infra store */ // ============ Entity Types ============ +export interface ContentPreset { + /** Whether this preset is selectable at provision time */ + active?: boolean | null; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string | null; + /** Timestamp of preset creation */ + createdAt?: string | null; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition?: Record | null; + /** Human-readable description of the preset */ + description?: string | null; + /** Unique preset identifier */ + id: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind?: string | null; + /** Human-readable preset name */ + label?: string | null; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug?: string | null; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string | null; + /** Timestamp of last modification */ + updatedAt?: string | null; +} +/** Database provisioning preset catalog — merkle-versioned head over the infra store */ export interface DbPreset { /** Whether this preset is selectable for new databases */ active?: boolean | null; @@ -296,7 +321,7 @@ export interface FunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface FunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string | null; @@ -352,12 +377,14 @@ export interface FunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -406,6 +433,8 @@ export interface FunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -911,7 +940,7 @@ export interface PlatformFunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface PlatformFunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean | null; @@ -967,12 +996,14 @@ export interface PlatformFunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -1021,6 +1052,8 @@ export interface PlatformFunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -1946,6 +1979,7 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ContentPresetRelations {} export interface DbPresetRelations {} export interface FunctionApiBindingRelations { functionDefinition?: FunctionDefinition | null; @@ -2098,6 +2132,7 @@ export interface WebhookEventRelations { endpoint?: WebhookEndpoint | null; } // ============ Entity Types With Relations ============ +export type ContentPresetWithRelations = ContentPreset & ContentPresetRelations; export type DbPresetWithRelations = DbPreset & DbPresetRelations; export type FunctionApiBindingWithRelations = FunctionApiBinding & FunctionApiBindingRelations; export type FunctionCapabilityBindingWithRelations = FunctionCapabilityBinding & @@ -2205,6 +2240,19 @@ export type ResourcesResolvedRequirementWithRelations = ResourcesResolvedRequire export type WebhookEndpointWithRelations = WebhookEndpoint & WebhookEndpointRelations; export type WebhookEventWithRelations = WebhookEvent & WebhookEventRelations; // ============ Entity Select Types ============ +export type ContentPresetSelect = { + active?: boolean; + commitId?: boolean; + createdAt?: boolean; + definition?: boolean; + description?: boolean; + id?: boolean; + kind?: boolean; + label?: boolean; + slug?: boolean; + storeId?: boolean; + updatedAt?: boolean; +}; export type DbPresetSelect = { active?: boolean; commitId?: boolean; @@ -2284,6 +2332,7 @@ export type FunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2328,6 +2377,7 @@ export type FunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -2697,6 +2747,7 @@ export type PlatformFunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2744,6 +2795,7 @@ export type PlatformFunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -3472,6 +3524,36 @@ export type WebhookEventSelect = { }; }; // ============ Table Filter Types ============ +export interface ContentPresetFilter { + /** Filter by the object’s `active` field. */ + active?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: ContentPresetFilter[]; + /** Filter by the object’s `commitId` field. */ + commitId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `definition` field. */ + definition?: JSONFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `kind` field. */ + kind?: StringFilter; + /** Filter by the object’s `label` field. */ + label?: StringFilter; + /** Negates the expression. */ + not?: ContentPresetFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `storeId` field. */ + storeId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface DbPresetFilter { /** Filter by the object’s `active` field. */ active?: BooleanFilter; @@ -3639,6 +3721,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3699,6 +3783,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -4451,6 +4537,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -4507,6 +4595,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -5912,6 +6002,32 @@ export interface WebhookEventFilter { updatedAt?: DatetimeFilter; } // ============ OrderBy Types ============ +export type ContentPresetOrderBy = + | 'ACTIVE_ASC' + | 'ACTIVE_DESC' + | 'COMMIT_ID_ASC' + | 'COMMIT_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DEFINITION_ASC' + | 'DEFINITION_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'KIND_ASC' + | 'KIND_DESC' + | 'LABEL_ASC' + | 'LABEL_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'STORE_ID_ASC' + | 'STORE_ID_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type DbPresetOrderBy = | 'ACTIVE_ASC' | 'ACTIVE_DESC' @@ -6048,6 +6164,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6100,6 +6218,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -6712,6 +6832,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6764,6 +6886,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -7921,6 +8045,38 @@ export type WebhookEventOrderBy = | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; // ============ CRUD Input Types ============ +export interface CreateContentPresetInput { + clientMutationId?: string; + contentPreset: { + active?: boolean; + commitId?: string; + definition: Record; + description?: string; + kind: string; + label?: string; + slug: string; + storeId?: string; + }; +} +export interface ContentPresetPatch { + active?: boolean | null; + commitId?: string | null; + definition?: Record | null; + description?: string | null; + kind?: string | null; + label?: string | null; + slug?: string | null; + storeId?: string | null; +} +export interface UpdateContentPresetInput { + clientMutationId?: string; + id: string; + contentPresetPatch: ContentPresetPatch; +} +export interface DeleteContentPresetInput { + clientMutationId?: string; + id: string; +} export interface CreateDbPresetInput { clientMutationId?: string; dbPreset: { @@ -8036,6 +8192,7 @@ export interface CreateFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8074,6 +8231,7 @@ export interface FunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8107,6 +8265,7 @@ export interface CreateFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8129,6 +8288,7 @@ export interface FunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -8895,6 +9055,7 @@ export interface CreatePlatformFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8934,6 +9095,7 @@ export interface PlatformFunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8967,6 +9129,7 @@ export interface CreatePlatformFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8988,6 +9151,7 @@ export interface PlatformFunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -10613,6 +10777,26 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10620,6 +10804,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface InitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10634,6 +10826,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface PlatformInfraInitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10648,6 +10849,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10655,6 +10876,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformResourceInstallationsInstallInput { clientMutationId?: string; definitionIds?: string[]; @@ -10714,6 +10943,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10721,6 +10961,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -11067,6 +11315,31 @@ export interface WebhookEndpointToManyWebhookEventFilter { /** Filters to entities where at least one related entity matches. */ some?: WebhookEventFilter; } +/** An input for mutations affecting `ContentPreset` */ +export interface ContentPresetInput { + /** Whether this preset is selectable at provision time */ + active?: boolean; + /** Infra store commit for the current definition (stamped by the versioned trigger on every write) */ + commitId?: string; + /** Timestamp of preset creation */ + createdAt?: string; + /** The seed document itself, in the shape the kind's seed function takes — the readily-cached head; history lives in the infra store */ + definition: Record; + /** Human-readable description of the preset */ + description?: string; + /** Unique preset identifier */ + id?: string; + /** What the definition seeds — the module option that resolves it (limit_defaults, trust_ladder, ...) */ + kind: string; + /** Human-readable preset name */ + label?: string; + /** Preset slug (unique per kind per scope); the preset's path in the infra tree is [content_preset, kind, slug] */ + slug: string; + /** Infra Merkle store holding this preset's history (stamped by the versioned trigger) */ + storeId?: string; + /** Timestamp of last modification */ + updatedAt?: string; +} /** An input for mutations affecting `DbPreset` */ export interface DbPresetInput { /** Whether this preset is selectable for new databases */ @@ -11128,7 +11401,7 @@ export interface FunctionCapabilityBindingInput { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -11176,12 +11449,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11234,6 +11509,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -11704,7 +11981,7 @@ export interface PlatformFunctionCapabilityBindingInput { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -11752,12 +12029,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (capabilities_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11804,6 +12083,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -12841,6 +13122,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -12900,6 +13183,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13282,6 +13567,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13882,6 +14169,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -14189,6 +14478,28 @@ export type InfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14197,6 +14508,20 @@ export type InfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14211,6 +14536,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14225,6 +14558,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14233,6 +14588,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -14315,6 +14684,20 @@ export type SaveGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14323,6 +14706,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; @@ -14339,6 +14736,51 @@ export type ValidateFunctionGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was created by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type CreateContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; +export interface UpdateContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was updated by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type UpdateContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; +export interface DeleteContentPresetPayload { + clientMutationId?: string | null; + /** The `ContentPreset` that was deleted by this mutation. */ + contentPreset?: ContentPreset | null; + contentPresetEdge?: ContentPresetEdge | null; +} +export type DeleteContentPresetPayloadSelect = { + clientMutationId?: boolean; + contentPreset?: { + select: ContentPresetSelect; + }; + contentPresetEdge?: { + select: ContentPresetEdgeSelect; + }; +}; export interface CreateDbPresetPayload { clientMutationId?: string | null; /** The `DbPreset` that was created by this mutation. */ @@ -16852,6 +17294,54 @@ export type DeleteWebhookEventPayloadSelect = { select: WebhookEventEdgeSelect; }; }; +/** A `InfraCommit` edge in the connection. */ +export interface InfraCommitEdge { + cursor?: string | null; + /** The `InfraCommit` at the end of the edge. */ + node?: InfraCommit | null; +} +export type InfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: InfraCommitSelect; + }; +}; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; +/** A `FunctionGraphCommit` edge in the connection. */ +export interface FunctionGraphCommitEdge { + cursor?: string | null; + /** The `FunctionGraphCommit` at the end of the edge. */ + node?: FunctionGraphCommit | null; +} +export type FunctionGraphCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphCommitSelect; + }; +}; +/** A `ContentPreset` edge in the connection. */ +export interface ContentPresetEdge { + cursor?: string | null; + /** The `ContentPreset` at the end of the edge. */ + node?: ContentPreset | null; +} +export type ContentPresetEdgeSelect = { + cursor?: boolean; + node?: { + select: ContentPresetSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -16936,18 +17426,6 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; -/** A `FunctionGraphCommit` edge in the connection. */ -export interface FunctionGraphCommitEdge { - cursor?: string | null; - /** The `FunctionGraphCommit` at the end of the edge. */ - node?: FunctionGraphCommit | null; -} -export type FunctionGraphCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionGraphCommitSelect; - }; -}; /** A `FunctionGraph` edge in the connection. */ export interface FunctionGraphEdge { cursor?: string | null; @@ -17056,18 +17534,6 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; -/** A `InfraCommit` edge in the connection. */ -export interface InfraCommitEdge { - cursor?: string | null; - /** The `InfraCommit` at the end of the edge. */ - node?: InfraCommit | null; -} -export type InfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: InfraCommitSelect; - }; -}; /** A `InfraObject` edge in the connection. */ export interface InfraObjectEdge { cursor?: string | null; @@ -17236,18 +17702,6 @@ export type PlatformFunctionInvocationEdgeSelect = { select: PlatformFunctionInvocationSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts b/sdk/constructive-sdk/src/compute/orm/models/contentPreset.ts similarity index 53% rename from sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts rename to sdk/constructive-sdk/src/compute/orm/models/contentPreset.ts index e3aded7147..20242ccc78 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts +++ b/sdk/constructive-sdk/src/compute/orm/models/contentPreset.ts @@ -1,5 +1,5 @@ /** - * OrgPermission model for ORM client + * ContentPreset 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 { - OrgPermission, - OrgPermissionWithRelations, - OrgPermissionSelect, - OrgPermissionFilter, - OrgPermissionOrderBy, - CreateOrgPermissionInput, - UpdateOrgPermissionInput, - OrgPermissionPatch, + ContentPreset, + ContentPresetWithRelations, + ContentPresetSelect, + ContentPresetFilter, + ContentPresetOrderBy, + CreateContentPresetInput, + UpdateContentPresetInput, + ContentPresetPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionModel { +export class ContentPresetModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermissions: ConnectionResult>; + contentPresets: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'OrgPermission', - 'orgPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class OrgPermissionModel { before: args?.before, offset: args?.offset, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermissions', + operationName: 'ContentPreset', + fieldName: 'contentPresets', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermission: InferSelectResult | null; + contentPreset: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'OrgPermission', - 'orgPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermission', + operationName: 'ContentPreset', + fieldName: 'contentPreset', document, variables, transform: (data: { - orgPermissions?: { - nodes?: InferSelectResult[]; + contentPresets?: { + nodes?: InferSelectResult[]; }; }) => ({ - orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + contentPreset: data.contentPresets?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermission: InferSelectResult | null; + contentPreset: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'OrgPermission', - 'orgPermissions', + 'ContentPreset', + 'contentPresets', args.select, { where: { @@ -124,91 +124,91 @@ export class OrgPermissionModel { }, first: 1, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'ContentPresetFilter', + 'ContentPresetOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermission', + operationName: 'ContentPreset', + fieldName: 'contentPreset', document, variables, transform: (data: { - orgPermissions?: { - nodes?: InferSelectResult[]; + contentPresets?: { + nodes?: InferSelectResult[]; }; }) => ({ - orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + contentPreset: data.contentPresets?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createOrgPermission: { - orgPermission: InferSelectResult; + createContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'OrgPermission', - 'createOrgPermission', - 'orgPermission', + 'ContentPreset', + 'createContentPreset', + 'contentPreset', args.select, args.data, - 'CreateOrgPermissionInput', + 'CreateContentPresetInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'createOrgPermission', + operationName: 'ContentPreset', + fieldName: 'createContentPreset', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - OrgPermissionPatch + ContentPresetPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateOrgPermission: { - orgPermission: InferSelectResult; + updateContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'OrgPermission', - 'updateOrgPermission', - 'orgPermission', + 'ContentPreset', + 'updateContentPreset', + 'contentPreset', args.select, args.where.id, args.data, - 'UpdateOrgPermissionInput', + 'UpdateContentPresetInput', 'id', - 'orgPermissionPatch', + 'contentPresetPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'updateOrgPermission', + operationName: 'ContentPreset', + fieldName: 'updateContentPreset', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class OrgPermissionModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteOrgPermission: { - orgPermission: InferSelectResult; + deleteContentPreset: { + contentPreset: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'OrgPermission', - 'deleteOrgPermission', - 'orgPermission', + 'ContentPreset', + 'deleteContentPreset', + 'contentPreset', { id: args.where.id, }, - 'DeleteOrgPermissionInput', + 'DeleteContentPresetInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'deleteOrgPermission', + operationName: 'ContentPreset', + fieldName: 'deleteContentPreset', document, variables, }); diff --git a/sdk/constructive-sdk/src/compute/orm/models/index.ts b/sdk/constructive-sdk/src/compute/orm/models/index.ts index e2480958de..bb1916cea6 100644 --- a/sdk/constructive-sdk/src/compute/orm/models/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/models/index.ts @@ -3,6 +3,7 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ContentPresetModel } from './contentPreset'; export { DbPresetModel } from './dbPreset'; export { FunctionApiBindingModel } from './functionApiBinding'; export { FunctionCapabilityBindingModel } from './functionCapabilityBinding'; diff --git a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts index c5bc975047..948d1e8903 100644 --- a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts @@ -16,12 +16,19 @@ import type { ImportGraphJsonInput, InfraInitEmptyRepoInput, InfraInsertNodeAtPathInput, + InfraInsertNodesAtPathsInput, + InfraSetAndCommitInput, InfraSetDataAtPathInput, + InfraSetManyAndCommitInput, InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, PlatformResourceInstallationsInstallInput, PlatformResourceInstallationsRollbackInput, PlatformResourceInstallationsUninstallInput, @@ -32,7 +39,9 @@ import type { ResourceInstallationsUninstallInput, ResourceInstallationsUpgradeInput, SaveGraphInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, StartExecutionInput, ValidateFunctionGraphInput, AddEdgePayload, @@ -44,12 +53,19 @@ import type { ImportGraphJsonPayload, InfraInitEmptyRepoPayload, InfraInsertNodeAtPathPayload, + InfraInsertNodesAtPathsPayload, + InfraSetAndCommitPayload, InfraSetDataAtPathPayload, + InfraSetManyAndCommitPayload, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, PlatformResourceInstallationsInstallPayload, PlatformResourceInstallationsRollbackPayload, PlatformResourceInstallationsUninstallPayload, @@ -60,7 +76,9 @@ import type { ResourceInstallationsUninstallPayload, ResourceInstallationsUpgradePayload, SaveGraphPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, StartExecutionPayload, ValidateFunctionGraphPayload, AddEdgePayloadSelect, @@ -72,12 +90,19 @@ import type { ImportGraphJsonPayloadSelect, InfraInitEmptyRepoPayloadSelect, InfraInsertNodeAtPathPayloadSelect, + InfraInsertNodesAtPathsPayloadSelect, + InfraSetAndCommitPayloadSelect, InfraSetDataAtPathPayloadSelect, + InfraSetManyAndCommitPayloadSelect, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, PlatformResourceInstallationsInstallPayloadSelect, PlatformResourceInstallationsRollbackPayloadSelect, PlatformResourceInstallationsUninstallPayloadSelect, @@ -88,7 +113,9 @@ import type { ResourceInstallationsUninstallPayloadSelect, ResourceInstallationsUpgradePayloadSelect, SaveGraphPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, StartExecutionPayloadSelect, ValidateFunctionGraphPayloadSelect, } from '../input-types'; @@ -120,24 +147,45 @@ export interface InfraInitEmptyRepoVariables { export interface InfraInsertNodeAtPathVariables { input: InfraInsertNodeAtPathInput; } +export interface InfraInsertNodesAtPathsVariables { + input: InfraInsertNodesAtPathsInput; +} +export interface InfraSetAndCommitVariables { + input: InfraSetAndCommitInput; +} export interface InfraSetDataAtPathVariables { input: InfraSetDataAtPathInput; } +export interface InfraSetManyAndCommitVariables { + input: InfraSetManyAndCommitInput; +} export interface InitEmptyRepoVariables { input: InitEmptyRepoInput; } export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} export interface PlatformInfraInitEmptyRepoVariables { input: PlatformInfraInitEmptyRepoInput; } export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} export interface PlatformResourceInstallationsInstallVariables { input: PlatformResourceInstallationsInstallInput; } @@ -175,9 +223,15 @@ export interface ResourceInstallationsUpgradeVariables { export interface SaveGraphVariables { input: SaveGraphInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export interface StartExecutionVariables { input: StartExecutionInput; } @@ -447,6 +501,64 @@ export function createMutationOperations(client: OrmClient) { 'InfraInsertNodeAtPathPayload' ), }), + infraInsertNodesAtPaths: ( + args: InfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraInsertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraInsertNodesAtPaths', + fieldName: 'infraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InfraInsertNodesAtPaths', + 'infraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InfraInsertNodesAtPathsPayload' + ), + }), + infraSetAndCommit: ( + args: InfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetAndCommit', + fieldName: 'infraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetAndCommit', + 'infraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetAndCommitPayload' + ), + }), infraSetDataAtPath: ( args: InfraSetDataAtPathVariables, options: { @@ -476,6 +588,35 @@ export function createMutationOperations(client: OrmClient) { 'InfraSetDataAtPathPayload' ), }), + infraSetManyAndCommit: ( + args: InfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetManyAndCommit', + fieldName: 'infraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetManyAndCommit', + 'infraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetManyAndCommitPayload' + ), + }), initEmptyRepo: ( args: InitEmptyRepoVariables, options: { @@ -534,6 +675,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), platformInfraInitEmptyRepo: ( args: PlatformInfraInitEmptyRepoVariables, options: { @@ -595,6 +765,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -624,6 +855,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), platformResourceInstallationsInstall: < S extends PlatformResourceInstallationsInstallPayloadSelect, >( @@ -946,6 +1209,35 @@ export function createMutationOperations(client: OrmClient) { 'SaveGraphPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -975,6 +1267,35 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), startExecution: ( args: StartExecutionVariables, options: { diff --git a/sdk/constructive-sdk/src/modules/README.md b/sdk/constructive-sdk/src/modules/README.md index efb8e061fd..dcf865e05e 100644 --- a/sdk/constructive-sdk/src/modules/README.md +++ b/sdk/constructive-sdk/src/modules/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 76 -- **Custom queries:** 2 -- **Custom mutations:** 10 +- **Tables:** 83 +- **Custom queries:** 0 +- **Custom mutations:** 3 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/modules/orm/README.md b/sdk/constructive-sdk/src/modules/orm/README.md index 7982fe489a..de92f9aee3 100644 --- a/sdk/constructive-sdk/src/modules/orm/README.md +++ b/sdk/constructive-sdk/src/modules/orm/README.md @@ -29,12 +29,15 @@ const db = createClient({ | `blueprint` | findMany, findOne, create, update, delete | | `blueprintConstruction` | findMany, findOne, create, update, delete | | `blueprintTemplate` | findMany, findOne, create, update, delete | +| `capabilitiesModule` | findMany, findOne, create, update, delete | | `catalogModule` | findMany, findOne, create, update, delete | | `computeLogModule` | findMany, findOne, create, update, delete | | `configSecretsUserModule` | findMany, findOne, create, update, delete | | `connectedAccountsModule` | findMany, findOne, create, update, delete | +| `contentPresetModule` | findMany, findOne, create, update, delete | | `cryptoAddressesModule` | findMany, findOne, create, update, delete | | `cryptoAuthModule` | findMany, findOne, create, update, delete | +| `dataCapabilitiesField` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `databaseSettingsModule` | findMany, findOne, create, update, delete | | `dbPoolConfig` | findMany, findOne, create, update, delete | @@ -45,9 +48,11 @@ const db = createClient({ | `denormalizedTableField` | findMany, findOne, create, update, delete | | `devicesModule` | findMany, findOne, create, update, delete | | `domainModule` | findMany, findOne, create, update, delete | +| `emailSenderModule` | findMany, findOne, create, update, delete | | `emailsModule` | findMany, findOne, create, update, delete | | `entityTypeProvision` | findMany, findOne, create, update, delete | | `eventsModule` | findMany, findOne, create, update, delete | +| `fileRefField` | findMany, findOne, create, update, delete | | `functionDeploymentModule` | findMany, findOne, create, update, delete | | `functionInvocationModule` | findMany, findOne, create, update, delete | | `functionModule` | findMany, findOne, create, update, delete | @@ -69,8 +74,8 @@ const db = createClient({ | `merkleStoreModule` | findMany, findOne, create, update, delete | | `namespaceModule` | findMany, findOne, create, update, delete | | `notificationsModule` | findMany, findOne, create, update, delete | +| `oauthRequestsModule` | findMany, findOne, create, update, delete | | `pagesModule` | findMany, findOne, create, update, delete | -| `permissionsModule` | findMany, findOne, create, update, delete | | `phoneNumbersModule` | findMany, findOne, create, update, delete | | `plansModule` | findMany, findOne, create, update, delete | | `principalAuthModule` | findMany, findOne, create, update, delete | @@ -82,6 +87,7 @@ const db = createClient({ | `resourceModule` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `routeModule` | findMany, findOne, create, update, delete | +| `scopeTypesModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `sessionSecretsModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | @@ -92,6 +98,7 @@ const db = createClient({ | `userAuthModule` | findMany, findOne, create, update, delete | | `userCredentialsModule` | findMany, findOne, create, update, delete | | `userSettingsModule` | findMany, findOne, create, update, delete | +| `userSettingsSecurityModule` | findMany, findOne, create, update, delete | | `userStateModule` | findMany, findOne, create, update, delete | | `usersModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | @@ -112,7 +119,7 @@ CRUD operations for AgentModule records. | `agentTableName` | String | Yes | | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `hasAgents` | Boolean | Yes | @@ -149,13 +156,13 @@ CRUD operations for AgentModule records. ```typescript // List all agentModule records -const items = await db.agentModule.findMany({ select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); +const items = await db.agentModule.findMany({ select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); // Get one by id -const item = await db.agentModule.findOne({ id: '', select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); +const item = await db.agentModule.findOne({ id: '', select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, hasAgents: true, hasPlans: true, hasResources: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceTableId: true, resourceTableName: true, resources: true, schemaId: true, scope: true, shared: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true } }).execute(); // Create -const created = await db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute(); +const created = await db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', hasAgents: '', hasPlans: '', hasResources: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceTableId: '', resourceTableName: '', resources: '', schemaId: '', scope: '', shared: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.agentModule.update({ where: { id: '' }, data: { agentTableId: '' }, select: { id: true } }).execute(); @@ -183,7 +190,7 @@ CRUD operations for ApiSurfaceModule records. | `corsSettingsTableId` | UUID | Yes | | `corsSettingsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -199,13 +206,13 @@ CRUD operations for ApiSurfaceModule records. ```typescript // List all apiSurfaceModule records -const items = await db.apiSurfaceModule.findMany({ select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.apiSurfaceModule.findMany({ select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.apiSurfaceModule.findOne({ id: '', select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.apiSurfaceModule.findOne({ id: '', select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.apiSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -229,7 +236,7 @@ CRUD operations for AppModule records. | `appsTableName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -247,13 +254,13 @@ CRUD operations for AppModule records. ```typescript // List all appModule records -const items = await db.appModule.findMany({ select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.appModule.findMany({ select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.appModule.findOne({ id: '', select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.appModule.findOne({ id: '', select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.appModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -274,8 +281,8 @@ CRUD operations for BillingModule records. | `balancesTableId` | UUID | Yes | | `balancesTableName` | String | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | | `defaultMeterCatalog` | JSON | Yes | -| `defaultPermissions` | String | Yes | | `id` | UUID | No | | `ledgerTableId` | UUID | Yes | | `ledgerTableName` | String | Yes | @@ -303,13 +310,13 @@ CRUD operations for BillingModule records. ```typescript // List all billingModule records -const items = await db.billingModule.findMany({ select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); +const items = await db.billingModule.findMany({ select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); // Get one by id -const item = await db.billingModule.findOne({ id: '', select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultMeterCatalog: true, defaultPermissions: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); +const item = await db.billingModule.findOne({ id: '', select: { apiName: true, balancesTableId: true, balancesTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute(); // Create -const created = await db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultMeterCatalog: '', defaultPermissions: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute(); +const created = await db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -329,16 +336,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | +| `billingInvoicesTableId` | UUID | Yes | +| `billingInvoicesTableName` | String | Yes | | `billingPricesTableId` | UUID | Yes | | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingRefundsTableId` | UUID | Yes | +| `billingRefundsTableName` | String | Yes | | `billingSubscriptionsTableId` | UUID | Yes | | `billingSubscriptionsTableName` | String | Yes | | `billingWebhookEventsTableId` | UUID | Yes | | `billingWebhookEventsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `id` | UUID | No | +| `listPendingUsageSyncFunction` | String | Yes | +| `markUsageSyncedFunction` | String | Yes | | `prefix` | String | Yes | | `pricesTableId` | UUID | Yes | | `privateApiName` | String | Yes | @@ -346,20 +359,22 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordRefundFunction` | String | Yes | | `schemaId` | UUID | Yes | | `subscriptionsTableId` | UUID | Yes | +| `upsertInvoiceFunction` | String | Yes | **Operations:** ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -495,6 +510,56 @@ const updated = await db.blueprintTemplate.update({ where: { id: '' }, dat const deleted = await db.blueprintTemplate.delete({ where: { id: '' } }).execute(); ``` +### `db.capabilitiesModule` + +CRUD operations for CapabilitiesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorTableId` | UUID | Yes | +| `apiName` | String | Yes | +| `bitlen` | Int | Yes | +| `databaseId` | UUID | Yes | +| `defaultTableId` | UUID | Yes | +| `defaultTableName` | String | Yes | +| `entityField` | String | Yes | +| `entityTableId` | UUID | Yes | +| `getByMask` | String | Yes | +| `getMask` | String | Yes | +| `getMaskByName` | String | Yes | +| `getPaddedMask` | String | Yes | +| `id` | UUID | No | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `privateSchemaId` | UUID | Yes | +| `privateSchemaName` | String | Yes | +| `publicSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scope` | String | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all capabilitiesModule records +const items = await db.capabilitiesModule.findMany({ select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.capabilitiesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.capabilitiesModule.create({ data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.capabilitiesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.capabilitiesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.catalogModule` CRUD operations for CatalogModule records. @@ -508,10 +573,12 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | Yes | | `appsTableId` | UUID | Yes | | `appsTableName` | String | Yes | +| `bindingsTableId` | UUID | Yes | +| `bindingsTableName` | String | Yes | | `bucketsTableId` | UUID | Yes | | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainsTableId` | UUID | Yes | | `domainsTableName` | String | Yes | | `entityTableId` | UUID | Yes | @@ -547,13 +614,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultCapabilities: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultCapabilities: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -683,6 +750,51 @@ const updated = await db.connectedAccountsModule.update({ where: { id: '' const deleted = await db.connectedAccountsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.contentPresetModule` + +CRUD operations for ContentPresetModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `contentPresetsTableId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `entityTableId` | UUID | Yes | +| `id` | UUID | No | +| `merkleStoreModuleId` | UUID | Yes | +| `policies` | JSON | Yes | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `privateSchemaId` | UUID | Yes | +| `privateSchemaName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaId` | UUID | Yes | +| `publicSchemaName` | String | Yes | +| `scope` | String | Yes | +| `storeName` | String | Yes | + +**Operations:** + +```typescript +// List all contentPresetModule records +const items = await db.contentPresetModule.findMany({ select: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }).execute(); + +// Get one by id +const item = await db.contentPresetModule.findOne({ id: '', select: { apiName: true, contentPresetsTableId: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, storeName: true } }).execute(); + +// Create +const created = await db.contentPresetModule.create({ data: { apiName: '', contentPresetsTableId: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', storeName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.contentPresetModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.contentPresetModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.cryptoAddressesModule` CRUD operations for CryptoAddressesModule records. @@ -763,6 +875,45 @@ const updated = await db.cryptoAuthModule.update({ where: { id: '' }, data const deleted = await db.cryptoAuthModule.delete({ where: { id: '' } }).execute(); ``` +### `db.dataCapabilitiesField` + +CRUD operations for DataCapabilitiesField records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capabilitiesModuleId` | UUID | Yes | +| `databaseId` | UUID | Yes | +| `fieldId` | UUID | Yes | +| `fromFieldId` | UUID | Yes | +| `id` | UUID | No | +| `mappingFieldId` | UUID | Yes | +| `mappingKeyFieldId` | UUID | Yes | +| `mappingTableId` | UUID | Yes | +| `mode` | String | Yes | +| `subsetGuard` | Boolean | Yes | +| `tableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all dataCapabilitiesField records +const items = await db.dataCapabilitiesField.findMany({ select: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }).execute(); + +// Get one by id +const item = await db.dataCapabilitiesField.findOne({ id: '', select: { capabilitiesModuleId: true, databaseId: true, fieldId: true, fromFieldId: true, id: true, mappingFieldId: true, mappingKeyFieldId: true, mappingTableId: true, mode: true, subsetGuard: true, tableId: true } }).execute(); + +// Create +const created = await db.dataCapabilitiesField.create({ data: { capabilitiesModuleId: '', databaseId: '', fieldId: '', fromFieldId: '', mappingFieldId: '', mappingKeyFieldId: '', mappingTableId: '', mode: '', subsetGuard: '', tableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.dataCapabilitiesField.update({ where: { id: '' }, data: { capabilitiesModuleId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.dataCapabilitiesField.delete({ where: { id: '' } }).execute(); +``` + ### `db.databaseProvisionModule` CRUD operations for DatabaseProvisionModule records. @@ -822,7 +973,7 @@ CRUD operations for DatabaseSettingsModule records. | `databaseId` | UUID | Yes | | `databaseSettingsTableId` | UUID | Yes | | `databaseSettingsTableName` | String | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -844,13 +995,13 @@ CRUD operations for DatabaseSettingsModule records. ```typescript // List all databaseSettingsModule records -const items = await db.databaseSettingsModule.findMany({ select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); +const items = await db.databaseSettingsModule.findMany({ select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); // Get one by id -const item = await db.databaseSettingsModule.findOne({ id: '', select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); +const item = await db.databaseSettingsModule.findOne({ id: '', select: { apiName: true, databaseId: true, databaseSettingsTableId: true, databaseSettingsTableName: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, pubkeySettingsTableId: true, pubkeySettingsTableName: true, publicSchemaName: true, rlsSettingsTableId: true, rlsSettingsTableName: true, schemaId: true, scope: true, webauthnSettingsTableId: true, webauthnSettingsTableName: true } }).execute(); // Create -const created = await db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute(); +const created = await db.databaseSettingsModule.create({ data: { apiName: '', databaseId: '', databaseSettingsTableId: '', databaseSettingsTableName: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', pubkeySettingsTableId: '', pubkeySettingsTableName: '', publicSchemaName: '', rlsSettingsTableId: '', rlsSettingsTableName: '', schemaId: '', scope: '', webauthnSettingsTableId: '', webauthnSettingsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.databaseSettingsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -995,7 +1146,7 @@ CRUD operations for DbUsageModule records. | `collectDbQueryStatsFunction` | String | Yes | | `collectDbTableStatsFunction` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `id` | UUID | No | | `interval` | String | Yes | @@ -1023,13 +1174,13 @@ CRUD operations for DbUsageModule records. ```typescript // List all dbUsageModule records -const items = await db.dbUsageModule.findMany({ select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); +const items = await db.dbUsageModule.findMany({ select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); // Get one by id -const item = await db.dbUsageModule.findOne({ id: '', select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultPermissions: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); +const item = await db.dbUsageModule.findOne({ id: '', select: { apiName: true, collectDbQueryStatsFunction: true, collectDbTableStatsFunction: true, databaseId: true, defaultCapabilities: true, entityField: true, id: true, interval: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, queryStatsLogTableId: true, queryStatsLogTableName: true, queryStatsSummaryTableId: true, queryStatsSummaryTableName: true, retention: true, rollupDbQueryStatsUsageSummaryFunction: true, rollupDbTableStatsUsageSummaryFunction: true, schemaId: true, scope: true, tableStatsLogTableId: true, tableStatsLogTableName: true, tableStatsSummaryTableId: true, tableStatsSummaryTableName: true } }).execute(); // Create -const created = await db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultPermissions: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute(); +const created = await db.dbUsageModule.create({ data: { apiName: '', collectDbQueryStatsFunction: '', collectDbTableStatsFunction: '', databaseId: '', defaultCapabilities: '', entityField: '', interval: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', queryStatsLogTableId: '', queryStatsLogTableName: '', queryStatsSummaryTableId: '', queryStatsSummaryTableName: '', retention: '', rollupDbQueryStatsUsageSummaryFunction: '', rollupDbTableStatsUsageSummaryFunction: '', schemaId: '', scope: '', tableStatsLogTableId: '', tableStatsLogTableName: '', tableStatsSummaryTableId: '', tableStatsSummaryTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.dbUsageModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1154,7 +1305,7 @@ CRUD operations for DomainModule records. | `apiName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainEventsTableId` | UUID | Yes | | `domainEventsTableName` | String | Yes | | `domainVerificationsTableId` | UUID | Yes | @@ -1180,13 +1331,13 @@ CRUD operations for DomainModule records. ```typescript // List all domainModule records -const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.domainModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.domainModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, domainEventsTableId: true, domainEventsTableName: true, domainVerificationsTableId: true, domainVerificationsTableName: true, domainsTableId: true, domainsTableName: true, entityField: true, entityTableId: true, id: true, managedDomainsTableId: true, managedDomainsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.domainModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', domainEventsTableId: '', domainEventsTableName: '', domainVerificationsTableId: '', domainVerificationsTableName: '', domainsTableId: '', domainsTableName: '', entityField: '', entityTableId: '', managedDomainsTableId: '', managedDomainsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.domainModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1195,6 +1346,54 @@ const updated = await db.domainModule.update({ where: { id: '' }, data: { const deleted = await db.domainModule.delete({ where: { id: '' } }).execute(); ``` +### `db.emailSenderModule` + +CRUD operations for EmailSenderModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | +| `emailIdentitiesTableId` | UUID | Yes | +| `emailIdentitiesTableName` | String | Yes | +| `emailProviderAccountsTableId` | UUID | Yes | +| `emailProviderAccountsTableName` | String | Yes | +| `emailSiteIdentitiesTableId` | UUID | Yes | +| `emailSiteIdentitiesTableName` | String | Yes | +| `entityField` | String | Yes | +| `entityTableId` | UUID | Yes | +| `id` | UUID | No | +| `policies` | JSON | Yes | +| `prefix` | String | Yes | +| `privateApiName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scope` | String | Yes | +| `siteSurfaceModuleId` | UUID | Yes | + +**Operations:** + +```typescript +// List all emailSenderModule records +const items = await db.emailSenderModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }).execute(); + +// Get one by id +const item = await db.emailSenderModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, emailIdentitiesTableId: true, emailIdentitiesTableName: true, emailProviderAccountsTableId: true, emailProviderAccountsTableName: true, emailSiteIdentitiesTableId: true, emailSiteIdentitiesTableName: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteSurfaceModuleId: true } }).execute(); + +// Create +const created = await db.emailSenderModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', emailIdentitiesTableId: '', emailIdentitiesTableName: '', emailProviderAccountsTableId: '', emailProviderAccountsTableName: '', emailSiteIdentitiesTableId: '', emailSiteIdentitiesTableName: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteSurfaceModuleId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.emailSenderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.emailSenderModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.emailsModule` CRUD operations for EmailsModule records. @@ -1312,7 +1511,7 @@ CRUD operations for EventsModule records. | `actorTableId` | UUID | Yes | | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `eventAggregatesTableId` | UUID | Yes | @@ -1321,6 +1520,7 @@ CRUD operations for EventsModule records. | `eventTypesTableName` | String | Yes | | `eventsTableId` | UUID | Yes | | `eventsTableName` | String | Yes | +| `expireGrants` | String | Yes | | `grantAchievement` | String | Yes | | `id` | UUID | No | | `interval` | String | Yes | @@ -1337,9 +1537,11 @@ CRUD operations for EventsModule records. | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | | `publicSchemaName` | String | Yes | +| `recomputeCapabilities` | String | Yes | | `recordEvent` | String | Yes | | `removeEvent` | String | Yes | | `retention` | String | Yes | +| `revokeAchievement` | String | Yes | | `schemaId` | UUID | Yes | | `scope` | String | Yes | | `stepsRequired` | String | Yes | @@ -1349,20 +1551,22 @@ CRUD operations for EventsModule records. | `tgEventBool` | String | Yes | | `tgEventToggle` | String | Yes | | `tgEventToggleBool` | String | Yes | +| `tgLevelGrantSync` | String | Yes | | `tgUpdateAggregates` | String | Yes | +| `trustLadder` | JSON | Yes | | `upsertAggregate` | String | Yes | **Operations:** ```typescript // List all eventsModule records -const items = await db.eventsModule.findMany({ select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }).execute(); +const items = await db.eventsModule.findMany({ select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }).execute(); // Get one by id -const item = await db.eventsModule.findOne({ id: '', select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordEvent: true, removeEvent: true, retention: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgUpdateAggregates: true, upsertAggregate: true } }).execute(); +const item = await db.eventsModule.findOne({ id: '', select: { achievementRewardsTableId: true, achievementRewardsTableName: true, actorTableId: true, apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, eventAggregatesTableId: true, eventAggregatesTableName: true, eventTypesTableId: true, eventTypesTableName: true, eventsTableId: true, eventsTableName: true, expireGrants: true, grantAchievement: true, id: true, interval: true, levelAchieved: true, levelGrantsTableId: true, levelGrantsTableName: true, levelRequirementsTableId: true, levelRequirementsTableName: true, levelsTableId: true, levelsTableName: true, prefix: true, premake: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recomputeCapabilities: true, recordEvent: true, removeEvent: true, retention: true, revokeAchievement: true, schemaId: true, scope: true, stepsRequired: true, tgAchievementReward: true, tgCheckAchievements: true, tgEvent: true, tgEventBool: true, tgEventToggle: true, tgEventToggleBool: true, tgLevelGrantSync: true, tgUpdateAggregates: true, trustLadder: true, upsertAggregate: true } }).execute(); // Create -const created = await db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordEvent: '', removeEvent: '', retention: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgUpdateAggregates: '', upsertAggregate: '' }, select: { id: true } }).execute(); +const created = await db.eventsModule.create({ data: { achievementRewardsTableId: '', achievementRewardsTableName: '', actorTableId: '', apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', eventAggregatesTableId: '', eventAggregatesTableName: '', eventTypesTableId: '', eventTypesTableName: '', eventsTableId: '', eventsTableName: '', expireGrants: '', grantAchievement: '', interval: '', levelAchieved: '', levelGrantsTableId: '', levelGrantsTableName: '', levelRequirementsTableId: '', levelRequirementsTableName: '', levelsTableId: '', levelsTableName: '', prefix: '', premake: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recomputeCapabilities: '', recordEvent: '', removeEvent: '', retention: '', revokeAchievement: '', schemaId: '', scope: '', stepsRequired: '', tgAchievementReward: '', tgCheckAchievements: '', tgEvent: '', tgEventBool: '', tgEventToggle: '', tgEventToggleBool: '', tgLevelGrantSync: '', tgUpdateAggregates: '', trustLadder: '', upsertAggregate: '' }, select: { id: true } }).execute(); // Update const updated = await db.eventsModule.update({ where: { id: '' }, data: { achievementRewardsTableId: '' }, select: { id: true } }).execute(); @@ -1371,6 +1575,43 @@ const updated = await db.eventsModule.update({ where: { id: '' }, data: { const deleted = await db.eventsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.fileRefField` + +CRUD operations for FileRefField records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `bucketKey` | String | Yes | +| `bucketTags` | String | Yes | +| `databaseId` | UUID | Yes | +| `enforceFk` | Boolean | Yes | +| `fieldId` | UUID | Yes | +| `id` | UUID | No | +| `isPublic` | Boolean | Yes | +| `storageModuleId` | UUID | Yes | +| `tableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all fileRefField records +const items = await db.fileRefField.findMany({ select: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }).execute(); + +// Get one by id +const item = await db.fileRefField.findOne({ id: '', select: { bucketKey: true, bucketTags: true, databaseId: true, enforceFk: true, fieldId: true, id: true, isPublic: true, storageModuleId: true, tableId: true } }).execute(); + +// Create +const created = await db.fileRefField.create({ data: { bucketKey: '', bucketTags: '', databaseId: '', enforceFk: '', fieldId: '', isPublic: '', storageModuleId: '', tableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.fileRefField.update({ where: { id: '' }, data: { bucketKey: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.fileRefField.delete({ where: { id: '' } }).execute(); +``` + ### `db.functionDeploymentModule` CRUD operations for FunctionDeploymentModule records. @@ -1381,7 +1622,7 @@ CRUD operations for FunctionDeploymentModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `deploymentEventsTableId` | UUID | Yes | | `deploymentEventsTableName` | String | Yes | | `deploymentsTableId` | UUID | Yes | @@ -1405,13 +1646,13 @@ CRUD operations for FunctionDeploymentModule records. ```typescript // List all functionDeploymentModule records -const items = await db.functionDeploymentModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionDeploymentModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionDeploymentModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionDeploymentModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, deploymentEventsTableId: true, deploymentEventsTableName: true, deploymentsTableId: true, deploymentsTableName: true, entityField: true, entityTableId: true, functionModuleId: true, id: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionDeploymentModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', deploymentEventsTableId: '', deploymentEventsTableName: '', deploymentsTableId: '', deploymentsTableName: '', entityField: '', entityTableId: '', functionModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeploymentModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1432,7 +1673,7 @@ CRUD operations for FunctionInvocationModule records. | `attemptsTableId` | UUID | Yes | | `attemptsTableName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `executionLogsTableId` | UUID | Yes | @@ -1454,13 +1695,13 @@ CRUD operations for FunctionInvocationModule records. ```typescript // List all functionInvocationModule records -const items = await db.functionInvocationModule.findMany({ select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionInvocationModule.findMany({ select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionInvocationModule.findOne({ id: '', select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionInvocationModule.findOne({ id: '', select: { apiName: true, attemptsTableId: true, attemptsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionLogsTableId: true, executionLogsTableName: true, id: true, invocationsTableId: true, invocationsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionInvocationModule.create({ data: { apiName: '', attemptsTableId: '', attemptsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionLogsTableId: '', executionLogsTableName: '', invocationsTableId: '', invocationsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionInvocationModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1482,7 +1723,7 @@ CRUD operations for FunctionModule records. | `bindingsTableName` | String | Yes | | `capabilityBindingsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `definitionsTableId` | UUID | Yes | | `definitionsTableName` | String | Yes | | `entityField` | String | Yes | @@ -1504,13 +1745,13 @@ CRUD operations for FunctionModule records. ```typescript // List all functionModule records -const items = await db.functionModule.findMany({ select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); +const items = await db.functionModule.findMany({ select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.functionModule.findOne({ id: '', select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultPermissions: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); +const item = await db.functionModule.findOne({ id: '', select: { apiName: true, bindingsTableId: true, bindingsTableName: true, capabilityBindingsTableId: true, databaseId: true, defaultCapabilities: true, definitionsTableId: true, definitionsTableName: true, entityField: true, entityTableId: true, hasCron: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schedulesTableId: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultPermissions: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.functionModule.create({ data: { apiName: '', bindingsTableId: '', bindingsTableName: '', capabilityBindingsTableId: '', databaseId: '', defaultCapabilities: '', definitionsTableId: '', definitionsTableName: '', entityField: '', entityTableId: '', hasCron: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schedulesTableId: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1530,7 +1771,7 @@ CRUD operations for GraphExecutionModule records. | `apiName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `executionsTableId` | UUID | Yes | @@ -1555,13 +1796,13 @@ CRUD operations for GraphExecutionModule records. ```typescript // List all graphExecutionModule records -const items = await db.graphExecutionModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.graphExecutionModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.graphExecutionModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.graphExecutionModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, executionsTableId: true, executionsTableName: true, graphModuleId: true, id: true, nodeStatesTableId: true, nodeStatesTableName: true, outputsTableId: true, outputsTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.graphExecutionModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', executionsTableId: '', executionsTableName: '', graphModuleId: '', nodeStatesTableId: '', nodeStatesTableName: '', outputsTableId: '', outputsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.graphExecutionModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1581,7 +1822,7 @@ CRUD operations for GraphModule records. | `apiName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `graphsTableId` | UUID | Yes | @@ -1601,13 +1842,13 @@ CRUD operations for GraphModule records. ```typescript // List all graphModule records -const items = await db.graphModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); +const items = await db.graphModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); // Get one by id -const item = await db.graphModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); +const item = await db.graphModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, graphsTableId: true, id: true, merkleStoreModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true } }).execute(); // Create -const created = await db.graphModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.graphModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', graphsTableId: '', merkleStoreModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.graphModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -1630,7 +1871,7 @@ CRUD operations for HierarchyModule records. | `chartEdgesTableName` | String | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `getManagersFunction` | String | Yes | @@ -1652,13 +1893,13 @@ CRUD operations for HierarchyModule records. ```typescript // List all hierarchyModule records -const items = await db.hierarchyModule.findMany({ select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); +const items = await db.hierarchyModule.findMany({ select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); // Get one by id -const item = await db.hierarchyModule.findOne({ id: '', select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); +const item = await db.hierarchyModule.findOne({ id: '', select: { chartEdgeGrantsTableId: true, chartEdgeGrantsTableName: true, chartEdgesTableId: true, chartEdgesTableName: true, createdAt: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, getManagersFunction: true, getSubordinatesFunction: true, hierarchySprtTableId: true, hierarchySprtTableName: true, id: true, isManagerOfFunction: true, prefix: true, privateSchemaId: true, privateSchemaName: true, rebuildHierarchyFunction: true, schemaId: true, scope: true, sprtTableName: true, usersTableId: true } }).execute(); // Create -const created = await db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute(); +const created = await db.hierarchyModule.create({ data: { chartEdgeGrantsTableId: '', chartEdgeGrantsTableName: '', chartEdgesTableId: '', chartEdgesTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', getManagersFunction: '', getSubordinatesFunction: '', hierarchySprtTableId: '', hierarchySprtTableName: '', isManagerOfFunction: '', prefix: '', privateSchemaId: '', privateSchemaName: '', rebuildHierarchyFunction: '', schemaId: '', scope: '', sprtTableName: '', usersTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.hierarchyModule.update({ where: { id: '' }, data: { chartEdgeGrantsTableId: '' }, select: { id: true } }).execute(); @@ -1677,7 +1918,7 @@ CRUD operations for HttpRouteModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `functionModuleId` | UUID | Yes | @@ -1701,13 +1942,13 @@ CRUD operations for HttpRouteModule records. ```typescript // List all httpRouteModule records -const items = await db.httpRouteModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); +const items = await db.httpRouteModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); // Get one by id -const item = await db.httpRouteModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); +const item = await db.httpRouteModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionModuleId: true, httpRoutesTableId: true, httpRoutesTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, resourceModuleId: true, schemaId: true, scope: true, storageModuleId: true } }).execute(); // Create -const created = await db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute(); +const created = await db.httpRouteModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionModuleId: '', httpRoutesTableId: '', httpRoutesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', resourceModuleId: '', schemaId: '', scope: '', storageModuleId: '' }, select: { id: true } }).execute(); // Update const updated = await db.httpRouteModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2092,6 +2333,7 @@ CRUD operations for LimitsModule records. | `limitCreditsTableId` | UUID | Yes | | `limitDecrementFunction` | String | Yes | | `limitDecrementTrigger` | String | Yes | +| `limitDefaults` | JSON | Yes | | `limitIncrementFunction` | String | Yes | | `limitIncrementTrigger` | String | Yes | | `limitUpdateTrigger` | String | Yes | @@ -2112,13 +2354,13 @@ CRUD operations for LimitsModule records. ```typescript // List all limitsModule records -const items = await db.limitsModule.findMany({ select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const items = await db.limitsModule.findMany({ select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Get one by id -const item = await db.limitsModule.findOne({ id: '', select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.limitsModule.findOne({ id: '', select: { actorTableId: true, aggregateTableId: true, apiName: true, capCheckTrigger: true, creditCodeItemsTableId: true, creditCodesTableId: true, creditRedemptionsTableId: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, eventsTableId: true, id: true, limitAggregateCheckSoftFunction: true, limitCapsDefaultsTableId: true, limitCapsTableId: true, limitCheckFunction: true, limitCheckSoftFunction: true, limitCreditsTableId: true, limitDecrementFunction: true, limitDecrementTrigger: true, limitDefaults: true, limitIncrementFunction: true, limitIncrementTrigger: true, limitUpdateTrigger: true, limitWarningStateTableId: true, limitWarningsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, resolveCapFunction: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Create -const created = await db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.limitsModule.create({ data: { actorTableId: '', aggregateTableId: '', apiName: '', capCheckTrigger: '', creditCodeItemsTableId: '', creditCodesTableId: '', creditRedemptionsTableId: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', eventsTableId: '', limitAggregateCheckSoftFunction: '', limitCapsDefaultsTableId: '', limitCapsTableId: '', limitCheckFunction: '', limitCheckSoftFunction: '', limitCreditsTableId: '', limitDecrementFunction: '', limitDecrementTrigger: '', limitDefaults: '', limitIncrementFunction: '', limitIncrementTrigger: '', limitUpdateTrigger: '', limitWarningStateTableId: '', limitWarningsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', resolveCapFunction: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.limitsModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); @@ -2174,9 +2416,12 @@ CRUD operations for MembershipsModule records. | `adminGrantsTableId` | UUID | Yes | | `adminGrantsTableName` | String | Yes | | `apiName` | String | Yes | +| `capabilitiesTableId` | UUID | Yes | +| `capabilityDefaultCapabilitiesTableId` | UUID | Yes | +| `capabilityDefaultGrantsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilitiesTableId` | UUID | Yes | | `defaultLimitsTableId` | UUID | Yes | -| `defaultPermissionsTableId` | UUID | Yes | | `entityField` | String | Yes | | `entityIdsByMask` | String | Yes | | `entityIdsByPerm` | String | Yes | @@ -2199,9 +2444,6 @@ CRUD operations for MembershipsModule records. | `membershipsTableName` | String | Yes | | `ownerGrantsTableId` | UUID | Yes | | `ownerGrantsTableName` | String | Yes | -| `permissionDefaultGrantsTableId` | UUID | Yes | -| `permissionDefaultPermissionsTableId` | UUID | Yes | -| `permissionsTableId` | UUID | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | @@ -2215,13 +2457,13 @@ CRUD operations for MembershipsModule records. ```typescript // List all membershipsModule records -const items = await db.membershipsModule.findMany({ select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); +const items = await db.membershipsModule.findMany({ select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); // Get one by id -const item = await db.membershipsModule.findOne({ id: '', select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, databaseId: true, defaultLimitsTableId: true, defaultPermissionsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, permissionDefaultGrantsTableId: true, permissionDefaultPermissionsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); +const item = await db.membershipsModule.findOne({ id: '', select: { actorMaskCheck: true, actorPermCheck: true, actorTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, apiName: true, capabilitiesTableId: true, capabilityDefaultCapabilitiesTableId: true, capabilityDefaultGrantsTableId: true, databaseId: true, defaultCapabilitiesTableId: true, defaultLimitsTableId: true, entityField: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, entityTableId: true, entityTableOwnerId: true, getOrgFn: true, grantsTableId: true, grantsTableName: true, id: true, limitsTableId: true, memberProfilesTableId: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, membershipSettingsTableId: true, membershipSettingsTableName: true, membershipsTableId: true, membershipsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, sprtTableId: true } }).execute(); // Create -const created = await db.membershipsModule.create({ data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', databaseId: '', defaultLimitsTableId: '', defaultPermissionsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', permissionDefaultGrantsTableId: '', permissionDefaultPermissionsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute(); +const created = await db.membershipsModule.create({ data: { actorMaskCheck: '', actorPermCheck: '', actorTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', apiName: '', capabilitiesTableId: '', capabilityDefaultCapabilitiesTableId: '', capabilityDefaultGrantsTableId: '', databaseId: '', defaultCapabilitiesTableId: '', defaultLimitsTableId: '', entityField: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', entityTableId: '', entityTableOwnerId: '', getOrgFn: '', grantsTableId: '', grantsTableName: '', limitsTableId: '', memberProfilesTableId: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', membershipSettingsTableId: '', membershipSettingsTableName: '', membershipsTableId: '', membershipsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', sprtTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.membershipsModule.update({ where: { id: '' }, data: { actorMaskCheck: '' }, select: { id: true } }).execute(); @@ -2239,6 +2481,7 @@ CRUD operations for MerkleStoreModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `capabilityKey` | String | Yes | | `commitTableId` | UUID | Yes | | `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | @@ -2246,7 +2489,6 @@ CRUD operations for MerkleStoreModule records. | `functionPrefix` | String | Yes | | `id` | UUID | No | | `objectTableId` | UUID | Yes | -| `permissionKey` | String | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | @@ -2261,13 +2503,13 @@ CRUD operations for MerkleStoreModule records. ```typescript // List all merkleStoreModule records -const items = await db.merkleStoreModule.findMany({ select: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); +const items = await db.merkleStoreModule.findMany({ select: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); // Get one by id -const item = await db.merkleStoreModule.findOne({ id: '', select: { apiName: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, permissionKey: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); +const item = await db.merkleStoreModule.findOne({ id: '', select: { apiName: true, capabilityKey: true, commitTableId: true, createdAt: true, databaseId: true, entityField: true, functionPrefix: true, id: true, objectTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, refTableId: true, schemaId: true, scope: true, storeTableId: true } }).execute(); // Create -const created = await db.merkleStoreModule.create({ data: { apiName: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', permissionKey: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute(); +const created = await db.merkleStoreModule.create({ data: { apiName: '', capabilityKey: '', commitTableId: '', databaseId: '', entityField: '', functionPrefix: '', objectTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', refTableId: '', schemaId: '', scope: '', storeTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.merkleStoreModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2286,7 +2528,7 @@ CRUD operations for NamespaceModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -2308,13 +2550,13 @@ CRUD operations for NamespaceModule records. ```typescript // List all namespaceModule records -const items = await db.namespaceModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const items = await db.namespaceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.namespaceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); +const item = await db.namespaceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, namespaceEventsTableId: true, namespaceEventsTableName: true, namespacesTableId: true, namespacesTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.namespaceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', namespaceEventsTableId: '', namespaceEventsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.namespaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2334,7 +2576,7 @@ CRUD operations for NotificationsModule records. | `apiName` | String | Yes | | `channelsTableId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `deliveryLogTableId` | UUID | Yes | | `entityField` | String | Yes | | `hasChannels` | Boolean | Yes | @@ -2360,13 +2602,13 @@ CRUD operations for NotificationsModule records. ```typescript // List all notificationsModule records -const items = await db.notificationsModule.findMany({ select: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); +const items = await db.notificationsModule.findMany({ select: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); // Get one by id -const item = await db.notificationsModule.findOne({ id: '', select: { apiName: true, channelsTableId: true, databaseId: true, defaultPermissions: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); +const item = await db.notificationsModule.findOne({ id: '', select: { apiName: true, channelsTableId: true, databaseId: true, defaultCapabilities: true, deliveryLogTableId: true, entityField: true, hasChannels: true, hasDigestMetadata: true, hasPreferences: true, hasSettingsExtension: true, hasSubscriptions: true, id: true, notificationsTableId: true, organizationSettingsTableId: true, ownerTableId: true, preferencesTableId: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, readStateTableId: true, schemaId: true, suppressionsTableId: true, userSettingsTableId: true } }).execute(); // Create -const created = await db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultPermissions: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute(); +const created = await db.notificationsModule.create({ data: { apiName: '', channelsTableId: '', databaseId: '', defaultCapabilities: '', deliveryLogTableId: '', entityField: '', hasChannels: '', hasDigestMetadata: '', hasPreferences: '', hasSettingsExtension: '', hasSubscriptions: '', notificationsTableId: '', organizationSettingsTableId: '', ownerTableId: '', preferencesTableId: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', readStateTableId: '', schemaId: '', suppressionsTableId: '', userSettingsTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.notificationsModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2375,101 +2617,91 @@ const updated = await db.notificationsModule.update({ where: { id: '' }, d const deleted = await db.notificationsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.pagesModule` +### `db.oauthRequestsModule` -CRUD operations for PagesModule records. +CRUD operations for OauthRequestsModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `apiName` | String | Yes | -| `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | +| `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | -| `merkleStoreModuleId` | UUID | Yes | -| `pagesTableId` | UUID | Yes | -| `policies` | JSON | Yes | +| `oauthAuthorizationRequestsTableId` | UUID | Yes | +| `oauthAuthorizationRequestsTableName` | String | Yes | +| `pendingIdentityLinksTableId` | UUID | Yes | +| `pendingIdentityLinksTableName` | String | Yes | | `prefix` | String | Yes | -| `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | -| `provisions` | JSON | Yes | -| `publicSchemaId` | UUID | Yes | -| `publicSchemaName` | String | Yes | | `scope` | String | Yes | -| `siteSurfaceModuleId` | UUID | Yes | -| `sitesTableId` | UUID | Yes | -| `storeNamePrefix` | String | Yes | **Operations:** ```typescript -// List all pagesModule records -const items = await db.pagesModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); +// List all oauthRequestsModule records +const items = await db.oauthRequestsModule.findMany({ select: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }).execute(); // Get one by id -const item = await db.pagesModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); +const item = await db.oauthRequestsModule.findOne({ id: '', select: { databaseId: true, entityField: true, entityTableId: true, id: true, oauthAuthorizationRequestsTableId: true, oauthAuthorizationRequestsTableName: true, pendingIdentityLinksTableId: true, pendingIdentityLinksTableName: true, prefix: true, privateSchemaId: true, privateSchemaName: true, scope: true } }).execute(); // Create -const created = await db.pagesModule.create({ data: { apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }, select: { id: true } }).execute(); +const created = await db.oauthRequestsModule.create({ data: { databaseId: '', entityField: '', entityTableId: '', oauthAuthorizationRequestsTableId: '', oauthAuthorizationRequestsTableName: '', pendingIdentityLinksTableId: '', pendingIdentityLinksTableName: '', prefix: '', privateSchemaId: '', privateSchemaName: '', scope: '' }, select: { id: true } }).execute(); // Update -const updated = await db.pagesModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); +const updated = await db.oauthRequestsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.pagesModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.oauthRequestsModule.delete({ where: { id: '' } }).execute(); ``` -### `db.permissionsModule` +### `db.pagesModule` -CRUD operations for PermissionsModule records. +CRUD operations for PagesModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorTableId` | UUID | Yes | | `apiName` | String | Yes | -| `bitlen` | Int | Yes | +| `createdAt` | Datetime | No | | `databaseId` | UUID | Yes | -| `defaultTableId` | UUID | Yes | -| `defaultTableName` | String | Yes | -| `entityField` | String | Yes | | `entityTableId` | UUID | Yes | -| `getByMask` | String | Yes | -| `getMask` | String | Yes | -| `getMaskByName` | String | Yes | -| `getPaddedMask` | String | Yes | | `id` | UUID | No | +| `merkleStoreModuleId` | UUID | Yes | +| `pagesTableId` | UUID | Yes | +| `policies` | JSON | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | +| `provisions` | JSON | Yes | +| `publicSchemaId` | UUID | Yes | | `publicSchemaName` | String | Yes | -| `schemaId` | UUID | Yes | | `scope` | String | Yes | -| `tableId` | UUID | Yes | -| `tableName` | String | Yes | +| `siteSurfaceModuleId` | UUID | Yes | +| `sitesTableId` | UUID | Yes | +| `storeNamePrefix` | String | Yes | **Operations:** ```typescript -// List all permissionsModule records -const items = await db.permissionsModule.findMany({ select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +// List all pagesModule records +const items = await db.pagesModule.findMany({ select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); // Get one by id -const item = await db.permissionsModule.findOne({ id: '', select: { actorTableId: true, apiName: true, bitlen: true, databaseId: true, defaultTableId: true, defaultTableName: true, entityField: true, entityTableId: true, getByMask: true, getMask: true, getMaskByName: true, getPaddedMask: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.pagesModule.findOne({ id: '', select: { apiName: true, createdAt: true, databaseId: true, entityTableId: true, id: true, merkleStoreModuleId: true, pagesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaId: true, publicSchemaName: true, scope: true, siteSurfaceModuleId: true, sitesTableId: true, storeNamePrefix: true } }).execute(); // Create -const created = await db.permissionsModule.create({ data: { actorTableId: '', apiName: '', bitlen: '', databaseId: '', defaultTableId: '', defaultTableName: '', entityField: '', entityTableId: '', getByMask: '', getMask: '', getMaskByName: '', getPaddedMask: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.pagesModule.create({ data: { apiName: '', databaseId: '', entityTableId: '', merkleStoreModuleId: '', pagesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaId: '', publicSchemaName: '', scope: '', siteSurfaceModuleId: '', sitesTableId: '', storeNamePrefix: '' }, select: { id: true } }).execute(); // Update -const updated = await db.permissionsModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); +const updated = await db.pagesModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.permissionsModule.delete({ where: { id: '' } }).execute(); +const deleted = await db.pagesModule.delete({ where: { id: '' } }).execute(); ``` ### `db.phoneNumbersModule` @@ -2614,22 +2846,24 @@ CRUD operations for ProfilesModule records. |-------|------|----------| | `actorTableId` | UUID | Yes | | `apiName` | String | Yes | +| `capabilitiesTableId` | UUID | Yes | | `databaseId` | UUID | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | +| `membershipProfilesTableId` | UUID | Yes | +| `membershipProfilesTableName` | String | Yes | | `membershipsTableId` | UUID | Yes | -| `permissionsTableId` | UUID | Yes | | `prefix` | String | Yes | | `privateApiName` | String | Yes | | `privateSchemaId` | UUID | Yes | | `privateSchemaName` | String | Yes | +| `profileCapabilitiesTableId` | UUID | Yes | +| `profileCapabilitiesTableName` | String | Yes | | `profileDefinitionGrantsTableId` | UUID | Yes | | `profileDefinitionGrantsTableName` | String | Yes | | `profileGrantsTableId` | UUID | Yes | | `profileGrantsTableName` | String | Yes | -| `profilePermissionsTableId` | UUID | Yes | -| `profilePermissionsTableName` | String | Yes | | `profileTemplatesTableId` | UUID | Yes | | `profileTemplatesTableName` | String | Yes | | `publicSchemaName` | String | Yes | @@ -2642,13 +2876,13 @@ CRUD operations for ProfilesModule records. ```typescript // List all profilesModule records -const items = await db.profilesModule.findMany({ select: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const items = await db.profilesModule.findMany({ select: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Get one by id -const item = await db.profilesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipsTableId: true, permissionsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profilePermissionsTableId: true, profilePermissionsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); +const item = await db.profilesModule.findOne({ id: '', select: { actorTableId: true, apiName: true, capabilitiesTableId: true, databaseId: true, entityField: true, entityTableId: true, id: true, membershipProfilesTableId: true, membershipProfilesTableName: true, membershipsTableId: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, profileCapabilitiesTableId: true, profileCapabilitiesTableName: true, profileDefinitionGrantsTableId: true, profileDefinitionGrantsTableName: true, profileGrantsTableId: true, profileGrantsTableName: true, profileTemplatesTableId: true, profileTemplatesTableName: true, publicSchemaName: true, schemaId: true, scope: true, tableId: true, tableName: true } }).execute(); // Create -const created = await db.profilesModule.create({ data: { actorTableId: '', apiName: '', databaseId: '', entityField: '', entityTableId: '', membershipsTableId: '', permissionsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profilePermissionsTableId: '', profilePermissionsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); +const created = await db.profilesModule.create({ data: { actorTableId: '', apiName: '', capabilitiesTableId: '', databaseId: '', entityField: '', entityTableId: '', membershipProfilesTableId: '', membershipProfilesTableName: '', membershipsTableId: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', profileCapabilitiesTableId: '', profileCapabilitiesTableName: '', profileDefinitionGrantsTableId: '', profileDefinitionGrantsTableName: '', profileGrantsTableId: '', profileGrantsTableName: '', profileTemplatesTableId: '', profileTemplatesTableName: '', publicSchemaName: '', schemaId: '', scope: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.profilesModule.update({ where: { id: '' }, data: { actorTableId: '' }, select: { id: true } }).execute(); @@ -2668,7 +2902,7 @@ CRUD operations for RateLimitMetersModule records. | `apiName` | String | Yes | | `checkRateLimitFunction` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `id` | UUID | No | | `prefix` | String | Yes | | `privateApiName` | String | Yes | @@ -2687,13 +2921,13 @@ CRUD operations for RateLimitMetersModule records. ```typescript // List all rateLimitMetersModule records -const items = await db.rateLimitMetersModule.findMany({ select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); +const items = await db.rateLimitMetersModule.findMany({ select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); // Get one by id -const item = await db.rateLimitMetersModule.findOne({ id: '', select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultPermissions: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); +const item = await db.rateLimitMetersModule.findOne({ id: '', select: { apiName: true, checkRateLimitFunction: true, databaseId: true, defaultCapabilities: true, id: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, rateLimitOverridesTableId: true, rateLimitOverridesTableName: true, rateLimitStateTableId: true, rateLimitStateTableName: true, rateWindowLimitsTableId: true, rateWindowLimitsTableName: true, schemaId: true } }).execute(); // Create -const created = await db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultPermissions: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute(); +const created = await db.rateLimitMetersModule.create({ data: { apiName: '', checkRateLimitFunction: '', databaseId: '', defaultCapabilities: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', rateLimitOverridesTableId: '', rateLimitOverridesTableName: '', rateLimitStateTableId: '', rateLimitStateTableName: '', rateWindowLimitsTableId: '', rateWindowLimitsTableName: '', schemaId: '' }, select: { id: true } }).execute(); // Update const updated = await db.rateLimitMetersModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2843,7 +3077,7 @@ CRUD operations for ResourceModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -2882,13 +3116,13 @@ CRUD operations for ResourceModule records. ```typescript // List all resourceModule records -const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const items = await db.resourceModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); +const item = await db.resourceModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, installationStoreName: true, merkleStoreModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, requirementsStateViewName: true, resolvedRequirementsViewName: true, resourceBillingRollupFunction: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceEventsTableId: true, resourceEventsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourceStatusChecksTableId: true, resourceStatusChecksTableName: true, resourceUsageLogTableId: true, resourceUsageLogTableName: true, resourceUsageSummaryTableId: true, resourceUsageSummaryTableName: true, resourcesTableId: true, resourcesTableName: true, rollupResourceUsageSummaryFunction: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.resourceModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', installationStoreName: '', merkleStoreModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', requirementsStateViewName: '', resolvedRequirementsViewName: '', resourceBillingRollupFunction: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceEventsTableId: '', resourceEventsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourceStatusChecksTableId: '', resourceStatusChecksTableName: '', resourceUsageLogTableId: '', resourceUsageLogTableName: '', resourceUsageSummaryTableId: '', resourceUsageSummaryTableName: '', resourcesTableId: '', resourcesTableName: '', rollupResourceUsageSummaryFunction: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.resourceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2947,9 +3181,11 @@ CRUD operations for RouteModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `appLinksFunctionName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `deepLinkFunctionName` | String | Yes | +| `defaultCapabilities` | String | Yes | | `domainModuleId` | UUID | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | @@ -2975,13 +3211,13 @@ CRUD operations for RouteModule records. ```typescript // List all routeModule records -const items = await db.routeModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const items = await db.routeModule.findMany({ select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.routeModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const item = await db.routeModule.findOne({ id: '', select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultCapabilities: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultCapabilities: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2990,6 +3226,39 @@ const updated = await db.routeModule.update({ where: { id: '' }, data: { a const deleted = await db.routeModule.delete({ where: { id: '' } }).execute(); ``` +### `db.scopeTypesModule` + +CRUD operations for ScopeTypesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `privateSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scopeTypesTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all scopeTypesModule records +const items = await db.scopeTypesModule.findMany({ select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Get one by id +const item = await db.scopeTypesModule.findOne({ id: '', select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Create +const created = await db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.scopeTypesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -3113,7 +3382,7 @@ CRUD operations for SiteSurfaceModule records. | `apiName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `id` | UUID | No | @@ -3147,13 +3416,13 @@ CRUD operations for SiteSurfaceModule records. ```typescript // List all siteSurfaceModule records -const items = await db.siteSurfaceModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); +const items = await db.siteSurfaceModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); // Get one by id -const item = await db.siteSurfaceModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); +const item = await db.siteSurfaceModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, siteAppLinksTableId: true, siteAppLinksTableName: true, siteDeepLinksTableId: true, siteDeepLinksTableName: true, siteErrorPagesTableId: true, siteErrorPagesTableName: true, siteMetadataTableId: true, siteMetadataTableName: true, siteModulesTableId: true, siteModulesTableName: true, siteThemesTableId: true, siteThemesTableName: true, siteWebConfigTableId: true, siteWebConfigTableName: true, sitesTableId: true, sitesTableName: true } }).execute(); // Create -const created = await db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute(); +const created = await db.siteSurfaceModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', siteAppLinksTableId: '', siteAppLinksTableName: '', siteDeepLinksTableId: '', siteDeepLinksTableName: '', siteErrorPagesTableId: '', siteErrorPagesTableName: '', siteMetadataTableId: '', siteMetadataTableName: '', siteModulesTableId: '', siteModulesTableName: '', siteThemesTableId: '', siteThemesTableName: '', siteWebConfigTableId: '', siteWebConfigTableName: '', sitesTableId: '', sitesTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.siteSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3226,8 +3495,8 @@ CRUD operations for StorageModule records. | `catalogModuleId` | UUID | Yes | | `confirmUploadDelay` | Interval | Yes | | `databaseId` | UUID | Yes | +| `defaultCapabilities` | String | Yes | | `defaultMaxFileSize` | BigInt | Yes | -| `defaultPermissions` | String | Yes | | `downloadUrlExpirySeconds` | Int | Yes | | `endpoint` | String | Yes | | `entityField` | String | Yes | @@ -3264,13 +3533,13 @@ CRUD operations for StorageModule records. ```typescript // List all storageModule records -const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const items = await db.storageModule.findMany({ select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Get one by id -const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultMaxFileSize: true, defaultPermissions: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); +const item = await db.storageModule.findOne({ id: '', select: { allowedOrigins: true, apiName: true, bucketsTableId: true, bucketsTableName: true, cacheTtlSeconds: true, catalogModuleId: true, confirmUploadDelay: true, databaseId: true, defaultCapabilities: true, defaultMaxFileSize: true, downloadUrlExpirySeconds: true, endpoint: true, entityField: true, entityTableId: true, fileEventsTableId: true, filesTableId: true, filesTableName: true, hasAuditLog: true, hasConfirmUpload: true, hasContentHash: true, hasCustomKeys: true, hasPathShares: true, hasVersioning: true, id: true, maxBulkFiles: true, maxBulkTotalSize: true, maxFilenameLength: true, pathSharesTableId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provider: true, provisions: true, publicSchemaName: true, publicUrlPrefix: true, restrictReads: true, schemaId: true, scope: true, uploadUrlExpirySeconds: true } }).execute(); // Create -const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultMaxFileSize: '', defaultPermissions: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); +const created = await db.storageModule.create({ data: { allowedOrigins: '', apiName: '', bucketsTableId: '', bucketsTableName: '', cacheTtlSeconds: '', catalogModuleId: '', confirmUploadDelay: '', databaseId: '', defaultCapabilities: '', defaultMaxFileSize: '', downloadUrlExpirySeconds: '', endpoint: '', entityField: '', entityTableId: '', fileEventsTableId: '', filesTableId: '', filesTableName: '', hasAuditLog: '', hasConfirmUpload: '', hasContentHash: '', hasCustomKeys: '', hasPathShares: '', hasVersioning: '', maxBulkFiles: '', maxBulkTotalSize: '', maxFilenameLength: '', pathSharesTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provider: '', provisions: '', publicSchemaName: '', publicUrlPrefix: '', restrictReads: '', schemaId: '', scope: '', uploadUrlExpirySeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.storageModule.update({ where: { id: '' }, data: { allowedOrigins: '' }, select: { id: true } }).execute(); @@ -3453,6 +3722,41 @@ const updated = await db.userSettingsModule.update({ where: { id: '' }, da const deleted = await db.userSettingsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.userSettingsSecurityModule` + +CRUD operations for UserSettingsSecurityModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `ownerTableId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all userSettingsSecurityModule records +const items = await db.userSettingsSecurityModule.findMany({ select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.userSettingsSecurityModule.findOne({ id: '', select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.userStateModule` CRUD operations for UserStateModule records. @@ -3615,7 +3919,7 @@ CRUD operations for WebhookModule records. |-------|------|----------| | `apiName` | String | Yes | | `databaseId` | UUID | Yes | -| `defaultPermissions` | String | Yes | +| `defaultCapabilities` | String | Yes | | `entityField` | String | Yes | | `entityTableId` | UUID | Yes | | `functionInvocationModuleId` | UUID | Yes | @@ -3641,13 +3945,13 @@ CRUD operations for WebhookModule records. ```typescript // List all webhookModule records -const items = await db.webhookModule.findMany({ select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); +const items = await db.webhookModule.findMany({ select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); // Get one by id -const item = await db.webhookModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultPermissions: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); +const item = await db.webhookModule.findOne({ id: '', select: { apiName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, functionInvocationModuleId: true, functionModuleId: true, id: true, infraSecretsModuleId: true, namespaceModuleId: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true, webhookEndpointsTableId: true, webhookEndpointsTableName: true, webhookEventsTableId: true, webhookEventsTableName: true } }).execute(); // Create -const created = await db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultPermissions: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute(); +const created = await db.webhookModule.create({ data: { apiName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', functionInvocationModuleId: '', functionModuleId: '', infraSecretsModuleId: '', namespaceModuleId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '', webhookEndpointsTableId: '', webhookEndpointsTableName: '', webhookEventsTableId: '', webhookEventsTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.webhookModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -3658,42 +3962,6 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ## Custom Operations -### `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 | - | `fieldName` | String | - | `tableId` | UUID | - -```typescript -const result = await db.query.resolveBlueprintField({ databaseId: '', fieldName: '', tableId: '' }).execute(); -``` - -### `db.query.resolveBlueprintTable` - -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. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - -```typescript -const result = await db.query.resolveBlueprintTable({ databaseId: '', defaultSchemaId: '', schemaName: '', tableMap: '', tableName: '' }).execute(); -``` - ### `db.mutation.constructBlueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (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, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3742,111 +4010,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.provisionCheckConstraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionCheckConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionFullTextSearch` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -```typescript -const result = await db.mutation.provisionFullTextSearch({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionIndex` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -```typescript -const result = await db.mutation.provisionIndex({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionRelation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -```typescript -const result = await db.mutation.provisionRelation({ input: '' }).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.provisionTable` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -```typescript -const result = await db.mutation.provisionTable({ input: '' }).execute(); -``` - -### `db.mutation.provisionUniqueConstraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionUniqueConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-sdk/src/modules/orm/index.ts b/sdk/constructive-sdk/src/modules/orm/index.ts index 0951126688..249a7e5114 100644 --- a/sdk/constructive-sdk/src/modules/orm/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/index.ts @@ -13,12 +13,15 @@ import { BillingProviderModuleModel } from './models/billingProviderModule'; import { BlueprintModel } from './models/blueprint'; import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { BlueprintTemplateModel } from './models/blueprintTemplate'; +import { CapabilitiesModuleModel } from './models/capabilitiesModule'; import { CatalogModuleModel } from './models/catalogModule'; import { ComputeLogModuleModel } from './models/computeLogModule'; import { ConfigSecretsUserModuleModel } from './models/configSecretsUserModule'; import { ConnectedAccountsModuleModel } from './models/connectedAccountsModule'; +import { ContentPresetModuleModel } from './models/contentPresetModule'; import { CryptoAddressesModuleModel } from './models/cryptoAddressesModule'; import { CryptoAuthModuleModel } from './models/cryptoAuthModule'; +import { DataCapabilitiesFieldModel } from './models/dataCapabilitiesField'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { DatabaseSettingsModuleModel } from './models/databaseSettingsModule'; import { DbPoolConfigModel } from './models/dbPoolConfig'; @@ -29,9 +32,11 @@ import { DefaultIdsModuleModel } from './models/defaultIdsModule'; import { DenormalizedTableFieldModel } from './models/denormalizedTableField'; import { DevicesModuleModel } from './models/devicesModule'; import { DomainModuleModel } from './models/domainModule'; +import { EmailSenderModuleModel } from './models/emailSenderModule'; import { EmailsModuleModel } from './models/emailsModule'; import { EntityTypeProvisionModel } from './models/entityTypeProvision'; import { EventsModuleModel } from './models/eventsModule'; +import { FileRefFieldModel } from './models/fileRefField'; import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule'; import { FunctionInvocationModuleModel } from './models/functionInvocationModule'; import { FunctionModuleModel } from './models/functionModule'; @@ -53,8 +58,8 @@ import { MembershipsModuleModel } from './models/membershipsModule'; import { MerkleStoreModuleModel } from './models/merkleStoreModule'; import { NamespaceModuleModel } from './models/namespaceModule'; import { NotificationsModuleModel } from './models/notificationsModule'; +import { OauthRequestsModuleModel } from './models/oauthRequestsModule'; import { PagesModuleModel } from './models/pagesModule'; -import { PermissionsModuleModel } from './models/permissionsModule'; import { PhoneNumbersModuleModel } from './models/phoneNumbersModule'; import { PlansModuleModel } from './models/plansModule'; import { PrincipalAuthModuleModel } from './models/principalAuthModule'; @@ -66,6 +71,7 @@ import { RelationProvisionModel } from './models/relationProvision'; import { ResourceModuleModel } from './models/resourceModule'; import { RlsModuleModel } from './models/rlsModule'; import { RouteModuleModel } from './models/routeModule'; +import { ScopeTypesModuleModel } from './models/scopeTypesModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SessionsModuleModel } from './models/sessionsModule'; @@ -76,19 +82,18 @@ import { TransferLogModuleModel } from './models/transferLogModule'; import { UserAuthModuleModel } from './models/userAuthModule'; import { UserCredentialsModuleModel } from './models/userCredentialsModule'; import { UserSettingsModuleModel } from './models/userSettingsModule'; +import { UserSettingsSecurityModuleModel } from './models/userSettingsSecurityModule'; import { UserStateModuleModel } from './models/userStateModule'; import { UsersModuleModel } from './models/usersModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { WebhookModuleModel } from './models/webhookModule'; -import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; -export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -124,12 +129,15 @@ export function createClient(config: OrmClientConfig) { blueprint: new BlueprintModel(client), blueprintConstruction: new BlueprintConstructionModel(client), blueprintTemplate: new BlueprintTemplateModel(client), + capabilitiesModule: new CapabilitiesModuleModel(client), catalogModule: new CatalogModuleModel(client), computeLogModule: new ComputeLogModuleModel(client), configSecretsUserModule: new ConfigSecretsUserModuleModel(client), connectedAccountsModule: new ConnectedAccountsModuleModel(client), + contentPresetModule: new ContentPresetModuleModel(client), cryptoAddressesModule: new CryptoAddressesModuleModel(client), cryptoAuthModule: new CryptoAuthModuleModel(client), + dataCapabilitiesField: new DataCapabilitiesFieldModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), databaseSettingsModule: new DatabaseSettingsModuleModel(client), dbPoolConfig: new DbPoolConfigModel(client), @@ -140,9 +148,11 @@ export function createClient(config: OrmClientConfig) { denormalizedTableField: new DenormalizedTableFieldModel(client), devicesModule: new DevicesModuleModel(client), domainModule: new DomainModuleModel(client), + emailSenderModule: new EmailSenderModuleModel(client), emailsModule: new EmailsModuleModel(client), entityTypeProvision: new EntityTypeProvisionModel(client), eventsModule: new EventsModuleModel(client), + fileRefField: new FileRefFieldModel(client), functionDeploymentModule: new FunctionDeploymentModuleModel(client), functionInvocationModule: new FunctionInvocationModuleModel(client), functionModule: new FunctionModuleModel(client), @@ -164,8 +174,8 @@ export function createClient(config: OrmClientConfig) { merkleStoreModule: new MerkleStoreModuleModel(client), namespaceModule: new NamespaceModuleModel(client), notificationsModule: new NotificationsModuleModel(client), + oauthRequestsModule: new OauthRequestsModuleModel(client), pagesModule: new PagesModuleModel(client), - permissionsModule: new PermissionsModuleModel(client), phoneNumbersModule: new PhoneNumbersModuleModel(client), plansModule: new PlansModuleModel(client), principalAuthModule: new PrincipalAuthModuleModel(client), @@ -177,6 +187,7 @@ export function createClient(config: OrmClientConfig) { resourceModule: new ResourceModuleModel(client), rlsModule: new RlsModuleModel(client), routeModule: new RouteModuleModel(client), + scopeTypesModule: new ScopeTypesModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), sessionSecretsModule: new SessionSecretsModuleModel(client), sessionsModule: new SessionsModuleModel(client), @@ -187,12 +198,12 @@ export function createClient(config: OrmClientConfig) { userAuthModule: new UserAuthModuleModel(client), userCredentialsModule: new UserCredentialsModuleModel(client), userSettingsModule: new UserSettingsModuleModel(client), + userSettingsSecurityModule: new UserSettingsSecurityModuleModel(client), userStateModule: new UserStateModuleModel(client), usersModule: new UsersModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), webhookModule: new WebhookModuleModel(client), - query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-sdk/src/modules/orm/input-types.ts b/sdk/constructive-sdk/src/modules/orm/input-types.ts index ed552e4810..27a0a0b958 100644 --- a/sdk/constructive-sdk/src/modules/orm/input-types.ts +++ b/sdk/constructive-sdk/src/modules/orm/input-types.ts @@ -236,7 +236,7 @@ export interface AgentModule { agentTableName?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; hasAgents?: boolean | null; @@ -281,7 +281,7 @@ export interface ApiSurfaceModule { corsSettingsTableId?: string | null; corsSettingsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -301,7 +301,7 @@ export interface AppModule { appsTableName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -320,8 +320,8 @@ export interface BillingModule { balancesTableId?: string | null; balancesTableName?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMeterCatalog?: Record | null; - defaultPermissions?: string[] | null; id: string; ledgerTableId?: string | null; ledgerTableName?: string | null; @@ -349,16 +349,22 @@ export interface BillingProviderModule { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; id: string; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -366,8 +372,10 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } /** An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build. */ export interface Blueprint { @@ -464,16 +472,42 @@ export interface BlueprintTemplate { /** Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private. */ visibility?: string | null; } +export interface CapabilitiesModule { + actorTableId?: string | null; + apiName?: string | null; + bitlen?: number | null; + databaseId?: string | null; + defaultTableId?: string | null; + defaultTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + getByMask?: string | null; + getMask?: string | null; + getMaskByName?: string | null; + getPaddedMask?: string | null; + id: string; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface CatalogModule { apiName?: string | null; apisTableId?: string | null; apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -548,6 +582,25 @@ export interface ConnectedAccountsModule { tableId?: string | null; tableName?: string | null; } +export interface ContentPresetModule { + apiName?: string | null; + contentPresetsTableId?: string | null; + createdAt?: string | null; + databaseId?: string | null; + entityTableId?: string | null; + id: string; + merkleStoreModuleId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + provisions?: Record | null; + publicSchemaId?: string | null; + publicSchemaName?: string | null; + scope?: string | null; + storeName?: string | null; +} export interface CryptoAddressesModule { apiName?: string | null; cryptoNetwork?: string | null; @@ -576,6 +629,19 @@ export interface CryptoAuthModule { userField?: string | null; usersTableId?: string | null; } +export interface DataCapabilitiesField { + capabilitiesModuleId?: string | null; + databaseId?: string | null; + fieldId?: string | null; + fromFieldId?: string | null; + id: string; + mappingFieldId?: string | null; + mappingKeyFieldId?: string | null; + mappingTableId?: string | null; + mode?: string | null; + subsetGuard?: boolean | null; + tableId?: 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 { /** When true, cold provisioning runs in the database:provision background job and the insert returns a pending ticket; when false, provisioning runs inline in the insert trigger */ @@ -598,7 +664,7 @@ export interface DatabaseProvisionModule { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string | null; id: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: Record | null; /** Additional configuration options for provisioning */ options?: Record | null; @@ -617,7 +683,7 @@ export interface DatabaseSettingsModule { databaseId?: string | null; databaseSettingsTableId?: string | null; databaseSettingsTableName?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -701,7 +767,7 @@ export interface DbUsageModule { collectDbQueryStatsFunction?: string | null; collectDbTableStatsFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; id: string; interval?: string | null; @@ -756,7 +822,7 @@ export interface DomainModule { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -778,6 +844,28 @@ export interface DomainModule { schemaId?: string | null; scope?: string | null; } +export interface EmailSenderModule { + apiName?: string | null; + databaseId?: string | null; + defaultCapabilities?: string[] | null; + emailIdentitiesTableId?: string | null; + emailIdentitiesTableName?: string | null; + emailProviderAccountsTableId?: string | null; + emailProviderAccountsTableName?: string | null; + emailSiteIdentitiesTableId?: string | null; + emailSiteIdentitiesTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + id: string; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + provisions?: Record | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + siteSurfaceModuleId?: string | null; +} export interface EmailsModule { apiName?: string | null; databaseId?: string | null; @@ -791,7 +879,7 @@ export interface EmailsModule { } /** * 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). + * and installs the required modules (capabilities, 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). @@ -813,7 +901,7 @@ export interface EntityTypeProvision { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: Record | null; @@ -823,9 +911,9 @@ export interface EntityTypeProvision { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -865,8 +953,11 @@ export interface EntityTypeProvision { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean | null; /** Unique identifier for this provision row. */ @@ -893,7 +984,7 @@ export interface EntityTypeProvision { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: Record | null; @@ -915,7 +1006,7 @@ export interface EntityTypeProvision { outGraphModuleId?: string | null; outGraphsTableId?: string | null; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_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; @@ -959,7 +1050,7 @@ export interface EntityTypeProvision { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -973,8 +1064,8 @@ export interface EntityTypeProvision { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean | null; @@ -993,7 +1084,7 @@ export interface EntityTypeProvision { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -1019,7 +1110,7 @@ export interface EntityTypeProvision { tableName?: string | 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -1056,7 +1147,7 @@ export interface EventsModule { actorTableId?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; eventAggregatesTableId?: string | null; @@ -1065,6 +1156,7 @@ export interface EventsModule { eventTypesTableName?: string | null; eventsTableId?: string | null; eventsTableName?: string | null; + expireGrants?: string | null; grantAchievement?: string | null; id: string; interval?: string | null; @@ -1081,9 +1173,11 @@ export interface EventsModule { privateSchemaId?: string | null; privateSchemaName?: string | null; publicSchemaName?: string | null; + recomputeCapabilities?: string | null; recordEvent?: string | null; removeEvent?: string | null; retention?: string | null; + revokeAchievement?: string | null; schemaId?: string | null; scope?: string | null; stepsRequired?: string | null; @@ -1093,13 +1187,26 @@ export interface EventsModule { tgEventBool?: string | null; tgEventToggle?: string | null; tgEventToggleBool?: string | null; + tgLevelGrantSync?: string | null; tgUpdateAggregates?: string | null; + trustLadder?: Record | null; upsertAggregate?: string | null; } +export interface FileRefField { + bucketKey?: string | null; + bucketTags?: string[] | null; + databaseId?: string | null; + enforceFk?: boolean | null; + fieldId?: string | null; + id: string; + isPublic?: boolean | null; + storageModuleId?: string | null; + tableId?: string | null; +} export interface FunctionDeploymentModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deploymentEventsTableId?: string | null; deploymentEventsTableName?: string | null; deploymentsTableId?: string | null; @@ -1124,7 +1231,7 @@ export interface FunctionInvocationModule { attemptsTableId?: string | null; attemptsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionLogsTableId?: string | null; @@ -1148,7 +1255,7 @@ export interface FunctionModule { bindingsTableName?: string | null; capabilityBindingsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; definitionsTableId?: string | null; definitionsTableName?: string | null; entityField?: string | null; @@ -1170,7 +1277,7 @@ export interface GraphExecutionModule { apiName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionsTableId?: string | null; @@ -1195,7 +1302,7 @@ export interface GraphModule { apiName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; graphsTableId?: string | null; @@ -1218,7 +1325,7 @@ export interface HierarchyModule { chartEdgesTableName?: string | null; createdAt?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; getManagersFunction?: string | null; @@ -1239,7 +1346,7 @@ export interface HierarchyModule { export interface HttpRouteModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionModuleId?: string | null; @@ -1442,6 +1549,7 @@ export interface LimitsModule { limitCreditsTableId?: string | null; limitDecrementFunction?: string | null; limitDecrementTrigger?: string | null; + limitDefaults?: Record | null; limitIncrementFunction?: string | null; limitIncrementTrigger?: string | null; limitUpdateTrigger?: string | null; @@ -1472,9 +1580,12 @@ export interface MembershipsModule { adminGrantsTableId?: string | null; adminGrantsTableName?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; + capabilityDefaultCapabilitiesTableId?: string | null; + capabilityDefaultGrantsTableId?: string | null; databaseId?: string | null; + defaultCapabilitiesTableId?: string | null; defaultLimitsTableId?: string | null; - defaultPermissionsTableId?: string | null; entityField?: string | null; entityIdsByMask?: string | null; entityIdsByPerm?: string | null; @@ -1497,9 +1608,6 @@ export interface MembershipsModule { membershipsTableName?: string | null; ownerGrantsTableId?: string | null; ownerGrantsTableName?: string | null; - permissionDefaultGrantsTableId?: string | null; - permissionDefaultPermissionsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -1511,6 +1619,7 @@ export interface MembershipsModule { } export interface MerkleStoreModule { apiName?: string | null; + capabilityKey?: string | null; commitTableId?: string | null; createdAt?: string | null; databaseId?: string | null; @@ -1518,7 +1627,6 @@ export interface MerkleStoreModule { functionPrefix?: string | null; id: string; objectTableId?: string | null; - permissionKey?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -1532,7 +1640,7 @@ export interface MerkleStoreModule { export interface NamespaceModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -1554,7 +1662,7 @@ export interface NotificationsModule { apiName?: string | null; channelsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deliveryLogTableId?: string | null; entityField?: string | null; hasChannels?: boolean | null; @@ -1576,6 +1684,28 @@ export interface NotificationsModule { suppressionsTableId?: string | null; userSettingsTableId?: string | null; } +/** + * Config row for the oauth_requests_module, which provisions the in-flight half of an SSO + * sign-in: the OAuth authorization requests table (state + PKCE code_verifier) and the + * pending identity links table (a verified identity parked under a single-use ticket), + * both private, plus the five SECURITY DEFINER procedures that are their only surface. + * Sibling of identity_providers_module (durable provider configuration) rather than part + * of it: this is ephemeral, purged flow state with its own retention. + */ +export interface OauthRequestsModule { + databaseId?: string | null; + entityField?: string | null; + entityTableId?: string | null; + id: string; + oauthAuthorizationRequestsTableId?: string | null; + oauthAuthorizationRequestsTableName?: string | null; + pendingIdentityLinksTableId?: string | null; + pendingIdentityLinksTableName?: string | null; + prefix?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + scope?: string | null; +} export interface PagesModule { apiName?: string | null; createdAt?: string | null; @@ -1597,30 +1727,6 @@ export interface PagesModule { sitesTableId?: string | null; storeNamePrefix?: string | null; } -export interface PermissionsModule { - actorTableId?: string | null; - apiName?: string | null; - bitlen?: number | null; - databaseId?: string | null; - defaultTableId?: string | null; - defaultTableName?: string | null; - entityField?: string | null; - entityTableId?: string | null; - getByMask?: string | null; - getMask?: string | null; - getMaskByName?: string | null; - getPaddedMask?: string | null; - id: string; - prefix?: string | null; - privateApiName?: string | null; - privateSchemaId?: string | null; - privateSchemaName?: string | null; - publicSchemaName?: string | null; - schemaId?: string | null; - scope?: string | null; - tableId?: string | null; - tableName?: string | null; -} export interface PhoneNumbersModule { apiName?: string | null; databaseId?: string | null; @@ -1679,22 +1785,24 @@ export interface PrincipalAuthModule { export interface ProfilesModule { actorTableId?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; databaseId?: string | null; entityField?: string | null; entityTableId?: string | null; id: string; + membershipProfilesTableId?: string | null; + membershipProfilesTableName?: string | null; membershipsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; privateSchemaName?: string | null; + profileCapabilitiesTableId?: string | null; + profileCapabilitiesTableName?: string | null; profileDefinitionGrantsTableId?: string | null; profileDefinitionGrantsTableName?: string | null; profileGrantsTableId?: string | null; profileGrantsTableName?: string | null; - profilePermissionsTableId?: string | null; - profilePermissionsTableName?: string | null; profileTemplatesTableId?: string | null; profileTemplatesTableName?: string | null; publicSchemaName?: string | null; @@ -1707,7 +1815,7 @@ export interface RateLimitMetersModule { apiName?: string | null; checkRateLimitFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; id: string; prefix?: string | null; privateApiName?: string | null; @@ -1885,7 +1993,7 @@ export interface RelationProvision { export interface ResourceModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -1937,9 +2045,11 @@ export interface RlsModule { } export interface RouteModule { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + deepLinkFunctionName?: string | null; + defaultCapabilities?: string[] | null; domainModuleId?: string | null; entityField?: string | null; entityTableId?: string | null; @@ -1961,6 +2071,13 @@ export interface RouteModule { schemaId?: string | null; scope?: string | null; } +export interface ScopeTypesModule { + databaseId?: string | null; + id: string; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | 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 grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** The database this provision belongs to. Required. */ @@ -2013,7 +2130,7 @@ export interface SiteSurfaceModule { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; id: string; @@ -2074,8 +2191,8 @@ export interface StorageModule { catalogModuleId?: string | null; confirmUploadDelay?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMaxFileSize?: string | null; - defaultPermissions?: string[] | null; downloadUrlExpirySeconds?: number | null; endpoint?: string | null; entityField?: string | null; @@ -2183,6 +2300,15 @@ export interface UserSettingsModule { tableId?: string | null; tableName?: string | null; } +export interface UserSettingsSecurityModule { + apiName?: string | null; + databaseId?: string | null; + id: string; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface UserStateModule { databaseId?: string | null; entityField?: string | null; @@ -2236,7 +2362,7 @@ export interface WebauthnCredentialsModule { export interface WebhookModule { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionInvocationModuleId?: string | null; @@ -2292,6 +2418,9 @@ export interface BlueprintTemplateRelations { blueprintTemplatesByForkedFromId?: ConnectionResult; blueprintsByTemplateId?: ConnectionResult; } +export interface CapabilitiesModuleRelations { + dataCapabilitiesFields?: ConnectionResult; +} export interface CatalogModuleRelations { apiSurfaceModules?: ConnectionResult; appModules?: ConnectionResult; @@ -2302,8 +2431,14 @@ export interface CatalogModuleRelations { export interface ComputeLogModuleRelations {} export interface ConfigSecretsUserModuleRelations {} export interface ConnectedAccountsModuleRelations {} +export interface ContentPresetModuleRelations { + merkleStoreModule?: MerkleStoreModule | null; +} export interface CryptoAddressesModuleRelations {} export interface CryptoAuthModuleRelations {} +export interface DataCapabilitiesFieldRelations { + capabilitiesModule?: CapabilitiesModule | null; +} export interface DatabaseProvisionModuleRelations {} export interface DatabaseSettingsModuleRelations {} export interface DbPoolConfigRelations {} @@ -2319,9 +2454,15 @@ export interface DomainModuleRelations { catalogModule?: CatalogModule | null; routeModules?: ConnectionResult; } +export interface EmailSenderModuleRelations { + siteSurfaceModule?: SiteSurfaceModule | null; +} export interface EmailsModuleRelations {} export interface EntityTypeProvisionRelations {} export interface EventsModuleRelations {} +export interface FileRefFieldRelations { + storageModule?: StorageModule | null; +} export interface FunctionDeploymentModuleRelations { functionModule?: FunctionModule | null; namespaceModule?: NamespaceModule | null; @@ -2361,6 +2502,7 @@ export interface LimitsModuleRelations {} export interface MembershipTypesModuleRelations {} export interface MembershipsModuleRelations {} export interface MerkleStoreModuleRelations { + contentPresetModules?: ConnectionResult; dbPresetModules?: ConnectionResult; graphModules?: ConnectionResult; pagesModules?: ConnectionResult; @@ -2372,11 +2514,11 @@ export interface NamespaceModuleRelations { webhookModules?: ConnectionResult; } export interface NotificationsModuleRelations {} +export interface OauthRequestsModuleRelations {} export interface PagesModuleRelations { merkleStoreModule?: MerkleStoreModule | null; siteSurfaceModule?: SiteSurfaceModule | null; } -export interface PermissionsModuleRelations {} export interface PhoneNumbersModuleRelations {} export interface PlansModuleRelations {} export interface PrincipalAuthModuleRelations {} @@ -2395,21 +2537,25 @@ export interface RouteModuleRelations { catalogModule?: CatalogModule | null; domainModule?: DomainModule | null; } +export interface ScopeTypesModuleRelations {} export interface SecureTableProvisionRelations {} export interface SessionSecretsModuleRelations {} export interface SessionsModuleRelations {} export interface SiteSurfaceModuleRelations { catalogModule?: CatalogModule | null; + emailSenderModules?: ConnectionResult; pagesModules?: ConnectionResult; } export interface StorageLogModuleRelations {} export interface StorageModuleRelations { + fileRefFields?: ConnectionResult; httpRouteModules?: ConnectionResult; } export interface TransferLogModuleRelations {} export interface UserAuthModuleRelations {} export interface UserCredentialsModuleRelations {} export interface UserSettingsModuleRelations {} +export interface UserSettingsSecurityModuleRelations {} export interface UserStateModuleRelations {} export interface UsersModuleRelations {} export interface WebauthnAuthModuleRelations {} @@ -2431,15 +2577,19 @@ export type BlueprintWithRelations = Blueprint & BlueprintRelations; export type BlueprintConstructionWithRelations = BlueprintConstruction & BlueprintConstructionRelations; export type BlueprintTemplateWithRelations = BlueprintTemplate & BlueprintTemplateRelations; +export type CapabilitiesModuleWithRelations = CapabilitiesModule & CapabilitiesModuleRelations; export type CatalogModuleWithRelations = CatalogModule & CatalogModuleRelations; export type ComputeLogModuleWithRelations = ComputeLogModule & ComputeLogModuleRelations; export type ConfigSecretsUserModuleWithRelations = ConfigSecretsUserModule & ConfigSecretsUserModuleRelations; export type ConnectedAccountsModuleWithRelations = ConnectedAccountsModule & ConnectedAccountsModuleRelations; +export type ContentPresetModuleWithRelations = ContentPresetModule & ContentPresetModuleRelations; export type CryptoAddressesModuleWithRelations = CryptoAddressesModule & CryptoAddressesModuleRelations; export type CryptoAuthModuleWithRelations = CryptoAuthModule & CryptoAuthModuleRelations; +export type DataCapabilitiesFieldWithRelations = DataCapabilitiesField & + DataCapabilitiesFieldRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type DatabaseSettingsModuleWithRelations = DatabaseSettingsModule & @@ -2453,9 +2603,11 @@ export type DenormalizedTableFieldWithRelations = DenormalizedTableField & DenormalizedTableFieldRelations; export type DevicesModuleWithRelations = DevicesModule & DevicesModuleRelations; export type DomainModuleWithRelations = DomainModule & DomainModuleRelations; +export type EmailSenderModuleWithRelations = EmailSenderModule & EmailSenderModuleRelations; export type EmailsModuleWithRelations = EmailsModule & EmailsModuleRelations; export type EntityTypeProvisionWithRelations = EntityTypeProvision & EntityTypeProvisionRelations; export type EventsModuleWithRelations = EventsModule & EventsModuleRelations; +export type FileRefFieldWithRelations = FileRefField & FileRefFieldRelations; export type FunctionDeploymentModuleWithRelations = FunctionDeploymentModule & FunctionDeploymentModuleRelations; export type FunctionInvocationModuleWithRelations = FunctionInvocationModule & @@ -2484,8 +2636,8 @@ export type MembershipsModuleWithRelations = MembershipsModule & MembershipsModu export type MerkleStoreModuleWithRelations = MerkleStoreModule & MerkleStoreModuleRelations; export type NamespaceModuleWithRelations = NamespaceModule & NamespaceModuleRelations; export type NotificationsModuleWithRelations = NotificationsModule & NotificationsModuleRelations; +export type OauthRequestsModuleWithRelations = OauthRequestsModule & OauthRequestsModuleRelations; export type PagesModuleWithRelations = PagesModule & PagesModuleRelations; -export type PermissionsModuleWithRelations = PermissionsModule & PermissionsModuleRelations; export type PhoneNumbersModuleWithRelations = PhoneNumbersModule & PhoneNumbersModuleRelations; export type PlansModuleWithRelations = PlansModule & PlansModuleRelations; export type PrincipalAuthModuleWithRelations = PrincipalAuthModule & PrincipalAuthModuleRelations; @@ -2498,6 +2650,7 @@ export type RelationProvisionWithRelations = RelationProvision & RelationProvisi export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; export type RouteModuleWithRelations = RouteModule & RouteModuleRelations; +export type ScopeTypesModuleWithRelations = ScopeTypesModule & ScopeTypesModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type SessionSecretsModuleWithRelations = SessionSecretsModule & @@ -2511,6 +2664,8 @@ export type UserAuthModuleWithRelations = UserAuthModule & UserAuthModuleRelatio export type UserCredentialsModuleWithRelations = UserCredentialsModule & UserCredentialsModuleRelations; export type UserSettingsModuleWithRelations = UserSettingsModule & UserSettingsModuleRelations; +export type UserSettingsSecurityModuleWithRelations = UserSettingsSecurityModule & + UserSettingsSecurityModuleRelations; export type UserStateModuleWithRelations = UserStateModule & UserStateModuleRelations; export type UsersModuleWithRelations = UsersModule & UsersModuleRelations; export type WebauthnAuthModuleWithRelations = WebauthnAuthModule & WebauthnAuthModuleRelations; @@ -2523,7 +2678,7 @@ export type AgentModuleSelect = { agentTableName?: boolean; apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; hasAgents?: boolean; @@ -2568,7 +2723,7 @@ export type ApiSurfaceModuleSelect = { corsSettingsTableId?: boolean; corsSettingsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2591,7 +2746,7 @@ export type AppModuleSelect = { appsTableName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2613,8 +2768,8 @@ export type BillingModuleSelect = { balancesTableId?: boolean; balancesTableName?: boolean; databaseId?: boolean; + defaultCapabilities?: boolean; defaultMeterCatalog?: boolean; - defaultPermissions?: boolean; id?: boolean; ledgerTableId?: boolean; ledgerTableName?: boolean; @@ -2642,16 +2797,22 @@ export type BillingProviderModuleSelect = { apiName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; + billingInvoicesTableId?: boolean; + billingInvoicesTableName?: boolean; billingPricesTableId?: boolean; billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingRefundsTableId?: boolean; + billingRefundsTableName?: boolean; billingSubscriptionsTableId?: boolean; billingSubscriptionsTableName?: boolean; billingWebhookEventsTableId?: boolean; billingWebhookEventsTableName?: boolean; databaseId?: boolean; id?: boolean; + listPendingUsageSyncFunction?: boolean; + markUsageSyncedFunction?: boolean; prefix?: boolean; pricesTableId?: boolean; privateApiName?: boolean; @@ -2659,8 +2820,10 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordRefundFunction?: boolean; schemaId?: boolean; subscriptionsTableId?: boolean; + upsertInvoiceFunction?: boolean; }; export type BlueprintSelect = { createdAt?: boolean; @@ -2738,16 +2901,48 @@ export type BlueprintTemplateSelect = { orderBy?: BlueprintOrderBy[]; }; }; +export type CapabilitiesModuleSelect = { + actorTableId?: boolean; + apiName?: boolean; + bitlen?: boolean; + databaseId?: boolean; + defaultTableId?: boolean; + defaultTableName?: boolean; + entityField?: boolean; + entityTableId?: boolean; + getByMask?: boolean; + getMask?: boolean; + getMaskByName?: boolean; + getPaddedMask?: boolean; + id?: boolean; + prefix?: boolean; + privateApiName?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + publicSchemaName?: boolean; + schemaId?: boolean; + scope?: boolean; + tableId?: boolean; + tableName?: boolean; + dataCapabilitiesFields?: { + select: DataCapabilitiesFieldSelect; + first?: number; + filter?: DataCapabilitiesFieldFilter; + orderBy?: DataCapabilitiesFieldOrderBy[]; + }; +}; export type CatalogModuleSelect = { apiName?: boolean; apisTableId?: boolean; apisTableName?: boolean; appsTableId?: boolean; appsTableName?: boolean; + bindingsTableId?: boolean; + bindingsTableName?: boolean; bucketsTableId?: boolean; bucketsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; domainsTableId?: boolean; domainsTableName?: boolean; entityTableId?: boolean; @@ -2852,6 +3047,28 @@ export type ConnectedAccountsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type ContentPresetModuleSelect = { + apiName?: boolean; + contentPresetsTableId?: boolean; + createdAt?: boolean; + databaseId?: boolean; + entityTableId?: boolean; + id?: boolean; + merkleStoreModuleId?: boolean; + policies?: boolean; + prefix?: boolean; + privateApiName?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + provisions?: boolean; + publicSchemaId?: boolean; + publicSchemaName?: boolean; + scope?: boolean; + storeName?: boolean; + merkleStoreModule?: { + select: MerkleStoreModuleSelect; + }; +}; export type CryptoAddressesModuleSelect = { apiName?: boolean; cryptoNetwork?: boolean; @@ -2880,6 +3097,22 @@ export type CryptoAuthModuleSelect = { userField?: boolean; usersTableId?: boolean; }; +export type DataCapabilitiesFieldSelect = { + capabilitiesModuleId?: boolean; + databaseId?: boolean; + fieldId?: boolean; + fromFieldId?: boolean; + id?: boolean; + mappingFieldId?: boolean; + mappingKeyFieldId?: boolean; + mappingTableId?: boolean; + mode?: boolean; + subsetGuard?: boolean; + tableId?: boolean; + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; +}; export type DatabaseProvisionModuleSelect = { async?: boolean; bootstrapError?: boolean; @@ -2906,7 +3139,7 @@ export type DatabaseSettingsModuleSelect = { databaseId?: boolean; databaseSettingsTableId?: boolean; databaseSettingsTableName?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -2978,7 +3211,7 @@ export type DbUsageModuleSelect = { collectDbQueryStatsFunction?: boolean; collectDbTableStatsFunction?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; id?: boolean; interval?: boolean; @@ -3033,7 +3266,7 @@ export type DomainModuleSelect = { apiName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; domainEventsTableId?: boolean; domainEventsTableName?: boolean; domainVerificationsTableId?: boolean; @@ -3064,6 +3297,31 @@ export type DomainModuleSelect = { orderBy?: RouteModuleOrderBy[]; }; }; +export type EmailSenderModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + defaultCapabilities?: boolean; + emailIdentitiesTableId?: boolean; + emailIdentitiesTableName?: boolean; + emailProviderAccountsTableId?: boolean; + emailProviderAccountsTableName?: boolean; + emailSiteIdentitiesTableId?: boolean; + emailSiteIdentitiesTableName?: boolean; + entityField?: boolean; + entityTableId?: boolean; + id?: boolean; + policies?: boolean; + prefix?: boolean; + privateApiName?: boolean; + provisions?: boolean; + publicSchemaName?: boolean; + schemaId?: boolean; + scope?: boolean; + siteSurfaceModuleId?: boolean; + siteSurfaceModule?: { + select: SiteSurfaceModuleSelect; + }; +}; export type EmailsModuleSelect = { apiName?: boolean; databaseId?: boolean; @@ -3122,7 +3380,7 @@ export type EventsModuleSelect = { actorTableId?: boolean; apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; eventAggregatesTableId?: boolean; @@ -3131,6 +3389,7 @@ export type EventsModuleSelect = { eventTypesTableName?: boolean; eventsTableId?: boolean; eventsTableName?: boolean; + expireGrants?: boolean; grantAchievement?: boolean; id?: boolean; interval?: boolean; @@ -3147,9 +3406,11 @@ export type EventsModuleSelect = { privateSchemaId?: boolean; privateSchemaName?: boolean; publicSchemaName?: boolean; + recomputeCapabilities?: boolean; recordEvent?: boolean; removeEvent?: boolean; retention?: boolean; + revokeAchievement?: boolean; schemaId?: boolean; scope?: boolean; stepsRequired?: boolean; @@ -3159,13 +3420,29 @@ export type EventsModuleSelect = { tgEventBool?: boolean; tgEventToggle?: boolean; tgEventToggleBool?: boolean; + tgLevelGrantSync?: boolean; tgUpdateAggregates?: boolean; + trustLadder?: boolean; upsertAggregate?: boolean; }; +export type FileRefFieldSelect = { + bucketKey?: boolean; + bucketTags?: boolean; + databaseId?: boolean; + enforceFk?: boolean; + fieldId?: boolean; + id?: boolean; + isPublic?: boolean; + storageModuleId?: boolean; + tableId?: boolean; + storageModule?: { + select: StorageModuleSelect; + }; +}; export type FunctionDeploymentModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; deploymentEventsTableId?: boolean; deploymentEventsTableName?: boolean; deploymentsTableId?: boolean; @@ -3196,7 +3473,7 @@ export type FunctionInvocationModuleSelect = { attemptsTableId?: boolean; attemptsTableName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; executionLogsTableId?: boolean; @@ -3226,7 +3503,7 @@ export type FunctionModuleSelect = { bindingsTableName?: boolean; capabilityBindingsTableId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; definitionsTableId?: boolean; definitionsTableName?: boolean; entityField?: boolean; @@ -3266,7 +3543,7 @@ export type GraphExecutionModuleSelect = { apiName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; executionsTableId?: boolean; @@ -3294,7 +3571,7 @@ export type GraphModuleSelect = { apiName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; graphsTableId?: boolean; @@ -3326,7 +3603,7 @@ export type HierarchyModuleSelect = { chartEdgesTableName?: boolean; createdAt?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; getManagersFunction?: boolean; @@ -3347,7 +3624,7 @@ export type HierarchyModuleSelect = { export type HttpRouteModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; functionModuleId?: boolean; @@ -3543,6 +3820,7 @@ export type LimitsModuleSelect = { limitCreditsTableId?: boolean; limitDecrementFunction?: boolean; limitDecrementTrigger?: boolean; + limitDefaults?: boolean; limitIncrementFunction?: boolean; limitIncrementTrigger?: boolean; limitUpdateTrigger?: boolean; @@ -3573,9 +3851,12 @@ export type MembershipsModuleSelect = { adminGrantsTableId?: boolean; adminGrantsTableName?: boolean; apiName?: boolean; + capabilitiesTableId?: boolean; + capabilityDefaultCapabilitiesTableId?: boolean; + capabilityDefaultGrantsTableId?: boolean; databaseId?: boolean; + defaultCapabilitiesTableId?: boolean; defaultLimitsTableId?: boolean; - defaultPermissionsTableId?: boolean; entityField?: boolean; entityIdsByMask?: boolean; entityIdsByPerm?: boolean; @@ -3598,9 +3879,6 @@ export type MembershipsModuleSelect = { membershipsTableName?: boolean; ownerGrantsTableId?: boolean; ownerGrantsTableName?: boolean; - permissionDefaultGrantsTableId?: boolean; - permissionDefaultPermissionsTableId?: boolean; - permissionsTableId?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; @@ -3612,6 +3890,7 @@ export type MembershipsModuleSelect = { }; export type MerkleStoreModuleSelect = { apiName?: boolean; + capabilityKey?: boolean; commitTableId?: boolean; createdAt?: boolean; databaseId?: boolean; @@ -3619,7 +3898,6 @@ export type MerkleStoreModuleSelect = { functionPrefix?: boolean; id?: boolean; objectTableId?: boolean; - permissionKey?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; @@ -3629,6 +3907,12 @@ export type MerkleStoreModuleSelect = { schemaId?: boolean; scope?: boolean; storeTableId?: boolean; + contentPresetModules?: { + select: ContentPresetModuleSelect; + first?: number; + filter?: ContentPresetModuleFilter; + orderBy?: ContentPresetModuleOrderBy[]; + }; dbPresetModules?: { select: DbPresetModuleSelect; first?: number; @@ -3657,7 +3941,7 @@ export type MerkleStoreModuleSelect = { export type NamespaceModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -3697,7 +3981,7 @@ export type NotificationsModuleSelect = { apiName?: boolean; channelsTableId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; deliveryLogTableId?: boolean; entityField?: boolean; hasChannels?: boolean; @@ -3719,6 +4003,20 @@ export type NotificationsModuleSelect = { suppressionsTableId?: boolean; userSettingsTableId?: boolean; }; +export type OauthRequestsModuleSelect = { + databaseId?: boolean; + entityField?: boolean; + entityTableId?: boolean; + id?: boolean; + oauthAuthorizationRequestsTableId?: boolean; + oauthAuthorizationRequestsTableName?: boolean; + pendingIdentityLinksTableId?: boolean; + pendingIdentityLinksTableName?: boolean; + prefix?: boolean; + privateSchemaId?: boolean; + privateSchemaName?: boolean; + scope?: boolean; +}; export type PagesModuleSelect = { apiName?: boolean; createdAt?: boolean; @@ -3746,30 +4044,6 @@ export type PagesModuleSelect = { select: SiteSurfaceModuleSelect; }; }; -export type PermissionsModuleSelect = { - actorTableId?: boolean; - apiName?: boolean; - bitlen?: boolean; - databaseId?: boolean; - defaultTableId?: boolean; - defaultTableName?: boolean; - entityField?: boolean; - entityTableId?: boolean; - getByMask?: boolean; - getMask?: boolean; - getMaskByName?: boolean; - getPaddedMask?: boolean; - id?: boolean; - prefix?: boolean; - privateApiName?: boolean; - privateSchemaId?: boolean; - privateSchemaName?: boolean; - publicSchemaName?: boolean; - schemaId?: boolean; - scope?: boolean; - tableId?: boolean; - tableName?: boolean; -}; export type PhoneNumbersModuleSelect = { apiName?: boolean; databaseId?: boolean; @@ -3827,22 +4101,24 @@ export type PrincipalAuthModuleSelect = { export type ProfilesModuleSelect = { actorTableId?: boolean; apiName?: boolean; + capabilitiesTableId?: boolean; databaseId?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; + membershipProfilesTableId?: boolean; + membershipProfilesTableName?: boolean; membershipsTableId?: boolean; - permissionsTableId?: boolean; prefix?: boolean; privateApiName?: boolean; privateSchemaId?: boolean; privateSchemaName?: boolean; + profileCapabilitiesTableId?: boolean; + profileCapabilitiesTableName?: boolean; profileDefinitionGrantsTableId?: boolean; profileDefinitionGrantsTableName?: boolean; profileGrantsTableId?: boolean; profileGrantsTableName?: boolean; - profilePermissionsTableId?: boolean; - profilePermissionsTableName?: boolean; profileTemplatesTableId?: boolean; profileTemplatesTableName?: boolean; publicSchemaName?: boolean; @@ -3855,7 +4131,7 @@ export type RateLimitMetersModuleSelect = { apiName?: boolean; checkRateLimitFunction?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; id?: boolean; prefix?: boolean; privateApiName?: boolean; @@ -3926,7 +4202,7 @@ export type RelationProvisionSelect = { export type ResourceModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -3990,9 +4266,11 @@ export type RlsModuleSelect = { }; export type RouteModuleSelect = { apiName?: boolean; + appLinksFunctionName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + deepLinkFunctionName?: boolean; + defaultCapabilities?: boolean; domainModuleId?: boolean; entityField?: boolean; entityTableId?: boolean; @@ -4020,6 +4298,13 @@ export type RouteModuleSelect = { select: DomainModuleSelect; }; }; +export type ScopeTypesModuleSelect = { + databaseId?: boolean; + id?: boolean; + privateSchemaName?: boolean; + schemaId?: boolean; + scopeTypesTableId?: boolean; +}; export type SecureTableProvisionSelect = { databaseId?: boolean; fields?: boolean; @@ -4058,7 +4343,7 @@ export type SiteSurfaceModuleSelect = { apiName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; id?: boolean; @@ -4090,6 +4375,12 @@ export type SiteSurfaceModuleSelect = { catalogModule?: { select: CatalogModuleSelect; }; + emailSenderModules?: { + select: EmailSenderModuleSelect; + first?: number; + filter?: EmailSenderModuleFilter; + orderBy?: EmailSenderModuleOrderBy[]; + }; pagesModules?: { select: PagesModuleSelect; first?: number; @@ -4128,8 +4419,8 @@ export type StorageModuleSelect = { catalogModuleId?: boolean; confirmUploadDelay?: boolean; databaseId?: boolean; + defaultCapabilities?: boolean; defaultMaxFileSize?: boolean; - defaultPermissions?: boolean; downloadUrlExpirySeconds?: boolean; endpoint?: boolean; entityField?: boolean; @@ -4161,6 +4452,12 @@ export type StorageModuleSelect = { schemaId?: boolean; scope?: boolean; uploadUrlExpirySeconds?: boolean; + fileRefFields?: { + select: FileRefFieldSelect; + first?: number; + filter?: FileRefFieldFilter; + orderBy?: FileRefFieldOrderBy[]; + }; httpRouteModules?: { select: HttpRouteModuleSelect; first?: number; @@ -4238,6 +4535,15 @@ export type UserSettingsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type UserSettingsSecurityModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + id?: boolean; + ownerTableId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; +}; export type UserStateModuleSelect = { databaseId?: boolean; entityField?: boolean; @@ -4289,7 +4595,7 @@ export type WebauthnCredentialsModuleSelect = { export type WebhookModuleSelect = { apiName?: boolean; databaseId?: boolean; - defaultPermissions?: boolean; + defaultCapabilities?: boolean; entityField?: boolean; entityTableId?: boolean; functionInvocationModuleId?: boolean; @@ -4335,8 +4641,8 @@ export interface AgentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4433,8 +4739,8 @@ export interface ApiSurfaceModuleFilter { corsSettingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4481,8 +4787,8 @@ export interface AppModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -4523,10 +4829,10 @@ export interface BillingModuleFilter { balancesTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMeterCatalog` field. */ defaultMeterCatalog?: JSONFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `ledgerTableId` field. */ @@ -4585,6 +4891,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -4593,6 +4903,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -4605,6 +4919,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -4623,10 +4941,14 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } export interface BlueprintFilter { /** Checks for all expressions in this list. */ @@ -4760,9 +5082,65 @@ export interface BlueprintTemplateFilter { /** Filter by the object’s `visibility` field. */ visibility?: StringFilter; } -export interface CatalogModuleFilter { +export interface CapabilitiesModuleFilter { + /** Filter by the object’s `actorTableId` field. */ + actorTableId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: CatalogModuleFilter[]; + and?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `bitlen` field. */ + bitlen?: IntFilter; + /** Filter by the object’s `dataCapabilitiesFields` relation. */ + dataCapabilitiesFields?: CapabilitiesModuleToManyDataCapabilitiesFieldFilter; + /** `dataCapabilitiesFields` exist. */ + dataCapabilitiesFieldsExist?: boolean; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultTableId` field. */ + defaultTableId?: UUIDFilter; + /** Filter by the object’s `defaultTableName` field. */ + defaultTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `getByMask` field. */ + getByMask?: StringFilter; + /** Filter by the object’s `getMask` field. */ + getMask?: StringFilter; + /** Filter by the object’s `getMaskByName` field. */ + getMaskByName?: StringFilter; + /** Filter by the object’s `getPaddedMask` field. */ + getPaddedMask?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: CapabilitiesModuleFilter; + /** Checks for any expressions in this list. */ + or?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +export interface CatalogModuleFilter { + /** Checks for all expressions in this list. */ + and?: CatalogModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; /** Filter by the object’s `apiSurfaceModules` relation. */ @@ -4781,14 +5159,18 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ bucketsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModules` relation. */ domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ @@ -4964,6 +5346,50 @@ export interface ConnectedAccountsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface ContentPresetModuleFilter { + /** Checks for all expressions in this list. */ + and?: ContentPresetModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `contentPresetsTableId` field. */ + contentPresetsTableId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `merkleStoreModule` relation. */ + merkleStoreModule?: MerkleStoreModuleFilter; + /** Filter by the object’s `merkleStoreModuleId` field. */ + merkleStoreModuleId?: UUIDFilter; + /** Negates the expression. */ + not?: ContentPresetModuleFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaId` field. */ + publicSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `storeName` field. */ + storeName?: StringFilter; +} export interface CryptoAddressesModuleFilter { /** Checks for all expressions in this list. */ and?: CryptoAddressesModuleFilter[]; @@ -5028,6 +5454,38 @@ export interface CryptoAuthModuleFilter { /** Filter by the object’s `usersTableId` field. */ usersTableId?: UUIDFilter; } +export interface DataCapabilitiesFieldFilter { + /** Checks for all expressions in this list. */ + and?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `capabilitiesModule` relation. */ + capabilitiesModule?: CapabilitiesModuleFilter; + /** Filter by the object’s `capabilitiesModuleId` field. */ + capabilitiesModuleId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `fromFieldId` field. */ + fromFieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `mappingFieldId` field. */ + mappingFieldId?: UUIDFilter; + /** Filter by the object’s `mappingKeyFieldId` field. */ + mappingKeyFieldId?: UUIDFilter; + /** Filter by the object’s `mappingTableId` field. */ + mappingTableId?: UUIDFilter; + /** Filter by the object’s `mode` field. */ + mode?: StringFilter; + /** Negates the expression. */ + not?: DataCapabilitiesFieldFilter; + /** Checks for any expressions in this list. */ + or?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `subsetGuard` field. */ + subsetGuard?: BooleanFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} export interface DatabaseProvisionModuleFilter { /** Checks for all expressions in this list. */ and?: DatabaseProvisionModuleFilter[]; @@ -5085,8 +5543,8 @@ export interface DatabaseSettingsModuleFilter { databaseSettingsTableId?: UUIDFilter; /** Filter by the object’s `databaseSettingsTableName` field. */ databaseSettingsTableName?: StringFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5241,8 +5699,8 @@ export interface DbUsageModuleFilter { collectDbTableStatsFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `id` field. */ @@ -5371,8 +5829,8 @@ export interface DomainModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -5422,6 +5880,58 @@ export interface DomainModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface EmailSenderModuleFilter { + /** Checks for all expressions in this list. */ + and?: EmailSenderModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailIdentitiesTableId` field. */ + emailIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesTableName` field. */ + emailIdentitiesTableName?: StringFilter; + /** Filter by the object’s `emailProviderAccountsTableId` field. */ + emailProviderAccountsTableId?: UUIDFilter; + /** Filter by the object’s `emailProviderAccountsTableName` field. */ + emailProviderAccountsTableName?: StringFilter; + /** Filter by the object’s `emailSiteIdentitiesTableId` field. */ + emailSiteIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentitiesTableName` field. */ + emailSiteIdentitiesTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSenderModuleFilter; + /** Checks for any expressions in this list. */ + or?: EmailSenderModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `siteSurfaceModule` relation. */ + siteSurfaceModule?: SiteSurfaceModuleFilter; + /** A related `siteSurfaceModule` exists. */ + siteSurfaceModuleExists?: boolean; + /** Filter by the object’s `siteSurfaceModuleId` field. */ + siteSurfaceModuleId?: UUIDFilter; +} export interface EmailsModuleFilter { /** Checks for all expressions in this list. */ and?: EmailsModuleFilter[]; @@ -5547,8 +6057,8 @@ export interface EventsModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5565,6 +6075,8 @@ export interface EventsModuleFilter { eventsTableId?: UUIDFilter; /** Filter by the object’s `eventsTableName` field. */ eventsTableName?: StringFilter; + /** Filter by the object’s `expireGrants` field. */ + expireGrants?: StringFilter; /** Filter by the object’s `grantAchievement` field. */ grantAchievement?: StringFilter; /** Filter by the object’s `id` field. */ @@ -5601,12 +6113,16 @@ export interface EventsModuleFilter { privateSchemaName?: StringFilter; /** Filter by the object’s `publicSchemaName` field. */ publicSchemaName?: StringFilter; + /** Filter by the object’s `recomputeCapabilities` field. */ + recomputeCapabilities?: StringFilter; /** Filter by the object’s `recordEvent` field. */ recordEvent?: StringFilter; /** Filter by the object’s `removeEvent` field. */ removeEvent?: StringFilter; /** Filter by the object’s `retention` field. */ retention?: StringFilter; + /** Filter by the object’s `revokeAchievement` field. */ + revokeAchievement?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `scope` field. */ @@ -5625,11 +6141,43 @@ export interface EventsModuleFilter { tgEventToggle?: StringFilter; /** Filter by the object’s `tgEventToggleBool` field. */ tgEventToggleBool?: StringFilter; + /** Filter by the object’s `tgLevelGrantSync` field. */ + tgLevelGrantSync?: StringFilter; /** Filter by the object’s `tgUpdateAggregates` field. */ tgUpdateAggregates?: StringFilter; + /** Filter by the object’s `trustLadder` field. */ + trustLadder?: JSONFilter; /** Filter by the object’s `upsertAggregate` field. */ upsertAggregate?: StringFilter; } +export interface FileRefFieldFilter { + /** Checks for all expressions in this list. */ + and?: FileRefFieldFilter[]; + /** Filter by the object’s `bucketKey` field. */ + bucketKey?: StringFilter; + /** Filter by the object’s `bucketTags` field. */ + bucketTags?: StringListFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `enforceFk` field. */ + enforceFk?: BooleanFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublic` field. */ + isPublic?: BooleanFilter; + /** Negates the expression. */ + not?: FileRefFieldFilter; + /** Checks for any expressions in this list. */ + or?: FileRefFieldFilter[]; + /** Filter by the object’s `storageModule` relation. */ + storageModule?: StorageModuleFilter; + /** Filter by the object’s `storageModuleId` field. */ + storageModuleId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} export interface FunctionDeploymentModuleFilter { /** Checks for all expressions in this list. */ and?: FunctionDeploymentModuleFilter[]; @@ -5637,8 +6185,8 @@ export interface FunctionDeploymentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deploymentEventsTableId` field. */ deploymentEventsTableId?: UUIDFilter; /** Filter by the object’s `deploymentEventsTableName` field. */ @@ -5699,8 +6247,8 @@ export interface FunctionInvocationModuleFilter { attemptsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5755,8 +6303,8 @@ export interface FunctionModuleFilter { capabilityBindingsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `definitionsTableId` field. */ definitionsTableId?: UUIDFilter; /** Filter by the object’s `definitionsTableName` field. */ @@ -5815,8 +6363,8 @@ export interface GraphExecutionModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5871,8 +6419,8 @@ export interface GraphModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5927,8 +6475,8 @@ export interface HierarchyModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -5973,8 +6521,8 @@ export interface HttpRouteModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -6387,6 +6935,8 @@ export interface LimitsModuleFilter { limitDecrementFunction?: StringFilter; /** Filter by the object’s `limitDecrementTrigger` field. */ limitDecrementTrigger?: StringFilter; + /** Filter by the object’s `limitDefaults` field. */ + limitDefaults?: JSONFilter; /** Filter by the object’s `limitIncrementFunction` field. */ limitIncrementFunction?: StringFilter; /** Filter by the object’s `limitIncrementTrigger` field. */ @@ -6455,12 +7005,18 @@ export interface MembershipsModuleFilter { and?: MembershipsModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultCapabilitiesTableId` field. */ + capabilityDefaultCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `capabilityDefaultGrantsTableId` field. */ + capabilityDefaultGrantsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilitiesTableId` field. */ + defaultCapabilitiesTableId?: UUIDFilter; /** Filter by the object’s `defaultLimitsTableId` field. */ defaultLimitsTableId?: UUIDFilter; - /** Filter by the object’s `defaultPermissionsTableId` field. */ - defaultPermissionsTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityIdsByMask` field. */ @@ -6509,12 +7065,6 @@ export interface MembershipsModuleFilter { ownerGrantsTableId?: UUIDFilter; /** Filter by the object’s `ownerGrantsTableName` field. */ ownerGrantsTableName?: StringFilter; - /** Filter by the object’s `permissionDefaultGrantsTableId` field. */ - permissionDefaultGrantsTableId?: UUIDFilter; - /** Filter by the object’s `permissionDefaultPermissionsTableId` field. */ - permissionDefaultPermissionsTableId?: UUIDFilter; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6537,8 +7087,14 @@ export interface MerkleStoreModuleFilter { and?: MerkleStoreModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilityKey` field. */ + capabilityKey?: StringFilter; /** Filter by the object’s `commitTableId` field. */ commitTableId?: UUIDFilter; + /** Filter by the object’s `contentPresetModules` relation. */ + contentPresetModules?: MerkleStoreModuleToManyContentPresetModuleFilter; + /** `contentPresetModules` exist. */ + contentPresetModulesExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -6567,8 +7123,6 @@ export interface MerkleStoreModuleFilter { pagesModules?: MerkleStoreModuleToManyPagesModuleFilter; /** `pagesModules` exist. */ pagesModulesExist?: boolean; - /** Filter by the object’s `permissionKey` field. */ - permissionKey?: StringFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6599,8 +7153,8 @@ export interface NamespaceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -6659,8 +7213,8 @@ export interface NotificationsModuleFilter { channelsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deliveryLogTableId` field. */ deliveryLogTableId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -6706,6 +7260,38 @@ export interface NotificationsModuleFilter { /** Filter by the object’s `userSettingsTableId` field. */ userSettingsTableId?: UUIDFilter; } +export interface OauthRequestsModuleFilter { + /** Checks for all expressions in this list. */ + and?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: OauthRequestsModuleFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableId` field. */ + oauthAuthorizationRequestsTableId?: UUIDFilter; + /** Filter by the object’s `oauthAuthorizationRequestsTableName` field. */ + oauthAuthorizationRequestsTableName?: StringFilter; + /** Checks for any expressions in this list. */ + or?: OauthRequestsModuleFilter[]; + /** Filter by the object’s `pendingIdentityLinksTableId` field. */ + pendingIdentityLinksTableId?: UUIDFilter; + /** Filter by the object’s `pendingIdentityLinksTableName` field. */ + pendingIdentityLinksTableName?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; +} export interface PagesModuleFilter { /** Checks for all expressions in this list. */ and?: PagesModuleFilter[]; @@ -6758,58 +7344,6 @@ export interface PagesModuleFilter { /** Filter by the object’s `storeNamePrefix` field. */ storeNamePrefix?: StringFilter; } -export interface PermissionsModuleFilter { - /** Filter by the object’s `actorTableId` field. */ - actorTableId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: PermissionsModuleFilter[]; - /** Filter by the object’s `apiName` field. */ - apiName?: StringFilter; - /** Filter by the object’s `bitlen` field. */ - bitlen?: IntFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `defaultTableId` field. */ - defaultTableId?: UUIDFilter; - /** Filter by the object’s `defaultTableName` field. */ - defaultTableName?: StringFilter; - /** Filter by the object’s `entityField` field. */ - entityField?: StringFilter; - /** Filter by the object’s `entityTableId` field. */ - entityTableId?: UUIDFilter; - /** Filter by the object’s `getByMask` field. */ - getByMask?: StringFilter; - /** Filter by the object’s `getMask` field. */ - getMask?: StringFilter; - /** Filter by the object’s `getMaskByName` field. */ - getMaskByName?: StringFilter; - /** Filter by the object’s `getPaddedMask` field. */ - getPaddedMask?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Negates the expression. */ - not?: PermissionsModuleFilter; - /** Checks for any expressions in this list. */ - or?: PermissionsModuleFilter[]; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Filter by the object’s `privateApiName` field. */ - privateApiName?: StringFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaName` field. */ - privateSchemaName?: StringFilter; - /** Filter by the object’s `publicSchemaName` field. */ - publicSchemaName?: StringFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `scope` field. */ - scope?: StringFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; -} export interface PhoneNumbersModuleFilter { /** Checks for all expressions in this list. */ and?: PhoneNumbersModuleFilter[]; @@ -6937,6 +7471,8 @@ export interface ProfilesModuleFilter { and?: ProfilesModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilitiesTableId` field. */ + capabilitiesTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `entityField` field. */ @@ -6945,14 +7481,16 @@ export interface ProfilesModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableId` field. */ + membershipProfilesTableId?: UUIDFilter; + /** Filter by the object’s `membershipProfilesTableName` field. */ + membershipProfilesTableName?: StringFilter; /** Filter by the object’s `membershipsTableId` field. */ membershipsTableId?: UUIDFilter; /** Negates the expression. */ not?: ProfilesModuleFilter; /** Checks for any expressions in this list. */ or?: ProfilesModuleFilter[]; - /** Filter by the object’s `permissionsTableId` field. */ - permissionsTableId?: UUIDFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -6961,6 +7499,10 @@ export interface ProfilesModuleFilter { privateSchemaId?: UUIDFilter; /** Filter by the object’s `privateSchemaName` field. */ privateSchemaName?: StringFilter; + /** Filter by the object’s `profileCapabilitiesTableId` field. */ + profileCapabilitiesTableId?: UUIDFilter; + /** Filter by the object’s `profileCapabilitiesTableName` field. */ + profileCapabilitiesTableName?: StringFilter; /** Filter by the object’s `profileDefinitionGrantsTableId` field. */ profileDefinitionGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileDefinitionGrantsTableName` field. */ @@ -6969,10 +7511,6 @@ export interface ProfilesModuleFilter { profileGrantsTableId?: UUIDFilter; /** Filter by the object’s `profileGrantsTableName` field. */ profileGrantsTableName?: StringFilter; - /** Filter by the object’s `profilePermissionsTableId` field. */ - profilePermissionsTableId?: UUIDFilter; - /** Filter by the object’s `profilePermissionsTableName` field. */ - profilePermissionsTableName?: StringFilter; /** Filter by the object’s `profileTemplatesTableId` field. */ profileTemplatesTableId?: UUIDFilter; /** Filter by the object’s `profileTemplatesTableName` field. */ @@ -6997,8 +7535,8 @@ export interface RateLimitMetersModuleFilter { checkRateLimitFunction?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Negates the expression. */ @@ -7155,8 +7693,8 @@ export interface ResourceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7279,6 +7817,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -7287,8 +7827,10 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ domainModule?: DomainModuleFilter; /** A related `domainModule` exists. */ @@ -7338,6 +7880,24 @@ export interface RouteModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ and?: SecureTableProvisionFilter[]; @@ -7431,8 +7991,12 @@ export interface SiteSurfaceModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailSenderModules` relation. */ + emailSenderModules?: SiteSurfaceModuleToManyEmailSenderModuleFilter; + /** `emailSenderModules` exist. */ + emailSenderModulesExist?: boolean; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7565,10 +8129,10 @@ export interface StorageModuleFilter { confirmUploadDelay?: IntervalFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMaxFileSize` field. */ defaultMaxFileSize?: BigIntFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `downloadUrlExpirySeconds` field. */ downloadUrlExpirySeconds?: IntFilter; /** Filter by the object’s `endpoint` field. */ @@ -7579,6 +8143,10 @@ export interface StorageModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `fileEventsTableId` field. */ fileEventsTableId?: UUIDFilter; + /** Filter by the object’s `fileRefFields` relation. */ + fileRefFields?: StorageModuleToManyFileRefFieldFilter; + /** `fileRefFields` exist. */ + fileRefFieldsExist?: boolean; /** Filter by the object’s `filesTableId` field. */ filesTableId?: UUIDFilter; /** Filter by the object’s `filesTableName` field. */ @@ -7796,6 +8364,28 @@ export interface UserSettingsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: 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; +} export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ and?: UserStateModuleFilter[]; @@ -7915,8 +8505,8 @@ export interface WebhookModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -7988,8 +8578,8 @@ export type AgentModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8078,8 +8668,8 @@ export type ApiSurfaceModuleOrderBy = | 'CORS_SETTINGS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8118,8 +8708,8 @@ export type AppModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8156,10 +8746,10 @@ export type BillingModuleOrderBy = | 'BALANCES_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_METER_CATALOG_ASC' | 'DEFAULT_METER_CATALOG_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'ID_ASC' | 'ID_DESC' | 'LEDGER_TABLE_ID_ASC' @@ -8214,6 +8804,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -8222,6 +8816,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -8234,6 +8832,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -8251,10 +8853,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; export type BlueprintOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -8353,25 +8959,77 @@ export type BlueprintTemplateOrderBy = | 'VERSION_DESC' | 'VISIBILITY_ASC' | 'VISIBILITY_DESC'; -export type CatalogModuleOrderBy = - | 'APIS_TABLE_ID_ASC' - | 'APIS_TABLE_ID_DESC' - | 'APIS_TABLE_NAME_ASC' - | 'APIS_TABLE_NAME_DESC' - | 'API_NAME_ASC' +export type CapabilitiesModuleOrderBy = + | 'ACTOR_TABLE_ID_ASC' + | 'ACTOR_TABLE_ID_DESC' + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'BITLEN_ASC' + | 'BITLEN_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_TABLE_ID_ASC' + | 'DEFAULT_TABLE_ID_DESC' + | 'DEFAULT_TABLE_NAME_ASC' + | 'DEFAULT_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'GET_BY_MASK_ASC' + | 'GET_BY_MASK_DESC' + | 'GET_MASK_ASC' + | 'GET_MASK_BY_NAME_ASC' + | 'GET_MASK_BY_NAME_DESC' + | 'GET_MASK_DESC' + | 'GET_PADDED_MASK_ASC' + | 'GET_PADDED_MASK_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; +export type CatalogModuleOrderBy = + | 'APIS_TABLE_ID_ASC' + | 'APIS_TABLE_ID_DESC' + | 'APIS_TABLE_NAME_ASC' + | 'APIS_TABLE_NAME_DESC' + | 'API_NAME_ASC' | 'API_NAME_DESC' | 'APPS_TABLE_ID_ASC' | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -8521,6 +9179,44 @@ export type ConnectedAccountsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type ContentPresetModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'CONTENT_PRESETS_TABLE_ID_ASC' + | 'CONTENT_PRESETS_TABLE_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MERKLE_STORE_MODULE_ID_ASC' + | 'MERKLE_STORE_MODULE_ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_ID_ASC' + | 'PUBLIC_SCHEMA_ID_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'STORE_NAME_ASC' + | 'STORE_NAME_DESC'; export type CryptoAddressesModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -8577,6 +9273,32 @@ export type CryptoAuthModuleOrderBy = | 'USERS_TABLE_ID_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC'; +export type DataCapabilitiesFieldOrderBy = + | 'CAPABILITIES_MODULE_ID_ASC' + | 'CAPABILITIES_MODULE_ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'FROM_FIELD_ID_ASC' + | 'FROM_FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'MAPPING_FIELD_ID_ASC' + | 'MAPPING_FIELD_ID_DESC' + | 'MAPPING_KEY_FIELD_ID_ASC' + | 'MAPPING_KEY_FIELD_ID_DESC' + | 'MAPPING_TABLE_ID_ASC' + | 'MAPPING_TABLE_ID_DESC' + | 'MODE_ASC' + | 'MODE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SUBSET_GUARD_ASC' + | 'SUBSET_GUARD_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; export type DatabaseProvisionModuleOrderBy = | 'ASYNC_ASC' | 'ASYNC_DESC' @@ -8628,8 +9350,8 @@ export type DatabaseSettingsModuleOrderBy = | 'DATABASE_SETTINGS_TABLE_ID_DESC' | 'DATABASE_SETTINGS_TABLE_NAME_ASC' | 'DATABASE_SETTINGS_TABLE_NAME_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -8766,8 +9488,8 @@ export type DbUsageModuleOrderBy = | 'COLLECT_DB_TABLE_STATS_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ID_ASC' @@ -8876,8 +9598,8 @@ export type DomainModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAINS_TABLE_ID_ASC' | 'DOMAINS_TABLE_ID_DESC' | 'DOMAINS_TABLE_NAME_ASC' @@ -8921,6 +9643,50 @@ export type DomainModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type EmailSenderModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' + | 'EMAIL_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_IDENTITIES_TABLE_NAME_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_ID_DESC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_ASC' + | 'EMAIL_PROVIDER_ACCOUNTS_TABLE_NAME_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_ID_DESC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_ASC' + | 'EMAIL_SITE_IDENTITIES_TABLE_NAME_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'POLICIES_ASC' + | 'POLICIES_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_API_NAME_ASC' + | 'PRIVATE_API_NAME_DESC' + | 'PROVISIONS_ASC' + | 'PROVISIONS_DESC' + | 'PUBLIC_SCHEMA_NAME_ASC' + | 'PUBLIC_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'SITE_SURFACE_MODULE_ID_ASC' + | 'SITE_SURFACE_MODULE_ID_DESC'; export type EmailsModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -9036,8 +9802,8 @@ export type EventsModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9054,6 +9820,8 @@ export type EventsModuleOrderBy = | 'EVENT_TYPES_TABLE_ID_DESC' | 'EVENT_TYPES_TABLE_NAME_ASC' | 'EVENT_TYPES_TABLE_NAME_DESC' + | 'EXPIRE_GRANTS_ASC' + | 'EXPIRE_GRANTS_DESC' | 'GRANT_ACHIEVEMENT_ASC' | 'GRANT_ACHIEVEMENT_DESC' | 'ID_ASC' @@ -9089,12 +9857,16 @@ export type EventsModuleOrderBy = | 'PRIVATE_SCHEMA_NAME_DESC' | 'PUBLIC_SCHEMA_NAME_ASC' | 'PUBLIC_SCHEMA_NAME_DESC' + | 'RECOMPUTE_CAPABILITIES_ASC' + | 'RECOMPUTE_CAPABILITIES_DESC' | 'RECORD_EVENT_ASC' | 'RECORD_EVENT_DESC' | 'REMOVE_EVENT_ASC' | 'REMOVE_EVENT_DESC' | 'RETENTION_ASC' | 'RETENTION_DESC' + | 'REVOKE_ACHIEVEMENT_ASC' + | 'REVOKE_ACHIEVEMENT_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' @@ -9113,17 +9885,43 @@ export type EventsModuleOrderBy = | 'TG_EVENT_TOGGLE_BOOL_ASC' | 'TG_EVENT_TOGGLE_BOOL_DESC' | 'TG_EVENT_TOGGLE_DESC' + | 'TG_LEVEL_GRANT_SYNC_ASC' + | 'TG_LEVEL_GRANT_SYNC_DESC' | 'TG_UPDATE_AGGREGATES_ASC' | 'TG_UPDATE_AGGREGATES_DESC' + | 'TRUST_LADDER_ASC' + | 'TRUST_LADDER_DESC' | 'UPSERT_AGGREGATE_ASC' | 'UPSERT_AGGREGATE_DESC'; +export type FileRefFieldOrderBy = + | 'BUCKET_KEY_ASC' + | 'BUCKET_KEY_DESC' + | 'BUCKET_TAGS_ASC' + | 'BUCKET_TAGS_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENFORCE_FK_ASC' + | 'ENFORCE_FK_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLIC_ASC' + | 'IS_PUBLIC_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STORAGE_MODULE_ID_ASC' + | 'STORAGE_MODULE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC'; export type FunctionDeploymentModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEPLOYMENTS_TABLE_ID_ASC' | 'DEPLOYMENTS_TABLE_ID_DESC' | 'DEPLOYMENTS_TABLE_NAME_ASC' @@ -9172,8 +9970,8 @@ export type FunctionInvocationModuleOrderBy = | 'ATTEMPTS_TABLE_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9220,8 +10018,8 @@ export type FunctionModuleOrderBy = | 'CAPABILITY_BINDINGS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFINITIONS_TABLE_ID_ASC' | 'DEFINITIONS_TABLE_ID_DESC' | 'DEFINITIONS_TABLE_NAME_ASC' @@ -9264,8 +10062,8 @@ export type GraphExecutionModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9314,8 +10112,8 @@ export type GraphModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9360,8 +10158,8 @@ export type HierarchyModuleOrderBy = | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9402,8 +10200,8 @@ export type HttpRouteModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9764,6 +10562,8 @@ export type LimitsModuleOrderBy = | 'LIMIT_DECREMENT_FUNCTION_DESC' | 'LIMIT_DECREMENT_TRIGGER_ASC' | 'LIMIT_DECREMENT_TRIGGER_DESC' + | 'LIMIT_DEFAULTS_ASC' + | 'LIMIT_DEFAULTS_DESC' | 'LIMIT_INCREMENT_FUNCTION_ASC' | 'LIMIT_INCREMENT_FUNCTION_DESC' | 'LIMIT_INCREMENT_TRIGGER_ASC' @@ -9824,12 +10624,18 @@ export type MembershipsModuleOrderBy = | 'ADMIN_GRANTS_TABLE_NAME_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_CAPABILITIES_TABLE_ID_DESC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_ASC' + | 'CAPABILITY_DEFAULT_GRANTS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_ASC' + | 'DEFAULT_CAPABILITIES_TABLE_ID_DESC' | 'DEFAULT_LIMITS_TABLE_ID_ASC' | 'DEFAULT_LIMITS_TABLE_ID_DESC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_IDS_BY_MASK_ASC' @@ -9875,12 +10681,6 @@ export type MembershipsModuleOrderBy = | 'OWNER_GRANTS_TABLE_ID_DESC' | 'OWNER_GRANTS_TABLE_NAME_ASC' | 'OWNER_GRANTS_TABLE_NAME_DESC' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_GRANTS_TABLE_ID_DESC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSION_DEFAULT_PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -9902,6 +10702,8 @@ export type MembershipsModuleOrderBy = export type MerkleStoreModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITY_KEY_ASC' + | 'CAPABILITY_KEY_DESC' | 'COMMIT_TABLE_ID_ASC' | 'COMMIT_TABLE_ID_DESC' | 'CREATED_AT_ASC' @@ -9917,8 +10719,6 @@ export type MerkleStoreModuleOrderBy = | 'NATURAL' | 'OBJECT_TABLE_ID_ASC' | 'OBJECT_TABLE_ID_DESC' - | 'PERMISSION_KEY_ASC' - | 'PERMISSION_KEY_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -9944,8 +10744,8 @@ export type NamespaceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -9988,8 +10788,8 @@ export type NotificationsModuleOrderBy = | 'CHANNELS_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DELIVERY_LOG_TABLE_ID_ASC' | 'DELIVERY_LOG_TABLE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10033,6 +10833,34 @@ export type NotificationsModuleOrderBy = | 'SUPPRESSIONS_TABLE_ID_DESC' | 'USER_SETTINGS_TABLE_ID_ASC' | 'USER_SETTINGS_TABLE_ID_DESC'; +export type OauthRequestsModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ENTITY_FIELD_ASC' + | 'ENTITY_FIELD_DESC' + | 'ENTITY_TABLE_ID_ASC' + | 'ENTITY_TABLE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_ID_DESC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_ASC' + | 'OAUTH_AUTHORIZATION_REQUESTS_TABLE_NAME_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_ID_DESC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_ASC' + | 'PENDING_IDENTITY_LINKS_TABLE_NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC'; export type PagesModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -10075,54 +10903,6 @@ export type PagesModuleOrderBy = | 'SITE_SURFACE_MODULE_ID_DESC' | 'STORE_NAME_PREFIX_ASC' | 'STORE_NAME_PREFIX_DESC'; -export type PermissionsModuleOrderBy = - | 'ACTOR_TABLE_ID_ASC' - | 'ACTOR_TABLE_ID_DESC' - | 'API_NAME_ASC' - | 'API_NAME_DESC' - | 'BITLEN_ASC' - | 'BITLEN_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DEFAULT_TABLE_ID_ASC' - | 'DEFAULT_TABLE_ID_DESC' - | 'DEFAULT_TABLE_NAME_ASC' - | 'DEFAULT_TABLE_NAME_DESC' - | 'ENTITY_FIELD_ASC' - | 'ENTITY_FIELD_DESC' - | 'ENTITY_TABLE_ID_ASC' - | 'ENTITY_TABLE_ID_DESC' - | 'GET_BY_MASK_ASC' - | 'GET_BY_MASK_DESC' - | 'GET_MASK_ASC' - | 'GET_MASK_BY_NAME_ASC' - | 'GET_MASK_BY_NAME_DESC' - | 'GET_MASK_DESC' - | 'GET_PADDED_MASK_ASC' - | 'GET_PADDED_MASK_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NATURAL' - | 'PREFIX_ASC' - | 'PREFIX_DESC' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'PRIVATE_API_NAME_ASC' - | 'PRIVATE_API_NAME_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_NAME_ASC' - | 'PRIVATE_SCHEMA_NAME_DESC' - | 'PUBLIC_SCHEMA_NAME_ASC' - | 'PUBLIC_SCHEMA_NAME_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'SCOPE_ASC' - | 'SCOPE_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC'; export type PhoneNumbersModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' @@ -10236,6 +11016,8 @@ export type ProfilesModuleOrderBy = | 'ACTOR_TABLE_ID_DESC' | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'CAPABILITIES_TABLE_ID_ASC' + | 'CAPABILITIES_TABLE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10246,9 +11028,11 @@ export type ProfilesModuleOrderBy = | 'ID_DESC' | 'MEMBERSHIPS_TABLE_ID_ASC' | 'MEMBERSHIPS_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_ID_DESC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_ASC' + | 'MEMBERSHIP_PROFILES_TABLE_NAME_DESC' | 'NATURAL' - | 'PERMISSIONS_TABLE_ID_ASC' - | 'PERMISSIONS_TABLE_ID_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'PRIMARY_KEY_ASC' @@ -10259,6 +11043,10 @@ export type ProfilesModuleOrderBy = | 'PRIVATE_SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_NAME_ASC' | 'PRIVATE_SCHEMA_NAME_DESC' + | 'PROFILE_CAPABILITIES_TABLE_ID_ASC' + | 'PROFILE_CAPABILITIES_TABLE_ID_DESC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_ASC' + | 'PROFILE_CAPABILITIES_TABLE_NAME_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_ASC' | 'PROFILE_DEFINITION_GRANTS_TABLE_ID_DESC' | 'PROFILE_DEFINITION_GRANTS_TABLE_NAME_ASC' @@ -10267,10 +11055,6 @@ export type ProfilesModuleOrderBy = | 'PROFILE_GRANTS_TABLE_ID_DESC' | 'PROFILE_GRANTS_TABLE_NAME_ASC' | 'PROFILE_GRANTS_TABLE_NAME_DESC' - | 'PROFILE_PERMISSIONS_TABLE_ID_ASC' - | 'PROFILE_PERMISSIONS_TABLE_ID_DESC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_ASC' - | 'PROFILE_PERMISSIONS_TABLE_NAME_DESC' | 'PROFILE_TEMPLATES_TABLE_ID_ASC' | 'PROFILE_TEMPLATES_TABLE_ID_DESC' | 'PROFILE_TEMPLATES_TABLE_NAME_ASC' @@ -10292,8 +11076,8 @@ export type RateLimitMetersModuleOrderBy = | 'CHECK_RATE_LIMIT_FUNCTION_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ID_ASC' | 'ID_DESC' | 'NATURAL' @@ -10434,8 +11218,8 @@ export type ResourceModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -10538,12 +11322,16 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DOMAIN_MODULE_ID_ASC' | 'DOMAIN_MODULE_ID_DESC' | 'ENTITY_FIELD_ASC' @@ -10587,6 +11375,20 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -10662,8 +11464,8 @@ export type SiteSurfaceModuleOrderBy = | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -10784,10 +11586,10 @@ export type StorageModuleOrderBy = | 'CONFIRM_UPLOAD_DELAY_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'ENDPOINT_ASC' @@ -10993,6 +11795,24 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -11094,8 +11914,8 @@ export type WebhookModuleOrderBy = | 'API_NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' - | 'DEFAULT_PERMISSIONS_ASC' - | 'DEFAULT_PERMISSIONS_DESC' + | 'DEFAULT_CAPABILITIES_ASC' + | 'DEFAULT_CAPABILITIES_DESC' | 'ENTITY_FIELD_ASC' | 'ENTITY_FIELD_DESC' | 'ENTITY_TABLE_ID_ASC' @@ -11147,7 +11967,7 @@ export interface CreateAgentModuleInput { agentTableName?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -11185,7 +12005,7 @@ export interface AgentModulePatch { agentTableName?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; hasAgents?: boolean | null; @@ -11240,7 +12060,7 @@ export interface CreateApiSurfaceModuleInput { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11264,7 +12084,7 @@ export interface ApiSurfaceModulePatch { corsSettingsTableId?: string | null; corsSettingsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -11294,7 +12114,7 @@ export interface CreateAppModuleInput { appsTableName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11316,7 +12136,7 @@ export interface AppModulePatch { appsTableName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -11345,8 +12165,8 @@ export interface CreateBillingModuleInput { balancesTableId?: string; balancesTableName?: string; databaseId: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: Record; - defaultPermissions?: string[]; ledgerTableId?: string; ledgerTableName?: string; meterCreditsTableId?: string; @@ -11375,8 +12195,8 @@ export interface BillingModulePatch { balancesTableId?: string | null; balancesTableName?: string | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMeterCatalog?: Record | null; - defaultPermissions?: string[] | null; ledgerTableId?: string | null; ledgerTableName?: string | null; meterCreditsTableId?: string | null; @@ -11414,15 +12234,21 @@ export interface CreateBillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -11430,23 +12256,31 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; }; } export interface BillingProviderModulePatch { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -11454,8 +12288,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } export interface UpdateBillingProviderModuleInput { clientMutationId?: string; @@ -11582,27 +12418,87 @@ export interface DeleteBlueprintTemplateInput { clientMutationId?: string; id: string; } -export interface CreateCatalogModuleInput { +export interface CreateCapabilitiesModuleInput { clientMutationId?: string; - catalogModule: { + capabilitiesModule: { + actorTableId?: string; apiName?: string; - apisTableId?: string; - apisTableName?: string; - appsTableId?: string; - appsTableName?: string; - bucketsTableId?: string; - bucketsTableName?: string; + bitlen?: number; databaseId: string; - defaultPermissions?: string[]; - domainsTableId?: string; - domainsTableName?: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; entityTableId?: string; - functionsTableId?: string; - functionsTableName?: string; - namespacesTableId?: string; - namespacesTableName?: string; - policies?: Record; - privateApiName?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope: string; + tableId?: string; + tableName?: string; + }; +} +export interface CapabilitiesModulePatch { + actorTableId?: string | null; + apiName?: string | null; + bitlen?: number | null; + databaseId?: string | null; + defaultTableId?: string | null; + defaultTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + getByMask?: string | null; + getMask?: string | null; + getMaskByName?: string | null; + getPaddedMask?: string | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateCapabilitiesModuleInput { + clientMutationId?: string; + id: string; + capabilitiesModulePatch: CapabilitiesModulePatch; +} +export interface DeleteCapabilitiesModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateCatalogModuleInput { + clientMutationId?: string; + catalogModule: { + apiName?: string; + apisTableId?: string; + apisTableName?: string; + appsTableId?: string; + appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; + bucketsTableId?: string; + bucketsTableName?: string; + databaseId: string; + defaultCapabilities?: string[]; + domainsTableId?: string; + domainsTableName?: string; + entityTableId?: string; + functionsTableId?: string; + functionsTableName?: string; + namespacesTableId?: string; + namespacesTableName?: string; + policies?: Record; + privateApiName?: string; provisions?: Record; publicSchemaName?: string; resourceDefinitionsTableId?: string; @@ -11631,10 +12527,12 @@ export interface CatalogModulePatch { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainsTableId?: string | null; domainsTableName?: string | null; entityTableId?: string | null; @@ -11790,6 +12688,52 @@ export interface DeleteConnectedAccountsModuleInput { clientMutationId?: string; id: string; } +export interface CreateContentPresetModuleInput { + clientMutationId?: string; + contentPresetModule: { + apiName?: string; + contentPresetsTableId?: string; + databaseId: string; + entityTableId?: string; + merkleStoreModuleId: string; + policies?: Record; + prefix: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: Record; + publicSchemaId?: string; + publicSchemaName?: string; + scope: string; + storeName: string; + }; +} +export interface ContentPresetModulePatch { + apiName?: string | null; + contentPresetsTableId?: string | null; + databaseId?: string | null; + entityTableId?: string | null; + merkleStoreModuleId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + provisions?: Record | null; + publicSchemaId?: string | null; + publicSchemaName?: string | null; + scope?: string | null; + storeName?: string | null; +} +export interface UpdateContentPresetModuleInput { + clientMutationId?: string; + id: string; + contentPresetModulePatch: ContentPresetModulePatch; +} +export interface DeleteContentPresetModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateCryptoAddressesModuleInput { clientMutationId?: string; cryptoAddressesModule: { @@ -11866,6 +12810,42 @@ export interface DeleteCryptoAuthModuleInput { clientMutationId?: string; id: string; } +export interface CreateDataCapabilitiesFieldInput { + clientMutationId?: string; + dataCapabilitiesField: { + capabilitiesModuleId: string; + databaseId: string; + fieldId: string; + fromFieldId?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId: string; + }; +} +export interface DataCapabilitiesFieldPatch { + capabilitiesModuleId?: string | null; + databaseId?: string | null; + fieldId?: string | null; + fromFieldId?: string | null; + mappingFieldId?: string | null; + mappingKeyFieldId?: string | null; + mappingTableId?: string | null; + mode?: string | null; + subsetGuard?: boolean | null; + tableId?: string | null; +} +export interface UpdateDataCapabilitiesFieldInput { + clientMutationId?: string; + id: string; + dataCapabilitiesFieldPatch: DataCapabilitiesFieldPatch; +} +export interface DeleteDataCapabilitiesFieldInput { + clientMutationId?: string; + id: string; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -11921,7 +12901,7 @@ export interface CreateDatabaseSettingsModuleInput { databaseId: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -11944,7 +12924,7 @@ export interface DatabaseSettingsModulePatch { databaseId?: string | null; databaseSettingsTableId?: string | null; databaseSettingsTableName?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -12089,7 +13069,7 @@ export interface CreateDbUsageModuleInput { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; interval?: string; prefix?: string; @@ -12118,7 +13098,7 @@ export interface DbUsageModulePatch { collectDbQueryStatsFunction?: string | null; collectDbTableStatsFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; interval?: string | null; prefix?: string | null; @@ -12240,7 +13220,7 @@ export interface CreateDomainModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -12266,7 +13246,7 @@ export interface DomainModulePatch { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; domainEventsTableId?: string | null; domainEventsTableName?: string | null; domainVerificationsTableId?: string | null; @@ -12296,6 +13276,60 @@ export interface DeleteDomainModuleInput { clientMutationId?: string; id: string; } +export interface CreateEmailSenderModuleInput { + clientMutationId?: string; + emailSenderModule: { + apiName?: string; + databaseId: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + policies?: Record; + prefix?: string; + privateApiName?: string; + provisions?: Record; + publicSchemaName?: string; + schemaId?: string; + scope: string; + siteSurfaceModuleId?: string; + }; +} +export interface EmailSenderModulePatch { + apiName?: string | null; + databaseId?: string | null; + defaultCapabilities?: string[] | null; + emailIdentitiesTableId?: string | null; + emailIdentitiesTableName?: string | null; + emailProviderAccountsTableId?: string | null; + emailProviderAccountsTableName?: string | null; + emailSiteIdentitiesTableId?: string | null; + emailSiteIdentitiesTableName?: string | null; + entityField?: string | null; + entityTableId?: string | null; + policies?: Record | null; + prefix?: string | null; + privateApiName?: string | null; + provisions?: Record | null; + publicSchemaName?: string | null; + schemaId?: string | null; + scope?: string | null; + siteSurfaceModuleId?: string | null; +} +export interface UpdateEmailSenderModuleInput { + clientMutationId?: string; + id: string; + emailSenderModulePatch: EmailSenderModulePatch; +} +export interface DeleteEmailSenderModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateEmailsModuleInput { clientMutationId?: string; emailsModule: { @@ -12428,7 +13462,7 @@ export interface CreateEventsModuleInput { actorTableId?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -12437,6 +13471,7 @@ export interface CreateEventsModuleInput { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; interval?: string; levelAchieved?: string; @@ -12452,9 +13487,11 @@ export interface CreateEventsModuleInput { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope: string; stepsRequired?: string; @@ -12464,7 +13501,9 @@ export interface CreateEventsModuleInput { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: Record; upsertAggregate?: string; }; } @@ -12474,7 +13513,7 @@ export interface EventsModulePatch { actorTableId?: string | null; apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; eventAggregatesTableId?: string | null; @@ -12483,6 +13522,7 @@ export interface EventsModulePatch { eventTypesTableName?: string | null; eventsTableId?: string | null; eventsTableName?: string | null; + expireGrants?: string | null; grantAchievement?: string | null; interval?: string | null; levelAchieved?: string | null; @@ -12498,9 +13538,11 @@ export interface EventsModulePatch { privateSchemaId?: string | null; privateSchemaName?: string | null; publicSchemaName?: string | null; + recomputeCapabilities?: string | null; recordEvent?: string | null; removeEvent?: string | null; retention?: string | null; + revokeAchievement?: string | null; schemaId?: string | null; scope?: string | null; stepsRequired?: string | null; @@ -12510,7 +13552,9 @@ export interface EventsModulePatch { tgEventBool?: string | null; tgEventToggle?: string | null; tgEventToggleBool?: string | null; + tgLevelGrantSync?: string | null; tgUpdateAggregates?: string | null; + trustLadder?: Record | null; upsertAggregate?: string | null; } export interface UpdateEventsModuleInput { @@ -12522,12 +13566,44 @@ export interface DeleteEventsModuleInput { clientMutationId?: string; id: string; } +export interface CreateFileRefFieldInput { + clientMutationId?: string; + fileRefField: { + bucketKey?: string; + bucketTags?: string[]; + databaseId: string; + enforceFk?: boolean; + fieldId: string; + isPublic?: boolean; + storageModuleId: string; + tableId: string; + }; +} +export interface FileRefFieldPatch { + bucketKey?: string | null; + bucketTags?: string[] | null; + databaseId?: string | null; + enforceFk?: boolean | null; + fieldId?: string | null; + isPublic?: boolean | null; + storageModuleId?: string | null; + tableId?: string | null; +} +export interface UpdateFileRefFieldInput { + clientMutationId?: string; + id: string; + fileRefFieldPatch: FileRefFieldPatch; +} +export interface DeleteFileRefFieldInput { + clientMutationId?: string; + id: string; +} export interface CreateFunctionDeploymentModuleInput { clientMutationId?: string; functionDeploymentModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -12550,7 +13626,7 @@ export interface CreateFunctionDeploymentModuleInput { export interface FunctionDeploymentModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deploymentEventsTableId?: string | null; deploymentEventsTableName?: string | null; deploymentsTableId?: string | null; @@ -12585,7 +13661,7 @@ export interface CreateFunctionInvocationModuleInput { attemptsTableId?: string; attemptsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -12608,7 +13684,7 @@ export interface FunctionInvocationModulePatch { attemptsTableId?: string | null; attemptsTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionLogsTableId?: string | null; @@ -12642,7 +13718,7 @@ export interface CreateFunctionModuleInput { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -12666,7 +13742,7 @@ export interface FunctionModulePatch { bindingsTableName?: string | null; capabilityBindingsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; definitionsTableId?: string | null; definitionsTableName?: string | null; entityField?: string | null; @@ -12697,7 +13773,7 @@ export interface CreateGraphExecutionModuleInput { graphExecutionModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -12721,7 +13797,7 @@ export interface CreateGraphExecutionModuleInput { export interface GraphExecutionModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; executionsTableId?: string | null; @@ -12755,7 +13831,7 @@ export interface CreateGraphModuleInput { graphModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -12774,7 +13850,7 @@ export interface CreateGraphModuleInput { export interface GraphModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; graphsTableId?: string | null; @@ -12806,7 +13882,7 @@ export interface CreateHierarchyModuleInput { chartEdgesTableId?: string; chartEdgesTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId: string; getManagersFunction?: string; @@ -12830,7 +13906,7 @@ export interface HierarchyModulePatch { chartEdgesTableId?: string | null; chartEdgesTableName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; getManagersFunction?: string | null; @@ -12861,7 +13937,7 @@ export interface CreateHttpRouteModuleInput { httpRouteModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -12884,7 +13960,7 @@ export interface CreateHttpRouteModuleInput { export interface HttpRouteModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionModuleId?: string | null; @@ -13292,6 +14368,7 @@ export interface CreateLimitsModuleInput { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: Record; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -13331,6 +14408,7 @@ export interface LimitsModulePatch { limitCreditsTableId?: string | null; limitDecrementFunction?: string | null; limitDecrementTrigger?: string | null; + limitDefaults?: Record | null; limitIncrementFunction?: string | null; limitIncrementTrigger?: string | null; limitUpdateTrigger?: string | null; @@ -13389,9 +14467,12 @@ export interface CreateMembershipsModuleInput { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -13413,9 +14494,6 @@ export interface CreateMembershipsModuleInput { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13433,9 +14511,12 @@ export interface MembershipsModulePatch { adminGrantsTableId?: string | null; adminGrantsTableName?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; + capabilityDefaultCapabilitiesTableId?: string | null; + capabilityDefaultGrantsTableId?: string | null; databaseId?: string | null; + defaultCapabilitiesTableId?: string | null; defaultLimitsTableId?: string | null; - defaultPermissionsTableId?: string | null; entityField?: string | null; entityIdsByMask?: string | null; entityIdsByPerm?: string | null; @@ -13457,9 +14538,6 @@ export interface MembershipsModulePatch { membershipsTableName?: string | null; ownerGrantsTableId?: string | null; ownerGrantsTableName?: string | null; - permissionDefaultGrantsTableId?: string | null; - permissionDefaultPermissionsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -13482,12 +14560,12 @@ export interface CreateMerkleStoreModuleInput { clientMutationId?: string; merkleStoreModule: { apiName?: string; + capabilityKey?: string; commitTableId?: string; databaseId: string; entityField?: string; functionPrefix?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13501,12 +14579,12 @@ export interface CreateMerkleStoreModuleInput { } export interface MerkleStoreModulePatch { apiName?: string | null; + capabilityKey?: string | null; commitTableId?: string | null; databaseId?: string | null; entityField?: string | null; functionPrefix?: string | null; objectTableId?: string | null; - permissionKey?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -13531,7 +14609,7 @@ export interface CreateNamespaceModuleInput { namespaceModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; namespaceEventsTableId?: string; @@ -13552,7 +14630,7 @@ export interface CreateNamespaceModuleInput { export interface NamespaceModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; namespaceEventsTableId?: string | null; @@ -13584,7 +14662,7 @@ export interface CreateNotificationsModuleInput { apiName?: string; channelsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -13610,7 +14688,7 @@ export interface NotificationsModulePatch { apiName?: string | null; channelsTableId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; deliveryLogTableId?: string | null; entityField?: string | null; hasChannels?: boolean | null; @@ -13640,6 +14718,44 @@ export interface DeleteNotificationsModuleInput { clientMutationId?: string; id: string; } +export interface CreateOauthRequestsModuleInput { + clientMutationId?: string; + oauthRequestsModule: { + databaseId: string; + entityField?: string; + entityTableId?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope: string; + }; +} +export interface OauthRequestsModulePatch { + databaseId?: string | null; + entityField?: string | null; + entityTableId?: string | null; + oauthAuthorizationRequestsTableId?: string | null; + oauthAuthorizationRequestsTableName?: string | null; + pendingIdentityLinksTableId?: string | null; + pendingIdentityLinksTableName?: string | null; + prefix?: string | null; + privateSchemaId?: string | null; + privateSchemaName?: string | null; + scope?: string | null; +} +export interface UpdateOauthRequestsModuleInput { + clientMutationId?: string; + id: string; + oauthRequestsModulePatch: OauthRequestsModulePatch; +} +export interface DeleteOauthRequestsModuleInput { + clientMutationId?: string; + id: string; +} export interface CreatePagesModuleInput { clientMutationId?: string; pagesModule: { @@ -13690,64 +14806,6 @@ export interface DeletePagesModuleInput { clientMutationId?: string; id: string; } -export interface CreatePermissionsModuleInput { - clientMutationId?: string; - permissionsModule: { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; - }; -} -export interface PermissionsModulePatch { - actorTableId?: string | null; - apiName?: string | null; - bitlen?: number | null; - databaseId?: string | null; - defaultTableId?: string | null; - defaultTableName?: string | null; - entityField?: string | null; - entityTableId?: string | null; - getByMask?: string | null; - getMask?: string | null; - getMaskByName?: string | null; - getPaddedMask?: string | null; - prefix?: string | null; - privateApiName?: string | null; - privateSchemaId?: string | null; - privateSchemaName?: string | null; - publicSchemaName?: string | null; - schemaId?: string | null; - scope?: string | null; - tableId?: string | null; - tableName?: string | null; -} -export interface UpdatePermissionsModuleInput { - clientMutationId?: string; - id: string; - permissionsModulePatch: PermissionsModulePatch; -} -export interface DeletePermissionsModuleInput { - clientMutationId?: string; - id: string; -} export interface CreatePhoneNumbersModuleInput { clientMutationId?: string; phoneNumbersModule: { @@ -13891,21 +14949,23 @@ export interface CreateProfilesModuleInput { profilesModule: { actorTableId?: string; apiName?: string; + capabilitiesTableId?: string; databaseId: string; entityField?: string; entityTableId?: string; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; membershipsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; profileDefinitionGrantsTableId?: string; profileDefinitionGrantsTableName?: string; profileGrantsTableId?: string; profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; profileTemplatesTableId?: string; profileTemplatesTableName?: string; publicSchemaName?: string; @@ -13918,21 +14978,23 @@ export interface CreateProfilesModuleInput { export interface ProfilesModulePatch { actorTableId?: string | null; apiName?: string | null; + capabilitiesTableId?: string | null; databaseId?: string | null; entityField?: string | null; entityTableId?: string | null; + membershipProfilesTableId?: string | null; + membershipProfilesTableName?: string | null; membershipsTableId?: string | null; - permissionsTableId?: string | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; privateSchemaName?: string | null; + profileCapabilitiesTableId?: string | null; + profileCapabilitiesTableName?: string | null; profileDefinitionGrantsTableId?: string | null; profileDefinitionGrantsTableName?: string | null; profileGrantsTableId?: string | null; profileGrantsTableName?: string | null; - profilePermissionsTableId?: string | null; - profilePermissionsTableName?: string | null; profileTemplatesTableId?: string | null; profileTemplatesTableName?: string | null; publicSchemaName?: string | null; @@ -13956,7 +15018,7 @@ export interface CreateRateLimitMetersModuleInput { apiName?: string; checkRateLimitFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -13975,7 +15037,7 @@ export interface RateLimitMetersModulePatch { apiName?: string | null; checkRateLimitFunction?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; prefix?: string | null; privateApiName?: string | null; privateSchemaId?: string | null; @@ -14139,7 +15201,7 @@ export interface CreateResourceModuleInput { resourceModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; installationStoreName?: string; @@ -14177,7 +15239,7 @@ export interface CreateResourceModuleInput { export interface ResourceModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; installationStoreName?: string | null; @@ -14264,9 +15326,11 @@ export interface CreateRouteModuleInput { clientMutationId?: string; routeModule: { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -14290,9 +15354,11 @@ export interface CreateRouteModuleInput { } export interface RouteModulePatch { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + deepLinkFunctionName?: string | null; + defaultCapabilities?: string[] | null; domainModuleId?: string | null; entityField?: string | null; entityTableId?: string | null; @@ -14322,15 +15388,39 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } -export interface CreateSecureTableProvisionInput { +export interface CreateScopeTypesModuleInput { clientMutationId?: string; - secureTableProvision: { + scopeTypesModule: { databaseId: string; - fields?: Record[]; - grants?: Record; - nodes?: Record; - outFields?: string[]; - policies?: Record; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; + }; +} +export interface ScopeTypesModulePatch { + databaseId?: string | null; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; +} +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} +export interface CreateSecureTableProvisionInput { + clientMutationId?: string; + secureTableProvision: { + databaseId: string; + fields?: Record[]; + grants?: Record; + nodes?: Record; + outFields?: string[]; + policies?: Record; schemaId?: string; tableId?: string; tableName?: string; @@ -14426,7 +15516,7 @@ export interface CreateSiteSurfaceModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; policies?: Record; @@ -14460,7 +15550,7 @@ export interface SiteSurfaceModulePatch { apiName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; policies?: Record | null; @@ -14563,8 +15653,8 @@ export interface CreateStorageModuleInput { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -14606,8 +15696,8 @@ export interface StorageModulePatch { catalogModuleId?: string | null; confirmUploadDelay?: IntervalInput | null; databaseId?: string | null; + defaultCapabilities?: string[] | null; defaultMaxFileSize?: string | null; - defaultPermissions?: string[] | null; downloadUrlExpirySeconds?: number | null; endpoint?: string | null; entityField?: string | null; @@ -14828,6 +15918,34 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + userSettingsSecurityModule: { + apiName?: string; + databaseId: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + }; +} +export interface UserSettingsSecurityModulePatch { + apiName?: string | null; + databaseId?: string | null; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateUserStateModuleInput { clientMutationId?: string; userStateModule: { @@ -14969,7 +16087,7 @@ export interface CreateWebhookModuleInput { webhookModule: { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -14994,7 +16112,7 @@ export interface CreateWebhookModuleInput { export interface WebhookModulePatch { apiName?: string | null; databaseId?: string | null; - defaultPermissions?: string[] | null; + defaultCapabilities?: string[] | null; entityField?: string | null; entityTableId?: string | null; functionInvocationModuleId?: string | null; @@ -15033,6 +16151,9 @@ export const connectionFieldsMap = { blueprintTemplatesByForkedFromId: 'BlueprintTemplate', blueprintsByTemplateId: 'Blueprint', }, + CapabilitiesModule: { + dataCapabilitiesFields: 'DataCapabilitiesField', + }, CatalogModule: { apiSurfaceModules: 'ApiSurfaceModule', appModules: 'AppModule', @@ -15058,6 +16179,7 @@ export const connectionFieldsMap = { webhookModules: 'WebhookModule', }, MerkleStoreModule: { + contentPresetModules: 'ContentPresetModule', dbPresetModules: 'DbPresetModule', graphModules: 'GraphModule', pagesModules: 'PagesModule', @@ -15072,9 +16194,11 @@ export const connectionFieldsMap = { httpRouteModules: 'HttpRouteModule', }, SiteSurfaceModule: { + emailSenderModules: 'EmailSenderModule', pagesModules: 'PagesModule', }, StorageModule: { + fileRefFields: 'FileRefField', httpRouteModules: 'HttpRouteModule', }, } as Record>; @@ -15101,79 +16225,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: Record; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: Record; - policies?: Record; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: Record; - fullTextSearches?: Record; - grants?: Record; - indexes?: Record; - nodes?: Record; - policies?: Record; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: Record; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} /** A filter to be used against many `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where every related entity matches. */ @@ -15201,6 +16252,15 @@ export interface BlueprintTemplateToManyBlueprintFilter { /** Filters to entities where at least one related entity matches. */ some?: BlueprintFilter; } +/** A filter to be used against many `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleToManyDataCapabilitiesFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: DataCapabilitiesFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: DataCapabilitiesFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: DataCapabilitiesFieldFilter; +} /** A filter to be used against many `ApiSurfaceModule` object types. All fields are combined with a logical ‘and.’ */ export interface CatalogModuleToManyApiSurfaceModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15334,6 +16394,15 @@ export interface InfraSecretsModuleToManyWebhookModuleFilter { /** Filters to entities where at least one related entity matches. */ some?: WebhookModuleFilter; } +/** A filter to be used against many `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface MerkleStoreModuleToManyContentPresetModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: ContentPresetModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: ContentPresetModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: ContentPresetModuleFilter; +} /** A filter to be used against many `DbPresetModule` object types. All fields are combined with a logical ‘and.’ */ export interface MerkleStoreModuleToManyDbPresetModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15445,6 +16514,15 @@ export interface JSONListFilter { /** Overlaps the specified list of values. */ overlaps?: Record[]; } +/** A filter to be used against many `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SiteSurfaceModuleToManyEmailSenderModuleFilter { + /** Filters to entities where every related entity matches. */ + every?: EmailSenderModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: EmailSenderModuleFilter; + /** Filters to entities where at least one related entity matches. */ + some?: EmailSenderModuleFilter; +} /** A filter to be used against many `PagesModule` object types. All fields are combined with a logical ‘and.’ */ export interface SiteSurfaceModuleToManyPagesModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15454,6 +16532,15 @@ export interface SiteSurfaceModuleToManyPagesModuleFilter { /** Filters to entities where at least one related entity matches. */ some?: PagesModuleFilter; } +/** A filter to be used against many `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface StorageModuleToManyFileRefFieldFilter { + /** Filters to entities where every related entity matches. */ + every?: FileRefFieldFilter; + /** Filters to entities where no related entity matches. */ + none?: FileRefFieldFilter; + /** Filters to entities where at least one related entity matches. */ + some?: FileRefFieldFilter; +} /** A filter to be used against many `HttpRouteModule` object types. All fields are combined with a logical ‘and.’ */ export interface StorageModuleToManyHttpRouteModuleFilter { /** Filters to entities where every related entity matches. */ @@ -15469,7 +16556,7 @@ export interface AgentModuleInput { agentTableName?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; hasAgents?: boolean; @@ -15515,7 +16602,7 @@ export interface ApiSurfaceModuleInput { corsSettingsTableId?: string; corsSettingsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15536,7 +16623,7 @@ export interface AppModuleInput { appsTableName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15556,8 +16643,8 @@ export interface BillingModuleInput { balancesTableId?: string; balancesTableName?: string; databaseId: string; + defaultCapabilities?: string[]; defaultMeterCatalog?: Record; - defaultPermissions?: string[]; id?: string; ledgerTableId?: string; ledgerTableName?: string; @@ -15586,16 +16673,22 @@ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -15603,8 +16696,10 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** An input for mutations affecting `Blueprint` */ export interface BlueprintInput { @@ -15701,6 +16796,31 @@ export interface BlueprintTemplateInput { /** Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private. */ visibility?: string; } +/** An input for mutations affecting `CapabilitiesModule` */ +export interface CapabilitiesModuleInput { + actorTableId?: string; + apiName?: string; + bitlen?: number; + databaseId: string; + defaultTableId?: string; + defaultTableName?: string; + entityField?: string; + entityTableId?: string; + getByMask?: string; + getMask?: string; + getMaskByName?: string; + getPaddedMask?: string; + id?: string; + prefix?: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + publicSchemaName?: string; + schemaId?: string; + scope: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `CatalogModule` */ export interface CatalogModuleInput { apiName?: string; @@ -15708,10 +16828,12 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainsTableId?: string; domainsTableName?: string; entityTableId?: string; @@ -15789,6 +16911,26 @@ export interface ConnectedAccountsModuleInput { tableId?: string; tableName: string; } +/** An input for mutations affecting `ContentPresetModule` */ +export interface ContentPresetModuleInput { + apiName?: string; + contentPresetsTableId?: string; + createdAt?: string; + databaseId: string; + entityTableId?: string; + id?: string; + merkleStoreModuleId: string; + policies?: Record; + prefix: string; + privateApiName?: string; + privateSchemaId?: string; + privateSchemaName?: string; + provisions?: Record; + publicSchemaId?: string; + publicSchemaName?: string; + scope: string; + storeName: string; +} /** An input for mutations affecting `CryptoAddressesModule` */ export interface CryptoAddressesModuleInput { apiName?: string; @@ -15819,6 +16961,20 @@ export interface CryptoAuthModuleInput { userField: string; usersTableId?: string; } +/** An input for mutations affecting `DataCapabilitiesField` */ +export interface DataCapabilitiesFieldInput { + capabilitiesModuleId: string; + databaseId: string; + fieldId: string; + fromFieldId?: string; + id?: string; + mappingFieldId?: string; + mappingKeyFieldId?: string; + mappingTableId?: string; + mode?: string; + subsetGuard?: boolean; + tableId: string; +} /** An input for mutations affecting `DatabaseProvisionModule` */ export interface DatabaseProvisionModuleInput { /** When true, cold provisioning runs in the database:provision background job and the insert returns a pending ticket; when false, provisioning runs inline in the insert trigger */ @@ -15841,7 +16997,7 @@ export interface DatabaseProvisionModuleInput { /** Uniform billing anchor: when the request was fulfilled with a usable database (cold provision completion or warm pool claim). Platform absorbs all provisioning compute before this point */ fulfilledAt?: string; id?: string; - /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["permissions_module", {"scope": "app"}]) */ + /** JSONB array of modules to install. Each element is either a string ("users_module") or a [name, options] tuple (["capabilities_module", {"scope": "app"}]) */ modules?: Record; /** Additional configuration options for provisioning */ options?: Record; @@ -15861,7 +17017,7 @@ export interface DatabaseSettingsModuleInput { databaseId: string; databaseSettingsTableId?: string; databaseSettingsTableName?: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -15966,7 +17122,7 @@ export interface DbUsageModuleInput { collectDbQueryStatsFunction?: string; collectDbTableStatsFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; id?: string; interval?: string; @@ -16025,7 +17181,7 @@ export interface DomainModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; domainEventsTableId?: string; domainEventsTableName?: string; domainVerificationsTableId?: string; @@ -16047,6 +17203,29 @@ export interface DomainModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `EmailSenderModule` */ +export interface EmailSenderModuleInput { + apiName?: string; + databaseId: string; + defaultCapabilities?: string[]; + emailIdentitiesTableId?: string; + emailIdentitiesTableName?: string; + emailProviderAccountsTableId?: string; + emailProviderAccountsTableName?: string; + emailSiteIdentitiesTableId?: string; + emailSiteIdentitiesTableName?: string; + entityField?: string; + entityTableId?: string; + id?: string; + policies?: Record; + prefix?: string; + privateApiName?: string; + provisions?: Record; + publicSchemaName?: string; + schemaId?: string; + scope: string; + siteSurfaceModuleId?: string; +} /** An input for mutations affecting `EmailsModule` */ export interface EmailsModuleInput { apiName?: string; @@ -16074,7 +17253,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). * Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) * with entity-scoped RLS and a job trigger dispatching function:provision tasks. - * Registers manage_functions + invoke_functions permission bits on first provision. + * Registers manage_functions + invoke_functions capability bits on first provision. * Example: functions := '[{}]'::jsonb */ functions?: Record; @@ -16084,9 +17263,9 @@ export interface EntityTypeProvisionInput { * Each element recognizes (all optional): * - key (text) module discriminator. Defaults to 'default'. * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). - * Registers manage_graphs + execute_graphs permission bits on first provision. + * Registers manage_graphs + execute_graphs capability bits on first provision. * Graph module requires a merkle_store_module_id dependency, so entity_type_provision - * only registers permissions here. The graph module itself must be provisioned + * only registers capabilities here. The graph module itself must be provisioned * separately with the merkle store dependency resolved. * Example: graphs := '[{}]'::jsonb */ @@ -16126,8 +17305,11 @@ export interface EntityTypeProvisionInput { 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. + * Profiles provide named capability roles (e.g. 'Editor', 'Viewer') with pre-configured capability bitmasks. + * When true, creates profile tables and applies profiles security. A membership may hold + * any number of profiles: the membership_profiles assignment table holds every profile a + * membership holds and the membership mask is granted | bit_or(held profile masks), with + * memberships.profile_id kept as a pointer at one held profile. */ hasProfiles?: boolean; /** Unique identifier for this provision row. */ @@ -16154,7 +17336,7 @@ export interface EntityTypeProvisionInput { * - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). * Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) * with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. - * Registers manage_namespaces permission bit on first provision. + * Registers manage_namespaces capability bit on first provision. * Example: namespaces := '[{}]'::jsonb */ namespaces?: Record; @@ -16176,7 +17358,7 @@ export interface EntityTypeProvisionInput { outGraphModuleId?: string; outGraphsTableId?: string; /** - * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Output: array of installed module labels (e.g. ARRAY['capabilities_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). * Populated by the trigger. Useful for verifying which modules were provisioned. */ outInstalledModules?: string[]; @@ -16220,7 +17402,7 @@ export interface EntityTypeProvisionInput { parentEntity?: 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), + * Drives entity table name (prefix || 's' by default), module labels (capabilities_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. */ @@ -16234,8 +17416,8 @@ export interface EntityTypeProvisionInput { * 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 + * - INSERT: create_entity capability on the parent entity + * - UPDATE: admin_entity capability on the entity itself * - DELETE: owner of the entity can delete it */ skipEntityPolicies?: boolean; @@ -16254,7 +17436,7 @@ export interface EntityTypeProvisionInput { * - download_url_expiry_seconds (integer) presigned GET URL expiry override * - default_max_file_size (bigint) global max file size in bytes for this module * - allowed_origins (text[]) default CORS origins for all buckets in this module - * - restrict_reads (boolean) require read_files permission for SELECT on files + * - restrict_reads (boolean) require read_files capability for SELECT on files * - has_path_shares (boolean) enable virtual filesystem + path share policies * - has_versioning (boolean) enable file version chains * - has_content_hash (boolean) enable content hash for dedup @@ -16280,7 +17462,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * 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[] + * Uses the same vocabulary as metaschema_modules_private.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). @@ -16318,7 +17500,7 @@ export interface EventsModuleInput { actorTableId?: string; apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; eventAggregatesTableId?: string; @@ -16327,6 +17509,7 @@ export interface EventsModuleInput { eventTypesTableName?: string; eventsTableId?: string; eventsTableName?: string; + expireGrants?: string; grantAchievement?: string; id?: string; interval?: string; @@ -16343,9 +17526,11 @@ export interface EventsModuleInput { privateSchemaId?: string; privateSchemaName?: string; publicSchemaName?: string; + recomputeCapabilities?: string; recordEvent?: string; removeEvent?: string; retention?: string; + revokeAchievement?: string; schemaId?: string; scope: string; stepsRequired?: string; @@ -16355,14 +17540,28 @@ export interface EventsModuleInput { tgEventBool?: string; tgEventToggle?: string; tgEventToggleBool?: string; + tgLevelGrantSync?: string; tgUpdateAggregates?: string; + trustLadder?: Record; upsertAggregate?: string; } +/** An input for mutations affecting `FileRefField` */ +export interface FileRefFieldInput { + bucketKey?: string; + bucketTags?: string[]; + databaseId: string; + enforceFk?: boolean; + fieldId: string; + id?: string; + isPublic?: boolean; + storageModuleId: string; + tableId: string; +} /** An input for mutations affecting `FunctionDeploymentModule` */ export interface FunctionDeploymentModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deploymentEventsTableId?: string; deploymentEventsTableName?: string; deploymentsTableId?: string; @@ -16388,7 +17587,7 @@ export interface FunctionInvocationModuleInput { attemptsTableId?: string; attemptsTableName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionLogsTableId?: string; @@ -16413,7 +17612,7 @@ export interface FunctionModuleInput { bindingsTableName?: string; capabilityBindingsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; definitionsTableId?: string; definitionsTableName?: string; entityField?: string; @@ -16436,7 +17635,7 @@ export interface GraphExecutionModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; executionsTableId?: string; @@ -16462,7 +17661,7 @@ export interface GraphModuleInput { apiName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; graphsTableId?: string; @@ -16486,7 +17685,7 @@ export interface HierarchyModuleInput { chartEdgesTableName?: string; createdAt?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId: string; getManagersFunction?: string; @@ -16508,7 +17707,7 @@ export interface HierarchyModuleInput { export interface HttpRouteModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionModuleId?: string; @@ -16699,6 +17898,7 @@ export interface LimitsModuleInput { limitCreditsTableId?: string; limitDecrementFunction?: string; limitDecrementTrigger?: string; + limitDefaults?: Record; limitIncrementFunction?: string; limitIncrementTrigger?: string; limitUpdateTrigger?: string; @@ -16731,9 +17931,12 @@ export interface MembershipsModuleInput { adminGrantsTableId?: string; adminGrantsTableName?: string; apiName?: string; + capabilitiesTableId?: string; + capabilityDefaultCapabilitiesTableId?: string; + capabilityDefaultGrantsTableId?: string; databaseId: string; + defaultCapabilitiesTableId?: string; defaultLimitsTableId?: string; - defaultPermissionsTableId?: string; entityField?: string; entityIdsByMask?: string; entityIdsByPerm?: string; @@ -16756,9 +17959,6 @@ export interface MembershipsModuleInput { membershipsTableName?: string; ownerGrantsTableId?: string; ownerGrantsTableName?: string; - permissionDefaultGrantsTableId?: string; - permissionDefaultPermissionsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -16771,6 +17971,7 @@ export interface MembershipsModuleInput { /** An input for mutations affecting `MerkleStoreModule` */ export interface MerkleStoreModuleInput { apiName?: string; + capabilityKey?: string; commitTableId?: string; createdAt?: string; databaseId: string; @@ -16778,7 +17979,6 @@ export interface MerkleStoreModuleInput { functionPrefix?: string; id?: string; objectTableId?: string; - permissionKey?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; @@ -16793,7 +17993,7 @@ export interface MerkleStoreModuleInput { export interface NamespaceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -16816,7 +18016,7 @@ export interface NotificationsModuleInput { apiName?: string; channelsTableId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; deliveryLogTableId?: string; entityField?: string; hasChannels?: boolean; @@ -16838,6 +18038,21 @@ export interface NotificationsModuleInput { suppressionsTableId?: string; userSettingsTableId?: string; } +/** An input for mutations affecting `OauthRequestsModule` */ +export interface OauthRequestsModuleInput { + databaseId: string; + entityField?: string; + entityTableId?: string; + id?: string; + oauthAuthorizationRequestsTableId?: string; + oauthAuthorizationRequestsTableName?: string; + pendingIdentityLinksTableId?: string; + pendingIdentityLinksTableName?: string; + prefix?: string; + privateSchemaId?: string; + privateSchemaName?: string; + scope: string; +} /** An input for mutations affecting `PagesModule` */ export interface PagesModuleInput { apiName?: string; @@ -16860,31 +18075,6 @@ export interface PagesModuleInput { sitesTableId?: string; storeNamePrefix?: string; } -/** An input for mutations affecting `PermissionsModule` */ -export interface PermissionsModuleInput { - actorTableId?: string; - apiName?: string; - bitlen?: number; - databaseId: string; - defaultTableId?: string; - defaultTableName?: string; - entityField?: string; - entityTableId?: string; - getByMask?: string; - getMask?: string; - getMaskByName?: string; - getPaddedMask?: string; - id?: string; - prefix?: string; - privateApiName?: string; - privateSchemaId?: string; - privateSchemaName?: string; - publicSchemaName?: string; - schemaId?: string; - scope: string; - tableId?: string; - tableName?: string; -} /** An input for mutations affecting `PhoneNumbersModule` */ export interface PhoneNumbersModuleInput { apiName?: string; @@ -16946,22 +18136,24 @@ export interface PrincipalAuthModuleInput { export interface ProfilesModuleInput { actorTableId?: string; apiName?: string; + capabilitiesTableId?: string; databaseId: string; entityField?: string; entityTableId?: string; id?: string; + membershipProfilesTableId?: string; + membershipProfilesTableName?: string; membershipsTableId?: string; - permissionsTableId?: string; prefix?: string; privateApiName?: string; privateSchemaId?: string; privateSchemaName?: string; + profileCapabilitiesTableId?: string; + profileCapabilitiesTableName?: string; profileDefinitionGrantsTableId?: string; profileDefinitionGrantsTableName?: string; profileGrantsTableId?: string; profileGrantsTableName?: string; - profilePermissionsTableId?: string; - profilePermissionsTableName?: string; profileTemplatesTableId?: string; profileTemplatesTableName?: string; publicSchemaName?: string; @@ -16975,7 +18167,7 @@ export interface RateLimitMetersModuleInput { apiName?: string; checkRateLimitFunction?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; id?: string; prefix?: string; privateApiName?: string; @@ -17147,7 +18339,7 @@ export interface RelationProvisionInput { export interface ResourceModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -17201,9 +18393,11 @@ export interface RlsModuleInput { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + deepLinkFunctionName?: string; + defaultCapabilities?: string[]; domainModuleId?: string; entityField?: string; entityTableId?: string; @@ -17225,6 +18419,14 @@ export interface RouteModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** An input for mutations affecting `SecureTableProvision` */ export interface SecureTableProvisionInput { /** The database this provision belongs to. Required. */ @@ -17279,7 +18481,7 @@ export interface SiteSurfaceModuleInput { apiName?: string; catalogModuleId?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; id?: string; @@ -17342,8 +18544,8 @@ export interface StorageModuleInput { catalogModuleId?: string; confirmUploadDelay?: IntervalInput; databaseId: string; + defaultCapabilities?: string[]; defaultMaxFileSize?: string; - defaultPermissions?: string[]; downloadUrlExpirySeconds?: number; endpoint?: string; entityField?: string; @@ -17450,6 +18652,16 @@ export interface UserSettingsModuleInput { tableId?: string; tableName?: string; } +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `UserStateModule` */ export interface UserStateModuleInput { databaseId: string; @@ -17507,7 +18719,7 @@ export interface WebauthnCredentialsModuleInput { export interface WebhookModuleInput { apiName?: string; databaseId: string; - defaultPermissions?: string[]; + defaultCapabilities?: string[]; entityField?: string; entityTableId?: string; functionInvocationModuleId?: string; @@ -17664,6 +18876,39 @@ export interface BlueprintFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +/** A filter to be used against `DataCapabilitiesField` object types. All fields are combined with a logical ‘and.’ */ +export interface DataCapabilitiesFieldFilter { + /** Checks for all expressions in this list. */ + and?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `capabilitiesModule` relation. */ + capabilitiesModule?: CapabilitiesModuleFilter; + /** Filter by the object’s `capabilitiesModuleId` field. */ + capabilitiesModuleId?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `fromFieldId` field. */ + fromFieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `mappingFieldId` field. */ + mappingFieldId?: UUIDFilter; + /** Filter by the object’s `mappingKeyFieldId` field. */ + mappingKeyFieldId?: UUIDFilter; + /** Filter by the object’s `mappingTableId` field. */ + mappingTableId?: UUIDFilter; + /** Filter by the object’s `mode` field. */ + mode?: StringFilter; + /** Negates the expression. */ + not?: DataCapabilitiesFieldFilter; + /** Checks for any expressions in this list. */ + or?: DataCapabilitiesFieldFilter[]; + /** Filter by the object’s `subsetGuard` field. */ + subsetGuard?: BooleanFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} /** A filter to be used against `ApiSurfaceModule` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSurfaceModuleFilter { /** Checks for all expressions in this list. */ @@ -17694,8 +18939,8 @@ export interface ApiSurfaceModuleFilter { corsSettingsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17743,8 +18988,8 @@ export interface AppModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17788,8 +19033,8 @@ export interface DomainModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainEventsTableId` field. */ domainEventsTableId?: UUIDFilter; /** Filter by the object’s `domainEventsTableName` field. */ @@ -17845,6 +19090,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -17853,8 +19100,10 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ domainModule?: DomainModuleFilter; /** A related `domainModule` exists. */ @@ -17918,8 +19167,12 @@ export interface SiteSurfaceModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailSenderModules` relation. */ + emailSenderModules?: SiteSurfaceModuleToManyEmailSenderModuleFilter; + /** `emailSenderModules` exist. */ + emailSenderModulesExist?: boolean; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -17993,8 +19246,8 @@ export interface WebhookModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18064,8 +19317,8 @@ export interface FunctionDeploymentModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `deploymentEventsTableId` field. */ deploymentEventsTableId?: UUIDFilter; /** Filter by the object’s `deploymentEventsTableName` field. */ @@ -18123,8 +19376,8 @@ export interface HttpRouteModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18188,8 +19441,8 @@ export interface GraphExecutionModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18235,6 +19488,51 @@ export interface GraphExecutionModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +/** A filter to be used against `ContentPresetModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ContentPresetModuleFilter { + /** Checks for all expressions in this list. */ + and?: ContentPresetModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `contentPresetsTableId` field. */ + contentPresetsTableId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `merkleStoreModule` relation. */ + merkleStoreModule?: MerkleStoreModuleFilter; + /** Filter by the object’s `merkleStoreModuleId` field. */ + merkleStoreModuleId?: UUIDFilter; + /** Negates the expression. */ + not?: ContentPresetModuleFilter; + /** Checks for any expressions in this list. */ + or?: ContentPresetModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaId` field. */ + publicSchemaId?: UUIDFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `storeName` field. */ + storeName?: StringFilter; +} /** A filter to be used against `DbPresetModule` object types. All fields are combined with a logical ‘and.’ */ export interface DbPresetModuleFilter { /** Checks for all expressions in this list. */ @@ -18290,8 +19588,8 @@ export interface GraphModuleFilter { createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18392,8 +19690,8 @@ export interface ResourceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18477,6 +19775,88 @@ export interface ResourceModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +/** A filter to be used against `EmailSenderModule` object types. All fields are combined with a logical ‘and.’ */ +export interface EmailSenderModuleFilter { + /** Checks for all expressions in this list. */ + and?: EmailSenderModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; + /** Filter by the object’s `emailIdentitiesTableId` field. */ + emailIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailIdentitiesTableName` field. */ + emailIdentitiesTableName?: StringFilter; + /** Filter by the object’s `emailProviderAccountsTableId` field. */ + emailProviderAccountsTableId?: UUIDFilter; + /** Filter by the object’s `emailProviderAccountsTableName` field. */ + emailProviderAccountsTableName?: StringFilter; + /** Filter by the object’s `emailSiteIdentitiesTableId` field. */ + emailSiteIdentitiesTableId?: UUIDFilter; + /** Filter by the object’s `emailSiteIdentitiesTableName` field. */ + emailSiteIdentitiesTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: EmailSenderModuleFilter; + /** Checks for any expressions in this list. */ + or?: EmailSenderModuleFilter[]; + /** Filter by the object’s `policies` field. */ + policies?: JSONFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `provisions` field. */ + provisions?: JSONFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `siteSurfaceModule` relation. */ + siteSurfaceModule?: SiteSurfaceModuleFilter; + /** A related `siteSurfaceModule` exists. */ + siteSurfaceModuleExists?: boolean; + /** Filter by the object’s `siteSurfaceModuleId` field. */ + siteSurfaceModuleId?: UUIDFilter; +} +/** A filter to be used against `FileRefField` object types. All fields are combined with a logical ‘and.’ */ +export interface FileRefFieldFilter { + /** Checks for all expressions in this list. */ + and?: FileRefFieldFilter[]; + /** Filter by the object’s `bucketKey` field. */ + bucketKey?: StringFilter; + /** Filter by the object’s `bucketTags` field. */ + bucketTags?: StringListFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `enforceFk` field. */ + enforceFk?: BooleanFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublic` field. */ + isPublic?: BooleanFilter; + /** Negates the expression. */ + not?: FileRefFieldFilter; + /** Checks for any expressions in this list. */ + or?: FileRefFieldFilter[]; + /** Filter by the object’s `storageModule` relation. */ + storageModule?: StorageModuleFilter; + /** Filter by the object’s `storageModuleId` field. */ + storageModuleId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; +} /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */ export interface UUIDFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -18703,6 +20083,88 @@ export interface IntFilter { /** Not included in the specified list. */ notIn?: number[]; } +/** A filter to be used against `CapabilitiesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface CapabilitiesModuleFilter { + /** Filter by the object’s `actorTableId` field. */ + actorTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `bitlen` field. */ + bitlen?: IntFilter; + /** Filter by the object’s `dataCapabilitiesFields` relation. */ + dataCapabilitiesFields?: CapabilitiesModuleToManyDataCapabilitiesFieldFilter; + /** `dataCapabilitiesFields` exist. */ + dataCapabilitiesFieldsExist?: boolean; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `defaultTableId` field. */ + defaultTableId?: UUIDFilter; + /** Filter by the object’s `defaultTableName` field. */ + defaultTableName?: StringFilter; + /** Filter by the object’s `entityField` field. */ + entityField?: StringFilter; + /** Filter by the object’s `entityTableId` field. */ + entityTableId?: UUIDFilter; + /** Filter by the object’s `getByMask` field. */ + getByMask?: StringFilter; + /** Filter by the object’s `getMask` field. */ + getMask?: StringFilter; + /** Filter by the object’s `getMaskByName` field. */ + getMaskByName?: StringFilter; + /** Filter by the object’s `getPaddedMask` field. */ + getPaddedMask?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: CapabilitiesModuleFilter; + /** Checks for any expressions in this list. */ + or?: CapabilitiesModuleFilter[]; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `privateApiName` field. */ + privateApiName?: StringFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `publicSchemaName` field. */ + publicSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scope` field. */ + scope?: StringFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: boolean; + /** Equal to the specified value. */ + equalTo?: boolean; + /** Greater than the specified value. */ + greaterThan?: boolean; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: boolean; + /** Included in the specified list. */ + in?: boolean[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: boolean; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: boolean; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: boolean; + /** Not equal to the specified value. */ + notEqualTo?: boolean; + /** Not included in the specified list. */ + notIn?: boolean[]; +} /** A filter to be used against `CatalogModule` object types. All fields are combined with a logical ‘and.’ */ export interface CatalogModuleFilter { /** Checks for all expressions in this list. */ @@ -18725,14 +20187,18 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ bucketsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `domainModules` relation. */ domainModules?: CatalogModuleToManyDomainModuleFilter; /** `domainModules` exist. */ @@ -18822,8 +20288,8 @@ export interface FunctionInvocationModuleFilter { attemptsTableName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -18879,8 +20345,8 @@ export interface FunctionModuleFilter { capabilityBindingsTableId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `definitionsTableId` field. */ definitionsTableId?: UUIDFilter; /** Filter by the object’s `definitionsTableName` field. */ @@ -18983,8 +20449,8 @@ export interface NamespaceModuleFilter { apiName?: StringFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `entityField` field. */ entityField?: StringFilter; /** Filter by the object’s `entityTableId` field. */ @@ -19054,10 +20520,10 @@ export interface StorageModuleFilter { confirmUploadDelay?: IntervalFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `defaultCapabilities` field. */ + defaultCapabilities?: StringListFilter; /** Filter by the object’s `defaultMaxFileSize` field. */ defaultMaxFileSize?: BigIntFilter; - /** Filter by the object’s `defaultPermissions` field. */ - defaultPermissions?: StringListFilter; /** Filter by the object’s `downloadUrlExpirySeconds` field. */ downloadUrlExpirySeconds?: IntFilter; /** Filter by the object’s `endpoint` field. */ @@ -19068,6 +20534,10 @@ export interface StorageModuleFilter { entityTableId?: UUIDFilter; /** Filter by the object’s `fileEventsTableId` field. */ fileEventsTableId?: UUIDFilter; + /** Filter by the object’s `fileRefFields` relation. */ + fileRefFields?: StorageModuleToManyFileRefFieldFilter; + /** `fileRefFields` exist. */ + fileRefFieldsExist?: boolean; /** Filter by the object’s `filesTableId` field. */ filesTableId?: UUIDFilter; /** Filter by the object’s `filesTableName` field. */ @@ -19135,8 +20605,14 @@ export interface MerkleStoreModuleFilter { and?: MerkleStoreModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `capabilityKey` field. */ + capabilityKey?: StringFilter; /** Filter by the object’s `commitTableId` field. */ commitTableId?: UUIDFilter; + /** Filter by the object’s `contentPresetModules` relation. */ + contentPresetModules?: MerkleStoreModuleToManyContentPresetModuleFilter; + /** `contentPresetModules` exist. */ + contentPresetModulesExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -19165,8 +20641,6 @@ export interface MerkleStoreModuleFilter { pagesModules?: MerkleStoreModuleToManyPagesModuleFilter; /** `pagesModules` exist. */ pagesModulesExist?: boolean; - /** Filter by the object’s `permissionKey` field. */ - permissionKey?: StringFilter; /** Filter by the object’s `prefix` field. */ prefix?: StringFilter; /** Filter by the object’s `privateApiName` field. */ @@ -19190,31 +20664,6 @@ export interface MerkleStoreModuleFilter { /** Filter by the object’s `storeTableId` field. */ storeTableId?: UUIDFilter; } -/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ -export interface BooleanFilter { - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: boolean; - /** Equal to the specified value. */ - equalTo?: boolean; - /** Greater than the specified value. */ - greaterThan?: boolean; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: boolean; - /** Included in the specified list. */ - in?: boolean[]; - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Less than the specified value. */ - lessThan?: boolean; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: boolean; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: boolean; - /** Not equal to the specified value. */ - notEqualTo?: boolean; - /** Not included in the specified list. */ - notIn?: boolean[]; -} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -19251,89 +20700,33 @@ export type ConstructBlueprintPayloadSelect = { }; export interface CopyTemplateToBlueprintPayload { clientMutationId?: string | null; - result?: string | null; -} -export type CopyTemplateToBlueprintPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionBucketPayload { - /** The access type applied */ - accessType: string; - /** The S3 bucket name that was provisioned */ - bucketName: string; - /** The S3 endpoint (null for AWS S3 default) */ - endpoint?: string | null; - /** Error message if provisioning failed */ - error?: string | null; - /** The storage provider used */ - provider: string; - /** Whether provisioning succeeded */ - success: boolean; -} -export type ProvisionBucketPayloadSelect = { - accessType?: boolean; - bucketName?: boolean; - endpoint?: boolean; - error?: boolean; - provider?: boolean; - success?: boolean; -}; -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionCheckConstraintPayloadSelect = { - clientMutationId?: boolean; -}; -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionFullTextSearchPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionIndexPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export type ProvisionRelationPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionRelationRecordSelect; - }; -}; -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionSpatialRelationPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; + result?: string | null; } -export type ProvisionTablePayloadSelect = { +export type CopyTemplateToBlueprintPayloadSelect = { clientMutationId?: boolean; - result?: { - select: ProvisionTableRecordSelect; - }; + result?: boolean; }; -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; +export interface ProvisionBucketPayload { + /** The access type applied */ + accessType: string; + /** The S3 bucket name that was provisioned */ + bucketName: string; + /** The S3 endpoint (null for AWS S3 default) */ + endpoint?: string | null; + /** Error message if provisioning failed */ + error?: string | null; + /** The storage provider used */ + provider: string; + /** Whether provisioning succeeded */ + success: boolean; } -export type ProvisionUniqueConstraintPayloadSelect = { - clientMutationId?: boolean; +export type ProvisionBucketPayloadSelect = { + accessType?: boolean; + bucketName?: boolean; + endpoint?: boolean; + error?: boolean; + provider?: boolean; + success?: boolean; }; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ @@ -19695,6 +21088,51 @@ export type DeleteBlueprintTemplatePayloadSelect = { }; clientMutationId?: boolean; }; +export interface CreateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was created by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type CreateCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was updated by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type UpdateCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteCapabilitiesModulePayload { + /** The `CapabilitiesModule` that was deleted by this mutation. */ + capabilitiesModule?: CapabilitiesModule | null; + capabilitiesModuleEdge?: CapabilitiesModuleEdge | null; + clientMutationId?: string | null; +} +export type DeleteCapabilitiesModulePayloadSelect = { + capabilitiesModule?: { + select: CapabilitiesModuleSelect; + }; + capabilitiesModuleEdge?: { + select: CapabilitiesModuleEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateCatalogModulePayload { /** The `CatalogModule` that was created by this mutation. */ catalogModule?: CatalogModule | null; @@ -19875,6 +21313,51 @@ export type DeleteConnectedAccountsModulePayloadSelect = { select: ConnectedAccountsModuleEdgeSelect; }; }; +export interface CreateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was created by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type CreateContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; +export interface UpdateContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was updated by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type UpdateContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; +export interface DeleteContentPresetModulePayload { + clientMutationId?: string | null; + /** The `ContentPresetModule` that was deleted by this mutation. */ + contentPresetModule?: ContentPresetModule | null; + contentPresetModuleEdge?: ContentPresetModuleEdge | null; +} +export type DeleteContentPresetModulePayloadSelect = { + clientMutationId?: boolean; + contentPresetModule?: { + select: ContentPresetModuleSelect; + }; + contentPresetModuleEdge?: { + select: ContentPresetModuleEdgeSelect; + }; +}; export interface CreateCryptoAddressesModulePayload { clientMutationId?: string | null; /** The `CryptoAddressesModule` that was created by this mutation. */ @@ -19965,6 +21448,51 @@ export type DeleteCryptoAuthModulePayloadSelect = { select: CryptoAuthModuleEdgeSelect; }; }; +export interface CreateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was created by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type CreateDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; +export interface UpdateDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was updated by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type UpdateDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; +export interface DeleteDataCapabilitiesFieldPayload { + clientMutationId?: string | null; + /** The `DataCapabilitiesField` that was deleted by this mutation. */ + dataCapabilitiesField?: DataCapabilitiesField | null; + dataCapabilitiesFieldEdge?: DataCapabilitiesFieldEdge | null; +} +export type DeleteDataCapabilitiesFieldPayloadSelect = { + clientMutationId?: boolean; + dataCapabilitiesField?: { + select: DataCapabilitiesFieldSelect; + }; + dataCapabilitiesFieldEdge?: { + select: DataCapabilitiesFieldEdgeSelect; + }; +}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -20415,6 +21943,51 @@ export type DeleteDomainModulePayloadSelect = { select: DomainModuleEdgeSelect; }; }; +export interface CreateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was created by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type CreateEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; +export interface UpdateEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was updated by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type UpdateEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; +export interface DeleteEmailSenderModulePayload { + clientMutationId?: string | null; + /** The `EmailSenderModule` that was deleted by this mutation. */ + emailSenderModule?: EmailSenderModule | null; + emailSenderModuleEdge?: EmailSenderModuleEdge | null; +} +export type DeleteEmailSenderModulePayloadSelect = { + clientMutationId?: boolean; + emailSenderModule?: { + select: EmailSenderModuleSelect; + }; + emailSenderModuleEdge?: { + select: EmailSenderModuleEdgeSelect; + }; +}; export interface CreateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was created by this mutation. */ @@ -20550,6 +22123,51 @@ export type DeleteEventsModulePayloadSelect = { select: EventsModuleEdgeSelect; }; }; +export interface CreateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was created by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type CreateFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; +export interface UpdateFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was updated by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type UpdateFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; +export interface DeleteFileRefFieldPayload { + clientMutationId?: string | null; + /** The `FileRefField` that was deleted by this mutation. */ + fileRefField?: FileRefField | null; + fileRefFieldEdge?: FileRefFieldEdge | null; +} +export type DeleteFileRefFieldPayloadSelect = { + clientMutationId?: boolean; + fileRefField?: { + select: FileRefFieldSelect; + }; + fileRefFieldEdge?: { + select: FileRefFieldEdgeSelect; + }; +}; export interface CreateFunctionDeploymentModulePayload { clientMutationId?: string | null; /** The `FunctionDeploymentModule` that was created by this mutation. */ @@ -21495,6 +23113,51 @@ export type DeleteNotificationsModulePayloadSelect = { select: NotificationsModuleEdgeSelect; }; }; +export interface CreateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was created by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type CreateOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; +export interface UpdateOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was updated by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type UpdateOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; +export interface DeleteOauthRequestsModulePayload { + clientMutationId?: string | null; + /** The `OauthRequestsModule` that was deleted by this mutation. */ + oauthRequestsModule?: OauthRequestsModule | null; + oauthRequestsModuleEdge?: OauthRequestsModuleEdge | null; +} +export type DeleteOauthRequestsModulePayloadSelect = { + clientMutationId?: boolean; + oauthRequestsModule?: { + select: OauthRequestsModuleSelect; + }; + oauthRequestsModuleEdge?: { + select: OauthRequestsModuleEdgeSelect; + }; +}; export interface CreatePagesModulePayload { clientMutationId?: string | null; /** The `PagesModule` that was created by this mutation. */ @@ -21540,51 +23203,6 @@ export type DeletePagesModulePayloadSelect = { select: PagesModuleEdgeSelect; }; }; -export interface CreatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was created by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type CreatePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; -export interface UpdatePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was updated by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type UpdatePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; -export interface DeletePermissionsModulePayload { - clientMutationId?: string | null; - /** The `PermissionsModule` that was deleted by this mutation. */ - permissionsModule?: PermissionsModule | null; - permissionsModuleEdge?: PermissionsModuleEdge | null; -} -export type DeletePermissionsModulePayloadSelect = { - clientMutationId?: boolean; - permissionsModule?: { - select: PermissionsModuleSelect; - }; - permissionsModuleEdge?: { - select: PermissionsModuleEdgeSelect; - }; -}; export interface CreatePhoneNumbersModulePayload { clientMutationId?: string | null; /** The `PhoneNumbersModule` that was created by this mutation. */ @@ -22080,6 +23698,51 @@ export type DeleteRouteModulePayloadSelect = { select: RouteModuleEdgeSelect; }; }; +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type CreateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type UpdateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type DeleteScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -22530,6 +24193,51 @@ export type DeleteUserSettingsModulePayloadSelect = { select: UserSettingsModuleEdgeSelect; }; }; +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type CreateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type UpdateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type DeleteUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -22755,26 +24463,6 @@ export type DeleteWebhookModulePayloadSelect = { select: WebhookModuleEdgeSelect; }; }; -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export type ProvisionRelationRecordSelect = { - outFieldId?: boolean; - outJunctionTableId?: boolean; - outSourceFieldId?: boolean; - outTargetFieldId?: boolean; -}; -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} -export type ProvisionTableRecordSelect = { - outFields?: boolean; - outTableId?: boolean; -}; /** A `AgentModule` edge in the connection. */ export interface AgentModuleEdge { cursor?: string | null; @@ -22871,6 +24559,18 @@ export type BlueprintTemplateEdgeSelect = { select: BlueprintTemplateSelect; }; }; +/** A `CapabilitiesModule` edge in the connection. */ +export interface CapabilitiesModuleEdge { + cursor?: string | null; + /** The `CapabilitiesModule` at the end of the edge. */ + node?: CapabilitiesModule | null; +} +export type CapabilitiesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: CapabilitiesModuleSelect; + }; +}; /** A `CatalogModule` edge in the connection. */ export interface CatalogModuleEdge { cursor?: string | null; @@ -22919,6 +24619,18 @@ export type ConnectedAccountsModuleEdgeSelect = { select: ConnectedAccountsModuleSelect; }; }; +/** A `ContentPresetModule` edge in the connection. */ +export interface ContentPresetModuleEdge { + cursor?: string | null; + /** The `ContentPresetModule` at the end of the edge. */ + node?: ContentPresetModule | null; +} +export type ContentPresetModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ContentPresetModuleSelect; + }; +}; /** A `CryptoAddressesModule` edge in the connection. */ export interface CryptoAddressesModuleEdge { cursor?: string | null; @@ -22943,6 +24655,18 @@ export type CryptoAuthModuleEdgeSelect = { select: CryptoAuthModuleSelect; }; }; +/** A `DataCapabilitiesField` edge in the connection. */ +export interface DataCapabilitiesFieldEdge { + cursor?: string | null; + /** The `DataCapabilitiesField` at the end of the edge. */ + node?: DataCapabilitiesField | null; +} +export type DataCapabilitiesFieldEdgeSelect = { + cursor?: boolean; + node?: { + select: DataCapabilitiesFieldSelect; + }; +}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -23063,6 +24787,18 @@ export type DomainModuleEdgeSelect = { select: DomainModuleSelect; }; }; +/** A `EmailSenderModule` edge in the connection. */ +export interface EmailSenderModuleEdge { + cursor?: string | null; + /** The `EmailSenderModule` at the end of the edge. */ + node?: EmailSenderModule | null; +} +export type EmailSenderModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: EmailSenderModuleSelect; + }; +}; /** A `EmailsModule` edge in the connection. */ export interface EmailsModuleEdge { cursor?: string | null; @@ -23099,6 +24835,18 @@ export type EventsModuleEdgeSelect = { select: EventsModuleSelect; }; }; +/** A `FileRefField` edge in the connection. */ +export interface FileRefFieldEdge { + cursor?: string | null; + /** The `FileRefField` at the end of the edge. */ + node?: FileRefField | null; +} +export type FileRefFieldEdgeSelect = { + cursor?: boolean; + node?: { + select: FileRefFieldSelect; + }; +}; /** A `FunctionDeploymentModule` edge in the connection. */ export interface FunctionDeploymentModuleEdge { cursor?: string | null; @@ -23351,28 +25099,28 @@ export type NotificationsModuleEdgeSelect = { select: NotificationsModuleSelect; }; }; -/** A `PagesModule` edge in the connection. */ -export interface PagesModuleEdge { +/** A `OauthRequestsModule` edge in the connection. */ +export interface OauthRequestsModuleEdge { cursor?: string | null; - /** The `PagesModule` at the end of the edge. */ - node?: PagesModule | null; + /** The `OauthRequestsModule` at the end of the edge. */ + node?: OauthRequestsModule | null; } -export type PagesModuleEdgeSelect = { +export type OauthRequestsModuleEdgeSelect = { cursor?: boolean; node?: { - select: PagesModuleSelect; + select: OauthRequestsModuleSelect; }; }; -/** A `PermissionsModule` edge in the connection. */ -export interface PermissionsModuleEdge { +/** A `PagesModule` edge in the connection. */ +export interface PagesModuleEdge { cursor?: string | null; - /** The `PermissionsModule` at the end of the edge. */ - node?: PermissionsModule | null; + /** The `PagesModule` at the end of the edge. */ + node?: PagesModule | null; } -export type PermissionsModuleEdgeSelect = { +export type PagesModuleEdgeSelect = { cursor?: boolean; node?: { - select: PermissionsModuleSelect; + select: PagesModuleSelect; }; }; /** A `PhoneNumbersModule` edge in the connection. */ @@ -23507,6 +25255,18 @@ export type RouteModuleEdgeSelect = { select: RouteModuleSelect; }; }; +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} +export type ScopeTypesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ScopeTypesModuleSelect; + }; +}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -23627,6 +25387,18 @@ export type UserSettingsModuleEdgeSelect = { select: UserSettingsModuleSelect; }; }; +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} +export type UserSettingsSecurityModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: UserSettingsSecurityModuleSelect; + }; +}; /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/modules/orm/models/capabilitiesModule.ts b/sdk/constructive-sdk/src/modules/orm/models/capabilitiesModule.ts new file mode 100644 index 0000000000..60aa4dabf4 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/capabilitiesModule.ts @@ -0,0 +1,245 @@ +/** + * CapabilitiesModule 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 { + CapabilitiesModule, + CapabilitiesModuleWithRelations, + CapabilitiesModuleSelect, + CapabilitiesModuleFilter, + CapabilitiesModuleOrderBy, + CreateCapabilitiesModuleInput, + UpdateCapabilitiesModuleInput, + CapabilitiesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class CapabilitiesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + 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, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModule', + document, + variables, + transform: (data: { + capabilitiesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + capabilitiesModule: data.capabilitiesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + capabilitiesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'CapabilitiesModule', + 'capabilitiesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'CapabilitiesModuleFilter', + 'CapabilitiesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'CapabilitiesModule', + fieldName: 'capabilitiesModule', + document, + variables, + transform: (data: { + capabilitiesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + capabilitiesModule: data.capabilitiesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'CapabilitiesModule', + 'createCapabilitiesModule', + 'capabilitiesModule', + args.select, + args.data, + 'CreateCapabilitiesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'createCapabilitiesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + CapabilitiesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'CapabilitiesModule', + 'updateCapabilitiesModule', + 'capabilitiesModule', + args.select, + args.where.id, + args.data, + 'UpdateCapabilitiesModuleInput', + 'id', + 'capabilitiesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'updateCapabilitiesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteCapabilitiesModule: { + capabilitiesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'CapabilitiesModule', + 'deleteCapabilitiesModule', + 'capabilitiesModule', + { + id: args.where.id, + }, + 'DeleteCapabilitiesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'CapabilitiesModule', + fieldName: 'deleteCapabilitiesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/contentPresetModule.ts b/sdk/constructive-sdk/src/modules/orm/models/contentPresetModule.ts new file mode 100644 index 0000000000..b756c7a1b2 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/contentPresetModule.ts @@ -0,0 +1,245 @@ +/** + * ContentPresetModule 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 { + ContentPresetModule, + ContentPresetModuleWithRelations, + ContentPresetModuleSelect, + ContentPresetModuleFilter, + ContentPresetModuleOrderBy, + CreateContentPresetModuleInput, + UpdateContentPresetModuleInput, + ContentPresetModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ContentPresetModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ContentPresetModule', + 'contentPresetModules', + 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, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ContentPresetModule', + 'contentPresetModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModule', + document, + variables, + transform: (data: { + contentPresetModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + contentPresetModule: data.contentPresetModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + contentPresetModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ContentPresetModule', + 'contentPresetModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ContentPresetModuleFilter', + 'ContentPresetModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ContentPresetModule', + fieldName: 'contentPresetModule', + document, + variables, + transform: (data: { + contentPresetModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + contentPresetModule: data.contentPresetModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ContentPresetModule', + 'createContentPresetModule', + 'contentPresetModule', + args.select, + args.data, + 'CreateContentPresetModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'createContentPresetModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ContentPresetModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ContentPresetModule', + 'updateContentPresetModule', + 'contentPresetModule', + args.select, + args.where.id, + args.data, + 'UpdateContentPresetModuleInput', + 'id', + 'contentPresetModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'updateContentPresetModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteContentPresetModule: { + contentPresetModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ContentPresetModule', + 'deleteContentPresetModule', + 'contentPresetModule', + { + id: args.where.id, + }, + 'DeleteContentPresetModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ContentPresetModule', + fieldName: 'deleteContentPresetModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/dataCapabilitiesField.ts b/sdk/constructive-sdk/src/modules/orm/models/dataCapabilitiesField.ts new file mode 100644 index 0000000000..f2d9ae971b --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/dataCapabilitiesField.ts @@ -0,0 +1,247 @@ +/** + * DataCapabilitiesField 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 { + DataCapabilitiesField, + DataCapabilitiesFieldWithRelations, + DataCapabilitiesFieldSelect, + DataCapabilitiesFieldFilter, + DataCapabilitiesFieldOrderBy, + CreateDataCapabilitiesFieldInput, + UpdateDataCapabilitiesFieldInput, + DataCapabilitiesFieldPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class DataCapabilitiesFieldModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesFields: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + 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, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesFields', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesField: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesField', + document, + variables, + transform: (data: { + dataCapabilitiesFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + dataCapabilitiesField: data.dataCapabilitiesFields?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + dataCapabilitiesField: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'DataCapabilitiesField', + 'dataCapabilitiesFields', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'DataCapabilitiesFieldFilter', + 'DataCapabilitiesFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DataCapabilitiesField', + fieldName: 'dataCapabilitiesField', + document, + variables, + transform: (data: { + dataCapabilitiesFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + dataCapabilitiesField: data.dataCapabilitiesFields?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'DataCapabilitiesField', + 'createDataCapabilitiesField', + 'dataCapabilitiesField', + args.select, + args.data, + 'CreateDataCapabilitiesFieldInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'createDataCapabilitiesField', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + DataCapabilitiesFieldPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'DataCapabilitiesField', + 'updateDataCapabilitiesField', + 'dataCapabilitiesField', + args.select, + args.where.id, + args.data, + 'UpdateDataCapabilitiesFieldInput', + 'id', + 'dataCapabilitiesFieldPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'updateDataCapabilitiesField', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteDataCapabilitiesField: { + dataCapabilitiesField: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'DataCapabilitiesField', + 'deleteDataCapabilitiesField', + 'dataCapabilitiesField', + { + id: args.where.id, + }, + 'DeleteDataCapabilitiesFieldInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DataCapabilitiesField', + fieldName: 'deleteDataCapabilitiesField', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/permissionsModule.ts b/sdk/constructive-sdk/src/modules/orm/models/emailSenderModule.ts similarity index 51% rename from sdk/constructive-sdk/src/modules/orm/models/permissionsModule.ts rename to sdk/constructive-sdk/src/modules/orm/models/emailSenderModule.ts index 2a330457b5..3f5f0f6385 100644 --- a/sdk/constructive-sdk/src/modules/orm/models/permissionsModule.ts +++ b/sdk/constructive-sdk/src/modules/orm/models/emailSenderModule.ts @@ -1,5 +1,5 @@ /** - * PermissionsModule model for ORM client + * EmailSenderModule 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 { - PermissionsModule, - PermissionsModuleWithRelations, - PermissionsModuleSelect, - PermissionsModuleFilter, - PermissionsModuleOrderBy, - CreatePermissionsModuleInput, - UpdatePermissionsModuleInput, - PermissionsModulePatch, + EmailSenderModule, + EmailSenderModuleWithRelations, + EmailSenderModuleSelect, + EmailSenderModuleFilter, + EmailSenderModuleOrderBy, + CreateEmailSenderModuleInput, + UpdateEmailSenderModuleInput, + EmailSenderModulePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PermissionsModuleModel { +export class EmailSenderModuleModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModules: ConnectionResult>; + emailSenderModules: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PermissionsModuleModel { before: args?.before, offset: args?.offset, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModules', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModules', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModule', document, variables, transform: (data: { - permissionsModules?: { - nodes?: InferSelectResult[]; + emailSenderModules?: { + nodes?: InferSelectResult[]; }; }) => ({ - permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + emailSenderModule: data.emailSenderModules?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - permissionsModule: InferSelectResult | null; + emailSenderModule: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PermissionsModule', - 'permissionsModules', + 'EmailSenderModule', + 'emailSenderModules', args.select, { where: { @@ -124,91 +124,91 @@ export class PermissionsModuleModel { }, first: 1, }, - 'PermissionsModuleFilter', - 'PermissionsModuleOrderBy', + 'EmailSenderModuleFilter', + 'EmailSenderModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PermissionsModule', - fieldName: 'permissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'emailSenderModule', document, variables, transform: (data: { - permissionsModules?: { - nodes?: InferSelectResult[]; + emailSenderModules?: { + nodes?: InferSelectResult[]; }; }) => ({ - permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + emailSenderModule: data.emailSenderModules?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPermissionsModule: { - permissionsModule: InferSelectResult; + createEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PermissionsModule', - 'createPermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'createEmailSenderModule', + 'emailSenderModule', args.select, args.data, - 'CreatePermissionsModuleInput', + 'CreateEmailSenderModuleInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'createPermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'createEmailSenderModule', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PermissionsModulePatch + EmailSenderModulePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePermissionsModule: { - permissionsModule: InferSelectResult; + updateEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PermissionsModule', - 'updatePermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'updateEmailSenderModule', + 'emailSenderModule', args.select, args.where.id, args.data, - 'UpdatePermissionsModuleInput', + 'UpdateEmailSenderModuleInput', 'id', - 'permissionsModulePatch', + 'emailSenderModulePatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'updatePermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'updateEmailSenderModule', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PermissionsModuleModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePermissionsModule: { - permissionsModule: InferSelectResult; + deleteEmailSenderModule: { + emailSenderModule: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PermissionsModule', - 'deletePermissionsModule', - 'permissionsModule', + 'EmailSenderModule', + 'deleteEmailSenderModule', + 'emailSenderModule', { id: args.where.id, }, - 'DeletePermissionsModuleInput', + 'DeleteEmailSenderModuleInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PermissionsModule', - fieldName: 'deletePermissionsModule', + operationName: 'EmailSenderModule', + fieldName: 'deleteEmailSenderModule', document, variables, }); diff --git a/sdk/constructive-sdk/src/modules/orm/models/fileRefField.ts b/sdk/constructive-sdk/src/modules/orm/models/fileRefField.ts new file mode 100644 index 0000000000..130f0d6858 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/fileRefField.ts @@ -0,0 +1,245 @@ +/** + * FileRefField 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 { + FileRefField, + FileRefFieldWithRelations, + FileRefFieldSelect, + FileRefFieldFilter, + FileRefFieldOrderBy, + CreateFileRefFieldInput, + UpdateFileRefFieldInput, + FileRefFieldPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class FileRefFieldModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefFields: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'FileRefField', + 'fileRefFields', + 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, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefFields', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefField: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'FileRefField', + 'fileRefFields', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefField', + document, + variables, + transform: (data: { + fileRefFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fileRefField: data.fileRefFields?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + fileRefField: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'FileRefField', + 'fileRefFields', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'FileRefFieldFilter', + 'FileRefFieldOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'FileRefField', + fieldName: 'fileRefField', + document, + variables, + transform: (data: { + fileRefFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fileRefField: data.fileRefFields?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'FileRefField', + 'createFileRefField', + 'fileRefField', + args.select, + args.data, + 'CreateFileRefFieldInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'createFileRefField', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + FileRefFieldPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'FileRefField', + 'updateFileRefField', + 'fileRefField', + args.select, + args.where.id, + args.data, + 'UpdateFileRefFieldInput', + 'id', + 'fileRefFieldPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'updateFileRefField', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteFileRefField: { + fileRefField: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'FileRefField', + 'deleteFileRefField', + 'fileRefField', + { + id: args.where.id, + }, + 'DeleteFileRefFieldInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'FileRefField', + fieldName: 'deleteFileRefField', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/index.ts b/sdk/constructive-sdk/src/modules/orm/models/index.ts index 55e18104c1..beb1e2e872 100644 --- a/sdk/constructive-sdk/src/modules/orm/models/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/models/index.ts @@ -11,12 +11,15 @@ export { BillingProviderModuleModel } from './billingProviderModule'; export { BlueprintModel } from './blueprint'; export { BlueprintConstructionModel } from './blueprintConstruction'; export { BlueprintTemplateModel } from './blueprintTemplate'; +export { CapabilitiesModuleModel } from './capabilitiesModule'; export { CatalogModuleModel } from './catalogModule'; export { ComputeLogModuleModel } from './computeLogModule'; export { ConfigSecretsUserModuleModel } from './configSecretsUserModule'; export { ConnectedAccountsModuleModel } from './connectedAccountsModule'; +export { ContentPresetModuleModel } from './contentPresetModule'; export { CryptoAddressesModuleModel } from './cryptoAddressesModule'; export { CryptoAuthModuleModel } from './cryptoAuthModule'; +export { DataCapabilitiesFieldModel } from './dataCapabilitiesField'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { DatabaseSettingsModuleModel } from './databaseSettingsModule'; export { DbPoolConfigModel } from './dbPoolConfig'; @@ -27,9 +30,11 @@ export { DefaultIdsModuleModel } from './defaultIdsModule'; export { DenormalizedTableFieldModel } from './denormalizedTableField'; export { DevicesModuleModel } from './devicesModule'; export { DomainModuleModel } from './domainModule'; +export { EmailSenderModuleModel } from './emailSenderModule'; export { EmailsModuleModel } from './emailsModule'; export { EntityTypeProvisionModel } from './entityTypeProvision'; export { EventsModuleModel } from './eventsModule'; +export { FileRefFieldModel } from './fileRefField'; export { FunctionDeploymentModuleModel } from './functionDeploymentModule'; export { FunctionInvocationModuleModel } from './functionInvocationModule'; export { FunctionModuleModel } from './functionModule'; @@ -51,8 +56,8 @@ export { MembershipsModuleModel } from './membershipsModule'; export { MerkleStoreModuleModel } from './merkleStoreModule'; export { NamespaceModuleModel } from './namespaceModule'; export { NotificationsModuleModel } from './notificationsModule'; +export { OauthRequestsModuleModel } from './oauthRequestsModule'; export { PagesModuleModel } from './pagesModule'; -export { PermissionsModuleModel } from './permissionsModule'; export { PhoneNumbersModuleModel } from './phoneNumbersModule'; export { PlansModuleModel } from './plansModule'; export { PrincipalAuthModuleModel } from './principalAuthModule'; @@ -64,6 +69,7 @@ export { RelationProvisionModel } from './relationProvision'; export { ResourceModuleModel } from './resourceModule'; export { RlsModuleModel } from './rlsModule'; export { RouteModuleModel } from './routeModule'; +export { ScopeTypesModuleModel } from './scopeTypesModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SessionsModuleModel } from './sessionsModule'; @@ -74,6 +80,7 @@ export { TransferLogModuleModel } from './transferLogModule'; export { UserAuthModuleModel } from './userAuthModule'; export { UserCredentialsModuleModel } from './userCredentialsModule'; export { UserSettingsModuleModel } from './userSettingsModule'; +export { UserSettingsSecurityModuleModel } from './userSettingsSecurityModule'; export { UserStateModuleModel } from './userStateModule'; export { UsersModuleModel } from './usersModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; diff --git a/sdk/constructive-sdk/src/modules/orm/models/oauthRequestsModule.ts b/sdk/constructive-sdk/src/modules/orm/models/oauthRequestsModule.ts new file mode 100644 index 0000000000..a874125a9e --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/oauthRequestsModule.ts @@ -0,0 +1,245 @@ +/** + * OauthRequestsModule 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 { + OauthRequestsModule, + OauthRequestsModuleWithRelations, + OauthRequestsModuleSelect, + OauthRequestsModuleFilter, + OauthRequestsModuleOrderBy, + CreateOauthRequestsModuleInput, + UpdateOauthRequestsModuleInput, + OauthRequestsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OauthRequestsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + 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, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModule', + document, + variables, + transform: (data: { + oauthRequestsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + oauthRequestsModule: data.oauthRequestsModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + oauthRequestsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OauthRequestsModule', + 'oauthRequestsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OauthRequestsModuleFilter', + 'OauthRequestsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OauthRequestsModule', + fieldName: 'oauthRequestsModule', + document, + variables, + transform: (data: { + oauthRequestsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + oauthRequestsModule: data.oauthRequestsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OauthRequestsModule', + 'createOauthRequestsModule', + 'oauthRequestsModule', + args.select, + args.data, + 'CreateOauthRequestsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'createOauthRequestsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OauthRequestsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OauthRequestsModule', + 'updateOauthRequestsModule', + 'oauthRequestsModule', + args.select, + args.where.id, + args.data, + 'UpdateOauthRequestsModuleInput', + 'id', + 'oauthRequestsModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'updateOauthRequestsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOauthRequestsModule: { + oauthRequestsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OauthRequestsModule', + 'deleteOauthRequestsModule', + 'oauthRequestsModule', + { + id: args.where.id, + }, + 'DeleteOauthRequestsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OauthRequestsModule', + fieldName: 'deleteOauthRequestsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts b/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts new file mode 100644 index 0000000000..1cbd281d05 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts @@ -0,0 +1,245 @@ +/** + * ScopeTypesModule 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 { + ScopeTypesModule, + ScopeTypesModuleWithRelations, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, + CreateScopeTypesModuleInput, + UpdateScopeTypesModuleInput, + ScopeTypesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ScopeTypesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + 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, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ScopeTypesModule', + 'createScopeTypesModule', + 'scopeTypesModule', + args.select, + args.data, + 'CreateScopeTypesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'createScopeTypesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ScopeTypesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ScopeTypesModule', + 'updateScopeTypesModule', + 'scopeTypesModule', + args.select, + args.where.id, + args.data, + 'UpdateScopeTypesModuleInput', + 'id', + 'scopeTypesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'updateScopeTypesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ScopeTypesModule', + 'deleteScopeTypesModule', + 'scopeTypesModule', + { + id: args.where.id, + }, + 'DeleteScopeTypesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'deleteScopeTypesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts b/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts new file mode 100644 index 0000000000..13b7c87010 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts @@ -0,0 +1,253 @@ +/** + * UserSettingsSecurityModule 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 { + UserSettingsSecurityModule, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, + CreateUserSettingsSecurityModuleInput, + UpdateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserSettingsSecurityModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + 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, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserSettingsSecurityModule', + 'createUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.data, + 'CreateUserSettingsSecurityModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'createUserSettingsSecurityModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + UserSettingsSecurityModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'UserSettingsSecurityModule', + 'updateUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.where.id, + args.data, + 'UpdateUserSettingsSecurityModuleInput', + 'id', + 'userSettingsSecurityModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'updateUserSettingsSecurityModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'UserSettingsSecurityModule', + 'deleteUserSettingsSecurityModule', + 'userSettingsSecurityModule', + { + id: args.where.id, + }, + 'DeleteUserSettingsSecurityModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'deleteUserSettingsSecurityModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts index 60041efadb..5450eca294 100644 --- a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts @@ -10,33 +10,12 @@ import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, - ProvisionCheckConstraintInput, - ProvisionFullTextSearchInput, - ProvisionIndexInput, - ProvisionRelationInput, - ProvisionSpatialRelationInput, - ProvisionTableInput, - ProvisionUniqueConstraintInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, - ProvisionCheckConstraintPayload, - ProvisionFullTextSearchPayload, - ProvisionIndexPayload, - ProvisionRelationPayload, - ProvisionSpatialRelationPayload, - ProvisionTablePayload, - ProvisionUniqueConstraintPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, - ProvisionCheckConstraintPayloadSelect, - ProvisionFullTextSearchPayloadSelect, - ProvisionIndexPayloadSelect, - ProvisionRelationPayloadSelect, - ProvisionSpatialRelationPayloadSelect, - ProvisionTablePayloadSelect, - ProvisionUniqueConstraintPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** @@ -63,55 +42,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -/** - * Variables for provisionCheckConstraint - * Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - */ -export interface ProvisionCheckConstraintVariables { - input: ProvisionCheckConstraintInput; -} -/** - * Variables for provisionFullTextSearch - * 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. - */ -export interface ProvisionFullTextSearchVariables { - input: ProvisionFullTextSearchInput; -} -/** - * Variables for provisionIndex - * 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. - */ -export interface ProvisionIndexVariables { - input: ProvisionIndexInput; -} -/** - * Variables for provisionRelation - * 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). - */ -export interface ProvisionRelationVariables { - input: ProvisionRelationInput; -} -/** - * 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; -} -/** - * Variables for provisionTable - * 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). - */ -export interface ProvisionTableVariables { - input: ProvisionTableInput; -} -/** - * Variables for provisionUniqueConstraint - * 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. - */ -export interface ProvisionUniqueConstraintVariables { - input: ProvisionUniqueConstraintInput; -} export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( @@ -201,208 +131,5 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - provisionCheckConstraint: ( - args: ProvisionCheckConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionCheckConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionCheckConstraint', - fieldName: 'provisionCheckConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionCheckConstraint', - 'provisionCheckConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionCheckConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionCheckConstraintPayload' - ), - }), - provisionFullTextSearch: ( - args: ProvisionFullTextSearchVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionFullTextSearch: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionFullTextSearch', - fieldName: 'provisionFullTextSearch', - ...buildCustomDocument( - 'mutation', - 'ProvisionFullTextSearch', - 'provisionFullTextSearch', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionFullTextSearchInput!', - }, - ], - connectionFieldsMap, - 'ProvisionFullTextSearchPayload' - ), - }), - provisionIndex: ( - args: ProvisionIndexVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionIndex: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionIndex', - fieldName: 'provisionIndex', - ...buildCustomDocument( - 'mutation', - 'ProvisionIndex', - 'provisionIndex', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionIndexInput!', - }, - ], - connectionFieldsMap, - 'ProvisionIndexPayload' - ), - }), - provisionRelation: ( - args: ProvisionRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionRelation', - fieldName: 'provisionRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionRelation', - 'provisionRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionRelationPayload' - ), - }), - 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' - ), - }), - provisionTable: ( - args: ProvisionTableVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionTable: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionTable', - fieldName: 'provisionTable', - ...buildCustomDocument( - 'mutation', - 'ProvisionTable', - 'provisionTable', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionTableInput!', - }, - ], - connectionFieldsMap, - 'ProvisionTablePayload' - ), - }), - provisionUniqueConstraint: ( - args: ProvisionUniqueConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionUniqueConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionUniqueConstraint', - fieldName: 'provisionUniqueConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionUniqueConstraint', - 'provisionUniqueConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionUniqueConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionUniqueConstraintPayload' - ), - }), }; } diff --git a/sdk/constructive-sdk/src/modules/orm/query/index.ts b/sdk/constructive-sdk/src/modules/orm/query/index.ts deleted file mode 100644 index 70496d57ba..0000000000 --- a/sdk/constructive-sdk/src/modules/orm/query/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Custom query operations - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { QueryBuilder, buildCustomDocument } from '../query-builder'; -import type { InferSelectResult, StrictSelect } from '../select-types'; -import { connectionFieldsMap } from '../input-types'; -/** - * 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; - fieldName?: string; - tableId?: string; -} -/** - * Variables for resolveBlueprintTable - * 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. - */ -export interface ResolveBlueprintTableVariables { - databaseId?: string; - defaultSchemaId?: string; - schemaName?: string; - tableMap?: unknown; - tableName?: string; -} -export function createQueryOperations(client: OrmClient) { - return { - 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: 'fieldName', - type: 'String', - }, - { - name: 'tableId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveBlueprintTable: ( - args: ResolveBlueprintTableVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintTable: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintTable', - fieldName: 'resolveBlueprintTable', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintTable', - 'resolveBlueprintTable', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'defaultSchemaId', - type: 'UUID', - }, - { - name: 'schemaName', - type: 'String', - }, - { - name: 'tableMap', - type: 'JSON', - }, - { - name: 'tableName', - type: 'String', - }, - ], - connectionFieldsMap, - undefined - ), - }), - }; -} diff --git a/sdk/constructive-sdk/src/objects/README.md b/sdk/constructive-sdk/src/objects/README.md index 8c4dfb1d48..e75db077a4 100644 --- a/sdk/constructive-sdk/src/objects/README.md +++ b/sdk/constructive-sdk/src/objects/README.md @@ -10,7 +10,7 @@ - **Tables:** 5 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/objects/orm/README.md b/sdk/constructive-sdk/src/objects/orm/README.md index 2a09348ad0..e112c19ae0 100644 --- a/sdk/constructive-sdk/src/objects/orm/README.md +++ b/sdk/constructive-sdk/src/objects/orm/README.md @@ -228,6 +228,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -246,6 +261,21 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -261,6 +291,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-sdk/src/objects/orm/input-types.ts b/sdk/constructive-sdk/src/objects/orm/input-types.ts index bab07456e0..1ca44bc9d7 100644 --- a/sdk/constructive-sdk/src/objects/orm/input-types.ts +++ b/sdk/constructive-sdk/src/objects/orm/input-types.ts @@ -665,6 +665,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -674,6 +683,17 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -681,6 +701,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** An input for mutations affecting `Commit` */ export interface CommitInput { /** User who authored the changes */ @@ -758,6 +786,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -780,6 +816,20 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -788,6 +838,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface CreateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was created by this mutation. */ diff --git a/sdk/constructive-sdk/src/objects/orm/mutation/index.ts b/sdk/constructive-sdk/src/objects/orm/mutation/index.ts index a0c21cb2bd..7d08bdc42e 100644 --- a/sdk/constructive-sdk/src/objects/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/objects/orm/mutation/index.ts @@ -9,16 +9,25 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, ProvisionBucketInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, ProvisionBucketPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, ProvisionBucketPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface InitEmptyRepoVariables { @@ -27,6 +36,9 @@ export interface InitEmptyRepoVariables { export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -37,9 +49,15 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export function createMutationOperations(client: OrmClient) { return { initEmptyRepo: ( @@ -100,6 +118,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -129,6 +176,35 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -158,5 +234,34 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), }; } diff --git a/sdk/constructive-sdk/src/usage/README.md b/sdk/constructive-sdk/src/usage/README.md index 99f27a1620..482390df23 100644 --- a/sdk/constructive-sdk/src/usage/README.md +++ b/sdk/constructive-sdk/src/usage/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 18 -- **Custom queries:** 0 -- **Custom mutations:** 5 +- **Tables:** 38 +- **Custom queries:** 5 +- **Custom mutations:** 11 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/usage/orm/README.md b/sdk/constructive-sdk/src/usage/orm/README.md index dfcec601ac..9fde0f403e 100644 --- a/sdk/constructive-sdk/src/usage/orm/README.md +++ b/sdk/constructive-sdk/src/usage/orm/README.md @@ -21,6 +21,13 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `appAchievementReward` | findMany, findOne, create, update, delete | +| `appEventAggregate` | findMany, findOne, create, update, delete | +| `appEvent` | findMany, findOne, create, update, delete | +| `appEventType` | findMany, findOne, create, update, delete | +| `appLevel` | findMany, findOne, create, update, delete | +| `appLevelGrant` | findMany, findOne, create, update, delete | +| `appLevelRequirement` | findMany, findOne, create, update, delete | | `appLimitCap` | findMany, findOne, create, update, delete | | `appLimitCapsDefault` | findMany, findOne, create, update, delete | | `appLimit` | findMany, findOne, create, update, delete | @@ -31,6 +38,12 @@ const db = createClient({ | `appLimitDefault` | findMany, findOne, create, update, delete | | `appLimitEvent` | findMany, findOne, create, update, delete | | `appLimitWarning` | findMany, findOne, create, update, delete | +| `billingUsageSummary` | findMany, findOne, create, update, delete | +| `ledger` | findMany, findOne, create, update, delete | +| `meter` | findMany, findOne, create, update, delete | +| `meterCredit` | findMany, findOne, create, update, delete | +| `meterDefault` | findMany, findOne, create, update, delete | +| `meterSource` | findMany, findOne, create, update, delete | | `orgLimitAggregate` | findMany, findOne, create, update, delete | | `orgLimitCap` | findMany, findOne, create, update, delete | | `orgLimitCapsDefault` | findMany, findOne, create, update, delete | @@ -39,9 +52,267 @@ const db = createClient({ | `orgLimitDefault` | findMany, findOne, create, update, delete | | `orgLimitEvent` | findMany, findOne, create, update, delete | | `orgLimitWarning` | findMany, findOne, create, update, delete | +| `planCap` | findMany, findOne, create, update, delete | +| `plan` | findMany, findOne, create, update, delete | +| `planLimit` | findMany, findOne, create, update, delete | +| `planMeterLimit` | findMany, findOne, create, update, delete | +| `planOverride` | findMany, findOne, create, update, delete | +| `planPricing` | findMany, findOne, create, update, delete | +| `planSubscription` | findMany, findOne, create, update, delete | ## Table Operations +### `db.appAchievementReward` + +CRUD operations for AppAchievementReward records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `amount` | Int | Yes | +| `createdAt` | Datetime | No | +| `creditType` | String | Yes | +| `expiresInterval` | Interval | Yes | +| `id` | UUID | No | +| `levelName` | String | Yes | +| `rewardType` | String | Yes | +| `targetName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appAchievementReward records +const items = await db.appAchievementReward.findMany({ select: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appAchievementReward.findOne({ id: '', select: { amount: true, createdAt: true, creditType: true, expiresInterval: true, id: true, levelName: true, rewardType: true, targetName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appAchievementReward.create({ data: { amount: '', creditType: '', expiresInterval: '', levelName: '', rewardType: '', targetName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appAchievementReward.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appAchievementReward.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEventAggregate` + +CRUD operations for AppEventAggregate records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `count` | Int | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `name` | String | Yes | +| `periodStart` | Datetime | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appEventAggregate records +const items = await db.appEventAggregate.findMany({ select: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appEventAggregate.findOne({ id: '', select: { actorId: true, count: true, createdAt: true, id: true, name: true, periodStart: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appEventAggregate.create({ data: { actorId: '', count: '', name: '', periodStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEventAggregate.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEventAggregate.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEvent` + +CRUD operations for AppEvent records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `count` | Int | Yes | +| `createdAt` | Datetime | No | +| `id` | UUID | No | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all appEvent records +const items = await db.appEvent.findMany({ select: { actorId: true, count: true, createdAt: true, id: true, name: true } }).execute(); + +// Get one by id +const item = await db.appEvent.findOne({ id: '', select: { actorId: true, count: true, createdAt: true, id: true, name: true } }).execute(); + +// Create +const created = await db.appEvent.create({ data: { actorId: '', count: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEvent.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEvent.delete({ where: { id: '' } }).execute(); +``` + +### `db.appEventType` + +CRUD operations for AppEventType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `aggregation` | String | Yes | +| `category` | String | Yes | +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `feedsLevels` | Boolean | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | +| `periodInterval` | Interval | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appEventType records +const items = await db.appEventType.findMany({ select: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appEventType.findOne({ id: '', select: { aggregation: true, category: true, createdAt: true, description: true, feedsLevels: true, id: true, isActive: true, name: true, periodInterval: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appEventType.create({ data: { aggregation: '', category: '', description: '', feedsLevels: '', isActive: '', name: '', periodInterval: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appEventType.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appEventType.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevel` + +CRUD operations for AppLevel records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `id` | UUID | No | +| `image` | ConstructiveInternalTypeImage | Yes | +| `name` | String | Yes | +| `ownerId` | UUID | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevel records +const items = await db.appLevel.findMany({ select: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevel.findOne({ id: '', select: { createdAt: true, description: true, id: true, image: true, name: true, ownerId: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevel.create({ data: { description: '', image: '', name: '', ownerId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevel.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevel.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevelGrant` + +CRUD operations for AppLevelGrant records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `createdAt` | Datetime | No | +| `expiresAt` | Datetime | Yes | +| `id` | UUID | No | +| `levelName` | String | Yes | +| `periodStart` | Datetime | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevelGrant records +const items = await db.appLevelGrant.findMany({ select: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevelGrant.findOne({ id: '', select: { actorId: true, createdAt: true, expiresAt: true, id: true, levelName: true, periodStart: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevelGrant.create({ data: { actorId: '', expiresAt: '', levelName: '', periodStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevelGrant.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevelGrant.delete({ where: { id: '' } }).execute(); +``` + +### `db.appLevelRequirement` + +CRUD operations for AppLevelRequirement records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `createdAt` | Datetime | No | +| `description` | String | Yes | +| `groupKey` | String | Yes | +| `id` | UUID | No | +| `level` | String | Yes | +| `metric` | String | Yes | +| `name` | String | Yes | +| `priority` | Int | Yes | +| `requiredCount` | Int | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all appLevelRequirement records +const items = await db.appLevelRequirement.findMany({ select: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.appLevelRequirement.findOne({ id: '', select: { createdAt: true, description: true, groupKey: true, id: true, level: true, metric: true, name: true, priority: true, requiredCount: true, updatedAt: true } }).execute(); + +// Create +const created = await db.appLevelRequirement.create({ data: { description: '', groupKey: '', level: '', metric: '', name: '', priority: '', requiredCount: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.appLevelRequirement.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.appLevelRequirement.delete({ where: { id: '' } }).execute(); +``` + ### `db.appLimitCap` CRUD operations for AppLimitCap records. @@ -385,220 +656,446 @@ const updated = await db.appLimitWarning.update({ where: { id: '' }, data: const deleted = await db.appLimitWarning.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitAggregate` +### `db.billingUsageSummary` -CRUD operations for OrgLimitAggregate records. +CRUD operations for BillingUsageSummary records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `creditsConsumed` | BigInt | Yes | | `entityId` | UUID | Yes | | `entityType` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `num` | BigInt | Yes | +| `meterSlug` | String | Yes | | `organizationId` | UUID | Yes | -| `periodCredits` | BigInt | Yes | -| `planMax` | BigInt | Yes | -| `purchasedCredits` | BigInt | Yes | -| `reserved` | BigInt | Yes | -| `softMax` | BigInt | Yes | -| `windowDuration` | Interval | Yes | -| `windowStart` | Datetime | Yes | +| `overageUnits` | BigInt | Yes | +| `periodEnd` | Datetime | Yes | +| `periodStart` | Datetime | Yes | +| `planLimit` | BigInt | Yes | +| `quantityUsed` | BigInt | Yes | **Operations:** ```typescript -// List all orgLimitAggregate records -const items = await db.orgLimitAggregate.findMany({ select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +// List all billingUsageSummary records +const items = await db.billingUsageSummary.findMany({ select: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }).execute(); // Get one by id -const item = await db.orgLimitAggregate.findOne({ id: '', select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +const item = await db.billingUsageSummary.findOne({ id: '', select: { creditsConsumed: true, entityId: true, entityType: true, id: true, meterSlug: true, organizationId: true, overageUnits: true, periodEnd: true, periodStart: true, planLimit: true, quantityUsed: true } }).execute(); // Create -const created = await db.orgLimitAggregate.create({ data: { entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', reserved: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); +const created = await db.billingUsageSummary.create({ data: { creditsConsumed: '', entityId: '', entityType: '', meterSlug: '', organizationId: '', overageUnits: '', periodEnd: '', periodStart: '', planLimit: '', quantityUsed: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitAggregate.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.billingUsageSummary.update({ where: { id: '' }, data: { creditsConsumed: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitAggregate.delete({ where: { id: '' } }).execute(); +const deleted = await db.billingUsageSummary.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCap` +### `db.ledger` -CRUD operations for OrgLimitCap records. +CRUD operations for Ledger records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `createdAt` | Datetime | No | +| `delta` | BigInt | Yes | | `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `entryType` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | +| `ledgerClass` | String | Yes | +| `metadata` | JSON | Yes | +| `meterSlug` | String | Yes | +| `organizationId` | UUID | Yes | +| `usageAfter` | BigInt | Yes | **Operations:** ```typescript -// List all orgLimitCap records -const items = await db.orgLimitCap.findMany({ select: { entityId: true, id: true, max: true, name: true } }).execute(); +// List all ledger records +const items = await db.ledger.findMany({ select: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }).execute(); // Get one by id -const item = await db.orgLimitCap.findOne({ id: '', select: { entityId: true, id: true, max: true, name: true } }).execute(); +const item = await db.ledger.findOne({ id: '', select: { createdAt: true, delta: true, entityId: true, entityType: true, entryType: true, id: true, ledgerClass: true, metadata: true, meterSlug: true, organizationId: true, usageAfter: true } }).execute(); // Create -const created = await db.orgLimitCap.create({ data: { entityId: '', max: '', name: '' }, select: { id: true } }).execute(); +const created = await db.ledger.create({ data: { delta: '', entityId: '', entityType: '', entryType: '', ledgerClass: '', metadata: '', meterSlug: '', organizationId: '', usageAfter: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCap.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); +const updated = await db.ledger.update({ where: { id: '' }, data: { delta: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCap.delete({ where: { id: '' } }).execute(); +const deleted = await db.ledger.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCapsDefault` +### `db.meter` -CRUD operations for OrgLimitCapsDefault records. +CRUD operations for Meter records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `aggregation` | String | Yes | +| `categoryMeter` | String | Yes | +| `creditCost` | Int | Yes | +| `displayName` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | +| `isActive` | Boolean | Yes | +| `meterType` | String | Yes | +| `periodInterval` | Interval | Yes | +| `rolloverCap` | BigInt | Yes | +| `slug` | String | Yes | +| `unit` | String | Yes | **Operations:** ```typescript -// List all orgLimitCapsDefault records -const items = await db.orgLimitCapsDefault.findMany({ select: { id: true, max: true, name: true } }).execute(); +// List all meter records +const items = await db.meter.findMany({ select: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }).execute(); // Get one by id -const item = await db.orgLimitCapsDefault.findOne({ id: '', select: { id: true, max: true, name: true } }).execute(); +const item = await db.meter.findOne({ id: '', select: { aggregation: true, categoryMeter: true, creditCost: true, displayName: true, id: true, isActive: true, meterType: true, periodInterval: true, rolloverCap: true, slug: true, unit: true } }).execute(); // Create -const created = await db.orgLimitCapsDefault.create({ data: { max: '', name: '' }, select: { id: true } }).execute(); +const created = await db.meter.create({ data: { aggregation: '', categoryMeter: '', creditCost: '', displayName: '', isActive: '', meterType: '', periodInterval: '', rolloverCap: '', slug: '', unit: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCapsDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); +const updated = await db.meter.update({ where: { id: '' }, data: { aggregation: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCapsDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.meter.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimit` +### `db.meterCredit` -CRUD operations for OrgLimit records. +CRUD operations for MeterCredit records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorId` | UUID | Yes | +| `amount` | BigInt | Yes | +| `createdAt` | Datetime | No | +| `creditType` | String | Yes | | `entityId` | UUID | Yes | | `entityType` | String | Yes | +| `expiresAt` | Datetime | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `num` | BigInt | Yes | +| `meterId` | UUID | Yes | | `organizationId` | UUID | Yes | -| `periodCredits` | BigInt | Yes | -| `planMax` | BigInt | Yes | -| `purchasedCredits` | BigInt | Yes | -| `softMax` | BigInt | Yes | -| `windowDuration` | Interval | Yes | -| `windowStart` | Datetime | Yes | +| `reason` | String | Yes | **Operations:** ```typescript -// List all orgLimit records -const items = await db.orgLimit.findMany({ select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +// List all meterCredit records +const items = await db.meterCredit.findMany({ select: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }).execute(); // Get one by id -const item = await db.orgLimit.findOne({ id: '', select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); +const item = await db.meterCredit.findOne({ id: '', select: { amount: true, createdAt: true, creditType: true, entityId: true, entityType: true, expiresAt: true, id: true, meterId: true, organizationId: true, reason: true } }).execute(); // Create -const created = await db.orgLimit.create({ data: { actorId: '', entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); +const created = await db.meterCredit.create({ data: { amount: '', creditType: '', entityId: '', entityType: '', expiresAt: '', meterId: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); +const updated = await db.meterCredit.update({ where: { id: '' }, data: { amount: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterCredit.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitCredit` +### `db.meterDefault` -CRUD operations for OrgLimitCredit records. +CRUD operations for MeterDefault records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `actorId` | UUID | Yes | -| `amount` | BigInt | Yes | -| `creditType` | String | Yes | -| `defaultLimitId` | UUID | Yes | -| `entityId` | UUID | Yes | -| `entityType` | String | Yes | +| `categoryMeter` | String | Yes | +| `creditCost` | BigFloat | Yes | +| `defaultPlanLimit` | BigInt | Yes | +| `displayName` | String | Yes | | `id` | UUID | No | -| `organizationId` | UUID | Yes | -| `reason` | String | Yes | +| `isActive` | Boolean | Yes | +| `meterType` | String | Yes | +| `slug` | String | Yes | +| `unit` | String | Yes | **Operations:** ```typescript -// List all orgLimitCredit records -const items = await db.orgLimitCredit.findMany({ select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); +// List all meterDefault records +const items = await db.meterDefault.findMany({ select: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }).execute(); // Get one by id -const item = await db.orgLimitCredit.findOne({ id: '', select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); +const item = await db.meterDefault.findOne({ id: '', select: { categoryMeter: true, creditCost: true, defaultPlanLimit: true, displayName: true, id: true, isActive: true, meterType: true, slug: true, unit: true } }).execute(); // Create -const created = await db.orgLimitCredit.create({ data: { actorId: '', amount: '', creditType: '', defaultLimitId: '', entityId: '', entityType: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); +const created = await db.meterDefault.create({ data: { categoryMeter: '', creditCost: '', defaultPlanLimit: '', displayName: '', isActive: '', meterType: '', slug: '', unit: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitCredit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); +const updated = await db.meterDefault.update({ where: { id: '' }, data: { categoryMeter: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitCredit.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterDefault.delete({ where: { id: '' } }).execute(); ``` -### `db.orgLimitDefault` +### `db.meterSource` -CRUD operations for OrgLimitDefault records. +CRUD operations for MeterSource records. **Fields:** | Field | Type | Editable | |-------|------|----------| +| `aggregationType` | String | Yes | +| `dimensionPath` | String | Yes | | `id` | UUID | No | -| `max` | BigInt | Yes | -| `name` | String | Yes | -| `softMax` | BigInt | Yes | +| `isActive` | Boolean | Yes | +| `meterSlug` | String | Yes | +| `sourceMetric` | String | Yes | **Operations:** ```typescript -// List all orgLimitDefault records -const items = await db.orgLimitDefault.findMany({ select: { id: true, max: true, name: true, softMax: true } }).execute(); +// List all meterSource records +const items = await db.meterSource.findMany({ select: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }).execute(); // Get one by id -const item = await db.orgLimitDefault.findOne({ id: '', select: { id: true, max: true, name: true, softMax: true } }).execute(); +const item = await db.meterSource.findOne({ id: '', select: { aggregationType: true, dimensionPath: true, id: true, isActive: true, meterSlug: true, sourceMetric: true } }).execute(); // Create -const created = await db.orgLimitDefault.create({ data: { max: '', name: '', softMax: '' }, select: { id: true } }).execute(); +const created = await db.meterSource.create({ data: { aggregationType: '', dimensionPath: '', isActive: '', meterSlug: '', sourceMetric: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); +const updated = await db.meterSource.update({ where: { id: '' }, data: { aggregationType: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); +const deleted = await db.meterSource.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitAggregate` + +CRUD operations for OrgLimitAggregate records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `num` | BigInt | Yes | +| `organizationId` | UUID | Yes | +| `periodCredits` | BigInt | Yes | +| `planMax` | BigInt | Yes | +| `purchasedCredits` | BigInt | Yes | +| `reserved` | BigInt | Yes | +| `softMax` | BigInt | Yes | +| `windowDuration` | Interval | Yes | +| `windowStart` | Datetime | Yes | + +**Operations:** + +```typescript +// List all orgLimitAggregate records +const items = await db.orgLimitAggregate.findMany({ select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Get one by id +const item = await db.orgLimitAggregate.findOne({ id: '', select: { entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, reserved: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Create +const created = await db.orgLimitAggregate.create({ data: { entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', reserved: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitAggregate.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitAggregate.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCap` + +CRUD operations for OrgLimitCap records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCap records +const items = await db.orgLimitCap.findMany({ select: { entityId: true, id: true, max: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCap.findOne({ id: '', select: { entityId: true, id: true, max: true, name: true } }).execute(); + +// Create +const created = await db.orgLimitCap.create({ data: { entityId: '', max: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCap.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCap.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCapsDefault` + +CRUD operations for OrgLimitCapsDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCapsDefault records +const items = await db.orgLimitCapsDefault.findMany({ select: { id: true, max: true, name: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCapsDefault.findOne({ id: '', select: { id: true, max: true, name: true } }).execute(); + +// Create +const created = await db.orgLimitCapsDefault.create({ data: { max: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCapsDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCapsDefault.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimit` + +CRUD operations for OrgLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `num` | BigInt | Yes | +| `organizationId` | UUID | Yes | +| `periodCredits` | BigInt | Yes | +| `planMax` | BigInt | Yes | +| `purchasedCredits` | BigInt | Yes | +| `softMax` | BigInt | Yes | +| `windowDuration` | Interval | Yes | +| `windowStart` | Datetime | Yes | + +**Operations:** + +```typescript +// List all orgLimit records +const items = await db.orgLimit.findMany({ select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Get one by id +const item = await db.orgLimit.findOne({ id: '', select: { actorId: true, entityId: true, entityType: true, id: true, max: true, name: true, num: true, organizationId: true, periodCredits: true, planMax: true, purchasedCredits: true, softMax: true, windowDuration: true, windowStart: true } }).execute(); + +// Create +const created = await db.orgLimit.create({ data: { actorId: '', entityId: '', entityType: '', max: '', name: '', num: '', organizationId: '', periodCredits: '', planMax: '', purchasedCredits: '', softMax: '', windowDuration: '', windowStart: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitCredit` + +CRUD operations for OrgLimitCredit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `actorId` | UUID | Yes | +| `amount` | BigInt | Yes | +| `creditType` | String | Yes | +| `defaultLimitId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `organizationId` | UUID | Yes | +| `reason` | String | Yes | + +**Operations:** + +```typescript +// List all orgLimitCredit records +const items = await db.orgLimitCredit.findMany({ select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); + +// Get one by id +const item = await db.orgLimitCredit.findOne({ id: '', select: { actorId: true, amount: true, creditType: true, defaultLimitId: true, entityId: true, entityType: true, id: true, organizationId: true, reason: true } }).execute(); + +// Create +const created = await db.orgLimitCredit.create({ data: { actorId: '', amount: '', creditType: '', defaultLimitId: '', entityId: '', entityType: '', organizationId: '', reason: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitCredit.update({ where: { id: '' }, data: { actorId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitCredit.delete({ where: { id: '' } }).execute(); +``` + +### `db.orgLimitDefault` + +CRUD operations for OrgLimitDefault records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `max` | BigInt | Yes | +| `name` | String | Yes | +| `softMax` | BigInt | Yes | + +**Operations:** + +```typescript +// List all orgLimitDefault records +const items = await db.orgLimitDefault.findMany({ select: { id: true, max: true, name: true, softMax: true } }).execute(); + +// Get one by id +const item = await db.orgLimitDefault.findOne({ id: '', select: { id: true, max: true, name: true, softMax: true } }).execute(); + +// Create +const created = await db.orgLimitDefault.create({ data: { max: '', name: '', softMax: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: { max: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); ``` ### `db.orgLimitEvent` @@ -676,8 +1173,324 @@ const updated = await db.orgLimitWarning.update({ where: { id: '' }, data: const deleted = await db.orgLimitWarning.delete({ where: { id: '' } }).execute(); ``` +### `db.planCap` + +CRUD operations for PlanCap records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `capName` | String | Yes | +| `capValue` | BigInt | Yes | +| `id` | UUID | No | +| `planId` | UUID | Yes | + +**Operations:** + +```typescript +// List all planCap records +const items = await db.planCap.findMany({ select: { capName: true, capValue: true, id: true, planId: true } }).execute(); + +// Get one by id +const item = await db.planCap.findOne({ id: '', select: { capName: true, capValue: true, id: true, planId: true } }).execute(); + +// Create +const created = await db.planCap.create({ data: { capName: '', capValue: '', planId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planCap.update({ where: { id: '' }, data: { capName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planCap.delete({ where: { id: '' } }).execute(); +``` + +### `db.plan` + +CRUD operations for Plan records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `description` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `name` | String | Yes | + +**Operations:** + +```typescript +// List all plan records +const items = await db.plan.findMany({ select: { description: true, id: true, isActive: true, name: true } }).execute(); + +// Get one by id +const item = await db.plan.findOne({ id: '', select: { description: true, id: true, isActive: true, name: true } }).execute(); + +// Create +const created = await db.plan.create({ data: { description: '', isActive: '', name: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.plan.update({ where: { id: '' }, data: { description: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.plan.delete({ where: { id: '' } }).execute(); +``` + +### `db.planLimit` + +CRUD operations for PlanLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `limitName` | String | Yes | +| `maxValue` | BigInt | Yes | +| `planId` | UUID | Yes | + +**Operations:** + +```typescript +// List all planLimit records +const items = await db.planLimit.findMany({ select: { id: true, limitName: true, maxValue: true, planId: true } }).execute(); + +// Get one by id +const item = await db.planLimit.findOne({ id: '', select: { id: true, limitName: true, maxValue: true, planId: true } }).execute(); + +// Create +const created = await db.planLimit.create({ data: { limitName: '', maxValue: '', planId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planLimit.update({ where: { id: '' }, data: { limitName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.planMeterLimit` + +CRUD operations for PlanMeterLimit records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `meterSlug` | String | Yes | +| `planId` | UUID | Yes | +| `planLimit` | BigInt | Yes | + +**Operations:** + +```typescript +// List all planMeterLimit records +const items = await db.planMeterLimit.findMany({ select: { id: true, meterSlug: true, planId: true, planLimit: true } }).execute(); + +// Get one by id +const item = await db.planMeterLimit.findOne({ id: '', select: { id: true, meterSlug: true, planId: true, planLimit: true } }).execute(); + +// Create +const created = await db.planMeterLimit.create({ data: { meterSlug: '', planId: '', planLimit: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planMeterLimit.update({ where: { id: '' }, data: { meterSlug: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planMeterLimit.delete({ where: { id: '' } }).execute(); +``` + +### `db.planOverride` + +CRUD operations for PlanOverride records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `entityId` | UUID | Yes | +| `expiresAt` | Datetime | Yes | +| `id` | UUID | No | +| `limitName` | String | Yes | +| `maxValue` | BigInt | Yes | +| `reason` | String | Yes | + +**Operations:** + +```typescript +// List all planOverride records +const items = await db.planOverride.findMany({ select: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }).execute(); + +// Get one by id +const item = await db.planOverride.findOne({ id: '', select: { entityId: true, expiresAt: true, id: true, limitName: true, maxValue: true, reason: true } }).execute(); + +// Create +const created = await db.planOverride.create({ data: { entityId: '', expiresAt: '', limitName: '', maxValue: '', reason: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planOverride.update({ where: { id: '' }, data: { entityId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planOverride.delete({ where: { id: '' } }).execute(); +``` + +### `db.planPricing` + +CRUD operations for PlanPricing records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `billingInterval` | String | Yes | +| `currency` | String | Yes | +| `discountPercent` | BigFloat | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `planId` | UUID | Yes | +| `price` | BigInt | Yes | + +**Operations:** + +```typescript +// List all planPricing records +const items = await db.planPricing.findMany({ select: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }).execute(); + +// Get one by id +const item = await db.planPricing.findOne({ id: '', select: { billingInterval: true, currency: true, discountPercent: true, id: true, isActive: true, planId: true, price: true } }).execute(); + +// Create +const created = await db.planPricing.create({ data: { billingInterval: '', currency: '', discountPercent: '', isActive: '', planId: '', price: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planPricing.update({ where: { id: '' }, data: { billingInterval: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planPricing.delete({ where: { id: '' } }).execute(); +``` + +### `db.planSubscription` + +CRUD operations for PlanSubscription records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `endsAt` | Datetime | Yes | +| `entityId` | UUID | Yes | +| `entityType` | String | Yes | +| `id` | UUID | No | +| `isActive` | Boolean | Yes | +| `organizationId` | UUID | Yes | +| `planId` | UUID | Yes | +| `startsAt` | Datetime | Yes | + +**Operations:** + +```typescript +// List all planSubscription records +const items = await db.planSubscription.findMany({ select: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }).execute(); + +// Get one by id +const item = await db.planSubscription.findOne({ id: '', select: { endsAt: true, entityId: true, entityType: true, id: true, isActive: true, organizationId: true, planId: true, startsAt: true } }).execute(); + +// Create +const created = await db.planSubscription.create({ data: { endsAt: '', entityId: '', entityType: '', isActive: '', organizationId: '', planId: '', startsAt: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.planSubscription.update({ where: { id: '' }, data: { endsAt: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.planSubscription.delete({ where: { id: '' } }).execute(); +``` + ## Custom Operations +### `db.query.captureAppLimitDefaults` + +captureAppLimitDefaults + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureAppLimitDefaults().execute(); +``` + +### `db.query.captureOrgLimitDefaults` + +captureOrgLimitDefaults + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureOrgLimitDefaults().execute(); +``` + +### `db.query.captureTrustLadder` + +captureTrustLadder + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.captureTrustLadder().execute(); +``` + +### `db.query.eventsAchieved` + +eventsAchieved + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `level` | String | + | `roleId` | UUID | + +```typescript +const result = await db.query.eventsAchieved({ level: '', roleId: '' }).execute(); +``` + +### `db.query.eventsRequired` + +Reads and enables pagination through a set of `AppLevelRequirement`. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `after` | Cursor | + | `first` | Int | + | `level` | String | + | `offset` | Int | + | `roleId` | UUID | + +```typescript +const result = await db.query.eventsRequired({ after: '', first: '', level: '', offset: '', roleId: '' }).execute(); +``` + +### `db.mutation.grantAchievement` + +grantAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | GrantAchievementInput (required) | + +```typescript +const result = await db.mutation.grantAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -696,6 +1509,36 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.recomputeCapabilities` + +recomputeCapabilities + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RecomputeCapabilitiesInput (required) | + +```typescript +const result = await db.mutation.recomputeCapabilities({ input: { actorId: '' } }).execute(); +``` + +### `db.mutation.revokeAchievement` + +revokeAchievement + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeAchievementInput (required) | + +```typescript +const result = await db.mutation.revokeAchievement({ input: { actorId: '', levelName: '' } }).execute(); +``` + ### `db.mutation.seedAppLimitCapsDefaults` seedAppLimitCapsDefaults @@ -726,6 +1569,21 @@ seedAppLimitDefaults const result = await db.mutation.seedAppLimitDefaults({ input: { defaults: '' } }).execute(); ``` +### `db.mutation.seedMeterDefaults` + +seedMeterDefaults + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedMeterDefaultsInput (required) | + +```typescript +const result = await db.mutation.seedMeterDefaults({ input: { defaults: '' } }).execute(); +``` + ### `db.mutation.seedOrgLimitCapsDefaults` seedOrgLimitCapsDefaults @@ -756,6 +1614,36 @@ seedOrgLimitDefaults const result = await db.mutation.seedOrgLimitDefaults({ input: { defaults: '' } }).execute(); ``` +### `db.mutation.seedPlan` + +seedPlan + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedPlanInput (required) | + +```typescript +const result = await db.mutation.seedPlan({ input: { planConfig: '', planName: '' } }).execute(); +``` + +### `db.mutation.seedTrustLadder` + +seedTrustLadder + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SeedTrustLadderInput (required) | + +```typescript +const result = await db.mutation.seedTrustLadder({ input: { ladder: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-sdk/src/usage/orm/index.ts b/sdk/constructive-sdk/src/usage/orm/index.ts index 7d48027d3b..39b71e8b29 100644 --- a/sdk/constructive-sdk/src/usage/orm/index.ts +++ b/sdk/constructive-sdk/src/usage/orm/index.ts @@ -5,6 +5,13 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { AppAchievementRewardModel } from './models/appAchievementReward'; +import { AppEventAggregateModel } from './models/appEventAggregate'; +import { AppEventModel } from './models/appEvent'; +import { AppEventTypeModel } from './models/appEventType'; +import { AppLevelModel } from './models/appLevel'; +import { AppLevelGrantModel } from './models/appLevelGrant'; +import { AppLevelRequirementModel } from './models/appLevelRequirement'; import { AppLimitCapModel } from './models/appLimitCap'; import { AppLimitCapsDefaultModel } from './models/appLimitCapsDefault'; import { AppLimitModel } from './models/appLimit'; @@ -15,6 +22,12 @@ import { AppLimitCreditRedemptionModel } from './models/appLimitCreditRedemption import { AppLimitDefaultModel } from './models/appLimitDefault'; import { AppLimitEventModel } from './models/appLimitEvent'; import { AppLimitWarningModel } from './models/appLimitWarning'; +import { BillingUsageSummaryModel } from './models/billingUsageSummary'; +import { LedgerModel } from './models/ledger'; +import { MeterModel } from './models/meter'; +import { MeterCreditModel } from './models/meterCredit'; +import { MeterDefaultModel } from './models/meterDefault'; +import { MeterSourceModel } from './models/meterSource'; import { OrgLimitAggregateModel } from './models/orgLimitAggregate'; import { OrgLimitCapModel } from './models/orgLimitCap'; import { OrgLimitCapsDefaultModel } from './models/orgLimitCapsDefault'; @@ -23,12 +36,21 @@ import { OrgLimitCreditModel } from './models/orgLimitCredit'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; import { OrgLimitEventModel } from './models/orgLimitEvent'; import { OrgLimitWarningModel } from './models/orgLimitWarning'; +import { PlanCapModel } from './models/planCap'; +import { PlanModel } from './models/plan'; +import { PlanLimitModel } from './models/planLimit'; +import { PlanMeterLimitModel } from './models/planMeterLimit'; +import { PlanOverrideModel } from './models/planOverride'; +import { PlanPricingModel } from './models/planPricing'; +import { PlanSubscriptionModel } from './models/planSubscription'; +import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; +export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -56,6 +78,13 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + appAchievementReward: new AppAchievementRewardModel(client), + appEventAggregate: new AppEventAggregateModel(client), + appEvent: new AppEventModel(client), + appEventType: new AppEventTypeModel(client), + appLevel: new AppLevelModel(client), + appLevelGrant: new AppLevelGrantModel(client), + appLevelRequirement: new AppLevelRequirementModel(client), appLimitCap: new AppLimitCapModel(client), appLimitCapsDefault: new AppLimitCapsDefaultModel(client), appLimit: new AppLimitModel(client), @@ -66,6 +95,12 @@ export function createClient(config: OrmClientConfig) { appLimitDefault: new AppLimitDefaultModel(client), appLimitEvent: new AppLimitEventModel(client), appLimitWarning: new AppLimitWarningModel(client), + billingUsageSummary: new BillingUsageSummaryModel(client), + ledger: new LedgerModel(client), + meter: new MeterModel(client), + meterCredit: new MeterCreditModel(client), + meterDefault: new MeterDefaultModel(client), + meterSource: new MeterSourceModel(client), orgLimitAggregate: new OrgLimitAggregateModel(client), orgLimitCap: new OrgLimitCapModel(client), orgLimitCapsDefault: new OrgLimitCapsDefaultModel(client), @@ -74,6 +109,14 @@ export function createClient(config: OrmClientConfig) { orgLimitDefault: new OrgLimitDefaultModel(client), orgLimitEvent: new OrgLimitEventModel(client), orgLimitWarning: new OrgLimitWarningModel(client), + planCap: new PlanCapModel(client), + plan: new PlanModel(client), + planLimit: new PlanLimitModel(client), + planMeterLimit: new PlanMeterLimitModel(client), + planOverride: new PlanOverrideModel(client), + planPricing: new PlanPricingModel(client), + planSubscription: new PlanSubscriptionModel(client), + query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-sdk/src/usage/orm/input-types.ts b/sdk/constructive-sdk/src/usage/orm/input-types.ts index f8df1c43d8..a9d363ba3a 100644 --- a/sdk/constructive-sdk/src/usage/orm/input-types.ts +++ b/sdk/constructive-sdk/src/usage/orm/input-types.ts @@ -230,8 +230,119 @@ export interface UUIDListFilter { anyGreaterThan?: string; anyGreaterThanOrEqualTo?: string; } -/** Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. */ +// ============ Custom Scalar Types ============ +export type ConstructiveInternalTypeImage = unknown; +/** Defines rewards granted when a level is achieved; supports limit_credits and meter_credits */ // ============ Entity Types ============ +export interface AppAchievementReward { + /** Number of credits to grant; unused by capability rewards */ + amount?: number | null; + createdAt?: string | null; + /** Credit type: permanent, expiring, etc. */ + creditType?: string | null; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: string | null; + id: string; + /** Name of the level this reward is granted for */ + levelName?: string | null; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType?: string | null; + /** Target limit name, meter slug, or capability catalog name */ + targetName?: string | null; + updatedAt?: string | null; +} +/** Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually */ +export interface AppEventAggregate { + actorId?: string | null; + /** Cumulative count of completed steps toward this requirement */ + count?: number | null; + createdAt?: string | null; + id: string; + /** Name identifier of the level requirement being tracked */ + name?: string | null; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string | null; + updatedAt?: string | null; +} +/** Partitioned append-only log of individual user actions; every single event ever recorded */ +export interface AppEvent { + actorId?: string | null; + /** Number of units completed in this step action */ + count?: number | null; + createdAt?: string | null; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id: string; + /** Name identifier of the level requirement this step fulfills */ + name?: string | null; +} +/** Catalog of known event types with per-type configuration for aggregation, retention, and level participation */ +export interface AppEventType { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string | null; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string | null; + createdAt?: string | null; + /** Human-readable description of this event type */ + description?: string | null; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean | null; + id: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean | null; + /** Unique name identifier for this event type */ + name?: string | null; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: string | null; + updatedAt?: string | null; +} +/** Defines available levels that users can achieve by completing requirements */ +export interface AppLevel { + createdAt?: string | null; + /** Human-readable description of what this level represents */ + description?: string | null; + id: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage | null; + /** Unique name of the level */ + name?: string | null; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string | null; + updatedAt?: string | null; +} +/** Records when a user achieves a level; prevents duplicate reward grants */ +export interface AppLevelGrant { + actorId?: string | null; + createdAt?: string | null; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string | null; + id: string; + /** Name of the level that was achieved */ + levelName?: string | null; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string | null; + updatedAt?: string | null; +} +/** Defines the specific requirements that must be met to achieve a level */ +export interface AppLevelRequirement { + createdAt?: string | null; + /** Human-readable description of what this requirement entails */ + description?: string | null; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string | null; + id: string; + /** Name of the level this requirement belongs to */ + level?: string | null; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string | null; + /** Name identifier of the requirement (matches step names) */ + name?: string | null; + /** Display ordering priority; lower values appear first */ + priority?: number | null; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number | null; + updatedAt?: string | null; +} +/** Per-entity cap overrides. Allows specific orgs/entities to have different cap values than the scope default. */ export interface AppLimitCap { /** Entity this cap override applies to */ entityId?: string | null; @@ -266,7 +377,7 @@ export interface AppLimit { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -277,7 +388,7 @@ export interface AppLimit { /** Start of the current metering window; NULL means no time window */ windowStart?: string | null; } -/** Redeemable credit codes managed by admins with the add_credits permission */ +/** Redeemable credit codes managed by admins with the add_credits capability */ export interface AppLimitCreditCode { /** Human-readable credit code (case-insensitive, unique) */ code?: string | null; @@ -377,6 +488,134 @@ export interface AppLimitWarning { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string | null; } +/** Permanent monthly usage summary per entity per meter (user-facing billing dashboard) */ +export interface BillingUsageSummary { + /** Universal credits consumed during this period */ + creditsConsumed?: string | null; + /** The entity (org, team, user) this summary belongs to */ + entityId?: string | null; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string | null; + id: string; + /** Which meter this summary tracks */ + meterSlug?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string | null; + /** End of the billing period this summary covers */ + periodEnd?: string | null; + /** Start of the billing period this summary covers */ + periodStart?: string | null; + /** Plan limit that was in effect during this period */ + planLimit?: string | null; + /** Total units consumed during this period */ + quantityUsed?: string | null; +} +/** Append-only event log for all billing events (usage, grants, adjustments) */ +export interface Ledger { + createdAt?: string | null; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta?: string | null; + /** The entity this ledger entry belongs to */ + entityId?: string | null; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string | null; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string | null; + /** Unique identifier for each ledger entry */ + id: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string | null; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: Record | null; + /** Which meter this entry is for */ + meterSlug?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Running total of usage after this entry */ + usageAfter?: string | null; +} +/** Defines billable meters (what to track: quotas, feature flags, credit pools) */ +export interface Meter { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string | null; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string | null; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number | null; + /** Human-readable name for the meter */ + displayName?: string | null; + id: string; + /** Whether this meter is currently active */ + isActive?: boolean | null; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string | null; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: string | null; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string | null; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug?: string | null; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string | null; +} +/** Append-only ledger of credit grants for billing meters that automatically update balances */ +export interface MeterCredit { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount?: string | null; + /** When this credit was granted */ + createdAt?: string | null; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string | null; + /** Entity this credit applies to */ + entityId?: string | null; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string | null; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string | null; + id: string; + /** FK to meters — which meter definition this credit applies to */ + meterId?: string | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string | null; +} +/** Default meter catalog: defines which meters are available and their default plan_limit values for new entities */ +export interface MeterDefault { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string | null; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string | null; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string | null; + /** Human-readable name for the default meter */ + displayName?: string | null; + id: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean | null; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string | null; + /** Meter slug that matches the slug in the meters table */ + slug?: string | null; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string | null; +} +/** Maps billing meters to typed usage summary table columns for automated usage reconciliation. Each row tells reconcile_typed_usage() which column to aggregate and how. */ +export interface MeterSource { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string | null; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath?: string | null; + id: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean | null; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug?: string | null; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric?: string | null; +} /** Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown) */ export interface OrgLimitAggregate { /** Entity (org) whose aggregate usage is being tracked */ @@ -394,7 +633,7 @@ export interface OrgLimitAggregate { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -443,7 +682,7 @@ export interface OrgLimit { organizationId?: string | null; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string | null; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string | null; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string | null; @@ -526,6 +765,94 @@ export interface OrgLimitWarning { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType?: string | null; } +/** Maps each plan to feature flag cap values (written to limit_caps when plan is applied) */ +export interface PlanCap { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName?: string | null; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string | null; + id: string; + /** Reference to the plan this cap setting belongs to */ + planId?: string | null; +} +/** Defines plan tiers with named limit configurations */ +export interface Plan { + /** Human-readable description of the plan tier */ + description?: string | null; + id: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean | null; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name?: string | null; +} +/** Maps each plan to specific limit names and their maximum allowed values */ +export interface PlanLimit { + id: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName?: string | null; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue?: string | null; + /** Reference to the plan this limit configuration belongs to */ + planId?: string | null; +} +/** Maps each plan to billing meter quotas (plan_limit values written to balances when plan is applied) */ +export interface PlanMeterLimit { + id: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug?: string | null; + /** Reference to the plan this meter limit belongs to */ + planId?: string | null; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit?: string | null; +} +/** Per-entity limit overrides that take precedence over plan defaults */ +export interface PlanOverride { + /** Entity receiving the custom override (personal org or actual org) */ + entityId?: string | null; + /** When this override expires; NULL means permanent */ + expiresAt?: string | null; + id: string; + /** Name of the limit being overridden */ + limitName?: string | null; + /** Override maximum value; negative means unlimited */ + maxValue?: string | null; + /** Admin note explaining why this override was granted */ + reason?: string | null; +} +/** Billing intervals and pricing for each plan tier */ +export interface PlanPricing { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval?: string | null; + /** ISO 4217 currency code (lowercase) */ + currency?: string | null; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string | null; + id: string; + /** Whether this pricing option is currently available */ + isActive?: boolean | null; + /** Reference to the plan this pricing belongs to */ + planId?: string | null; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price?: string | null; +} +/** Assigns a plan to an entity with subscription lifecycle (start, end, active state) */ +export interface PlanSubscription { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string | null; + /** The entity (org, team, user) this subscription belongs to */ + entityId?: string | null; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string | null; + id: string; + /** Whether the subscription is currently active */ + isActive?: boolean | null; + /** Resolved billable organization via get_organization_id */ + organizationId?: string | null; + /** Reference to the plan this subscription is for */ + planId?: string | null; + /** When the subscription becomes active */ + startsAt?: string | null; +} // ============ Relation Helper Types ============ export interface ConnectionResult { nodes: T[]; @@ -539,6 +866,13 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface AppAchievementRewardRelations {} +export interface AppEventAggregateRelations {} +export interface AppEventRelations {} +export interface AppEventTypeRelations {} +export interface AppLevelRelations {} +export interface AppLevelGrantRelations {} +export interface AppLevelRequirementRelations {} export interface AppLimitCapRelations {} export interface AppLimitCapsDefaultRelations {} export interface AppLimitRelations {} @@ -562,6 +896,16 @@ export interface AppLimitDefaultRelations { } export interface AppLimitEventRelations {} export interface AppLimitWarningRelations {} +export interface BillingUsageSummaryRelations {} +export interface LedgerRelations {} +export interface MeterRelations { + meterCredits?: ConnectionResult; +} +export interface MeterCreditRelations { + meter?: Meter | null; +} +export interface MeterDefaultRelations {} +export interface MeterSourceRelations {} export interface OrgLimitAggregateRelations {} export interface OrgLimitCapRelations {} export interface OrgLimitCapsDefaultRelations {} @@ -574,7 +918,38 @@ export interface OrgLimitDefaultRelations { } export interface OrgLimitEventRelations {} export interface OrgLimitWarningRelations {} +export interface PlanCapRelations { + plan?: Plan | null; +} +export interface PlanRelations { + planCaps?: ConnectionResult; + planLimits?: ConnectionResult; + planMeterLimits?: ConnectionResult; + planPricings?: ConnectionResult; + planSubscriptions?: ConnectionResult; +} +export interface PlanLimitRelations { + plan?: Plan | null; +} +export interface PlanMeterLimitRelations { + plan?: Plan | null; +} +export interface PlanOverrideRelations {} +export interface PlanPricingRelations { + plan?: Plan | null; +} +export interface PlanSubscriptionRelations { + plan?: Plan | null; +} // ============ Entity Types With Relations ============ +export type AppAchievementRewardWithRelations = AppAchievementReward & + AppAchievementRewardRelations; +export type AppEventAggregateWithRelations = AppEventAggregate & AppEventAggregateRelations; +export type AppEventWithRelations = AppEvent & AppEventRelations; +export type AppEventTypeWithRelations = AppEventType & AppEventTypeRelations; +export type AppLevelWithRelations = AppLevel & AppLevelRelations; +export type AppLevelGrantWithRelations = AppLevelGrant & AppLevelGrantRelations; +export type AppLevelRequirementWithRelations = AppLevelRequirement & AppLevelRequirementRelations; export type AppLimitCapWithRelations = AppLimitCap & AppLimitCapRelations; export type AppLimitCapsDefaultWithRelations = AppLimitCapsDefault & AppLimitCapsDefaultRelations; export type AppLimitWithRelations = AppLimit & AppLimitRelations; @@ -587,6 +962,12 @@ export type AppLimitCreditRedemptionWithRelations = AppLimitCreditRedemption & export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRelations; export type AppLimitEventWithRelations = AppLimitEvent & AppLimitEventRelations; export type AppLimitWarningWithRelations = AppLimitWarning & AppLimitWarningRelations; +export type BillingUsageSummaryWithRelations = BillingUsageSummary & BillingUsageSummaryRelations; +export type LedgerWithRelations = Ledger & LedgerRelations; +export type MeterWithRelations = Meter & MeterRelations; +export type MeterCreditWithRelations = MeterCredit & MeterCreditRelations; +export type MeterDefaultWithRelations = MeterDefault & MeterDefaultRelations; +export type MeterSourceWithRelations = MeterSource & MeterSourceRelations; export type OrgLimitAggregateWithRelations = OrgLimitAggregate & OrgLimitAggregateRelations; export type OrgLimitCapWithRelations = OrgLimitCap & OrgLimitCapRelations; export type OrgLimitCapsDefaultWithRelations = OrgLimitCapsDefault & OrgLimitCapsDefaultRelations; @@ -595,7 +976,83 @@ export type OrgLimitCreditWithRelations = OrgLimitCredit & OrgLimitCreditRelatio export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; export type OrgLimitEventWithRelations = OrgLimitEvent & OrgLimitEventRelations; export type OrgLimitWarningWithRelations = OrgLimitWarning & OrgLimitWarningRelations; +export type PlanCapWithRelations = PlanCap & PlanCapRelations; +export type PlanWithRelations = Plan & PlanRelations; +export type PlanLimitWithRelations = PlanLimit & PlanLimitRelations; +export type PlanMeterLimitWithRelations = PlanMeterLimit & PlanMeterLimitRelations; +export type PlanOverrideWithRelations = PlanOverride & PlanOverrideRelations; +export type PlanPricingWithRelations = PlanPricing & PlanPricingRelations; +export type PlanSubscriptionWithRelations = PlanSubscription & PlanSubscriptionRelations; // ============ Entity Select Types ============ +export type AppAchievementRewardSelect = { + amount?: boolean; + createdAt?: boolean; + creditType?: boolean; + expiresInterval?: boolean; + id?: boolean; + levelName?: boolean; + rewardType?: boolean; + targetName?: boolean; + updatedAt?: boolean; +}; +export type AppEventAggregateSelect = { + actorId?: boolean; + count?: boolean; + createdAt?: boolean; + id?: boolean; + name?: boolean; + periodStart?: boolean; + updatedAt?: boolean; +}; +export type AppEventSelect = { + actorId?: boolean; + count?: boolean; + createdAt?: boolean; + id?: boolean; + name?: boolean; +}; +export type AppEventTypeSelect = { + aggregation?: boolean; + category?: boolean; + createdAt?: boolean; + description?: boolean; + feedsLevels?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + periodInterval?: boolean; + updatedAt?: boolean; +}; +export type AppLevelSelect = { + createdAt?: boolean; + description?: boolean; + id?: boolean; + image?: boolean; + name?: boolean; + ownerId?: boolean; + updatedAt?: boolean; +}; +export type AppLevelGrantSelect = { + actorId?: boolean; + createdAt?: boolean; + expiresAt?: boolean; + id?: boolean; + levelName?: boolean; + periodStart?: boolean; + updatedAt?: boolean; +}; +export type AppLevelRequirementSelect = { + createdAt?: boolean; + description?: boolean; + groupKey?: boolean; + id?: boolean; + level?: boolean; + metric?: boolean; + name?: boolean; + priority?: boolean; + requiredCount?: boolean; + updatedAt?: boolean; +}; export type AppLimitCapSelect = { entityId?: boolean; id?: boolean; @@ -715,6 +1172,85 @@ export type AppLimitWarningSelect = { thresholdValue?: boolean; warningType?: boolean; }; +export type BillingUsageSummarySelect = { + creditsConsumed?: boolean; + entityId?: boolean; + entityType?: boolean; + id?: boolean; + meterSlug?: boolean; + organizationId?: boolean; + overageUnits?: boolean; + periodEnd?: boolean; + periodStart?: boolean; + planLimit?: boolean; + quantityUsed?: boolean; +}; +export type LedgerSelect = { + createdAt?: boolean; + delta?: boolean; + entityId?: boolean; + entityType?: boolean; + entryType?: boolean; + id?: boolean; + ledgerClass?: boolean; + metadata?: boolean; + meterSlug?: boolean; + organizationId?: boolean; + usageAfter?: boolean; +}; +export type MeterSelect = { + aggregation?: boolean; + categoryMeter?: boolean; + creditCost?: boolean; + displayName?: boolean; + id?: boolean; + isActive?: boolean; + meterType?: boolean; + periodInterval?: boolean; + rolloverCap?: boolean; + slug?: boolean; + unit?: boolean; + meterCredits?: { + select: MeterCreditSelect; + first?: number; + filter?: MeterCreditFilter; + orderBy?: MeterCreditOrderBy[]; + }; +}; +export type MeterCreditSelect = { + amount?: boolean; + createdAt?: boolean; + creditType?: boolean; + entityId?: boolean; + entityType?: boolean; + expiresAt?: boolean; + id?: boolean; + meterId?: boolean; + organizationId?: boolean; + reason?: boolean; + meter?: { + select: MeterSelect; + }; +}; +export type MeterDefaultSelect = { + categoryMeter?: boolean; + creditCost?: boolean; + defaultPlanLimit?: boolean; + displayName?: boolean; + id?: boolean; + isActive?: boolean; + meterType?: boolean; + slug?: boolean; + unit?: boolean; +}; +export type MeterSourceSelect = { + aggregationType?: boolean; + dimensionPath?: boolean; + id?: boolean; + isActive?: boolean; + meterSlug?: boolean; + sourceMetric?: boolean; +}; export type OrgLimitAggregateSelect = { entityId?: boolean; entityType?: boolean; @@ -807,78 +1343,340 @@ export type OrgLimitWarningSelect = { thresholdValue?: boolean; warningType?: boolean; }; +export type PlanCapSelect = { + capName?: boolean; + capValue?: boolean; + id?: boolean; + planId?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanSelect = { + description?: boolean; + id?: boolean; + isActive?: boolean; + name?: boolean; + planCaps?: { + select: PlanCapSelect; + first?: number; + filter?: PlanCapFilter; + orderBy?: PlanCapOrderBy[]; + }; + planLimits?: { + select: PlanLimitSelect; + first?: number; + filter?: PlanLimitFilter; + orderBy?: PlanLimitOrderBy[]; + }; + planMeterLimits?: { + select: PlanMeterLimitSelect; + first?: number; + filter?: PlanMeterLimitFilter; + orderBy?: PlanMeterLimitOrderBy[]; + }; + planPricings?: { + select: PlanPricingSelect; + first?: number; + filter?: PlanPricingFilter; + orderBy?: PlanPricingOrderBy[]; + }; + planSubscriptions?: { + select: PlanSubscriptionSelect; + first?: number; + filter?: PlanSubscriptionFilter; + orderBy?: PlanSubscriptionOrderBy[]; + }; +}; +export type PlanLimitSelect = { + id?: boolean; + limitName?: boolean; + maxValue?: boolean; + planId?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanMeterLimitSelect = { + id?: boolean; + meterSlug?: boolean; + planId?: boolean; + planLimit?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanOverrideSelect = { + entityId?: boolean; + expiresAt?: boolean; + id?: boolean; + limitName?: boolean; + maxValue?: boolean; + reason?: boolean; +}; +export type PlanPricingSelect = { + billingInterval?: boolean; + currency?: boolean; + discountPercent?: boolean; + id?: boolean; + isActive?: boolean; + planId?: boolean; + price?: boolean; + plan?: { + select: PlanSelect; + }; +}; +export type PlanSubscriptionSelect = { + endsAt?: boolean; + entityId?: boolean; + entityType?: boolean; + id?: boolean; + isActive?: boolean; + organizationId?: boolean; + planId?: boolean; + startsAt?: boolean; + plan?: { + select: PlanSelect; + }; +}; // ============ Table Filter Types ============ -export interface AppLimitCapFilter { +export interface AppAchievementRewardFilter { + /** Filter by the object’s `amount` field. */ + amount?: IntFilter; /** Checks for all expressions in this list. */ - and?: AppLimitCapFilter[]; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; + and?: AppAchievementRewardFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `expiresInterval` field. */ + expiresInterval?: IntervalFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppAchievementRewardFilter; + /** Checks for any expressions in this list. */ + or?: AppAchievementRewardFilter[]; + /** Filter by the object’s `rewardType` field. */ + rewardType?: StringFilter; + /** Filter by the object’s `targetName` field. */ + targetName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppEventAggregateFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppEventAggregateFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitCapFilter; + not?: AppEventAggregateFilter; /** Checks for any expressions in this list. */ - or?: AppLimitCapFilter[]; + or?: AppEventAggregateFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppLimitCapsDefaultFilter { +export interface AppEventFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: AppLimitCapsDefaultFilter[]; + and?: AppEventFilter[]; + /** Filter by the object’s `count` field. */ + count?: IntFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitCapsDefaultFilter; + not?: AppEventFilter; /** Checks for any expressions in this list. */ - or?: AppLimitCapsDefaultFilter[]; + or?: AppEventFilter[]; } -export interface AppLimitFilter { - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; +export interface AppEventTypeFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; /** Checks for all expressions in this list. */ - and?: AppLimitFilter[]; - /** Filter by the object’s `entityType` field. */ - entityType?: StringFilter; + and?: AppEventTypeFilter[]; + /** Filter by the object’s `category` field. */ + category?: StringFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `feedsLevels` field. */ + feedsLevels?: BooleanFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `max` field. */ - max?: BigIntFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: AppLimitFilter; - /** Filter by the object’s `num` field. */ - num?: BigIntFilter; + not?: AppEventTypeFilter; /** Checks for any expressions in this list. */ - or?: AppLimitFilter[]; - /** Filter by the object’s `organizationId` field. */ - organizationId?: UUIDFilter; - /** Filter by the object’s `periodCredits` field. */ - periodCredits?: BigIntFilter; - /** Filter by the object’s `planMax` field. */ - planMax?: BigIntFilter; - /** Filter by the object’s `purchasedCredits` field. */ - purchasedCredits?: BigIntFilter; - /** Filter by the object’s `softMax` field. */ - softMax?: BigIntFilter; - /** Filter by the object’s `windowDuration` field. */ - windowDuration?: IntervalFilter; - /** Filter by the object’s `windowStart` field. */ - windowStart?: DatetimeFilter; + or?: AppEventTypeFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; } -export interface AppLimitCreditCodeFilter { +export interface AppLevelFilter { /** Checks for all expressions in this list. */ - and?: AppLimitCreditCodeFilter[]; - /** Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. */ - appLimitCreditCodeItemsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter; - /** `appLimitCreditCodeItemsByCreditCodeId` exist. */ - appLimitCreditCodeItemsByCreditCodeIdExist?: boolean; + and?: AppLevelFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `image` field. */ + image?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelFilter[]; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLevelGrantFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppLevelGrantFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `levelName` field. */ + levelName?: StringFilter; + /** Negates the expression. */ + not?: AppLevelGrantFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelGrantFilter[]; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLevelRequirementFilter { + /** Checks for all expressions in this list. */ + and?: AppLevelRequirementFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `groupKey` field. */ + groupKey?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `level` field. */ + level?: StringFilter; + /** Filter by the object’s `metric` field. */ + metric?: StringFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLevelRequirementFilter; + /** Checks for any expressions in this list. */ + or?: AppLevelRequirementFilter[]; + /** Filter by the object’s `priority` field. */ + priority?: IntFilter; + /** Filter by the object’s `requiredCount` field. */ + requiredCount?: IntFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +export interface AppLimitCapFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCapFilter[]; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitCapFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitCapFilter[]; +} +export interface AppLimitCapsDefaultFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCapsDefaultFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitCapsDefaultFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitCapsDefaultFilter[]; +} +export interface AppLimitFilter { + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: AppLimitFilter[]; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `max` field. */ + max?: BigIntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: AppLimitFilter; + /** Filter by the object’s `num` field. */ + num?: BigIntFilter; + /** Checks for any expressions in this list. */ + or?: AppLimitFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `periodCredits` field. */ + periodCredits?: BigIntFilter; + /** Filter by the object’s `planMax` field. */ + planMax?: BigIntFilter; + /** Filter by the object’s `purchasedCredits` field. */ + purchasedCredits?: BigIntFilter; + /** Filter by the object’s `softMax` field. */ + softMax?: BigIntFilter; + /** Filter by the object’s `windowDuration` field. */ + windowDuration?: IntervalFilter; + /** Filter by the object’s `windowStart` field. */ + windowStart?: DatetimeFilter; +} +export interface AppLimitCreditCodeFilter { + /** Checks for all expressions in this list. */ + and?: AppLimitCreditCodeFilter[]; + /** Filter by the object’s `appLimitCreditCodeItemsByCreditCodeId` relation. */ + appLimitCreditCodeItemsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter; + /** `appLimitCreditCodeItemsByCreditCodeId` exist. */ + appLimitCreditCodeItemsByCreditCodeIdExist?: boolean; /** Filter by the object’s `appLimitCreditRedemptionsByCreditCodeId` relation. */ appLimitCreditRedemptionsByCreditCodeId?: AppLimitCreditCodeToManyAppLimitCreditRedemptionFilter; /** `appLimitCreditRedemptionsByCreditCodeId` exist. */ @@ -1038,6 +1836,176 @@ export interface AppLimitWarningFilter { /** Filter by the object’s `warningType` field. */ warningType?: StringFilter; } +export interface BillingUsageSummaryFilter { + /** Checks for all expressions in this list. */ + and?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `creditsConsumed` field. */ + creditsConsumed?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: BillingUsageSummaryFilter; + /** Checks for any expressions in this list. */ + or?: BillingUsageSummaryFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `overageUnits` field. */ + overageUnits?: BigIntFilter; + /** Filter by the object’s `periodEnd` field. */ + periodEnd?: DatetimeFilter; + /** Filter by the object’s `periodStart` field. */ + periodStart?: DatetimeFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; + /** Filter by the object’s `quantityUsed` field. */ + quantityUsed?: BigIntFilter; +} +export interface LedgerFilter { + /** Checks for all expressions in this list. */ + and?: LedgerFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `delta` field. */ + delta?: BigIntFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `entryType` field. */ + entryType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ledgerClass` field. */ + ledgerClass?: StringFilter; + /** Filter by the object’s `metadata` field. */ + metadata?: JSONFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: LedgerFilter; + /** Checks for any expressions in this list. */ + or?: LedgerFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `usageAfter` field. */ + usageAfter?: BigIntFilter; +} +export interface MeterFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: IntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterCredits` relation. */ + meterCredits?: MeterToManyMeterCreditFilter; + /** `meterCredits` exist. */ + meterCreditsExist?: boolean; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterFilter; + /** Checks for any expressions in this list. */ + or?: MeterFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `rolloverCap` field. */ + rolloverCap?: BigIntFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +export interface MeterCreditFilter { + /** Filter by the object’s `amount` field. */ + amount?: BigIntFilter; + /** Checks for all expressions in this list. */ + and?: MeterCreditFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meter` relation. */ + meter?: MeterFilter; + /** Filter by the object’s `meterId` field. */ + meterId?: UUIDFilter; + /** Negates the expression. */ + not?: MeterCreditFilter; + /** Checks for any expressions in this list. */ + or?: MeterCreditFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +export interface MeterDefaultFilter { + /** Checks for all expressions in this list. */ + and?: MeterDefaultFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: BigFloatFilter; + /** Filter by the object’s `defaultPlanLimit` field. */ + defaultPlanLimit?: BigIntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterDefaultFilter; + /** Checks for any expressions in this list. */ + or?: MeterDefaultFilter[]; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} +export interface MeterSourceFilter { + /** Filter by the object’s `aggregationType` field. */ + aggregationType?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterSourceFilter[]; + /** Filter by the object’s `dimensionPath` field. */ + dimensionPath?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: MeterSourceFilter; + /** Checks for any expressions in this list. */ + or?: MeterSourceFilter[]; + /** Filter by the object’s `sourceMetric` field. */ + sourceMetric?: StringFilter; +} export interface OrgLimitAggregateFilter { /** Checks for all expressions in this list. */ and?: OrgLimitAggregateFilter[]; @@ -1242,7 +2210,305 @@ export interface OrgLimitWarningFilter { /** Filter by the object’s `warningType` field. */ warningType?: StringFilter; } +export interface PlanCapFilter { + /** Checks for all expressions in this list. */ + and?: PlanCapFilter[]; + /** Filter by the object’s `capName` field. */ + capName?: StringFilter; + /** Filter by the object’s `capValue` field. */ + capValue?: BigIntFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlanCapFilter; + /** Checks for any expressions in this list. */ + or?: PlanCapFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +export interface PlanFilter { + /** Checks for all expressions in this list. */ + and?: PlanFilter[]; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlanFilter; + /** Checks for any expressions in this list. */ + or?: PlanFilter[]; + /** Filter by the object’s `planCaps` relation. */ + planCaps?: PlanToManyPlanCapFilter; + /** `planCaps` exist. */ + planCapsExist?: boolean; + /** Filter by the object’s `planLimits` relation. */ + planLimits?: PlanToManyPlanLimitFilter; + /** `planLimits` exist. */ + planLimitsExist?: boolean; + /** Filter by the object’s `planMeterLimits` relation. */ + planMeterLimits?: PlanToManyPlanMeterLimitFilter; + /** `planMeterLimits` exist. */ + planMeterLimitsExist?: boolean; + /** Filter by the object’s `planPricings` relation. */ + planPricings?: PlanToManyPlanPricingFilter; + /** `planPricings` exist. */ + planPricingsExist?: boolean; + /** Filter by the object’s `planSubscriptions` relation. */ + planSubscriptions?: PlanToManyPlanSubscriptionFilter; + /** `planSubscriptions` exist. */ + planSubscriptionsExist?: boolean; +} +export interface PlanLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +export interface PlanMeterLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanMeterLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: PlanMeterLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanMeterLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; +} +export interface PlanOverrideFilter { + /** Checks for all expressions in this list. */ + and?: PlanOverrideFilter[]; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanOverrideFilter; + /** Checks for any expressions in this list. */ + or?: PlanOverrideFilter[]; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} +export interface PlanPricingFilter { + /** Checks for all expressions in this list. */ + and?: PlanPricingFilter[]; + /** Filter by the object’s `billingInterval` field. */ + billingInterval?: StringFilter; + /** Filter by the object’s `currency` field. */ + currency?: StringFilter; + /** Filter by the object’s `discountPercent` field. */ + discountPercent?: BigFloatFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanPricingFilter; + /** Checks for any expressions in this list. */ + or?: PlanPricingFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `price` field. */ + price?: BigIntFilter; +} +export interface PlanSubscriptionFilter { + /** Checks for all expressions in this list. */ + and?: PlanSubscriptionFilter[]; + /** Filter by the object’s `endsAt` field. */ + endsAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanSubscriptionFilter; + /** Checks for any expressions in this list. */ + or?: PlanSubscriptionFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `startsAt` field. */ + startsAt?: DatetimeFilter; +} // ============ OrderBy Types ============ +export type AppAchievementRewardOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'EXPIRES_INTERVAL_ASC' + | 'EXPIRES_INTERVAL_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REWARD_TYPE_ASC' + | 'REWARD_TYPE_DESC' + | 'TARGET_NAME_ASC' + | 'TARGET_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppEventAggregateOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppEventOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'COUNT_ASC' + | 'COUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type AppEventTypeOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'FEEDS_LEVELS_ASC' + | 'FEEDS_LEVELS_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IMAGE_ASC' + | 'IMAGE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelGrantOrderBy = + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_NAME_ASC' + | 'LEVEL_NAME_DESC' + | 'NATURAL' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; +export type AppLevelRequirementOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'GROUP_KEY_ASC' + | 'GROUP_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEVEL_ASC' + | 'LEVEL_DESC' + | 'METRIC_ASC' + | 'METRIC_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIORITY_ASC' + | 'PRIORITY_DESC' + | 'REQUIRED_COUNT_ASC' + | 'REQUIRED_COUNT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppLimitCapOrderBy = | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' @@ -1409,6 +2675,146 @@ export type AppLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +export type BillingUsageSummaryOrderBy = + | 'CREDITS_CONSUMED_ASC' + | 'CREDITS_CONSUMED_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'OVERAGE_UNITS_ASC' + | 'OVERAGE_UNITS_DESC' + | 'PERIOD_END_ASC' + | 'PERIOD_END_DESC' + | 'PERIOD_START_ASC' + | 'PERIOD_START_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'QUANTITY_USED_ASC' + | 'QUANTITY_USED_DESC'; +export type LedgerOrderBy = + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DELTA_ASC' + | 'DELTA_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ENTRY_TYPE_ASC' + | 'ENTRY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LEDGER_CLASS_ASC' + | 'LEDGER_CLASS_DESC' + | 'METADATA_ASC' + | 'METADATA_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'USAGE_AFTER_ASC' + | 'USAGE_AFTER_DESC'; +export type MeterOrderBy = + | 'AGGREGATION_ASC' + | 'AGGREGATION_DESC' + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PERIOD_INTERVAL_ASC' + | 'PERIOD_INTERVAL_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLLOVER_CAP_ASC' + | 'ROLLOVER_CAP_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +export type MeterCreditOrderBy = + | 'AMOUNT_ASC' + | 'AMOUNT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'CREDIT_TYPE_ASC' + | 'CREDIT_TYPE_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'METER_ID_ASC' + | 'METER_ID_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +export type MeterDefaultOrderBy = + | 'CATEGORY_METER_ASC' + | 'CATEGORY_METER_DESC' + | 'CREDIT_COST_ASC' + | 'CREDIT_COST_DESC' + | 'DEFAULT_PLAN_LIMIT_ASC' + | 'DEFAULT_PLAN_LIMIT_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_TYPE_ASC' + | 'METER_TYPE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SLUG_ASC' + | 'SLUG_DESC' + | 'UNIT_ASC' + | 'UNIT_DESC'; +export type MeterSourceOrderBy = + | 'AGGREGATION_TYPE_ASC' + | 'AGGREGATION_TYPE_DESC' + | 'DIMENSION_PATH_ASC' + | 'DIMENSION_PATH_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SOURCE_METRIC_ASC' + | 'SOURCE_METRIC_DESC'; export type OrgLimitAggregateOrderBy = | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' @@ -1575,7 +2981,292 @@ export type OrgLimitWarningOrderBy = | 'THRESHOLD_VALUE_DESC' | 'WARNING_TYPE_ASC' | 'WARNING_TYPE_DESC'; +export type PlanCapOrderBy = + | 'CAP_NAME_ASC' + | 'CAP_NAME_DESC' + | 'CAP_VALUE_ASC' + | 'CAP_VALUE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanOrderBy = + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanMeterLimitOrderBy = + | 'ID_ASC' + | 'ID_DESC' + | 'METER_SLUG_ASC' + | 'METER_SLUG_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PLAN_LIMIT_ASC' + | 'PLAN_LIMIT_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanOverrideOrderBy = + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'LIMIT_NAME_ASC' + | 'LIMIT_NAME_DESC' + | 'MAX_VALUE_ASC' + | 'MAX_VALUE_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'REASON_ASC' + | 'REASON_DESC'; +export type PlanPricingOrderBy = + | 'BILLING_INTERVAL_ASC' + | 'BILLING_INTERVAL_DESC' + | 'CURRENCY_ASC' + | 'CURRENCY_DESC' + | 'DISCOUNT_PERCENT_ASC' + | 'DISCOUNT_PERCENT_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRICE_ASC' + | 'PRICE_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC'; +export type PlanSubscriptionOrderBy = + | 'ENDS_AT_ASC' + | 'ENDS_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ENTITY_TYPE_ASC' + | 'ENTITY_TYPE_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_ACTIVE_ASC' + | 'IS_ACTIVE_DESC' + | 'NATURAL' + | 'ORGANIZATION_ID_ASC' + | 'ORGANIZATION_ID_DESC' + | 'PLAN_ID_ASC' + | 'PLAN_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'STARTS_AT_ASC' + | 'STARTS_AT_DESC'; // ============ CRUD Input Types ============ +export interface CreateAppAchievementRewardInput { + clientMutationId?: string; + appAchievementReward: { + amount?: number; + creditType?: string; + expiresInterval?: IntervalInput; + levelName: string; + rewardType: string; + targetName: string; + }; +} +export interface AppAchievementRewardPatch { + amount?: number | null; + creditType?: string | null; + expiresInterval?: IntervalInput | null; + levelName?: string | null; + rewardType?: string | null; + targetName?: string | null; +} +export interface UpdateAppAchievementRewardInput { + clientMutationId?: string; + id: string; + appAchievementRewardPatch: AppAchievementRewardPatch; +} +export interface DeleteAppAchievementRewardInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventAggregateInput { + clientMutationId?: string; + appEventAggregate: { + actorId?: string; + count?: number; + name: string; + periodStart?: string; + }; +} +export interface AppEventAggregatePatch { + actorId?: string | null; + count?: number | null; + name?: string | null; + periodStart?: string | null; +} +export interface UpdateAppEventAggregateInput { + clientMutationId?: string; + id: string; + appEventAggregatePatch: AppEventAggregatePatch; +} +export interface DeleteAppEventAggregateInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventInput { + clientMutationId?: string; + appEvent: { + actorId?: string; + count?: number; + name: string; + }; +} +export interface AppEventPatch { + actorId?: string | null; + count?: number | null; + name?: string | null; +} +export interface UpdateAppEventInput { + clientMutationId?: string; + id: string; + appEventPatch: AppEventPatch; +} +export interface DeleteAppEventInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppEventTypeInput { + clientMutationId?: string; + appEventType: { + aggregation?: string; + category?: string; + description?: string; + feedsLevels?: boolean; + isActive?: boolean; + name: string; + periodInterval?: IntervalInput; + }; +} +export interface AppEventTypePatch { + aggregation?: string | null; + category?: string | null; + description?: string | null; + feedsLevels?: boolean | null; + isActive?: boolean | null; + name?: string | null; + periodInterval?: IntervalInput | null; +} +export interface UpdateAppEventTypeInput { + clientMutationId?: string; + id: string; + appEventTypePatch: AppEventTypePatch; +} +export interface DeleteAppEventTypeInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelInput { + clientMutationId?: string; + appLevel: { + description?: string; + image?: ConstructiveInternalTypeImage; + name: string; + ownerId?: string; + }; +} +export interface AppLevelPatch { + description?: string | null; + image?: ConstructiveInternalTypeImage | null; + imageUpload?: File | null; + name?: string | null; + ownerId?: string | null; +} +export interface UpdateAppLevelInput { + clientMutationId?: string; + id: string; + appLevelPatch: AppLevelPatch; +} +export interface DeleteAppLevelInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelGrantInput { + clientMutationId?: string; + appLevelGrant: { + actorId?: string; + expiresAt?: string; + levelName: string; + periodStart?: string; + }; +} +export interface AppLevelGrantPatch { + actorId?: string | null; + expiresAt?: string | null; + levelName?: string | null; + periodStart?: string | null; +} +export interface UpdateAppLevelGrantInput { + clientMutationId?: string; + id: string; + appLevelGrantPatch: AppLevelGrantPatch; +} +export interface DeleteAppLevelGrantInput { + clientMutationId?: string; + id: string; +} +export interface CreateAppLevelRequirementInput { + clientMutationId?: string; + appLevelRequirement: { + description?: string; + groupKey?: string; + level: string; + metric?: string; + name: string; + priority?: number; + requiredCount?: number; + }; +} +export interface AppLevelRequirementPatch { + description?: string | null; + groupKey?: string | null; + level?: string | null; + metric?: string | null; + name?: string | null; + priority?: number | null; + requiredCount?: number | null; +} +export interface UpdateAppLevelRequirementInput { + clientMutationId?: string; + id: string; + appLevelRequirementPatch: AppLevelRequirementPatch; +} +export interface DeleteAppLevelRequirementInput { + clientMutationId?: string; + id: string; +} export interface CreateAppLimitCapInput { clientMutationId?: string; appLimitCap: { @@ -1840,6 +3531,202 @@ export interface DeleteAppLimitWarningInput { clientMutationId?: string; id: string; } +export interface CreateBillingUsageSummaryInput { + clientMutationId?: string; + billingUsageSummary: { + creditsConsumed?: string; + entityId: string; + entityType?: string; + meterSlug: string; + organizationId?: string; + overageUnits?: string; + periodEnd: string; + periodStart: string; + planLimit?: string; + quantityUsed?: string; + }; +} +export interface BillingUsageSummaryPatch { + creditsConsumed?: string | null; + entityId?: string | null; + entityType?: string | null; + meterSlug?: string | null; + organizationId?: string | null; + overageUnits?: string | null; + periodEnd?: string | null; + periodStart?: string | null; + planLimit?: string | null; + quantityUsed?: string | null; +} +export interface UpdateBillingUsageSummaryInput { + clientMutationId?: string; + id: string; + billingUsageSummaryPatch: BillingUsageSummaryPatch; +} +export interface DeleteBillingUsageSummaryInput { + clientMutationId?: string; + id: string; +} +export interface CreateLedgerInput { + clientMutationId?: string; + ledger: { + delta: string; + entityId: string; + entityType?: string; + entryType?: string; + ledgerClass?: string; + metadata?: Record; + meterSlug: string; + organizationId?: string; + usageAfter: string; + }; +} +export interface LedgerPatch { + delta?: string | null; + entityId?: string | null; + entityType?: string | null; + entryType?: string | null; + ledgerClass?: string | null; + metadata?: Record | null; + meterSlug?: string | null; + organizationId?: string | null; + usageAfter?: string | null; +} +export interface UpdateLedgerInput { + clientMutationId?: string; + id: string; + ledgerPatch: LedgerPatch; +} +export interface DeleteLedgerInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterInput { + clientMutationId?: string; + meter: { + aggregation?: string; + categoryMeter?: string; + creditCost?: number; + displayName?: string; + isActive?: boolean; + meterType?: string; + periodInterval?: IntervalInput; + rolloverCap?: string; + slug: string; + unit?: string; + }; +} +export interface MeterPatch { + aggregation?: string | null; + categoryMeter?: string | null; + creditCost?: number | null; + displayName?: string | null; + isActive?: boolean | null; + meterType?: string | null; + periodInterval?: IntervalInput | null; + rolloverCap?: string | null; + slug?: string | null; + unit?: string | null; +} +export interface UpdateMeterInput { + clientMutationId?: string; + id: string; + meterPatch: MeterPatch; +} +export interface DeleteMeterInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterCreditInput { + clientMutationId?: string; + meterCredit: { + amount: string; + creditType?: string; + entityId: string; + entityType?: string; + expiresAt?: string; + meterId: string; + organizationId?: string; + reason?: string; + }; +} +export interface MeterCreditPatch { + amount?: string | null; + creditType?: string | null; + entityId?: string | null; + entityType?: string | null; + expiresAt?: string | null; + meterId?: string | null; + organizationId?: string | null; + reason?: string | null; +} +export interface UpdateMeterCreditInput { + clientMutationId?: string; + id: string; + meterCreditPatch: MeterCreditPatch; +} +export interface DeleteMeterCreditInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterDefaultInput { + clientMutationId?: string; + meterDefault: { + categoryMeter?: string; + creditCost?: string; + defaultPlanLimit?: string; + displayName?: string; + isActive?: boolean; + meterType?: string; + slug: string; + unit?: string; + }; +} +export interface MeterDefaultPatch { + categoryMeter?: string | null; + creditCost?: string | null; + defaultPlanLimit?: string | null; + displayName?: string | null; + isActive?: boolean | null; + meterType?: string | null; + slug?: string | null; + unit?: string | null; +} +export interface UpdateMeterDefaultInput { + clientMutationId?: string; + id: string; + meterDefaultPatch: MeterDefaultPatch; +} +export interface DeleteMeterDefaultInput { + clientMutationId?: string; + id: string; +} +export interface CreateMeterSourceInput { + clientMutationId?: string; + meterSource: { + aggregationType?: string; + dimensionPath: string; + isActive?: boolean; + meterSlug: string; + sourceMetric: string; + }; +} +export interface MeterSourcePatch { + aggregationType?: string | null; + dimensionPath?: string | null; + isActive?: boolean | null; + meterSlug?: string | null; + sourceMetric?: string | null; +} +export interface UpdateMeterSourceInput { + clientMutationId?: string; + id: string; + meterSourcePatch: MeterSourcePatch; +} +export interface DeleteMeterSourceInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgLimitAggregateInput { clientMutationId?: string; orgLimitAggregate: { @@ -2084,6 +3971,178 @@ export interface DeleteOrgLimitWarningInput { clientMutationId?: string; id: string; } +export interface CreatePlanCapInput { + clientMutationId?: string; + planCap: { + capName: string; + capValue?: string; + planId: string; + }; +} +export interface PlanCapPatch { + capName?: string | null; + capValue?: string | null; + planId?: string | null; +} +export interface UpdatePlanCapInput { + clientMutationId?: string; + id: string; + planCapPatch: PlanCapPatch; +} +export interface DeletePlanCapInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanInput { + clientMutationId?: string; + plan: { + description?: string; + isActive?: boolean; + name: string; + }; +} +export interface PlanPatch { + description?: string | null; + isActive?: boolean | null; + name?: string | null; +} +export interface UpdatePlanInput { + clientMutationId?: string; + id: string; + planPatch: PlanPatch; +} +export interface DeletePlanInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanLimitInput { + clientMutationId?: string; + planLimit: { + limitName: string; + maxValue: string; + planId: string; + }; +} +export interface PlanLimitPatch { + limitName?: string | null; + maxValue?: string | null; + planId?: string | null; +} +export interface UpdatePlanLimitInput { + clientMutationId?: string; + id: string; + planLimitPatch: PlanLimitPatch; +} +export interface DeletePlanLimitInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanMeterLimitInput { + clientMutationId?: string; + planMeterLimit: { + meterSlug: string; + planId: string; + planLimit: string; + }; +} +export interface PlanMeterLimitPatch { + meterSlug?: string | null; + planId?: string | null; + planLimit?: string | null; +} +export interface UpdatePlanMeterLimitInput { + clientMutationId?: string; + id: string; + planMeterLimitPatch: PlanMeterLimitPatch; +} +export interface DeletePlanMeterLimitInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanOverrideInput { + clientMutationId?: string; + planOverride: { + entityId: string; + expiresAt?: string; + limitName: string; + maxValue: string; + reason?: string; + }; +} +export interface PlanOverridePatch { + entityId?: string | null; + expiresAt?: string | null; + limitName?: string | null; + maxValue?: string | null; + reason?: string | null; +} +export interface UpdatePlanOverrideInput { + clientMutationId?: string; + id: string; + planOverridePatch: PlanOverridePatch; +} +export interface DeletePlanOverrideInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanPricingInput { + clientMutationId?: string; + planPricing: { + billingInterval: string; + currency?: string; + discountPercent?: string; + isActive?: boolean; + planId: string; + price: string; + }; +} +export interface PlanPricingPatch { + billingInterval?: string | null; + currency?: string | null; + discountPercent?: string | null; + isActive?: boolean | null; + planId?: string | null; + price?: string | null; +} +export interface UpdatePlanPricingInput { + clientMutationId?: string; + id: string; + planPricingPatch: PlanPricingPatch; +} +export interface DeletePlanPricingInput { + clientMutationId?: string; + id: string; +} +export interface CreatePlanSubscriptionInput { + clientMutationId?: string; + planSubscription: { + endsAt?: string; + entityId: string; + entityType?: string; + isActive?: boolean; + organizationId?: string; + planId: string; + startsAt?: string; + }; +} +export interface PlanSubscriptionPatch { + endsAt?: string | null; + entityId?: string | null; + entityType?: string | null; + isActive?: boolean | null; + organizationId?: string | null; + planId?: string | null; + startsAt?: string | null; +} +export interface UpdatePlanSubscriptionInput { + clientMutationId?: string; + id: string; + planSubscriptionPatch: PlanSubscriptionPatch; +} +export interface DeletePlanSubscriptionInput { + clientMutationId?: string; + id: string; +} // ============ Connection Fields Map ============ export const connectionFieldsMap = { AppLimitCreditCode: { @@ -2094,11 +4153,26 @@ export const connectionFieldsMap = { appLimitCreditCodeItemsByDefaultLimitId: 'AppLimitCreditCodeItem', appLimitCreditsByDefaultLimitId: 'AppLimitCredit', }, + Meter: { + meterCredits: 'MeterCredit', + }, OrgLimitDefault: { orgLimitCreditsByDefaultLimitId: 'OrgLimitCredit', }, + Plan: { + planCaps: 'PlanCap', + planLimits: 'PlanLimit', + planMeterLimits: 'PlanMeterLimit', + planPricings: 'PlanPricing', + planSubscriptions: 'PlanSubscription', + }, } as Record>; // ============ Custom Input Types (from schema) ============ +export interface GrantAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -2108,6 +4182,15 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface RecomputeCapabilitiesInput { + actorId?: string; + clientMutationId?: string; +} +export interface RevokeAchievementInput { + actorId?: string; + clientMutationId?: string; + levelName?: string; +} export interface SeedAppLimitCapsDefaultsInput { clientMutationId?: string; defaults?: Record; @@ -2116,6 +4199,10 @@ export interface SeedAppLimitDefaultsInput { clientMutationId?: string; defaults?: Record; } +export interface SeedMeterDefaultsInput { + clientMutationId?: string; + defaults?: Record; +} export interface SeedOrgLimitCapsDefaultsInput { clientMutationId?: string; defaults?: Record; @@ -2124,6 +4211,15 @@ export interface SeedOrgLimitDefaultsInput { clientMutationId?: string; defaults?: Record; } +export interface SeedPlanInput { + clientMutationId?: string; + planConfig?: Record; + planName?: string; +} +export interface SeedTrustLadderInput { + clientMutationId?: string; + ladder?: Record; +} /** A filter to be used against Interval fields. All fields are combined with a logical ‘and.’ */ export interface IntervalFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -2149,6 +4245,41 @@ export interface IntervalFilter { /** Not included in the specified list. */ notIn?: IntervalInput[]; } +/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ +export interface ConstructiveInternalTypeImageFilter { + /** Contained by the specified JSON. */ + containedBy?: ConstructiveInternalTypeImage; + /** Contains the specified JSON. */ + contains?: ConstructiveInternalTypeImage; + /** Contains all of the specified keys. */ + containsAllKeys?: string[]; + /** Contains any of the specified keys. */ + containsAnyKeys?: string[]; + /** Contains the specified key. */ + containsKey?: string; + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: ConstructiveInternalTypeImage; + /** Equal to the specified value. */ + equalTo?: ConstructiveInternalTypeImage; + /** Greater than the specified value. */ + greaterThan?: ConstructiveInternalTypeImage; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Included in the specified list. */ + in?: ConstructiveInternalTypeImage[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: ConstructiveInternalTypeImage; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: ConstructiveInternalTypeImage; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: ConstructiveInternalTypeImage; + /** Not equal to the specified value. */ + notEqualTo?: ConstructiveInternalTypeImage; + /** Not included in the specified list. */ + notIn?: ConstructiveInternalTypeImage[]; +} /** A filter to be used against many `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ */ export interface AppLimitCreditCodeToManyAppLimitCreditCodeItemFilter { /** Filters to entities where every related entity matches. */ @@ -2185,6 +4316,15 @@ export interface AppLimitDefaultToManyAppLimitCreditFilter { /** Filters to entities where at least one related entity matches. */ some?: AppLimitCreditFilter; } +/** A filter to be used against many `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterToManyMeterCreditFilter { + /** Filters to entities where every related entity matches. */ + every?: MeterCreditFilter; + /** Filters to entities where no related entity matches. */ + none?: MeterCreditFilter; + /** Filters to entities where at least one related entity matches. */ + some?: MeterCreditFilter; +} /** A filter to be used against many `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitDefaultToManyOrgLimitCreditFilter { /** Filters to entities where every related entity matches. */ @@ -2194,6 +4334,179 @@ export interface OrgLimitDefaultToManyOrgLimitCreditFilter { /** Filters to entities where at least one related entity matches. */ some?: OrgLimitCreditFilter; } +/** A filter to be used against many `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanCapFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanCapFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanCapFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanCapFilter; +} +/** A filter to be used against many `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanLimitFilter; +} +/** A filter to be used against many `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanMeterLimitFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanMeterLimitFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanMeterLimitFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanMeterLimitFilter; +} +/** A filter to be used against many `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanPricingFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanPricingFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanPricingFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanPricingFilter; +} +/** A filter to be used against many `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanToManyPlanSubscriptionFilter { + /** Filters to entities where every related entity matches. */ + every?: PlanSubscriptionFilter; + /** Filters to entities where no related entity matches. */ + none?: PlanSubscriptionFilter; + /** Filters to entities where at least one related entity matches. */ + some?: PlanSubscriptionFilter; +} +/** An input for mutations affecting `AppAchievementReward` */ +export interface AppAchievementRewardInput { + /** Number of credits to grant; unused by capability rewards */ + amount?: number; + createdAt?: string; + /** Credit type: permanent, expiring, etc. */ + creditType?: string; + /** Optional duration after which the granted credit expires; NULL means never expires */ + expiresInterval?: IntervalInput; + id?: string; + /** Name of the level this reward is granted for */ + levelName: string; + /** Type of reward: limit_credit, meter_credit, or capability */ + rewardType: string; + /** Target limit name, meter slug, or capability catalog name */ + targetName: string; + updatedAt?: string; +} +/** An interval of time that has passed where the smallest distinct unit is a second. */ +export interface IntervalInput { + /** A quantity of days. */ + days?: number; + /** A quantity of hours. */ + hours?: number; + /** A quantity of minutes. */ + minutes?: number; + /** A quantity of months. */ + months?: number; + /** + * A quantity of seconds. This is the only non-integer field, as all the other + * fields will dump their overflow into a smaller unit of time. Intervals don’t + * have a smaller unit than seconds. + */ + seconds?: number; + /** A quantity of years. */ + years?: number; +} +/** An input for mutations affecting `AppEventAggregate` */ +export interface AppEventAggregateInput { + actorId?: string; + /** Cumulative count of completed steps toward this requirement */ + count?: number; + createdAt?: string; + id?: string; + /** Name identifier of the level requirement being tracked */ + name: string; + /** Start of current counting period; NULL means lifetime counting */ + periodStart?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppEvent` */ +export interface AppEventInput { + actorId?: string; + /** Number of units completed in this step action */ + count?: number; + createdAt?: string; + /** Unique identifier for each event (uuidv7 provides temporal ordering) */ + id?: string; + /** Name identifier of the level requirement this step fulfills */ + name: string; +} +/** An input for mutations affecting `AppEventType` */ +export interface AppEventTypeInput { + /** Aggregation mode: count, sum, last_value, or none */ + aggregation?: string; + /** Grouping category: onboarding, engagement, analytics, commerce, etc. */ + category?: string; + createdAt?: string; + /** Human-readable description of this event type */ + description?: string; + /** Whether this event type participates in the levels/badge system by updating aggregates */ + feedsLevels?: boolean; + id?: string; + /** Whether recording of this event type is enabled */ + isActive?: boolean; + /** Unique name identifier for this event type */ + name: string; + /** Optional period for aggregate count reset; NULL means lifetime counting */ + periodInterval?: IntervalInput; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevel` */ +export interface AppLevelInput { + createdAt?: string; + /** Human-readable description of what this level represents */ + description?: string; + id?: string; + /** Badge or icon image associated with this level */ + image?: ConstructiveInternalTypeImage; + /** Unique name of the level */ + name: string; + /** Optional owner (actor) who created or manages this level */ + ownerId?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevelGrant` */ +export interface AppLevelGrantInput { + actorId?: string; + createdAt?: string; + /** When this grant lapses; NULL means it holds until revoked */ + expiresAt?: string; + id?: string; + /** Name of the level that was achieved */ + levelName: string; + /** Period start for periodic achievements; -infinity for non-periodic (earn-once) */ + periodStart?: string; + updatedAt?: string; +} +/** An input for mutations affecting `AppLevelRequirement` */ +export interface AppLevelRequirementInput { + createdAt?: string; + /** Human-readable description of what this requirement entails */ + description?: string; + /** Requirements of a level sharing this key satisfy it as alternatives; NULL requires this one on its own */ + groupKey?: string; + id?: string; + /** Name of the level this requirement belongs to */ + level: string; + /** Computed signal to compare against required_count instead of an event count; currently only account_age_days */ + metric?: string; + /** Name identifier of the requirement (matches step names) */ + name: string; + /** Display ordering priority; lower values appear first */ + priority?: number; + /** Number of steps needed to satisfy this requirement */ + requiredCount?: number; + updatedAt?: string; +} /** An input for mutations affecting `AppLimitCap` */ export interface AppLimitCapInput { /** Entity this cap override applies to */ @@ -2229,7 +4542,7 @@ export interface AppLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2240,25 +4553,6 @@ export interface AppLimitInput { /** Start of the current metering window; NULL means no time window */ windowStart?: string; } -/** An interval of time that has passed where the smallest distinct unit is a second. */ -export interface IntervalInput { - /** A quantity of days. */ - days?: number; - /** A quantity of hours. */ - hours?: number; - /** A quantity of minutes. */ - minutes?: number; - /** A quantity of months. */ - months?: number; - /** - * A quantity of seconds. This is the only non-integer field, as all the other - * fields will dump their overflow into a smaller unit of time. Intervals don’t - * have a smaller unit than seconds. - */ - seconds?: number; - /** A quantity of years. */ - years?: number; -} /** An input for mutations affecting `AppLimitCreditCode` */ export interface AppLimitCreditCodeInput { /** Human-readable credit code (case-insensitive, unique) */ @@ -2359,6 +4653,134 @@ export interface AppLimitWarningInput { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType: string; } +/** An input for mutations affecting `BillingUsageSummary` */ +export interface BillingUsageSummaryInput { + /** Universal credits consumed during this period */ + creditsConsumed?: string; + /** The entity (org, team, user) this summary belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + id?: string; + /** Which meter this summary tracks */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Units consumed beyond the plan limit (quantity_used - plan_limit when positive) */ + overageUnits?: string; + /** End of the billing period this summary covers */ + periodEnd: string; + /** Start of the billing period this summary covers */ + periodStart: string; + /** Plan limit that was in effect during this period */ + planLimit?: string; + /** Total units consumed during this period */ + quantityUsed?: string; +} +/** An input for mutations affecting `Ledger` */ +export interface LedgerInput { + createdAt?: string; + /** Change amount (positive = grant/credit, negative = consumption/debit) */ + delta: string; + /** The entity this ledger entry belongs to */ + entityId: string; + /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */ + entityType?: string; + /** Specific type: increment, decrement, credit_purchase, plan_grant, reset, adjustment */ + entryType?: string; + /** Unique identifier for each ledger entry */ + id?: string; + /** Classification: usage, grant, adjustment, refund */ + ledgerClass?: string; + /** Additional context (reason, source, Stripe receipt, etc.) */ + metadata?: Record; + /** Which meter this entry is for */ + meterSlug: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Running total of usage after this entry */ + usageAfter: string; +} +/** An input for mutations affecting `Meter` */ +export interface MeterInput { + /** How usage is aggregated: cumulative (sum over period) or peak (max watermark) */ + aggregation?: string; + /** Slug of the category pool meter this meter belongs to. When set, usage overflow charges the category pool before falling through to universal credits. NULL means skip category pool and fall through directly to universal. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: number; + /** Human-readable name for the meter */ + displayName?: string; + id?: string; + /** Whether this meter is currently active */ + isActive?: boolean; + /** Type of meter: quota (consumable), boolean (feature flag), or usage_pool (category aggregator) */ + meterType?: string; + /** Reset cadence for this meter (e.g. 1 month, 1 year). NULL means no periodic reset. */ + periodInterval?: IntervalInput; + /** Maximum unused units that carry forward on rollover reset. NULL means unlimited rollover. */ + rolloverCap?: string; + /** Unique identifier for the meter (e.g. api_requests, storage_gb, seats) */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, characters, audio_seconds, pages, images, megapixels, bytes, requests, compute_ms, credits) */ + unit?: string; +} +/** An input for mutations affecting `MeterCredit` */ +export interface MeterCreditInput { + /** Number of credits to grant (positive to add, negative to revoke) */ + amount: string; + /** When this credit was granted */ + createdAt?: string; + /** Credit behavior: permanent (survives reset), period (zeroed on reset), or rollover (unused portion carries forward) */ + creditType?: string; + /** Entity this credit applies to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + /** When this credit expires. NULL means the credit never expires. */ + expiresAt?: string; + id?: string; + /** FK to meters — which meter definition this credit applies to */ + meterId: string; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Optional reason for the credit grant (promo code, admin grant, etc.) */ + reason?: string; +} +/** An input for mutations affecting `MeterDefault` */ +export interface MeterDefaultInput { + /** Slug of the category pool meter (usage_pool) this meter belongs to, enabling the per-task -> category -> universal waterfall for default-provisioned meters. NULL skips the category pool. */ + categoryMeter?: string; + /** Universal credits consumed per unit of this meter. NULL disables universal credit fallback. */ + creditCost?: string; + /** Default plan_limit value for new entity balances. 0 means no quota; -1 (negative) means unlimited. */ + defaultPlanLimit?: string; + /** Human-readable name for the default meter */ + displayName?: string; + id?: string; + /** Whether this default meter is actively provisioned for new entities */ + isActive?: boolean; + /** Type of meter: quota, boolean, or usage_pool */ + meterType?: string; + /** Meter slug that matches the slug in the meters table */ + slug: string; + /** Unit of measurement for this meter (e.g. tokens, requests, images, compute_ms, credits) */ + unit?: string; +} +/** An input for mutations affecting `MeterSource` */ +export interface MeterSourceInput { + /** How to aggregate the column. Built-in types: sum, sum_bytes_to_gb, peak. Custom types supported. */ + aggregationType?: string; + /** Column name in the typed usage summary table (e.g. total_reads, avg_read_time_ms, size_bytes) */ + dimensionPath: string; + id?: string; + /** Soft-delete flag. Inactive sources are skipped during reconciliation. */ + isActive?: boolean; + /** Slug of the billing meter this source feeds (matches meters.slug in the billing module) */ + meterSlug: string; + /** Source table type: table_usage (db_table_stats_usage_summary), query_time (db_query_stats_usage_summary), or row_count (trigger-based, skipped by reconcile) */ + sourceMetric: string; +} /** An input for mutations affecting `OrgLimitAggregate` */ export interface OrgLimitAggregateInput { /** Entity (org) whose aggregate usage is being tracked */ @@ -2376,7 +4798,7 @@ export interface OrgLimitAggregateInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this entity by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2425,7 +4847,7 @@ export interface OrgLimitInput { organizationId?: string; /** Temporary credits for the current billing window. Resets to 0 on window expiry. */ periodCredits?: string; - /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */ + /** Ceiling pinned for this actor by the active plan via apply_plan(). NULL means the ceiling follows the tenant default in the default-limits table, so raising a default reaches rows that already exist. Window reset does not change this value. */ planMax?: string; /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */ purchasedCredits?: string; @@ -2508,6 +4930,94 @@ export interface OrgLimitWarningInput { /** Threshold type: absolute (fixed count) or percentage (of max) */ warningType: string; } +/** An input for mutations affecting `PlanCap` */ +export interface PlanCapInput { + /** Name of the cap/feature flag this plan sets (must match a name in caps_defaults or limit_caps) */ + capName: string; + /** Cap value to set when this plan is applied. Convention: 0=disabled, 1=enabled, N=numeric cap, negative=unlimited */ + capValue?: string; + id?: string; + /** Reference to the plan this cap setting belongs to */ + planId: string; +} +/** An input for mutations affecting `Plan` */ +export interface PlanInput { + /** Human-readable description of the plan tier */ + description?: string; + id?: string; + /** Whether this plan can currently be applied to entities */ + isActive?: boolean; + /** Unique name identifier of the plan (e.g. free, pro, enterprise) */ + name: string; +} +/** An input for mutations affecting `PlanLimit` */ +export interface PlanLimitInput { + id?: string; + /** Name of the limit this plan sets (must match the name field in a limits table) */ + limitName: string; + /** Maximum value to set on the limit when this plan is applied; negative means unlimited */ + maxValue: string; + /** Reference to the plan this limit configuration belongs to */ + planId: string; +} +/** An input for mutations affecting `PlanMeterLimit` */ +export interface PlanMeterLimitInput { + id?: string; + /** Slug of the billing meter this plan sets a quota for (must match a slug in the meters table) */ + meterSlug: string; + /** Reference to the plan this meter limit belongs to */ + planId: string; + /** Billing quota to set on the balance when this plan is applied; negative means unlimited */ + planLimit: string; +} +/** An input for mutations affecting `PlanOverride` */ +export interface PlanOverrideInput { + /** Entity receiving the custom override (personal org or actual org) */ + entityId: string; + /** When this override expires; NULL means permanent */ + expiresAt?: string; + id?: string; + /** Name of the limit being overridden */ + limitName: string; + /** Override maximum value; negative means unlimited */ + maxValue: string; + /** Admin note explaining why this override was granted */ + reason?: string; +} +/** An input for mutations affecting `PlanPricing` */ +export interface PlanPricingInput { + /** Billing cycle identifier (e.g. monthly, yearly, lifetime) */ + billingInterval: string; + /** ISO 4217 currency code (lowercase) */ + currency?: string; + /** Discount percentage off the base price (0-100); NULL means no discount */ + discountPercent?: string; + id?: string; + /** Whether this pricing option is currently available */ + isActive?: boolean; + /** Reference to the plan this pricing belongs to */ + planId: string; + /** Price in smallest currency unit (e.g. cents); negative means contact-sales */ + price: string; +} +/** An input for mutations affecting `PlanSubscription` */ +export interface PlanSubscriptionInput { + /** When the subscription expires (NULL = no expiration) */ + endsAt?: string; + /** The entity (org, team, user) this subscription belongs to */ + entityId: string; + /** Membership prefix identifying the entity kind (org, team, app) */ + entityType?: string; + id?: string; + /** Whether the subscription is currently active */ + isActive?: boolean; + /** Resolved billable organization via get_organization_id */ + organizationId?: string; + /** Reference to the plan this subscription is for */ + planId: string; + /** When the subscription becomes active */ + startsAt?: string; +} /** A filter to be used against `AppLimitCreditCodeItem` object types. All fields are combined with a logical ‘and.’ */ export interface AppLimitCreditCodeItemFilter { /** Filter by the object’s `amount` field. */ @@ -2575,6 +5085,37 @@ export interface AppLimitCreditFilter { /** Filter by the object’s `reason` field. */ reason?: StringFilter; } +/** A filter to be used against `MeterCredit` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterCreditFilter { + /** Filter by the object’s `amount` field. */ + amount?: BigIntFilter; + /** Checks for all expressions in this list. */ + and?: MeterCreditFilter[]; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `creditType` field. */ + creditType?: StringFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meter` relation. */ + meter?: MeterFilter; + /** Filter by the object’s `meterId` field. */ + meterId?: UUIDFilter; + /** Negates the expression. */ + not?: MeterCreditFilter; + /** Checks for any expressions in this list. */ + or?: MeterCreditFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `reason` field. */ + reason?: StringFilter; +} /** A filter to be used against `OrgLimitCredit` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitCreditFilter { /** Filter by the object’s `actorId` field. */ @@ -2604,6 +5145,115 @@ export interface OrgLimitCreditFilter { /** Filter by the object’s `reason` field. */ reason?: StringFilter; } +/** A filter to be used against `PlanCap` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanCapFilter { + /** Checks for all expressions in this list. */ + and?: PlanCapFilter[]; + /** Filter by the object’s `capName` field. */ + capName?: StringFilter; + /** Filter by the object’s `capValue` field. */ + capValue?: BigIntFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: PlanCapFilter; + /** Checks for any expressions in this list. */ + or?: PlanCapFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** A filter to be used against `PlanLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `limitName` field. */ + limitName?: StringFilter; + /** Filter by the object’s `maxValue` field. */ + maxValue?: BigIntFilter; + /** Negates the expression. */ + not?: PlanLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; +} +/** A filter to be used against `PlanMeterLimit` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanMeterLimitFilter { + /** Checks for all expressions in this list. */ + and?: PlanMeterLimitFilter[]; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `meterSlug` field. */ + meterSlug?: StringFilter; + /** Negates the expression. */ + not?: PlanMeterLimitFilter; + /** Checks for any expressions in this list. */ + or?: PlanMeterLimitFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `planLimit` field. */ + planLimit?: BigIntFilter; +} +/** A filter to be used against `PlanPricing` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanPricingFilter { + /** Checks for all expressions in this list. */ + and?: PlanPricingFilter[]; + /** Filter by the object’s `billingInterval` field. */ + billingInterval?: StringFilter; + /** Filter by the object’s `currency` field. */ + currency?: StringFilter; + /** Filter by the object’s `discountPercent` field. */ + discountPercent?: BigFloatFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanPricingFilter; + /** Checks for any expressions in this list. */ + or?: PlanPricingFilter[]; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `price` field. */ + price?: BigIntFilter; +} +/** A filter to be used against `PlanSubscription` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanSubscriptionFilter { + /** Checks for all expressions in this list. */ + and?: PlanSubscriptionFilter[]; + /** Filter by the object’s `endsAt` field. */ + endsAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `entityType` field. */ + entityType?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Negates the expression. */ + not?: PlanSubscriptionFilter; + /** Checks for any expressions in this list. */ + or?: PlanSubscriptionFilter[]; + /** Filter by the object’s `organizationId` field. */ + organizationId?: UUIDFilter; + /** Filter by the object’s `plan` relation. */ + plan?: PlanFilter; + /** Filter by the object’s `planId` field. */ + planId?: UUIDFilter; + /** Filter by the object’s `startsAt` field. */ + startsAt?: DatetimeFilter; +} /** A filter to be used against BigInt fields. All fields are combined with a logical ‘and.’ */ export interface BigIntFilter { /** Not equal to the specified value, treating null like an ordinary value. */ @@ -2783,6 +5433,66 @@ export interface AppLimitDefaultFilter { /** Filter by the object’s `softMax` field. */ softMax?: BigIntFilter; } +/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ +export interface DatetimeFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: string; + /** Equal to the specified value. */ + equalTo?: string; + /** Greater than the specified value. */ + greaterThan?: string; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: string; + /** Included in the specified list. */ + in?: string[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: string; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: string; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: string; + /** Not equal to the specified value. */ + notEqualTo?: string; + /** Not included in the specified list. */ + notIn?: string[]; +} +/** A filter to be used against `Meter` object types. All fields are combined with a logical ‘and.’ */ +export interface MeterFilter { + /** Filter by the object’s `aggregation` field. */ + aggregation?: StringFilter; + /** Checks for all expressions in this list. */ + and?: MeterFilter[]; + /** Filter by the object’s `categoryMeter` field. */ + categoryMeter?: StringFilter; + /** Filter by the object’s `creditCost` field. */ + creditCost?: IntFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `meterCredits` relation. */ + meterCredits?: MeterToManyMeterCreditFilter; + /** `meterCredits` exist. */ + meterCreditsExist?: boolean; + /** Filter by the object’s `meterType` field. */ + meterType?: StringFilter; + /** Negates the expression. */ + not?: MeterFilter; + /** Checks for any expressions in this list. */ + or?: MeterFilter[]; + /** Filter by the object’s `periodInterval` field. */ + periodInterval?: IntervalFilter; + /** Filter by the object’s `rolloverCap` field. */ + rolloverCap?: BigIntFilter; + /** Filter by the object’s `slug` field. */ + slug?: StringFilter; + /** Filter by the object’s `unit` field. */ + unit?: StringFilter; +} /** A filter to be used against `OrgLimitDefault` object types. All fields are combined with a logical ‘and.’ */ export interface OrgLimitDefaultFilter { /** Checks for all expressions in this list. */ @@ -2804,57 +5514,144 @@ export interface OrgLimitDefaultFilter { /** Filter by the object’s `softMax` field. */ softMax?: BigIntFilter; } -/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ -export interface IntFilter { +/** A filter to be used against `Plan` object types. All fields are combined with a logical ‘and.’ */ +export interface PlanFilter { + /** Checks for all expressions in this list. */ + and?: PlanFilter[]; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlanFilter; + /** Checks for any expressions in this list. */ + or?: PlanFilter[]; + /** Filter by the object’s `planCaps` relation. */ + planCaps?: PlanToManyPlanCapFilter; + /** `planCaps` exist. */ + planCapsExist?: boolean; + /** Filter by the object’s `planLimits` relation. */ + planLimits?: PlanToManyPlanLimitFilter; + /** `planLimits` exist. */ + planLimitsExist?: boolean; + /** Filter by the object’s `planMeterLimits` relation. */ + planMeterLimits?: PlanToManyPlanMeterLimitFilter; + /** `planMeterLimits` exist. */ + planMeterLimitsExist?: boolean; + /** Filter by the object’s `planPricings` relation. */ + planPricings?: PlanToManyPlanPricingFilter; + /** `planPricings` exist. */ + planPricingsExist?: boolean; + /** Filter by the object’s `planSubscriptions` relation. */ + planSubscriptions?: PlanToManyPlanSubscriptionFilter; + /** `planSubscriptions` exist. */ + planSubscriptionsExist?: boolean; +} +/** A filter to be used against BigFloat fields. All fields are combined with a logical ‘and.’ */ +export interface BigFloatFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: number; + distinctFrom?: string; /** Equal to the specified value. */ - equalTo?: number; + equalTo?: string; /** Greater than the specified value. */ - greaterThan?: number; + greaterThan?: string; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: number; + greaterThanOrEqualTo?: string; /** Included in the specified list. */ - in?: number[]; + in?: string[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: number; + lessThan?: string; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: number; + lessThanOrEqualTo?: string; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: number; + notDistinctFrom?: string; /** Not equal to the specified value. */ - notEqualTo?: number; + notEqualTo?: string; /** Not included in the specified list. */ - notIn?: number[]; + notIn?: string[]; } -/** A filter to be used against Datetime fields. All fields are combined with a logical ‘and.’ */ -export interface DatetimeFilter { +/** A filter to be used against Boolean fields. All fields are combined with a logical ‘and.’ */ +export interface BooleanFilter { /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: string; + distinctFrom?: boolean; /** Equal to the specified value. */ - equalTo?: string; + equalTo?: boolean; /** Greater than the specified value. */ - greaterThan?: string; + greaterThan?: boolean; /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: string; + greaterThanOrEqualTo?: boolean; /** Included in the specified list. */ - in?: string[]; + in?: boolean[]; /** Is null (if `true` is specified) or is not null (if `false` is specified). */ isNull?: boolean; /** Less than the specified value. */ - lessThan?: string; + lessThan?: boolean; /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: string; + lessThanOrEqualTo?: boolean; /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: string; + notDistinctFrom?: boolean; /** Not equal to the specified value. */ - notEqualTo?: string; + notEqualTo?: boolean; /** Not included in the specified list. */ - notIn?: string[]; + notIn?: boolean[]; +} +/** A filter to be used against Int fields. All fields are combined with a logical ‘and.’ */ +export interface IntFilter { + /** Not equal to the specified value, treating null like an ordinary value. */ + distinctFrom?: number; + /** Equal to the specified value. */ + equalTo?: number; + /** Greater than the specified value. */ + greaterThan?: number; + /** Greater than or equal to the specified value. */ + greaterThanOrEqualTo?: number; + /** Included in the specified list. */ + in?: number[]; + /** Is null (if `true` is specified) or is not null (if `false` is specified). */ + isNull?: boolean; + /** Less than the specified value. */ + lessThan?: number; + /** Less than or equal to the specified value. */ + lessThanOrEqualTo?: number; + /** Equal to the specified value, treating null like an ordinary value. */ + notDistinctFrom?: number; + /** Not equal to the specified value. */ + notEqualTo?: number; + /** Not included in the specified list. */ + notIn?: number[]; } +/** A connection to a list of `AppLevelRequirement` values. */ // ============ Payload/Return Types (for custom operations) ============ +export interface AppLevelRequirementConnection { + edges: AppLevelRequirementEdge[]; + nodes: AppLevelRequirement[]; + pageInfo: PageInfo; + totalCount: number; +} +export type AppLevelRequirementConnectionSelect = { + edges?: { + select: AppLevelRequirementEdgeSelect; + }; + nodes?: { + select: AppLevelRequirementSelect; + }; + pageInfo?: { + select: PageInfoSelect; + }; + totalCount?: boolean; +}; +export interface GrantAchievementPayload { + clientMutationId?: string | null; +} +export type GrantAchievementPayloadSelect = { + clientMutationId?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -2877,6 +5674,18 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface RecomputeCapabilitiesPayload { + clientMutationId?: string | null; +} +export type RecomputeCapabilitiesPayloadSelect = { + clientMutationId?: boolean; +}; +export interface RevokeAchievementPayload { + clientMutationId?: string | null; +} +export type RevokeAchievementPayloadSelect = { + clientMutationId?: boolean; +}; export interface SeedAppLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2893,6 +5702,14 @@ export type SeedAppLimitDefaultsPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SeedMeterDefaultsPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SeedMeterDefaultsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface SeedOrgLimitCapsDefaultsPayload { clientMutationId?: string | null; result?: boolean | null; @@ -2909,6 +5726,337 @@ export type SeedOrgLimitDefaultsPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SeedPlanPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type SeedPlanPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface SeedTrustLadderPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type SeedTrustLadderPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface CreateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was created by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type CreateAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppAchievementRewardPayload { + /** The `AppAchievementReward` that was updated by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppAchievementRewardPayload { + /** The `AppAchievementReward` that was deleted by this mutation. */ + appAchievementReward?: AppAchievementReward | null; + appAchievementRewardEdge?: AppAchievementRewardEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppAchievementRewardPayloadSelect = { + appAchievementReward?: { + select: AppAchievementRewardSelect; + }; + appAchievementRewardEdge?: { + select: AppAchievementRewardEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventAggregatePayload { + /** The `AppEventAggregate` that was created by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventAggregatePayload { + /** The `AppEventAggregate` that was updated by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventAggregatePayload { + /** The `AppEventAggregate` that was deleted by this mutation. */ + appEventAggregate?: AppEventAggregate | null; + appEventAggregateEdge?: AppEventAggregateEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventAggregatePayloadSelect = { + appEventAggregate?: { + select: AppEventAggregateSelect; + }; + appEventAggregateEdge?: { + select: AppEventAggregateEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventPayload { + /** The `AppEvent` that was created by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventPayload { + /** The `AppEvent` that was updated by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventPayload { + /** The `AppEvent` that was deleted by this mutation. */ + appEvent?: AppEvent | null; + appEventEdge?: AppEventEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventPayloadSelect = { + appEvent?: { + select: AppEventSelect; + }; + appEventEdge?: { + select: AppEventEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppEventTypePayload { + /** The `AppEventType` that was created by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type CreateAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppEventTypePayload { + /** The `AppEventType` that was updated by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppEventTypePayload { + /** The `AppEventType` that was deleted by this mutation. */ + appEventType?: AppEventType | null; + appEventTypeEdge?: AppEventTypeEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppEventTypePayloadSelect = { + appEventType?: { + select: AppEventTypeSelect; + }; + appEventTypeEdge?: { + select: AppEventTypeEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelPayload { + /** The `AppLevel` that was created by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelPayload { + /** The `AppLevel` that was updated by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelPayload { + /** The `AppLevel` that was deleted by this mutation. */ + appLevel?: AppLevel | null; + appLevelEdge?: AppLevelEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelPayloadSelect = { + appLevel?: { + select: AppLevelSelect; + }; + appLevelEdge?: { + select: AppLevelEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelGrantPayload { + /** The `AppLevelGrant` that was created by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelGrantPayload { + /** The `AppLevelGrant` that was updated by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelGrantPayload { + /** The `AppLevelGrant` that was deleted by this mutation. */ + appLevelGrant?: AppLevelGrant | null; + appLevelGrantEdge?: AppLevelGrantEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelGrantPayloadSelect = { + appLevelGrant?: { + select: AppLevelGrantSelect; + }; + appLevelGrantEdge?: { + select: AppLevelGrantEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was created by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type CreateAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was updated by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type UpdateAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteAppLevelRequirementPayload { + /** The `AppLevelRequirement` that was deleted by this mutation. */ + appLevelRequirement?: AppLevelRequirement | null; + appLevelRequirementEdge?: AppLevelRequirementEdge | null; + clientMutationId?: string | null; +} +export type DeleteAppLevelRequirementPayloadSelect = { + appLevelRequirement?: { + select: AppLevelRequirementSelect; + }; + appLevelRequirementEdge?: { + select: AppLevelRequirementEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateAppLimitCapPayload { /** The `AppLimitCap` that was created by this mutation. */ appLimitCap?: AppLimitCap | null; @@ -3354,10 +6502,280 @@ export type DeleteAppLimitWarningPayloadSelect = { appLimitWarning?: { select: AppLimitWarningSelect; }; - appLimitWarningEdge?: { - select: AppLimitWarningEdgeSelect; + appLimitWarningEdge?: { + select: AppLimitWarningEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was created by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type CreateBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was updated by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type UpdateBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteBillingUsageSummaryPayload { + /** The `BillingUsageSummary` that was deleted by this mutation. */ + billingUsageSummary?: BillingUsageSummary | null; + billingUsageSummaryEdge?: BillingUsageSummaryEdge | null; + clientMutationId?: string | null; +} +export type DeleteBillingUsageSummaryPayloadSelect = { + billingUsageSummary?: { + select: BillingUsageSummarySelect; + }; + billingUsageSummaryEdge?: { + select: BillingUsageSummaryEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface CreateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was created by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type CreateLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface UpdateLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was updated by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type UpdateLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface DeleteLedgerPayload { + clientMutationId?: string | null; + /** The `Ledger` that was deleted by this mutation. */ + ledger?: Ledger | null; + ledgerEdge?: LedgerEdge | null; +} +export type DeleteLedgerPayloadSelect = { + clientMutationId?: boolean; + ledger?: { + select: LedgerSelect; + }; + ledgerEdge?: { + select: LedgerEdgeSelect; + }; +}; +export interface CreateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was created by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type CreateMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface UpdateMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was updated by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type UpdateMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface DeleteMeterPayload { + clientMutationId?: string | null; + /** The `Meter` that was deleted by this mutation. */ + meter?: Meter | null; + meterEdge?: MeterEdge | null; +} +export type DeleteMeterPayloadSelect = { + clientMutationId?: boolean; + meter?: { + select: MeterSelect; + }; + meterEdge?: { + select: MeterEdgeSelect; + }; +}; +export interface CreateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was created by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type CreateMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface UpdateMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was updated by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type UpdateMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface DeleteMeterCreditPayload { + clientMutationId?: string | null; + /** The `MeterCredit` that was deleted by this mutation. */ + meterCredit?: MeterCredit | null; + meterCreditEdge?: MeterCreditEdge | null; +} +export type DeleteMeterCreditPayloadSelect = { + clientMutationId?: boolean; + meterCredit?: { + select: MeterCreditSelect; + }; + meterCreditEdge?: { + select: MeterCreditEdgeSelect; + }; +}; +export interface CreateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was created by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type CreateMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface UpdateMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was updated by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type UpdateMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface DeleteMeterDefaultPayload { + clientMutationId?: string | null; + /** The `MeterDefault` that was deleted by this mutation. */ + meterDefault?: MeterDefault | null; + meterDefaultEdge?: MeterDefaultEdge | null; +} +export type DeleteMeterDefaultPayloadSelect = { + clientMutationId?: boolean; + meterDefault?: { + select: MeterDefaultSelect; + }; + meterDefaultEdge?: { + select: MeterDefaultEdgeSelect; + }; +}; +export interface CreateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was created by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type CreateMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; + }; +}; +export interface UpdateMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was updated by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type UpdateMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; + }; +}; +export interface DeleteMeterSourcePayload { + clientMutationId?: string | null; + /** The `MeterSource` that was deleted by this mutation. */ + meterSource?: MeterSource | null; + meterSourceEdge?: MeterSourceEdge | null; +} +export type DeleteMeterSourcePayloadSelect = { + clientMutationId?: boolean; + meterSource?: { + select: MeterSourceSelect; + }; + meterSourceEdge?: { + select: MeterSourceEdgeSelect; }; - clientMutationId?: boolean; }; export interface CreateOrgLimitAggregatePayload { clientMutationId?: string | null; @@ -3719,6 +7137,422 @@ export type DeleteOrgLimitWarningPayloadSelect = { select: OrgLimitWarningEdgeSelect; }; }; +export interface CreatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was created by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type CreatePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface UpdatePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was updated by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type UpdatePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface DeletePlanCapPayload { + clientMutationId?: string | null; + /** The `PlanCap` that was deleted by this mutation. */ + planCap?: PlanCap | null; + planCapEdge?: PlanCapEdge | null; +} +export type DeletePlanCapPayloadSelect = { + clientMutationId?: boolean; + planCap?: { + select: PlanCapSelect; + }; + planCapEdge?: { + select: PlanCapEdgeSelect; + }; +}; +export interface CreatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was created by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type CreatePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface UpdatePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was updated by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type UpdatePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface DeletePlanPayload { + clientMutationId?: string | null; + /** The `Plan` that was deleted by this mutation. */ + plan?: Plan | null; + planEdge?: PlanEdge | null; +} +export type DeletePlanPayloadSelect = { + clientMutationId?: boolean; + plan?: { + select: PlanSelect; + }; + planEdge?: { + select: PlanEdgeSelect; + }; +}; +export interface CreatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was created by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type CreatePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface UpdatePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was updated by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type UpdatePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface DeletePlanLimitPayload { + clientMutationId?: string | null; + /** The `PlanLimit` that was deleted by this mutation. */ + planLimit?: PlanLimit | null; + planLimitEdge?: PlanLimitEdge | null; +} +export type DeletePlanLimitPayloadSelect = { + clientMutationId?: boolean; + planLimit?: { + select: PlanLimitSelect; + }; + planLimitEdge?: { + select: PlanLimitEdgeSelect; + }; +}; +export interface CreatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was created by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type CreatePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface UpdatePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was updated by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type UpdatePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface DeletePlanMeterLimitPayload { + clientMutationId?: string | null; + /** The `PlanMeterLimit` that was deleted by this mutation. */ + planMeterLimit?: PlanMeterLimit | null; + planMeterLimitEdge?: PlanMeterLimitEdge | null; +} +export type DeletePlanMeterLimitPayloadSelect = { + clientMutationId?: boolean; + planMeterLimit?: { + select: PlanMeterLimitSelect; + }; + planMeterLimitEdge?: { + select: PlanMeterLimitEdgeSelect; + }; +}; +export interface CreatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was created by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type CreatePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface UpdatePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was updated by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type UpdatePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface DeletePlanOverridePayload { + clientMutationId?: string | null; + /** The `PlanOverride` that was deleted by this mutation. */ + planOverride?: PlanOverride | null; + planOverrideEdge?: PlanOverrideEdge | null; +} +export type DeletePlanOverridePayloadSelect = { + clientMutationId?: boolean; + planOverride?: { + select: PlanOverrideSelect; + }; + planOverrideEdge?: { + select: PlanOverrideEdgeSelect; + }; +}; +export interface CreatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was created by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type CreatePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface UpdatePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was updated by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type UpdatePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface DeletePlanPricingPayload { + clientMutationId?: string | null; + /** The `PlanPricing` that was deleted by this mutation. */ + planPricing?: PlanPricing | null; + planPricingEdge?: PlanPricingEdge | null; +} +export type DeletePlanPricingPayloadSelect = { + clientMutationId?: boolean; + planPricing?: { + select: PlanPricingSelect; + }; + planPricingEdge?: { + select: PlanPricingEdgeSelect; + }; +}; +export interface CreatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was created by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type CreatePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +export interface UpdatePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was updated by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type UpdatePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +export interface DeletePlanSubscriptionPayload { + clientMutationId?: string | null; + /** The `PlanSubscription` that was deleted by this mutation. */ + planSubscription?: PlanSubscription | null; + planSubscriptionEdge?: PlanSubscriptionEdge | null; +} +export type DeletePlanSubscriptionPayloadSelect = { + clientMutationId?: boolean; + planSubscription?: { + select: PlanSubscriptionSelect; + }; + planSubscriptionEdge?: { + select: PlanSubscriptionEdgeSelect; + }; +}; +/** A `AppLevelRequirement` edge in the connection. */ +export interface AppLevelRequirementEdge { + cursor?: string | null; + /** The `AppLevelRequirement` at the end of the edge. */ + node?: AppLevelRequirement | null; +} +export type AppLevelRequirementEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelRequirementSelect; + }; +}; +/** Information about pagination in a connection. */ +export interface PageInfo { + /** When paginating forwards, the cursor to continue. */ + endCursor?: string | null; + /** When paginating forwards, are there more items? */ + hasNextPage: boolean; + /** When paginating backwards, are there more items? */ + hasPreviousPage: boolean; + /** When paginating backwards, the cursor to continue. */ + startCursor?: string | null; +} +export type PageInfoSelect = { + endCursor?: boolean; + hasNextPage?: boolean; + hasPreviousPage?: boolean; + startCursor?: boolean; +}; +/** A `AppAchievementReward` edge in the connection. */ +export interface AppAchievementRewardEdge { + cursor?: string | null; + /** The `AppAchievementReward` at the end of the edge. */ + node?: AppAchievementReward | null; +} +export type AppAchievementRewardEdgeSelect = { + cursor?: boolean; + node?: { + select: AppAchievementRewardSelect; + }; +}; +/** A `AppEventAggregate` edge in the connection. */ +export interface AppEventAggregateEdge { + cursor?: string | null; + /** The `AppEventAggregate` at the end of the edge. */ + node?: AppEventAggregate | null; +} +export type AppEventAggregateEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventAggregateSelect; + }; +}; +/** A `AppEvent` edge in the connection. */ +export interface AppEventEdge { + cursor?: string | null; + /** The `AppEvent` at the end of the edge. */ + node?: AppEvent | null; +} +export type AppEventEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventSelect; + }; +}; +/** A `AppEventType` edge in the connection. */ +export interface AppEventTypeEdge { + cursor?: string | null; + /** The `AppEventType` at the end of the edge. */ + node?: AppEventType | null; +} +export type AppEventTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: AppEventTypeSelect; + }; +}; +/** A `AppLevel` edge in the connection. */ +export interface AppLevelEdge { + cursor?: string | null; + /** The `AppLevel` at the end of the edge. */ + node?: AppLevel | null; +} +export type AppLevelEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelSelect; + }; +}; +/** A `AppLevelGrant` edge in the connection. */ +export interface AppLevelGrantEdge { + cursor?: string | null; + /** The `AppLevelGrant` at the end of the edge. */ + node?: AppLevelGrant | null; +} +export type AppLevelGrantEdgeSelect = { + cursor?: boolean; + node?: { + select: AppLevelGrantSelect; + }; +}; /** A `AppLimitCap` edge in the connection. */ export interface AppLimitCapEdge { cursor?: string | null; @@ -3839,6 +7673,78 @@ export type AppLimitWarningEdgeSelect = { select: AppLimitWarningSelect; }; }; +/** A `BillingUsageSummary` edge in the connection. */ +export interface BillingUsageSummaryEdge { + cursor?: string | null; + /** The `BillingUsageSummary` at the end of the edge. */ + node?: BillingUsageSummary | null; +} +export type BillingUsageSummaryEdgeSelect = { + cursor?: boolean; + node?: { + select: BillingUsageSummarySelect; + }; +}; +/** A `Ledger` edge in the connection. */ +export interface LedgerEdge { + cursor?: string | null; + /** The `Ledger` at the end of the edge. */ + node?: Ledger | null; +} +export type LedgerEdgeSelect = { + cursor?: boolean; + node?: { + select: LedgerSelect; + }; +}; +/** A `Meter` edge in the connection. */ +export interface MeterEdge { + cursor?: string | null; + /** The `Meter` at the end of the edge. */ + node?: Meter | null; +} +export type MeterEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterSelect; + }; +}; +/** A `MeterCredit` edge in the connection. */ +export interface MeterCreditEdge { + cursor?: string | null; + /** The `MeterCredit` at the end of the edge. */ + node?: MeterCredit | null; +} +export type MeterCreditEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterCreditSelect; + }; +}; +/** A `MeterDefault` edge in the connection. */ +export interface MeterDefaultEdge { + cursor?: string | null; + /** The `MeterDefault` at the end of the edge. */ + node?: MeterDefault | null; +} +export type MeterDefaultEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterDefaultSelect; + }; +}; +/** A `MeterSource` edge in the connection. */ +export interface MeterSourceEdge { + cursor?: string | null; + /** The `MeterSource` at the end of the edge. */ + node?: MeterSource | null; +} +export type MeterSourceEdgeSelect = { + cursor?: boolean; + node?: { + select: MeterSourceSelect; + }; +}; /** A `OrgLimitAggregate` edge in the connection. */ export interface OrgLimitAggregateEdge { cursor?: string | null; @@ -3935,3 +7841,87 @@ export type OrgLimitWarningEdgeSelect = { select: OrgLimitWarningSelect; }; }; +/** A `PlanCap` edge in the connection. */ +export interface PlanCapEdge { + cursor?: string | null; + /** The `PlanCap` at the end of the edge. */ + node?: PlanCap | null; +} +export type PlanCapEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanCapSelect; + }; +}; +/** A `Plan` edge in the connection. */ +export interface PlanEdge { + cursor?: string | null; + /** The `Plan` at the end of the edge. */ + node?: Plan | null; +} +export type PlanEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanSelect; + }; +}; +/** A `PlanLimit` edge in the connection. */ +export interface PlanLimitEdge { + cursor?: string | null; + /** The `PlanLimit` at the end of the edge. */ + node?: PlanLimit | null; +} +export type PlanLimitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanLimitSelect; + }; +}; +/** A `PlanMeterLimit` edge in the connection. */ +export interface PlanMeterLimitEdge { + cursor?: string | null; + /** The `PlanMeterLimit` at the end of the edge. */ + node?: PlanMeterLimit | null; +} +export type PlanMeterLimitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanMeterLimitSelect; + }; +}; +/** A `PlanOverride` edge in the connection. */ +export interface PlanOverrideEdge { + cursor?: string | null; + /** The `PlanOverride` at the end of the edge. */ + node?: PlanOverride | null; +} +export type PlanOverrideEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanOverrideSelect; + }; +}; +/** A `PlanPricing` edge in the connection. */ +export interface PlanPricingEdge { + cursor?: string | null; + /** The `PlanPricing` at the end of the edge. */ + node?: PlanPricing | null; +} +export type PlanPricingEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanPricingSelect; + }; +}; +/** A `PlanSubscription` edge in the connection. */ +export interface PlanSubscriptionEdge { + cursor?: string | null; + /** The `PlanSubscription` at the end of the edge. */ + node?: PlanSubscription | null; +} +export type PlanSubscriptionEdgeSelect = { + cursor?: boolean; + node?: { + select: PlanSubscriptionSelect; + }; +}; diff --git a/sdk/constructive-sdk/src/usage/orm/models/appAchievementReward.ts b/sdk/constructive-sdk/src/usage/orm/models/appAchievementReward.ts new file mode 100644 index 0000000000..cdbccdd6b0 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appAchievementReward.ts @@ -0,0 +1,247 @@ +/** + * AppAchievementReward 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 { + AppAchievementReward, + AppAchievementRewardWithRelations, + AppAchievementRewardSelect, + AppAchievementRewardFilter, + AppAchievementRewardOrderBy, + CreateAppAchievementRewardInput, + UpdateAppAchievementRewardInput, + AppAchievementRewardPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppAchievementRewardModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementRewards: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'AppAchievementReward', + 'appAchievementRewards', + 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, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementRewards', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementReward: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppAchievementReward', + 'appAchievementRewards', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementReward', + document, + variables, + transform: (data: { + appAchievementRewards?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievementReward: data.appAchievementRewards?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appAchievementReward: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppAchievementReward', + 'appAchievementRewards', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppAchievementRewardFilter', + 'AppAchievementRewardOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppAchievementReward', + fieldName: 'appAchievementReward', + document, + variables, + transform: (data: { + appAchievementRewards?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievementReward: data.appAchievementRewards?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppAchievementReward', + 'createAppAchievementReward', + 'appAchievementReward', + args.select, + args.data, + 'CreateAppAchievementRewardInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'createAppAchievementReward', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppAchievementRewardPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppAchievementReward', + 'updateAppAchievementReward', + 'appAchievementReward', + args.select, + args.where.id, + args.data, + 'UpdateAppAchievementRewardInput', + 'id', + 'appAchievementRewardPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'updateAppAchievementReward', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppAchievementReward: { + appAchievementReward: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppAchievementReward', + 'deleteAppAchievementReward', + 'appAchievementReward', + { + id: args.where.id, + }, + 'DeleteAppAchievementRewardInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppAchievementReward', + fieldName: 'deleteAppAchievementReward', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/appEvent.ts b/sdk/constructive-sdk/src/usage/orm/models/appEvent.ts new file mode 100644 index 0000000000..b0cc9982d4 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appEvent.ts @@ -0,0 +1,250 @@ +/** + * AppEvent 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 { + AppEvent, + AppEventWithRelations, + AppEventSelect, + AppEventFilter, + AppEventOrderBy, + CreateAppEventInput, + UpdateAppEventInput, + AppEventPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvents: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEvent', + 'appEvents', + 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, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvents', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEvent', + 'appEvents', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvent', + document, + variables, + transform: (data: { + appEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEvent: data.appEvents?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEvent: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEvent', + 'appEvents', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventFilter', + 'AppEventOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEvent', + fieldName: 'appEvent', + document, + variables, + transform: (data: { + appEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEvent: data.appEvents?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEvent', + 'createAppEvent', + 'appEvent', + args.select, + args.data, + 'CreateAppEventInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'createAppEvent', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + AppEventPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEvent', + 'updateAppEvent', + 'appEvent', + args.select, + args.where.id, + args.data, + 'UpdateAppEventInput', + 'id', + 'appEventPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'updateAppEvent', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEvent: { + appEvent: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEvent', + 'deleteAppEvent', + 'appEvent', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteAppEventInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEvent', + fieldName: 'deleteAppEvent', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/appEventAggregate.ts b/sdk/constructive-sdk/src/usage/orm/models/appEventAggregate.ts new file mode 100644 index 0000000000..74985e675e --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appEventAggregate.ts @@ -0,0 +1,245 @@ +/** + * AppEventAggregate 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 { + AppEventAggregate, + AppEventAggregateWithRelations, + AppEventAggregateSelect, + AppEventAggregateFilter, + AppEventAggregateOrderBy, + CreateAppEventAggregateInput, + UpdateAppEventAggregateInput, + AppEventAggregatePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventAggregateModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregates: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventAggregate', + 'appEventAggregates', + 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, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregates', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregate: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEventAggregate', + 'appEventAggregates', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregate', + document, + variables, + transform: (data: { + appEventAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventAggregate: data.appEventAggregates?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventAggregate: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventAggregate', + 'appEventAggregates', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventAggregateFilter', + 'AppEventAggregateOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventAggregate', + fieldName: 'appEventAggregate', + document, + variables, + transform: (data: { + appEventAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventAggregate: data.appEventAggregates?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEventAggregate', + 'createAppEventAggregate', + 'appEventAggregate', + args.select, + args.data, + 'CreateAppEventAggregateInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'createAppEventAggregate', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppEventAggregatePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEventAggregate', + 'updateAppEventAggregate', + 'appEventAggregate', + args.select, + args.where.id, + args.data, + 'UpdateAppEventAggregateInput', + 'id', + 'appEventAggregatePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'updateAppEventAggregate', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEventAggregate: { + appEventAggregate: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEventAggregate', + 'deleteAppEventAggregate', + 'appEventAggregate', + { + id: args.where.id, + }, + 'DeleteAppEventAggregateInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventAggregate', + fieldName: 'deleteAppEventAggregate', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/appEventType.ts b/sdk/constructive-sdk/src/usage/orm/models/appEventType.ts new file mode 100644 index 0000000000..4781228b4c --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appEventType.ts @@ -0,0 +1,245 @@ +/** + * AppEventType 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 { + AppEventType, + AppEventTypeWithRelations, + AppEventTypeSelect, + AppEventTypeFilter, + AppEventTypeOrderBy, + CreateAppEventTypeInput, + UpdateAppEventTypeInput, + AppEventTypePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppEventTypeModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventTypes: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventType', + 'appEventTypes', + 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, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventTypes', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventType: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppEventType', + 'appEventTypes', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventType', + document, + variables, + transform: (data: { + appEventTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventType: data.appEventTypes?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appEventType: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppEventType', + 'appEventTypes', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppEventTypeFilter', + 'AppEventTypeOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppEventType', + fieldName: 'appEventType', + document, + variables, + transform: (data: { + appEventTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appEventType: data.appEventTypes?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppEventType', + 'createAppEventType', + 'appEventType', + args.select, + args.data, + 'CreateAppEventTypeInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'createAppEventType', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppEventTypePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppEventType', + 'updateAppEventType', + 'appEventType', + args.select, + args.where.id, + args.data, + 'UpdateAppEventTypeInput', + 'id', + 'appEventTypePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'updateAppEventType', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppEventType: { + appEventType: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppEventType', + 'deleteAppEventType', + 'appEventType', + { + id: args.where.id, + }, + 'DeleteAppEventTypeInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppEventType', + fieldName: 'deleteAppEventType', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/appLevel.ts b/sdk/constructive-sdk/src/usage/orm/models/appLevel.ts new file mode 100644 index 0000000000..36a050cba3 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appLevel.ts @@ -0,0 +1,245 @@ +/** + * AppLevel 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 { + AppLevel, + AppLevelWithRelations, + AppLevelSelect, + AppLevelFilter, + AppLevelOrderBy, + CreateAppLevelInput, + UpdateAppLevelInput, + AppLevelPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppLevelModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevels: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevel', + 'appLevels', + 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, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevels', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevel: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppLevel', + 'appLevels', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevel', + document, + variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevel: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevel', + 'appLevels', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppLevelFilter', + 'AppLevelOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevel', + fieldName: 'appLevel', + document, + variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppLevel', + 'createAppLevel', + 'appLevel', + args.select, + args.data, + 'CreateAppLevelInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'createAppLevel', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppLevelPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppLevel', + 'updateAppLevel', + 'appLevel', + args.select, + args.where.id, + args.data, + 'UpdateAppLevelInput', + 'id', + 'appLevelPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'updateAppLevel', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppLevel: { + appLevel: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppLevel', + 'deleteAppLevel', + 'appLevel', + { + id: args.where.id, + }, + 'DeleteAppLevelInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevel', + fieldName: 'deleteAppLevel', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermission.ts b/sdk/constructive-sdk/src/usage/orm/models/appLevelGrant.ts similarity index 53% rename from sdk/constructive-react/src/admin/orm/models/orgPermission.ts rename to sdk/constructive-sdk/src/usage/orm/models/appLevelGrant.ts index e3aded7147..9324be5b70 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgPermission.ts +++ b/sdk/constructive-sdk/src/usage/orm/models/appLevelGrant.ts @@ -1,5 +1,5 @@ /** - * OrgPermission model for ORM client + * AppLevelGrant 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 { - OrgPermission, - OrgPermissionWithRelations, - OrgPermissionSelect, - OrgPermissionFilter, - OrgPermissionOrderBy, - CreateOrgPermissionInput, - UpdateOrgPermissionInput, - OrgPermissionPatch, + AppLevelGrant, + AppLevelGrantWithRelations, + AppLevelGrantSelect, + AppLevelGrantFilter, + AppLevelGrantOrderBy, + CreateAppLevelGrantInput, + UpdateAppLevelGrantInput, + AppLevelGrantPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class OrgPermissionModel { +export class AppLevelGrantModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermissions: ConnectionResult>; + appLevelGrants: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'OrgPermission', - 'orgPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class OrgPermissionModel { before: args?.before, offset: args?.offset, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermissions', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrants', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermission: InferSelectResult | null; + appLevelGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'OrgPermission', - 'orgPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermission', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrant', document, variables, transform: (data: { - orgPermissions?: { - nodes?: InferSelectResult[]; + appLevelGrants?: { + nodes?: InferSelectResult[]; }; }) => ({ - orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + appLevelGrant: data.appLevelGrants?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - orgPermission: InferSelectResult | null; + appLevelGrant: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'OrgPermission', - 'orgPermissions', + 'AppLevelGrant', + 'appLevelGrants', args.select, { where: { @@ -124,91 +124,91 @@ export class OrgPermissionModel { }, first: 1, }, - 'OrgPermissionFilter', - 'OrgPermissionOrderBy', + 'AppLevelGrantFilter', + 'AppLevelGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'OrgPermission', - fieldName: 'orgPermission', + operationName: 'AppLevelGrant', + fieldName: 'appLevelGrant', document, variables, transform: (data: { - orgPermissions?: { - nodes?: InferSelectResult[]; + appLevelGrants?: { + nodes?: InferSelectResult[]; }; }) => ({ - orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + appLevelGrant: data.appLevelGrants?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createOrgPermission: { - orgPermission: InferSelectResult; + createAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'OrgPermission', - 'createOrgPermission', - 'orgPermission', + 'AppLevelGrant', + 'createAppLevelGrant', + 'appLevelGrant', args.select, args.data, - 'CreateOrgPermissionInput', + 'CreateAppLevelGrantInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'createOrgPermission', + operationName: 'AppLevelGrant', + fieldName: 'createAppLevelGrant', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - OrgPermissionPatch + AppLevelGrantPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateOrgPermission: { - orgPermission: InferSelectResult; + updateAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'OrgPermission', - 'updateOrgPermission', - 'orgPermission', + 'AppLevelGrant', + 'updateAppLevelGrant', + 'appLevelGrant', args.select, args.where.id, args.data, - 'UpdateOrgPermissionInput', + 'UpdateAppLevelGrantInput', 'id', - 'orgPermissionPatch', + 'appLevelGrantPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'updateOrgPermission', + operationName: 'AppLevelGrant', + fieldName: 'updateAppLevelGrant', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class OrgPermissionModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteOrgPermission: { - orgPermission: InferSelectResult; + deleteAppLevelGrant: { + appLevelGrant: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'OrgPermission', - 'deleteOrgPermission', - 'orgPermission', + 'AppLevelGrant', + 'deleteAppLevelGrant', + 'appLevelGrant', { id: args.where.id, }, - 'DeleteOrgPermissionInput', + 'DeleteAppLevelGrantInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'OrgPermission', - fieldName: 'deleteOrgPermission', + operationName: 'AppLevelGrant', + fieldName: 'deleteAppLevelGrant', document, variables, }); diff --git a/sdk/constructive-sdk/src/usage/orm/models/appLevelRequirement.ts b/sdk/constructive-sdk/src/usage/orm/models/appLevelRequirement.ts new file mode 100644 index 0000000000..f7634bc482 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/appLevelRequirement.ts @@ -0,0 +1,245 @@ +/** + * AppLevelRequirement 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 { + AppLevelRequirement, + AppLevelRequirementWithRelations, + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy, + CreateAppLevelRequirementInput, + UpdateAppLevelRequirementInput, + AppLevelRequirementPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class AppLevelRequirementModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirements: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + 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, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirements', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirement: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirement', + document, + variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + appLevelRequirement: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'AppLevelRequirement', + 'appLevelRequirements', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'AppLevelRequirement', + fieldName: 'appLevelRequirement', + document, + variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'AppLevelRequirement', + 'createAppLevelRequirement', + 'appLevelRequirement', + args.select, + args.data, + 'CreateAppLevelRequirementInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'createAppLevelRequirement', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + AppLevelRequirementPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'AppLevelRequirement', + 'updateAppLevelRequirement', + 'appLevelRequirement', + args.select, + args.where.id, + args.data, + 'UpdateAppLevelRequirementInput', + 'id', + 'appLevelRequirementPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'updateAppLevelRequirement', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteAppLevelRequirement: { + appLevelRequirement: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'AppLevelRequirement', + 'deleteAppLevelRequirement', + 'appLevelRequirement', + { + id: args.where.id, + }, + 'DeleteAppLevelRequirementInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'AppLevelRequirement', + fieldName: 'deleteAppLevelRequirement', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/billingUsageSummary.ts b/sdk/constructive-sdk/src/usage/orm/models/billingUsageSummary.ts new file mode 100644 index 0000000000..38512d9f62 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/billingUsageSummary.ts @@ -0,0 +1,245 @@ +/** + * BillingUsageSummary 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 { + BillingUsageSummary, + BillingUsageSummaryWithRelations, + BillingUsageSummarySelect, + BillingUsageSummaryFilter, + BillingUsageSummaryOrderBy, + CreateBillingUsageSummaryInput, + UpdateBillingUsageSummaryInput, + BillingUsageSummaryPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class BillingUsageSummaryModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummaries: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + 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, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummaries', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummary: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummary', + document, + variables, + transform: (data: { + billingUsageSummaries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingUsageSummary: data.billingUsageSummaries?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + billingUsageSummary: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'BillingUsageSummary', + 'billingUsageSummaries', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'BillingUsageSummaryFilter', + 'BillingUsageSummaryOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'BillingUsageSummary', + fieldName: 'billingUsageSummary', + document, + variables, + transform: (data: { + billingUsageSummaries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingUsageSummary: data.billingUsageSummaries?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'BillingUsageSummary', + 'createBillingUsageSummary', + 'billingUsageSummary', + args.select, + args.data, + 'CreateBillingUsageSummaryInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'createBillingUsageSummary', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + BillingUsageSummaryPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'BillingUsageSummary', + 'updateBillingUsageSummary', + 'billingUsageSummary', + args.select, + args.where.id, + args.data, + 'UpdateBillingUsageSummaryInput', + 'id', + 'billingUsageSummaryPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'updateBillingUsageSummary', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteBillingUsageSummary: { + billingUsageSummary: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'BillingUsageSummary', + 'deleteBillingUsageSummary', + 'billingUsageSummary', + { + id: args.where.id, + }, + 'DeleteBillingUsageSummaryInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'BillingUsageSummary', + fieldName: 'deleteBillingUsageSummary', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/index.ts b/sdk/constructive-sdk/src/usage/orm/models/index.ts index 049cfdab13..ef279b7afb 100644 --- a/sdk/constructive-sdk/src/usage/orm/models/index.ts +++ b/sdk/constructive-sdk/src/usage/orm/models/index.ts @@ -3,6 +3,13 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { AppAchievementRewardModel } from './appAchievementReward'; +export { AppEventAggregateModel } from './appEventAggregate'; +export { AppEventModel } from './appEvent'; +export { AppEventTypeModel } from './appEventType'; +export { AppLevelModel } from './appLevel'; +export { AppLevelGrantModel } from './appLevelGrant'; +export { AppLevelRequirementModel } from './appLevelRequirement'; export { AppLimitCapModel } from './appLimitCap'; export { AppLimitCapsDefaultModel } from './appLimitCapsDefault'; export { AppLimitModel } from './appLimit'; @@ -13,6 +20,12 @@ export { AppLimitCreditRedemptionModel } from './appLimitCreditRedemption'; export { AppLimitDefaultModel } from './appLimitDefault'; export { AppLimitEventModel } from './appLimitEvent'; export { AppLimitWarningModel } from './appLimitWarning'; +export { BillingUsageSummaryModel } from './billingUsageSummary'; +export { LedgerModel } from './ledger'; +export { MeterModel } from './meter'; +export { MeterCreditModel } from './meterCredit'; +export { MeterDefaultModel } from './meterDefault'; +export { MeterSourceModel } from './meterSource'; export { OrgLimitAggregateModel } from './orgLimitAggregate'; export { OrgLimitCapModel } from './orgLimitCap'; export { OrgLimitCapsDefaultModel } from './orgLimitCapsDefault'; @@ -21,3 +34,10 @@ export { OrgLimitCreditModel } from './orgLimitCredit'; export { OrgLimitDefaultModel } from './orgLimitDefault'; export { OrgLimitEventModel } from './orgLimitEvent'; export { OrgLimitWarningModel } from './orgLimitWarning'; +export { PlanCapModel } from './planCap'; +export { PlanModel } from './plan'; +export { PlanLimitModel } from './planLimit'; +export { PlanMeterLimitModel } from './planMeterLimit'; +export { PlanOverrideModel } from './planOverride'; +export { PlanPricingModel } from './planPricing'; +export { PlanSubscriptionModel } from './planSubscription'; diff --git a/sdk/constructive-sdk/src/usage/orm/models/ledger.ts b/sdk/constructive-sdk/src/usage/orm/models/ledger.ts new file mode 100644 index 0000000000..37a6cfd886 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/ledger.ts @@ -0,0 +1,250 @@ +/** + * Ledger 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 { + Ledger, + LedgerWithRelations, + LedgerSelect, + LedgerFilter, + LedgerOrderBy, + CreateLedgerInput, + UpdateLedgerInput, + LedgerPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class LedgerModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledgers: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Ledger', + 'ledgers', + 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, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledgers', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledger: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Ledger', + 'ledgers', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledger', + document, + variables, + transform: (data: { + ledgers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ledger: data.ledgers?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + ledger: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Ledger', + 'ledgers', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'LedgerFilter', + 'LedgerOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Ledger', + fieldName: 'ledger', + document, + variables, + transform: (data: { + ledgers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ledger: data.ledgers?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Ledger', + 'createLedger', + 'ledger', + args.select, + args.data, + 'CreateLedgerInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'createLedger', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + createdAt: string; + }, + LedgerPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Ledger', + 'updateLedger', + 'ledger', + args.select, + args.where.id, + args.data, + 'UpdateLedgerInput', + 'id', + 'ledgerPatch', + connectionFieldsMap, + { + createdAt: args.where.createdAt, + } + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'updateLedger', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + createdAt: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteLedger: { + ledger: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Ledger', + 'deleteLedger', + 'ledger', + { + id: args.where.id, + createdAt: args.where.createdAt, + }, + 'DeleteLedgerInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Ledger', + fieldName: 'deleteLedger', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/meter.ts b/sdk/constructive-sdk/src/usage/orm/models/meter.ts new file mode 100644 index 0000000000..26718a0190 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/meter.ts @@ -0,0 +1,245 @@ +/** + * Meter 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 { + Meter, + MeterWithRelations, + MeterSelect, + MeterFilter, + MeterOrderBy, + CreateMeterInput, + UpdateMeterInput, + MeterPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meters: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Meter', + 'meters', + 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, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meters', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meter: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Meter', + 'meters', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meter', + document, + variables, + transform: (data: { + meters?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meter: data.meters?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meter: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Meter', + 'meters', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterFilter', + 'MeterOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Meter', + fieldName: 'meter', + document, + variables, + transform: (data: { + meters?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meter: data.meters?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Meter', + 'createMeter', + 'meter', + args.select, + args.data, + 'CreateMeterInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'createMeter', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Meter', + 'updateMeter', + 'meter', + args.select, + args.where.id, + args.data, + 'UpdateMeterInput', + 'id', + 'meterPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'updateMeter', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeter: { + meter: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Meter', + 'deleteMeter', + 'meter', + { + id: args.where.id, + }, + 'DeleteMeterInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Meter', + fieldName: 'deleteMeter', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/meterCredit.ts b/sdk/constructive-sdk/src/usage/orm/models/meterCredit.ts new file mode 100644 index 0000000000..ba2881f8f5 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/meterCredit.ts @@ -0,0 +1,245 @@ +/** + * MeterCredit 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 { + MeterCredit, + MeterCreditWithRelations, + MeterCreditSelect, + MeterCreditFilter, + MeterCreditOrderBy, + CreateMeterCreditInput, + UpdateMeterCreditInput, + MeterCreditPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterCreditModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterCredit', + 'meterCredits', + 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, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterCredit', + 'meterCredits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredit', + document, + variables, + transform: (data: { + meterCredits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterCredit: data.meterCredits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterCredit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterCredit', + 'meterCredits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterCreditFilter', + 'MeterCreditOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterCredit', + fieldName: 'meterCredit', + document, + variables, + transform: (data: { + meterCredits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterCredit: data.meterCredits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterCredit', + 'createMeterCredit', + 'meterCredit', + args.select, + args.data, + 'CreateMeterCreditInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'createMeterCredit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterCreditPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterCredit', + 'updateMeterCredit', + 'meterCredit', + args.select, + args.where.id, + args.data, + 'UpdateMeterCreditInput', + 'id', + 'meterCreditPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'updateMeterCredit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterCredit: { + meterCredit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterCredit', + 'deleteMeterCredit', + 'meterCredit', + { + id: args.where.id, + }, + 'DeleteMeterCreditInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterCredit', + fieldName: 'deleteMeterCredit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/meterDefault.ts b/sdk/constructive-sdk/src/usage/orm/models/meterDefault.ts new file mode 100644 index 0000000000..a5bec1564f --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/meterDefault.ts @@ -0,0 +1,245 @@ +/** + * MeterDefault 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 { + MeterDefault, + MeterDefaultWithRelations, + MeterDefaultSelect, + MeterDefaultFilter, + MeterDefaultOrderBy, + CreateMeterDefaultInput, + UpdateMeterDefaultInput, + MeterDefaultPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterDefaultModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefaults: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterDefault', + 'meterDefaults', + 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, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefaults', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterDefault', + 'meterDefaults', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefault', + document, + variables, + transform: (data: { + meterDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterDefault: data.meterDefaults?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterDefault: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterDefault', + 'meterDefaults', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterDefaultFilter', + 'MeterDefaultOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterDefault', + fieldName: 'meterDefault', + document, + variables, + transform: (data: { + meterDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterDefault: data.meterDefaults?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterDefault', + 'createMeterDefault', + 'meterDefault', + args.select, + args.data, + 'CreateMeterDefaultInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'createMeterDefault', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterDefaultPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterDefault', + 'updateMeterDefault', + 'meterDefault', + args.select, + args.where.id, + args.data, + 'UpdateMeterDefaultInput', + 'id', + 'meterDefaultPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'updateMeterDefault', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterDefault: { + meterDefault: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterDefault', + 'deleteMeterDefault', + 'meterDefault', + { + id: args.where.id, + }, + 'DeleteMeterDefaultInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterDefault', + fieldName: 'deleteMeterDefault', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/meterSource.ts b/sdk/constructive-sdk/src/usage/orm/models/meterSource.ts new file mode 100644 index 0000000000..8e1ddd7b0f --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/meterSource.ts @@ -0,0 +1,245 @@ +/** + * MeterSource 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 { + MeterSource, + MeterSourceWithRelations, + MeterSourceSelect, + MeterSourceFilter, + MeterSourceOrderBy, + CreateMeterSourceInput, + UpdateMeterSourceInput, + MeterSourcePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class MeterSourceModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSources: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterSource', + 'meterSources', + 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, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSources', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSource: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'MeterSource', + 'meterSources', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSource', + document, + variables, + transform: (data: { + meterSources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterSource: data.meterSources?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + meterSource: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'MeterSource', + 'meterSources', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'MeterSourceFilter', + 'MeterSourceOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'MeterSource', + fieldName: 'meterSource', + document, + variables, + transform: (data: { + meterSources?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + meterSource: data.meterSources?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'MeterSource', + 'createMeterSource', + 'meterSource', + args.select, + args.data, + 'CreateMeterSourceInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'createMeterSource', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + MeterSourcePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'MeterSource', + 'updateMeterSource', + 'meterSource', + args.select, + args.where.id, + args.data, + 'UpdateMeterSourceInput', + 'id', + 'meterSourcePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'updateMeterSource', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteMeterSource: { + meterSource: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'MeterSource', + 'deleteMeterSource', + 'meterSource', + { + id: args.where.id, + }, + 'DeleteMeterSourceInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'MeterSource', + fieldName: 'deleteMeterSource', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/plan.ts b/sdk/constructive-sdk/src/usage/orm/models/plan.ts new file mode 100644 index 0000000000..16b199389a --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/plan.ts @@ -0,0 +1,245 @@ +/** + * Plan 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 { + Plan, + PlanWithRelations, + PlanSelect, + PlanFilter, + PlanOrderBy, + CreatePlanInput, + UpdatePlanInput, + PlanPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + plans: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'Plan', + 'plans', + 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, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plans', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + plan: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'Plan', + 'plans', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plan', + document, + variables, + transform: (data: { + plans?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plan: data.plans?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + plan: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'Plan', + 'plans', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanFilter', + 'PlanOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'Plan', + fieldName: 'plan', + document, + variables, + transform: (data: { + plans?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plan: data.plans?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'Plan', + 'createPlan', + 'plan', + args.select, + args.data, + 'CreatePlanInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'createPlan', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'Plan', + 'updatePlan', + 'plan', + args.select, + args.where.id, + args.data, + 'UpdatePlanInput', + 'id', + 'planPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'updatePlan', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlan: { + plan: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'Plan', + 'deletePlan', + 'plan', + { + id: args.where.id, + }, + 'DeletePlanInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'Plan', + fieldName: 'deletePlan', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planCap.ts b/sdk/constructive-sdk/src/usage/orm/models/planCap.ts new file mode 100644 index 0000000000..2c3b676aff --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planCap.ts @@ -0,0 +1,245 @@ +/** + * PlanCap 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 { + PlanCap, + PlanCapWithRelations, + PlanCapSelect, + PlanCapFilter, + PlanCapOrderBy, + CreatePlanCapInput, + UpdatePlanCapInput, + PlanCapPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanCapModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCaps: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanCap', + 'planCaps', + 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, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCaps', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCap: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanCap', + 'planCaps', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCap', + document, + variables, + transform: (data: { + planCaps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planCap: data.planCaps?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planCap: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanCap', + 'planCaps', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanCapFilter', + 'PlanCapOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanCap', + fieldName: 'planCap', + document, + variables, + transform: (data: { + planCaps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planCap: data.planCaps?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanCap', + 'createPlanCap', + 'planCap', + args.select, + args.data, + 'CreatePlanCapInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'createPlanCap', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanCapPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanCap', + 'updatePlanCap', + 'planCap', + args.select, + args.where.id, + args.data, + 'UpdatePlanCapInput', + 'id', + 'planCapPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'updatePlanCap', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanCap: { + planCap: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanCap', + 'deletePlanCap', + 'planCap', + { + id: args.where.id, + }, + 'DeletePlanCapInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanCap', + fieldName: 'deletePlanCap', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planLimit.ts b/sdk/constructive-sdk/src/usage/orm/models/planLimit.ts new file mode 100644 index 0000000000..b35f99c5e2 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planLimit.ts @@ -0,0 +1,245 @@ +/** + * PlanLimit 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 { + PlanLimit, + PlanLimitWithRelations, + PlanLimitSelect, + PlanLimitFilter, + PlanLimitOrderBy, + CreatePlanLimitInput, + UpdatePlanLimitInput, + PlanLimitPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanLimitModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanLimit', + 'planLimits', + 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, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanLimit', + 'planLimits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimit', + document, + variables, + transform: (data: { + planLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planLimit: data.planLimits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanLimit', + 'planLimits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanLimitFilter', + 'PlanLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanLimit', + fieldName: 'planLimit', + document, + variables, + transform: (data: { + planLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planLimit: data.planLimits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanLimit', + 'createPlanLimit', + 'planLimit', + args.select, + args.data, + 'CreatePlanLimitInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'createPlanLimit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanLimitPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanLimit', + 'updatePlanLimit', + 'planLimit', + args.select, + args.where.id, + args.data, + 'UpdatePlanLimitInput', + 'id', + 'planLimitPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'updatePlanLimit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanLimit: { + planLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanLimit', + 'deletePlanLimit', + 'planLimit', + { + id: args.where.id, + }, + 'DeletePlanLimitInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanLimit', + fieldName: 'deletePlanLimit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planMeterLimit.ts b/sdk/constructive-sdk/src/usage/orm/models/planMeterLimit.ts new file mode 100644 index 0000000000..9e2529dafb --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planMeterLimit.ts @@ -0,0 +1,245 @@ +/** + * PlanMeterLimit 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 { + PlanMeterLimit, + PlanMeterLimitWithRelations, + PlanMeterLimitSelect, + PlanMeterLimitFilter, + PlanMeterLimitOrderBy, + CreatePlanMeterLimitInput, + UpdatePlanMeterLimitInput, + PlanMeterLimitPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanMeterLimitModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimits: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanMeterLimit', + 'planMeterLimits', + 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, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimits', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanMeterLimit', + 'planMeterLimits', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimit', + document, + variables, + transform: (data: { + planMeterLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planMeterLimit: data.planMeterLimits?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planMeterLimit: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanMeterLimit', + 'planMeterLimits', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanMeterLimitFilter', + 'PlanMeterLimitOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanMeterLimit', + fieldName: 'planMeterLimit', + document, + variables, + transform: (data: { + planMeterLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planMeterLimit: data.planMeterLimits?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanMeterLimit', + 'createPlanMeterLimit', + 'planMeterLimit', + args.select, + args.data, + 'CreatePlanMeterLimitInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'createPlanMeterLimit', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanMeterLimitPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanMeterLimit', + 'updatePlanMeterLimit', + 'planMeterLimit', + args.select, + args.where.id, + args.data, + 'UpdatePlanMeterLimitInput', + 'id', + 'planMeterLimitPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'updatePlanMeterLimit', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanMeterLimit: { + planMeterLimit: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanMeterLimit', + 'deletePlanMeterLimit', + 'planMeterLimit', + { + id: args.where.id, + }, + 'DeletePlanMeterLimitInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanMeterLimit', + fieldName: 'deletePlanMeterLimit', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planOverride.ts b/sdk/constructive-sdk/src/usage/orm/models/planOverride.ts new file mode 100644 index 0000000000..d8fc2bbf51 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planOverride.ts @@ -0,0 +1,245 @@ +/** + * PlanOverride 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 { + PlanOverride, + PlanOverrideWithRelations, + PlanOverrideSelect, + PlanOverrideFilter, + PlanOverrideOrderBy, + CreatePlanOverrideInput, + UpdatePlanOverrideInput, + PlanOverridePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanOverrideModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverrides: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanOverride', + 'planOverrides', + 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, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverrides', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanOverride', + 'planOverrides', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverride', + document, + variables, + transform: (data: { + planOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planOverride: data.planOverrides?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planOverride: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanOverride', + 'planOverrides', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanOverrideFilter', + 'PlanOverrideOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanOverride', + fieldName: 'planOverride', + document, + variables, + transform: (data: { + planOverrides?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planOverride: data.planOverrides?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanOverride', + 'createPlanOverride', + 'planOverride', + args.select, + args.data, + 'CreatePlanOverrideInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'createPlanOverride', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanOverridePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanOverride', + 'updatePlanOverride', + 'planOverride', + args.select, + args.where.id, + args.data, + 'UpdatePlanOverrideInput', + 'id', + 'planOverridePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'updatePlanOverride', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanOverride: { + planOverride: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanOverride', + 'deletePlanOverride', + 'planOverride', + { + id: args.where.id, + }, + 'DeletePlanOverrideInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanOverride', + fieldName: 'deletePlanOverride', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planPricing.ts b/sdk/constructive-sdk/src/usage/orm/models/planPricing.ts new file mode 100644 index 0000000000..feb19c37e0 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planPricing.ts @@ -0,0 +1,245 @@ +/** + * PlanPricing 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 { + PlanPricing, + PlanPricingWithRelations, + PlanPricingSelect, + PlanPricingFilter, + PlanPricingOrderBy, + CreatePlanPricingInput, + UpdatePlanPricingInput, + PlanPricingPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanPricingModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricings: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanPricing', + 'planPricings', + 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, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricings', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricing: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanPricing', + 'planPricings', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricing', + document, + variables, + transform: (data: { + planPricings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planPricing: data.planPricings?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planPricing: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanPricing', + 'planPricings', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanPricingFilter', + 'PlanPricingOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanPricing', + fieldName: 'planPricing', + document, + variables, + transform: (data: { + planPricings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planPricing: data.planPricings?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanPricing', + 'createPlanPricing', + 'planPricing', + args.select, + args.data, + 'CreatePlanPricingInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'createPlanPricing', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanPricingPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanPricing', + 'updatePlanPricing', + 'planPricing', + args.select, + args.where.id, + args.data, + 'UpdatePlanPricingInput', + 'id', + 'planPricingPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'updatePlanPricing', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanPricing: { + planPricing: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanPricing', + 'deletePlanPricing', + 'planPricing', + { + id: args.where.id, + }, + 'DeletePlanPricingInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanPricing', + fieldName: 'deletePlanPricing', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/models/planSubscription.ts b/sdk/constructive-sdk/src/usage/orm/models/planSubscription.ts new file mode 100644 index 0000000000..8622e5b6ad --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/models/planSubscription.ts @@ -0,0 +1,245 @@ +/** + * PlanSubscription 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 { + PlanSubscription, + PlanSubscriptionWithRelations, + PlanSubscriptionSelect, + PlanSubscriptionFilter, + PlanSubscriptionOrderBy, + CreatePlanSubscriptionInput, + UpdatePlanSubscriptionInput, + PlanSubscriptionPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class PlanSubscriptionModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscriptions: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanSubscription', + 'planSubscriptions', + 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, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscriptions', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscription: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'PlanSubscription', + 'planSubscriptions', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscription', + document, + variables, + transform: (data: { + planSubscriptions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planSubscription: data.planSubscriptions?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + planSubscription: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'PlanSubscription', + 'planSubscriptions', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'PlanSubscriptionFilter', + 'PlanSubscriptionOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'PlanSubscription', + fieldName: 'planSubscription', + document, + variables, + transform: (data: { + planSubscriptions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + planSubscription: data.planSubscriptions?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createPlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'PlanSubscription', + 'createPlanSubscription', + 'planSubscription', + args.select, + args.data, + 'CreatePlanSubscriptionInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'createPlanSubscription', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + PlanSubscriptionPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updatePlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'PlanSubscription', + 'updatePlanSubscription', + 'planSubscription', + args.select, + args.where.id, + args.data, + 'UpdatePlanSubscriptionInput', + 'id', + 'planSubscriptionPatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'updatePlanSubscription', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deletePlanSubscription: { + planSubscription: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'PlanSubscription', + 'deletePlanSubscription', + 'planSubscription', + { + id: args.where.id, + }, + 'DeletePlanSubscriptionInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'PlanSubscription', + fieldName: 'deletePlanSubscription', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/usage/orm/mutation/index.ts b/sdk/constructive-sdk/src/usage/orm/mutation/index.ts index 176d63791b..d573aa713c 100644 --- a/sdk/constructive-sdk/src/usage/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/usage/orm/mutation/index.ts @@ -7,23 +7,44 @@ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { + GrantAchievementInput, ProvisionBucketInput, + RecomputeCapabilitiesInput, + RevokeAchievementInput, SeedAppLimitCapsDefaultsInput, SeedAppLimitDefaultsInput, + SeedMeterDefaultsInput, SeedOrgLimitCapsDefaultsInput, SeedOrgLimitDefaultsInput, + SeedPlanInput, + SeedTrustLadderInput, + GrantAchievementPayload, ProvisionBucketPayload, + RecomputeCapabilitiesPayload, + RevokeAchievementPayload, SeedAppLimitCapsDefaultsPayload, SeedAppLimitDefaultsPayload, + SeedMeterDefaultsPayload, SeedOrgLimitCapsDefaultsPayload, SeedOrgLimitDefaultsPayload, + SeedPlanPayload, + SeedTrustLadderPayload, + GrantAchievementPayloadSelect, ProvisionBucketPayloadSelect, + RecomputeCapabilitiesPayloadSelect, + RevokeAchievementPayloadSelect, SeedAppLimitCapsDefaultsPayloadSelect, SeedAppLimitDefaultsPayloadSelect, + SeedMeterDefaultsPayloadSelect, SeedOrgLimitCapsDefaultsPayloadSelect, SeedOrgLimitDefaultsPayloadSelect, + SeedPlanPayloadSelect, + SeedTrustLadderPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface GrantAchievementVariables { + input: GrantAchievementInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -34,20 +55,64 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface RecomputeCapabilitiesVariables { + input: RecomputeCapabilitiesInput; +} +export interface RevokeAchievementVariables { + input: RevokeAchievementInput; +} export interface SeedAppLimitCapsDefaultsVariables { input: SeedAppLimitCapsDefaultsInput; } export interface SeedAppLimitDefaultsVariables { input: SeedAppLimitDefaultsInput; } +export interface SeedMeterDefaultsVariables { + input: SeedMeterDefaultsInput; +} export interface SeedOrgLimitCapsDefaultsVariables { input: SeedOrgLimitCapsDefaultsInput; } export interface SeedOrgLimitDefaultsVariables { input: SeedOrgLimitDefaultsInput; } +export interface SeedPlanVariables { + input: SeedPlanInput; +} +export interface SeedTrustLadderVariables { + input: SeedTrustLadderInput; +} export function createMutationOperations(client: OrmClient) { return { + grantAchievement: ( + args: GrantAchievementVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + grantAchievement: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'GrantAchievement', + fieldName: 'grantAchievement', + ...buildCustomDocument( + 'mutation', + 'GrantAchievement', + 'grantAchievement', + options.select, + args, + [ + { + name: 'input', + type: 'GrantAchievementInput!', + }, + ], + connectionFieldsMap, + 'GrantAchievementPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -77,6 +142,64 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + recomputeCapabilities: ( + args: RecomputeCapabilitiesVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + recomputeCapabilities: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RecomputeCapabilities', + fieldName: 'recomputeCapabilities', + ...buildCustomDocument( + 'mutation', + 'RecomputeCapabilities', + 'recomputeCapabilities', + options.select, + args, + [ + { + name: 'input', + type: 'RecomputeCapabilitiesInput!', + }, + ], + connectionFieldsMap, + 'RecomputeCapabilitiesPayload' + ), + }), + revokeAchievement: ( + args: RevokeAchievementVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeAchievement: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeAchievement', + fieldName: 'revokeAchievement', + ...buildCustomDocument( + 'mutation', + 'RevokeAchievement', + 'revokeAchievement', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeAchievementInput!', + }, + ], + connectionFieldsMap, + 'RevokeAchievementPayload' + ), + }), seedAppLimitCapsDefaults: ( args: SeedAppLimitCapsDefaultsVariables, options: { @@ -135,6 +258,35 @@ export function createMutationOperations(client: OrmClient) { 'SeedAppLimitDefaultsPayload' ), }), + seedMeterDefaults: ( + args: SeedMeterDefaultsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedMeterDefaults: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedMeterDefaults', + fieldName: 'seedMeterDefaults', + ...buildCustomDocument( + 'mutation', + 'SeedMeterDefaults', + 'seedMeterDefaults', + options.select, + args, + [ + { + name: 'input', + type: 'SeedMeterDefaultsInput!', + }, + ], + connectionFieldsMap, + 'SeedMeterDefaultsPayload' + ), + }), seedOrgLimitCapsDefaults: ( args: SeedOrgLimitCapsDefaultsVariables, options: { @@ -193,5 +345,63 @@ export function createMutationOperations(client: OrmClient) { 'SeedOrgLimitDefaultsPayload' ), }), + seedPlan: ( + args: SeedPlanVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedPlan: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedPlan', + fieldName: 'seedPlan', + ...buildCustomDocument( + 'mutation', + 'SeedPlan', + 'seedPlan', + options.select, + args, + [ + { + name: 'input', + type: 'SeedPlanInput!', + }, + ], + connectionFieldsMap, + 'SeedPlanPayload' + ), + }), + seedTrustLadder: ( + args: SeedTrustLadderVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + seedTrustLadder: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SeedTrustLadder', + fieldName: 'seedTrustLadder', + ...buildCustomDocument( + 'mutation', + 'SeedTrustLadder', + 'seedTrustLadder', + options.select, + args, + [ + { + name: 'input', + type: 'SeedTrustLadderInput!', + }, + ], + connectionFieldsMap, + 'SeedTrustLadderPayload' + ), + }), }; } diff --git a/sdk/constructive-sdk/src/usage/orm/query/index.ts b/sdk/constructive-sdk/src/usage/orm/query/index.ts new file mode 100644 index 0000000000..d620b32b26 --- /dev/null +++ b/sdk/constructive-sdk/src/usage/orm/query/index.ts @@ -0,0 +1,166 @@ +/** + * Custom query operations + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { QueryBuilder, buildCustomDocument } from '../query-builder'; +import type { InferSelectResult, StrictSelect } from '../select-types'; +import type { AppLevelRequirementConnection } from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export interface EventsAchievedVariables { + level?: string; + roleId?: string; +} +export interface EventsRequiredVariables { + /** Read all values in the set after (below) this cursor. */ + after?: string; + /** Only read the first `n` values of the set. */ + first?: number; + level?: string; + /** + * Skip the first `n` values from our `after` cursor, an alternative to cursor + * based pagination. May not be used with `last`. + */ + offset?: number; + roleId?: string; +} +export function createQueryOperations(client: OrmClient) { + return { + captureAppLimitDefaults: (options?: { select?: Record }) => + new QueryBuilder<{ + captureAppLimitDefaults: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureAppLimitDefaults', + fieldName: 'captureAppLimitDefaults', + ...buildCustomDocument( + 'query', + 'CaptureAppLimitDefaults', + 'captureAppLimitDefaults', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + captureOrgLimitDefaults: (options?: { select?: Record }) => + new QueryBuilder<{ + captureOrgLimitDefaults: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureOrgLimitDefaults', + fieldName: 'captureOrgLimitDefaults', + ...buildCustomDocument( + 'query', + 'CaptureOrgLimitDefaults', + 'captureOrgLimitDefaults', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + captureTrustLadder: (options?: { select?: Record }) => + new QueryBuilder<{ + captureTrustLadder: unknown | null; + }>({ + client, + operation: 'query', + operationName: 'CaptureTrustLadder', + fieldName: 'captureTrustLadder', + ...buildCustomDocument( + 'query', + 'CaptureTrustLadder', + 'captureTrustLadder', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), + eventsAchieved: ( + args: EventsAchievedVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + eventsAchieved: boolean | null; + }>({ + client, + operation: 'query', + operationName: 'EventsAchieved', + fieldName: 'eventsAchieved', + ...buildCustomDocument( + 'query', + 'EventsAchieved', + 'eventsAchieved', + options?.select, + args, + [ + { + name: 'level', + type: 'String', + }, + { + name: 'roleId', + type: 'UUID', + }, + ], + connectionFieldsMap, + undefined + ), + }), + eventsRequired: ( + args: EventsRequiredVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + eventsRequired: AppLevelRequirementConnection | null; + }>({ + client, + operation: 'query', + operationName: 'EventsRequired', + fieldName: 'eventsRequired', + ...buildCustomDocument( + 'query', + 'EventsRequired', + 'eventsRequired', + options?.select, + args, + [ + { + name: 'after', + type: 'Cursor', + }, + { + name: 'first', + type: 'Int', + }, + { + name: 'level', + type: 'String', + }, + { + name: 'offset', + type: 'Int', + }, + { + name: 'roleId', + type: 'UUID', + }, + ], + connectionFieldsMap, + undefined + ), + }), + }; +}